Update
This commit is contained in:
20
lua/plugins/default/blink.lua
Normal file
20
lua/plugins/default/blink.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
version = "*",
|
||||
opts = {
|
||||
-- sources = {
|
||||
-- compat = { "avante_commands", "avante_mentions", "avante_files" },
|
||||
-- },
|
||||
keymap = {
|
||||
["<C-j>"] = { "select_next", "fallback" },
|
||||
["<C-k>"] = { "select_prev", "fallback" },
|
||||
},
|
||||
completion = {
|
||||
menu = { border = "single" },
|
||||
documentation = { window = { border = "single" } },
|
||||
},
|
||||
signature = { window = { border = "single" } },
|
||||
},
|
||||
},
|
||||
}
|
||||
11
lua/plugins/default/conform.lua
Normal file
11
lua/plugins/default/conform.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
opts = {
|
||||
formatters_by_ft = {
|
||||
["json"] = { "jq" },
|
||||
["jsonc"] = { "jq" },
|
||||
["tex"] = { "latexindent" },
|
||||
["toml"] = { "taplo "},
|
||||
}
|
||||
}
|
||||
}
|
||||
15
lua/plugins/default/copilot.lua
Normal file
15
lua/plugins/default/copilot.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
-- {
|
||||
-- "zbirenbaum/copilot.lua",
|
||||
-- opts = {
|
||||
-- copilot_model = "claude-3.7-sonnet",
|
||||
-- suggestion = {
|
||||
-- keymap = {
|
||||
-- accept = "<D-l>",
|
||||
-- next = "<D-]>",
|
||||
-- prev = "<D-[>",
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
24
lua/plugins/default/lspconfig.lua
Normal file
24
lua/plugins/default/lspconfig.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
optional = true,
|
||||
opts = {
|
||||
servers = {
|
||||
texlab = {
|
||||
keys = {
|
||||
{ "<Leader>K", "<plug>(vimtex-doc-package)", desc = "Vimtex Docs", silent = true },
|
||||
},
|
||||
settings = {
|
||||
texlab = {
|
||||
inlayHints = {
|
||||
labelDefinitions = false,
|
||||
labelReferences = false,
|
||||
},
|
||||
diagnostics = { ignoredPatterns = { "^Overfull", "^Underfull" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
70
lua/plugins/default/luasnip.lua
Normal file
70
lua/plugins/default/luasnip.lua
Normal file
@@ -0,0 +1,70 @@
|
||||
return {
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
config = function()
|
||||
require("luasnip").config.set_config({
|
||||
enable_autosnippets = true,
|
||||
store_selection_keys = "`",
|
||||
})
|
||||
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/LuaSnip" })
|
||||
local auto_expand = require("luasnip").expand_auto
|
||||
require("luasnip").expand_auto = function(...)
|
||||
vim.o.undolevels = vim.o.undolevels
|
||||
auto_expand(...)
|
||||
end
|
||||
-- local types = require("luasnip.util.types")
|
||||
-- require("luasnip").config.setup({
|
||||
-- ext_opts = {
|
||||
-- [types.choiceNode] = {
|
||||
-- active = {
|
||||
-- virt_text = { { "●", "GruvboxOrange" } },
|
||||
-- },
|
||||
-- },
|
||||
-- [types.insertNode] = {
|
||||
-- active = {
|
||||
-- virt_text = { { "●", "GruvboxBlue" } },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- })
|
||||
end,
|
||||
keys = function()
|
||||
return {
|
||||
{
|
||||
"fj",
|
||||
function()
|
||||
return require("luasnip").expand_or_locally_jumpable() and "<Plug>luasnip-jump-next"
|
||||
-- or "<c-\\><c-n>:call searchpair('[([{<|]', '', '[)\\]}>|]', 'W')<cr>a"
|
||||
end,
|
||||
expr = true,
|
||||
silent = true,
|
||||
mode = "i",
|
||||
},
|
||||
{
|
||||
"fj",
|
||||
function()
|
||||
return require("luasnip").jump(1)
|
||||
end,
|
||||
mode = "s",
|
||||
},
|
||||
{
|
||||
"fk",
|
||||
function()
|
||||
require("luasnip").jump(-1)
|
||||
end,
|
||||
mode = { "i", "s" },
|
||||
},
|
||||
{
|
||||
"<c-h>",
|
||||
"<Plug>luasnip-next-choice",
|
||||
mode = { "i", "s" },
|
||||
},
|
||||
{
|
||||
"<c-p>",
|
||||
"<Plug>luasnip-prev-choice",
|
||||
mode = { "i", "s" },
|
||||
},
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
22
lua/plugins/default/neotree.lua
Normal file
22
lua/plugins/default/neotree.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
lazy = true,
|
||||
opts = {
|
||||
filesystem = {
|
||||
window = {
|
||||
mappings = {
|
||||
["o"] = "system_open",
|
||||
},
|
||||
},
|
||||
commands = {
|
||||
system_open = function(state)
|
||||
local node = state.tree:get_node()
|
||||
local path = node:get_id()
|
||||
vim.api.nvim_command("silent !open -g " .. path)
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
59
lua/plugins/default/tree-sitter.lua
Normal file
59
lua/plugins/default/tree-sitter.lua
Normal file
@@ -0,0 +1,59 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function()
|
||||
return {
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = { "latex" },
|
||||
additional_vim_regex_highlighting = { "latex", "markdown" },
|
||||
},
|
||||
indent = { enable = true, disable = { "python" } },
|
||||
context_commentstring = { enable = true, enable_autocmd = false },
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"c",
|
||||
"cpp",
|
||||
"html",
|
||||
"json",
|
||||
"lua",
|
||||
"luap",
|
||||
"markdown",
|
||||
"make",
|
||||
"markdown_inline",
|
||||
"scala",
|
||||
"python",
|
||||
"query",
|
||||
"toml",
|
||||
"regex",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<cr>",
|
||||
node_incremental = "<cr>",
|
||||
scope_incremental = "\\",
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
rainbow = {
|
||||
enable = true,
|
||||
-- list of languages you want to disable the plugin for
|
||||
disable = { "jsx", "cpp" },
|
||||
-- Which query to use for finding delimiters
|
||||
query = "rainbow-parens",
|
||||
-- Highlight the entire buffer all at once
|
||||
},
|
||||
|
||||
keys = function()
|
||||
return {
|
||||
{ "<cr>", desc = "Increment selection" },
|
||||
{ "<bs>", desc = "Decrement selection", mode = "x" },
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
61
lua/plugins/default/treesitter.lua
Normal file
61
lua/plugins/default/treesitter.lua
Normal file
@@ -0,0 +1,61 @@
|
||||
return {
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function()
|
||||
return {
|
||||
highlight = {
|
||||
enable = true,
|
||||
disable = { "latex" },
|
||||
-- additional_vim_regex_highlighting = { "markdown" },
|
||||
},
|
||||
-- ignore_install = { "latex" },
|
||||
indent = { enable = true, disable = { "python" } },
|
||||
context_commentstring = { enable = true, enable_autocmd = false },
|
||||
ensure_installed = {
|
||||
"latex",
|
||||
"bash",
|
||||
"c",
|
||||
"cpp",
|
||||
"html",
|
||||
"json",
|
||||
"lua",
|
||||
"luap",
|
||||
"markdown",
|
||||
"make",
|
||||
"markdown_inline",
|
||||
"scala",
|
||||
"python",
|
||||
"query",
|
||||
"toml",
|
||||
"regex",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "<cr>",
|
||||
node_incremental = "<cr>",
|
||||
scope_incremental = "\\",
|
||||
node_decremental = "<bs>",
|
||||
},
|
||||
},
|
||||
}
|
||||
end,
|
||||
rainbow = {
|
||||
enable = true,
|
||||
-- list of languages you want to disable the plugin for
|
||||
disable = { "jsx", "cpp" },
|
||||
-- Which query to use for finding delimiters
|
||||
query = "rainbow-parens",
|
||||
-- Highlight the entire buffer all at once
|
||||
},
|
||||
|
||||
keys = function()
|
||||
return {
|
||||
{ "<cr>", desc = "Increment selection" },
|
||||
{ "<bs>", desc = "Decrement selection", mode = "x" },
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user