Nvim revamp
This commit is contained in:
@@ -10,7 +10,6 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
vim.opt.rtp:prepend(lazypath)
|
vim.opt.rtp:prepend(lazypath)
|
||||||
--require("lazy").setup(pluginTable)
|
|
||||||
require("lazy").setup({
|
require("lazy").setup({
|
||||||
spec = {
|
spec = {
|
||||||
-- import your plugins
|
-- import your plugins
|
||||||
@@ -23,27 +22,25 @@ require("lazy").setup({
|
|||||||
checker = { enabled = true },
|
checker = { enabled = true },
|
||||||
})
|
})
|
||||||
|
|
||||||
if vim.fn.has('persistent_undo') then
|
if vim.fn.has("persistent_undo") then
|
||||||
local target_path = vim.fn.stdpath('data') .. '/.nvimundodir'
|
local target_path = vim.fn.stdpath("data") .. "/.nvimundodir"
|
||||||
if not vim.fn.isdirectory(target_path) then
|
if not vim.fn.isdirectory(target_path) then
|
||||||
vim.fn.mkpath(target_path, { mode = 0700 }) -- Use mkpath for parent creation
|
vim.fn.mkpath(target_path, { mode = 0700 }) -- Use mkpath for parent creation
|
||||||
end
|
end
|
||||||
|
|
||||||
vim.opt.undodir = target_path
|
vim.opt.undodir = target_path
|
||||||
vim.api.nvim_set_option('undofile', true)
|
vim.api.nvim_set_option("undofile", true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd("StdinReadPre", {
|
vim.api.nvim_create_autocmd("StdinReadPre", {
|
||||||
pattern = "*",
|
pattern = "*",
|
||||||
command = "let s:std_in=1"
|
command = "let s:std_in=1",
|
||||||
})
|
})
|
||||||
--vim.api.nvim_create_autocmd("VimEnter", {
|
--vim.api.nvim_create_autocmd("VimEnter", {
|
||||||
-- pattern = "*",
|
-- pattern = "*",
|
||||||
-- command = "if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | execute 'Neotree current' | execute 'cd '.argv()[0] | endif"
|
-- command = "if argc() == 1 && isdirectory(argv()[0]) && !exists('s:std_in') | execute 'Neotree current' | execute 'cd '.argv()[0] | endif"
|
||||||
--})
|
--})
|
||||||
|
|
||||||
|
|
||||||
vim.g.airline_powerline_fonts = 1
|
vim.g.airline_powerline_fonts = 1
|
||||||
|
|
||||||
--vim.g.coq_settings = {'clients.tabnine.enabled' = false}
|
--vim.g.coq_settings = {'clients.tabnine.enabled' = false}
|
||||||
@@ -52,11 +49,11 @@ vim.g.airline_powerline_fonts = 1
|
|||||||
--vim.g.syntastic_python_checkers = ['bandit', 'python']
|
--vim.g.syntastic_python_checkers = ['bandit', 'python']
|
||||||
|
|
||||||
--" Keybinds
|
--" Keybinds
|
||||||
vim.keymap.set('n', '<F2>', ':Neotree toggle<CR>', { noremap = true })
|
vim.keymap.set("n", "<F2>", ":Neotree toggle<CR>", { noremap = true })
|
||||||
vim.keymap.set('n', '<F3>', function() vim.lsp.buf.code_action() end, { noremap = true })
|
vim.keymap.set("n", "<F3>", function() vim.lsp.buf.code_action() end, { noremap = true })
|
||||||
vim.keymap.set('n', '<F4>', ':ZenMode<CR>', { noremap = true })
|
vim.keymap.set("n", "<F4>", ":ZenMode<CR>", { noremap = true })
|
||||||
vim.keymap.set('n', '<F5>', function() vim.lsp.buf.format() end, { noremap = true })
|
vim.keymap.set("n", "<F5>", function() vim.lsp.buf.format() end, { noremap = true })
|
||||||
vim.keymap.set('n', '<F6>', ':MundoToggle<CR>', { noremap = true })
|
vim.keymap.set("n", "<F6>", ":MundoToggle<CR>", { noremap = true })
|
||||||
|
|
||||||
--nnoremap <F4> :Goyo<CR>
|
--nnoremap <F4> :Goyo<CR>
|
||||||
--nnoremap <F5> :MundoToggle<CR>
|
--nnoremap <F5> :MundoToggle<CR>
|
||||||
@@ -72,7 +69,7 @@ local dap = require("dap")
|
|||||||
dap.adapters.gdb = {
|
dap.adapters.gdb = {
|
||||||
type = "executable",
|
type = "executable",
|
||||||
command = "gdb",
|
command = "gdb",
|
||||||
args = { "-i", "dap" }
|
args = { "-i", "dap" },
|
||||||
}
|
}
|
||||||
|
|
||||||
dap.configurations.cpp = {
|
dap.configurations.cpp = {
|
||||||
@@ -81,7 +78,7 @@ dap.configurations.cpp = {
|
|||||||
type = "gdb",
|
type = "gdb",
|
||||||
request = "launch",
|
request = "launch",
|
||||||
program = function()
|
program = function()
|
||||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file")
|
||||||
end,
|
end,
|
||||||
cwd = "${workspaceFolder}",
|
cwd = "${workspaceFolder}",
|
||||||
stopAtBeginningOfMainSubprogram = false,
|
stopAtBeginningOfMainSubprogram = false,
|
||||||
@@ -90,33 +87,31 @@ dap.configurations.cpp = {
|
|||||||
-- Mappings.
|
-- Mappings.
|
||||||
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
|
||||||
local opts = { noremap = true, silent = true }
|
local opts = { noremap = true, silent = true }
|
||||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, opts)
|
vim.keymap.set("n", "<space>e", vim.diagnostic.open_float, opts)
|
||||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, opts)
|
vim.keymap.set("n", "<space>q", vim.diagnostic.setloclist, opts)
|
||||||
|
|
||||||
-- Use an on_attach function to only map the following keys
|
-- Use an on_attach function to only map the following keys
|
||||||
-- after the language server attaches to the current buffer
|
-- after the language server attaches to the current buffer
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
-- Enable completion triggered by <c-x><c-o>
|
-- Enable completion triggered by <c-x><c-o>
|
||||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
vim.api.nvim_buf_set_option(bufnr, "omnifunc", "v:lua.vim.lsp.omnifunc")
|
||||||
|
|
||||||
-- Mappings.
|
-- Mappings.
|
||||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||||
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
local bufopts = { noremap = true, silent = true, buffer = bufnr }
|
||||||
vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, bufopts)
|
vim.keymap.set("n", "gD", vim.lsp.buf.declaration, bufopts)
|
||||||
vim.keymap.set('n', 'gd', vim.lsp.buf.definition, bufopts)
|
vim.keymap.set("n", "gd", vim.lsp.buf.definition, bufopts)
|
||||||
vim.keymap.set('n', 'K', vim.lsp.buf.hover, bufopts)
|
vim.keymap.set("n", "K", vim.lsp.buf.hover, bufopts)
|
||||||
vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, bufopts)
|
vim.keymap.set("n", "gi", vim.lsp.buf.implementation, bufopts)
|
||||||
vim.keymap.set('n', '<C-k>', vim.lsp.buf.signature_help, bufopts)
|
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, bufopts)
|
||||||
vim.keymap.set('n', '<space>wa', vim.lsp.buf.add_workspace_folder, bufopts)
|
vim.keymap.set("n", "<space>wa", vim.lsp.buf.add_workspace_folder, bufopts)
|
||||||
vim.keymap.set('n', '<space>wr', vim.lsp.buf.remove_workspace_folder, bufopts)
|
vim.keymap.set("n", "<space>wr", vim.lsp.buf.remove_workspace_folder, bufopts)
|
||||||
vim.keymap.set('n', '<space>wl', function()
|
vim.keymap.set("n", "<space>wl", function() print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, bufopts)
|
||||||
print(vim.inspect(vim.lsp.buf.list_workspace_folders()))
|
vim.keymap.set("n", "<space>D", vim.lsp.buf.type_definition, bufopts)
|
||||||
end, bufopts)
|
vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, bufopts)
|
||||||
vim.keymap.set('n', '<space>D', vim.lsp.buf.type_definition, bufopts)
|
vim.keymap.set("n", "<space>ca", vim.lsp.buf.code_action, bufopts)
|
||||||
vim.keymap.set('n', '<space>rn', vim.lsp.buf.rename, bufopts)
|
vim.keymap.set("n", "gr", vim.lsp.buf.references, bufopts)
|
||||||
vim.keymap.set('n', '<space>ca', vim.lsp.buf.code_action, bufopts)
|
vim.keymap.set("n", "<space>f", function() vim.lsp.buf.format({ async = true }) end, bufopts)
|
||||||
vim.keymap.set('n', 'gr', vim.lsp.buf.references, bufopts)
|
|
||||||
vim.keymap.set('n', '<space>f', function() vim.lsp.buf.format { async = true } end, bufopts)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local lsp_flags = {
|
local lsp_flags = {
|
||||||
@@ -129,8 +124,8 @@ local lsp_flags = {
|
|||||||
|
|
||||||
--lsp.pyright.setup(coq.lsp_ensure_capabilities({}))
|
--lsp.pyright.setup(coq.lsp_ensure_capabilities({}))
|
||||||
--lsp.ccls.setup(coq.lsp_ensure_capabilities({}))
|
--lsp.ccls.setup(coq.lsp_ensure_capabilities({}))
|
||||||
vim.lsp.config("ltex",{ settings = { ltex = { language = "pl-PL" } } })
|
vim.lsp.config("ltex", { settings = { ltex = { language = "pl-PL" } } })
|
||||||
vim.lsp.config("rust_analyzer",{
|
vim.lsp.config("rust_analyzer", {
|
||||||
settings = {
|
settings = {
|
||||||
["rust-analyzer"] = {
|
["rust-analyzer"] = {
|
||||||
imports = {
|
imports = {
|
||||||
@@ -145,18 +140,16 @@ vim.lsp.config("rust_analyzer",{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
procMacro = {
|
procMacro = {
|
||||||
enable = true
|
enable = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
require("dapui").setup()
|
require("dapui").setup()
|
||||||
require("catppuccin").setup({ flavour = "macchiato" })
|
require("catppuccin").setup({ flavour = "macchiato" })
|
||||||
require('colorizer').setup()
|
require("colorizer").setup()
|
||||||
require("circles").setup()
|
require("circles").setup()
|
||||||
vim.cmd.colorscheme "catppuccin"
|
vim.cmd.colorscheme("catppuccin")
|
||||||
-- committia_open_only_vim_starting
|
-- committia_open_only_vim_starting
|
||||||
vim.g.committia_open_only_vim_starting = 1
|
vim.g.committia_open_only_vim_starting = 1
|
||||||
|
|
||||||
--autocmd VimEnter * execute 'COQnow -s'
|
|
||||||
|
|||||||
@@ -1,38 +1,43 @@
|
|||||||
{
|
{
|
||||||
|
"avante.nvim": { "branch": "main", "commit": "fde9a524457d17661618678f085649d4e8d3fd6f" },
|
||||||
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
|
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
|
||||||
|
"blink.compat": { "branch": "main", "commit": "1454f14a8d855a578ceeba77c62538fa1459a67c" },
|
||||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||||
"catppuccin": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" },
|
"catppuccin": { "branch": "main", "commit": "beaf41a30c26fd7d6c386d383155cbd65dd554cd" },
|
||||||
"circles.nvim": { "branch": "main", "commit": "01b9ac1dc6c181f6982eddd57deb1fc7f92d7a70" },
|
"circles.nvim": { "branch": "main", "commit": "01b9ac1dc6c181f6982eddd57deb1fc7f92d7a70" },
|
||||||
"codeium.vim": { "branch": "main", "commit": "a8d47ec54fe82df920b2545559f767003e8a7f8d" },
|
|
||||||
"committia.vim": { "branch": "master", "commit": "c8c0f255e8090ed90dd9d5dd2e8672994f8e3671" },
|
"committia.vim": { "branch": "master", "commit": "c8c0f255e8090ed90dd9d5dd2e8672994f8e3671" },
|
||||||
"ctrlp.vim": { "branch": "master", "commit": "86872f021c4e245e3c583054fda82fb820a2faee" },
|
"ctrlp.vim": { "branch": "master", "commit": "86872f021c4e245e3c583054fda82fb820a2faee" },
|
||||||
"firenvim": { "branch": "master", "commit": "a18ef908ac06b52ad9333b70e3e630b0a56ecb3d" },
|
"firenvim": { "branch": "master", "commit": "a18ef908ac06b52ad9333b70e3e630b0a56ecb3d" },
|
||||||
"formatter.nvim": { "branch": "master", "commit": "b9d7f853da1197b83b8edb4cc4952f7ad3a42e41" },
|
"formatter.nvim": { "branch": "master", "commit": "b9d7f853da1197b83b8edb4cc4952f7ad3a42e41" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||||
"git-messenger.vim": { "branch": "master", "commit": "fd124457378a295a5d1036af4954b35d6b807385" },
|
"git-messenger.vim": { "branch": "master", "commit": "fd124457378a295a5d1036af4954b35d6b807385" },
|
||||||
"image.nvim": { "branch": "master", "commit": "446a8a5cc7a3eae3185ee0c697732c32a5547a0b" },
|
"image.nvim": { "branch": "master", "commit": "446a8a5cc7a3eae3185ee0c697732c32a5547a0b" },
|
||||||
|
"img-clip.nvim": { "branch": "main", "commit": "b6ddfb97b5600d99afe3452d707444afda658aca" },
|
||||||
"indentLine.vim": { "branch": "master", "commit": "988ba5557a9d1ff49d27c22a6b5f405075b3cebb" },
|
"indentLine.vim": { "branch": "master", "commit": "988ba5557a9d1ff49d27c22a6b5f405075b3cebb" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "bf9e7205192015dc48727744f21e09ac986664f9" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "c953789db7fd28eafe5eb5659846d34b5024b3cc" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
|
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||||
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
|
||||||
"neoconf.nvim": { "branch": "main", "commit": "a839efc800b258e953a916e5ff8fb7ed316f75b0" },
|
"neoconf.nvim": { "branch": "main", "commit": "a659e840dbfe1dd6eb0f7b67dc367d0080f9da8f" },
|
||||||
"nerdcommenter": { "branch": "master", "commit": "a462bbda1e26f44fb3d3eb9d9d1c6a07aa98e665" },
|
"nerdcommenter": { "branch": "master", "commit": "a462bbda1e26f44fb3d3eb9d9d1c6a07aa98e665" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
|
||||||
"nvim-colorizer.lua": { "branch": "master", "commit": "81e676d3203c9eb6e4c0ccf1eba1679296ef923f" },
|
"nvim-colorizer.lua": { "branch": "master", "commit": "338409dd8a6ed74767bad3eb5269f1b903ffb3cf" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "5860c7c501eb428d3137ee22c522828d20cca0b3" },
|
"nvim-dap": { "branch": "master", "commit": "e47878dcf1ccc30136b30d19ab19fe76946d61cd" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
|
||||||
"nvim-lightbulb": { "branch": "master", "commit": "aa3a8b0f4305b25cfe368f6c9be9923a7c9d0805" },
|
"nvim-lightbulb": { "branch": "master", "commit": "aa3a8b0f4305b25cfe368f6c9be9923a7c9d0805" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "c4f67bf85b01a57e3c130352c0a0e453ab8cd5b9" },
|
"nvim-lspconfig": { "branch": "master", "commit": "3f58aeca0c6ece8a9fb8782ea3fcb6024f285be3" },
|
||||||
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
|
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||||
|
"render-markdown.nvim": { "branch": "main", "commit": "48934b49a2363b49ae1d698ed4cb30fb79d7efe8" },
|
||||||
|
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
|
||||||
"syntastic": { "branch": "master", "commit": "8d5e37c29cf5952fbf300b9230bffe424c61a488" },
|
"syntastic": { "branch": "master", "commit": "8d5e37c29cf5952fbf300b9230bffe424c61a488" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "3d757e586ff0bfc85bdb7b46c9d3d932147a0cde" },
|
"teamtype-nvim": { "branch": "main", "commit": "799402fc3c49118e4703bc48f379ea6930824dab" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||||
"tree-sitter-c-sharp": { "branch": "master", "commit": "485f0bae0274ac9114797fc10db6f7034e4086e3" },
|
"tree-sitter-c-sharp": { "branch": "master", "commit": "f05a2ca99d329de2e6c32f26a21c6169b2bfcbb7" },
|
||||||
"twilight.nvim": { "branch": "main", "commit": "664e752f4a219801265cc3fc18782b457b58c1e1" },
|
"twilight.nvim": { "branch": "main", "commit": "664e752f4a219801265cc3fc18782b457b58c1e1" },
|
||||||
"vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" },
|
"vim-easy-align": { "branch": "master", "commit": "9815a55dbcd817784458df7a18acacc6f82b1241" },
|
||||||
"vim-gitgutter": { "branch": "main", "commit": "0acb772e76064cc406664ab595b58b3fac76488a" },
|
"vim-gitgutter": { "branch": "main", "commit": "0acb772e76064cc406664ab595b58b3fac76488a" },
|
||||||
|
|||||||
137
.config/nvim/lua/plugins/comp.lua
Normal file
137
.config/nvim/lua/plugins/comp.lua
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
"saghen/blink.cmp",
|
||||||
|
dependencies = { "rafamadriz/friendly-snippets", "saghen/blink.compat" },
|
||||||
|
version = "1.*",
|
||||||
|
|
||||||
|
---@module 'blink.cmp'
|
||||||
|
---@type blink.cmp.Config
|
||||||
|
opts = {
|
||||||
|
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
|
||||||
|
-- 'super-tab' for mappings similar to vscode (tab to accept)
|
||||||
|
-- 'enter' for enter to accept
|
||||||
|
-- 'none' for no mappings
|
||||||
|
--
|
||||||
|
-- All presets have the following mappings:
|
||||||
|
-- C-space: Open menu or open docs if already open
|
||||||
|
-- C-n/C-p or Up/Down: Select next/previous item
|
||||||
|
-- C-e: Hide menu
|
||||||
|
-- C-k: Toggle signature help (if signature.enabled = true)
|
||||||
|
--
|
||||||
|
-- See :h blink-cmp-config-keymap for defining your own keymap
|
||||||
|
keymap = { preset = "default" },
|
||||||
|
appearance = {
|
||||||
|
nerd_font_variant = "mono",
|
||||||
|
},
|
||||||
|
|
||||||
|
completion = { documentation = { auto_show = false } },
|
||||||
|
|
||||||
|
sources = {
|
||||||
|
default = {
|
||||||
|
"lazydev",
|
||||||
|
"lsp",
|
||||||
|
"path",
|
||||||
|
"snippets",
|
||||||
|
"buffer",
|
||||||
|
"avante_commands",
|
||||||
|
"avante_mentions",
|
||||||
|
"avante_shortcuts",
|
||||||
|
"avante_files",
|
||||||
|
},
|
||||||
|
providers = {
|
||||||
|
lazydev = {
|
||||||
|
name = "LazyDev",
|
||||||
|
module = "lazydev.integrations.blink",
|
||||||
|
score_offset = 100,
|
||||||
|
},
|
||||||
|
avante_commands = {
|
||||||
|
name = "avante_commands",
|
||||||
|
module = "blink.compat.source",
|
||||||
|
score_offset = 90, -- show at a higher priority than lsp
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
avante_files = {
|
||||||
|
name = "avante_files",
|
||||||
|
module = "blink.compat.source",
|
||||||
|
score_offset = 100, -- show at a higher priority than lsp
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
avante_mentions = {
|
||||||
|
name = "avante_mentions",
|
||||||
|
module = "blink.compat.source",
|
||||||
|
score_offset = 1000, -- show at a higher priority than lsp
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
avante_shortcuts = {
|
||||||
|
name = "avante_shortcuts",
|
||||||
|
module = "blink.compat.source",
|
||||||
|
score_offset = 1000, -- show at a higher priority than lsp
|
||||||
|
opts = {},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
fuzzy = { implementation = "prefer_rust_with_warning" },
|
||||||
|
},
|
||||||
|
opts_extend = { "sources.default" },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"yetone/avante.nvim",
|
||||||
|
-- ⚠️ must add this setting! ! !
|
||||||
|
build = vim.fn.has("win32") ~= 0
|
||||||
|
and "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false"
|
||||||
|
or "make",
|
||||||
|
event = "VeryLazy",
|
||||||
|
version = false, -- Never set this value to "*"! Never!
|
||||||
|
---@module 'avante'
|
||||||
|
---@type avante.Config
|
||||||
|
opts = {
|
||||||
|
instructions_file = "avante.md",
|
||||||
|
provider = "ollama_ministral",
|
||||||
|
providers = {
|
||||||
|
ollama_devstral = {
|
||||||
|
endpoint = "http://10.0.32.128:11434",
|
||||||
|
__inherited_from = "ollama",
|
||||||
|
model = "devstral-small-2:latest",
|
||||||
|
},
|
||||||
|
ollama_ministral = {
|
||||||
|
endpoint = "http://10.0.32.128:11434",
|
||||||
|
__inherited_from = "ollama",
|
||||||
|
model = "ministral-3:3b",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
"MunifTanjim/nui.nvim",
|
||||||
|
--- The below dependencies are optional,
|
||||||
|
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
|
||||||
|
"folke/snacks.nvim", -- for input provider snacks
|
||||||
|
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
|
||||||
|
{
|
||||||
|
-- support for image pasting
|
||||||
|
"HakonHarnes/img-clip.nvim",
|
||||||
|
event = "VeryLazy",
|
||||||
|
opts = {
|
||||||
|
-- recommended settings
|
||||||
|
default = {
|
||||||
|
embed_image_as_base64 = false,
|
||||||
|
prompt_for_file_name = false,
|
||||||
|
drag_and_drop = {
|
||||||
|
insert_mode = true,
|
||||||
|
},
|
||||||
|
-- required for Windows users
|
||||||
|
use_absolute_path = true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
-- Make sure to set this up properly if you have lazy=true
|
||||||
|
"MeanderingProgrammer/render-markdown.nvim",
|
||||||
|
opts = {
|
||||||
|
file_types = { "markdown", "Avante" },
|
||||||
|
},
|
||||||
|
ft = { "markdown", "Avante" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
@@ -9,13 +9,13 @@ return {
|
|||||||
lazy = not vim.g.started_by_firenvim,
|
lazy = not vim.g.started_by_firenvim,
|
||||||
build = function()
|
build = function()
|
||||||
vim.fn["firenvim#install"](0)
|
vim.fn["firenvim#install"](0)
|
||||||
end
|
end,
|
||||||
},
|
},
|
||||||
--'honza/vim-snippets',
|
--'honza/vim-snippets',
|
||||||
--'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
--'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
|
||||||
'vim-scripts/indentLine.vim',
|
"vim-scripts/indentLine.vim",
|
||||||
'rhysd/git-messenger.vim',
|
"rhysd/git-messenger.vim",
|
||||||
'junegunn/vim-easy-align',
|
"junegunn/vim-easy-align",
|
||||||
"preservim/nerdcommenter",
|
"preservim/nerdcommenter",
|
||||||
"mg979/vim-visual-multi",
|
"mg979/vim-visual-multi",
|
||||||
"airblade/vim-gitgutter",
|
"airblade/vim-gitgutter",
|
||||||
@@ -26,11 +26,11 @@ return {
|
|||||||
-- your configuration comes here
|
-- your configuration comes here
|
||||||
-- or leave it empty to use the default settings
|
-- or leave it empty to use the default settings
|
||||||
-- refer to the configuration section below
|
-- refer to the configuration section below
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
--'vim-airline/vim-airline'
|
--'vim-airline/vim-airline'
|
||||||
--'vim-airline/vim-airline-themes'
|
--'vim-airline/vim-airline-themes'
|
||||||
{ 'ctrlpvim/ctrlp.vim' },
|
{ "ctrlpvim/ctrlp.vim" },
|
||||||
--'godlygeek/tabular'
|
--'godlygeek/tabular'
|
||||||
--'easymotion/vim-easymotion'
|
--'easymotion/vim-easymotion'
|
||||||
--'nathanaelkane/vim-indent-guides'
|
--'nathanaelkane/vim-indent-guides'
|
||||||
@@ -46,102 +46,42 @@ return {
|
|||||||
--'tpope/vim-obsession'
|
--'tpope/vim-obsession'
|
||||||
--'tpope/vim-fugitive'
|
--'tpope/vim-fugitive'
|
||||||
--'tpope/vim-surround'
|
--'tpope/vim-surround'
|
||||||
{
|
--{
|
||||||
'Exafunction/codeium.vim',
|
--'Exafunction/codeium.vim',
|
||||||
event = 'BufEnter',
|
--event = 'BufEnter',
|
||||||
config = function()
|
--config = function()
|
||||||
-- Change '<C-g>' here to any keycode you like.
|
---- Change '<C-g>' here to any keycode you like.
|
||||||
vim.keymap.set('i', '<C-g>', function() return vim.fn['codeium#Accept']() end, { expr = true, silent = true })
|
--vim.keymap.set('i', '<C-g>', function() return vim.fn['codeium#Accept']() end, { expr = true, silent = true })
|
||||||
vim.keymap.set('i', '<c-;>', function() return vim.fn['codeium#CycleCompletions'](1) end,
|
--vim.keymap.set('i', '<c-;>', function() return vim.fn['codeium#CycleCompletions'](1) end,
|
||||||
{ expr = true, silent = true })
|
--{ expr = true, silent = true })
|
||||||
vim.keymap.set('i', '<c-,>', function() return vim.fn['codeium#CycleCompletions'](-1) end,
|
--vim.keymap.set('i', '<c-,>', function() return vim.fn['codeium#CycleCompletions'](-1) end,
|
||||||
{ expr = true, silent = true })
|
--{ expr = true, silent = true })
|
||||||
vim.keymap.set('i', '<c-x>', function() return vim.fn['codeium#Clear']() end, { expr = true, silent = true })
|
--vim.keymap.set('i', '<c-x>', function() return vim.fn['codeium#Clear']() end, { expr = true, silent = true })
|
||||||
end
|
--end
|
||||||
},
|
--},
|
||||||
--'lambdalisue/suda.vim'
|
--'lambdalisue/suda.vim'
|
||||||
{ 'tree-sitter/tree-sitter-c-sharp' },
|
{ "tree-sitter/tree-sitter-c-sharp" },
|
||||||
{ 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate' },
|
{ "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" },
|
||||||
'nvim-lua/plenary.nvim',
|
"nvim-lua/plenary.nvim",
|
||||||
'nvim-telescope/telescope.nvim',
|
"nvim-telescope/telescope.nvim",
|
||||||
|
"kosayoda/nvim-lightbulb",
|
||||||
'kosayoda/nvim-lightbulb',
|
|
||||||
--'antoinemadec/FixCursorHold.nvim'
|
--'antoinemadec/FixCursorHold.nvim'
|
||||||
'mhartington/formatter.nvim',
|
"mhartington/formatter.nvim",
|
||||||
'NvChad/nvim-colorizer.lua',
|
"NvChad/nvim-colorizer.lua",
|
||||||
|
"nvim-tree/nvim-web-devicons",
|
||||||
|
"projekt0n/circles.nvim",
|
||||||
|
|
||||||
{
|
"nvim-neotest/nvim-nio",
|
||||||
'saghen/blink.cmp',
|
|
||||||
-- optional: provides snippets for the snippet source
|
|
||||||
dependencies = { 'rafamadriz/friendly-snippets' },
|
|
||||||
|
|
||||||
-- use a release tag to download pre-built binaries
|
|
||||||
version = '1.*',
|
|
||||||
-- AND/OR build from source, requires nightly: https://rust-lang.github.io/rustup/concepts/channels.html#working-with-nightly-rust
|
|
||||||
-- build = 'cargo build --release',
|
|
||||||
-- If you use nix, you can build from source using latest nightly rust with:
|
|
||||||
-- build = 'nix run .#build-plugin',
|
|
||||||
|
|
||||||
---@module 'blink.cmp'
|
|
||||||
---@type blink.cmp.Config
|
|
||||||
opts = {
|
|
||||||
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
|
|
||||||
-- 'super-tab' for mappings similar to vscode (tab to accept)
|
|
||||||
-- 'enter' for enter to accept
|
|
||||||
-- 'none' for no mappings
|
|
||||||
--
|
|
||||||
-- All presets have the following mappings:
|
|
||||||
-- C-space: Open menu or open docs if already open
|
|
||||||
-- C-n/C-p or Up/Down: Select next/previous item
|
|
||||||
-- C-e: Hide menu
|
|
||||||
-- C-k: Toggle signature help (if signature.enabled = true)
|
|
||||||
--
|
|
||||||
-- See :h blink-cmp-config-keymap for defining your own keymap
|
|
||||||
keymap = { preset = 'default' },
|
|
||||||
appearance = {
|
|
||||||
-- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
|
|
||||||
-- Adjusts spacing to ensure icons are aligned
|
|
||||||
nerd_font_variant = 'mono'
|
|
||||||
},
|
|
||||||
|
|
||||||
-- (Default) Only show the documentation popup when manually triggered
|
|
||||||
completion = { documentation = { auto_show = false } },
|
|
||||||
|
|
||||||
-- Default list of enabled providers defined so that you can extend it
|
|
||||||
-- elsewhere in your config, without redefining it, due to `opts_extend`
|
|
||||||
sources = {
|
|
||||||
default = { 'lsp', 'path', 'snippets', 'buffer' },
|
|
||||||
},
|
|
||||||
|
|
||||||
-- (Default) Rust fuzzy matcher for typo resistance and significantly better performance
|
|
||||||
-- You may use a lua implementation instead by using `implementation = "lua"` or fallback to the lua implementation,
|
|
||||||
-- when the Rust fuzzy matcher is not available, by using `implementation = "prefer_rust"`
|
|
||||||
--
|
|
||||||
-- See the fuzzy documentation for more information
|
|
||||||
fuzzy = { implementation = "prefer_rust_with_warning" }
|
|
||||||
},
|
|
||||||
opts_extend = { "sources.default" }
|
|
||||||
},
|
|
||||||
-- { 'ms-jpq/coq_nvim', branch = 'coq' },
|
|
||||||
--" 9000+ Snippets
|
|
||||||
-- { 'ms-jpq/coq.artifacts', branch = 'artifacts' },
|
|
||||||
-- { 'ms-jpq/coq.thirdparty', branch = '3p' },
|
|
||||||
|
|
||||||
'nvim-tree/nvim-web-devicons',
|
|
||||||
'projekt0n/circles.nvim',
|
|
||||||
|
|
||||||
'nvim-neotest/nvim-nio',
|
|
||||||
|
|
||||||
--'uga-rosa/translate.nvim'
|
--'uga-rosa/translate.nvim'
|
||||||
--'mechatroner/rainbow_csv'
|
--'mechatroner/rainbow_csv'
|
||||||
--'christoomey/vim-system-copy'
|
--'christoomey/vim-system-copy'
|
||||||
--'eandrju/cellular-automaton.nvim'
|
--'eandrju/cellular-automaton.nvim'
|
||||||
--"neovim/nvim-lspconfig",
|
|
||||||
--"'ranjithshegde/ccls.nvim'
|
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
{"folke/lazydev.nvim",
|
{
|
||||||
|
"folke/lazydev.nvim",
|
||||||
ft = "lua", -- only load on lua files
|
ft = "lua", -- only load on lua files
|
||||||
opts = {
|
opts = {
|
||||||
library = {
|
library = {
|
||||||
@@ -152,6 +92,14 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ "folke/neoconf.nvim", cmd = "Neoconf" },
|
{ "folke/neoconf.nvim", cmd = "Neoconf" },
|
||||||
|
{
|
||||||
|
"teamtype/teamtype-nvim",
|
||||||
|
keys = {
|
||||||
|
{ "<leader>ej", "<cmd>TeamtypeJumpToCursor<cr>" },
|
||||||
|
{ "<leader>ef", "<cmd>TeamtypeFollow<cr>" },
|
||||||
|
},
|
||||||
|
lazy = false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
return {
|
return {
|
||||||
{"nvim-neo-tree/neo-tree.nvim",
|
{
|
||||||
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
branch = "v3.x",
|
branch = "v3.x",
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
{"3rd/image.nvim",
|
{
|
||||||
opts={
|
"3rd/image.nvim",
|
||||||
|
opts = {
|
||||||
backend = "kitty",
|
backend = "kitty",
|
||||||
processor = "magick_rock", -- or "magick_cli"
|
processor = "magick_rock", -- or "magick_cli"
|
||||||
integrations = {
|
integrations = {
|
||||||
@@ -38,25 +40,31 @@ return {
|
|||||||
max_width_window_percentage = nil,
|
max_width_window_percentage = nil,
|
||||||
max_height_window_percentage = 50,
|
max_height_window_percentage = 50,
|
||||||
window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
|
window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
|
||||||
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "snacks_notif", "scrollview", "scrollview_sign" },
|
window_overlap_clear_ft_ignore = {
|
||||||
|
"cmp_menu",
|
||||||
|
"cmp_docs",
|
||||||
|
"snacks_notif",
|
||||||
|
"scrollview",
|
||||||
|
"scrollview_sign",
|
||||||
|
},
|
||||||
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
|
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
|
||||||
tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
|
tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
|
||||||
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif" }, -- render image files as images when opened
|
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif" }, -- render image files as images when opened
|
||||||
}
|
},
|
||||||
}, -- Optional image support in preview window: See `# Preview Mode` for more information
|
}, -- Optional image support in preview window: See `# Preview Mode` for more information
|
||||||
},
|
},
|
||||||
opts={
|
opts = {
|
||||||
window = {
|
window = {
|
||||||
mappings = {
|
mappings = {
|
||||||
["P"] = { "toggle_preview", config = { use_float = false, use_image_nvim = true } },
|
["P"] = { "toggle_preview", config = { use_float = false, use_image_nvim = true } },
|
||||||
["l"] = "focus_preview",
|
["l"] = "focus_preview",
|
||||||
["<C-b>"] = { "scroll_preview", config = {direction = 10} },
|
["<C-b>"] = { "scroll_preview", config = { direction = 10 } },
|
||||||
["<C-f>"] = { "scroll_preview", config = {direction = -10} },
|
["<C-f>"] = { "scroll_preview", config = { direction = -10 } },
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{"catppuccin/nvim", lazy=true, name="catppuccin"},
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ "catppuccin/nvim", lazy = true, name = "catppuccin" },
|
||||||
{
|
{
|
||||||
"folke/twilight.nvim",
|
"folke/twilight.nvim",
|
||||||
opts = {
|
opts = {
|
||||||
@@ -78,9 +86,11 @@ return {
|
|||||||
"if_statement",
|
"if_statement",
|
||||||
},
|
},
|
||||||
exclude = {}, -- exclude these filetypes
|
exclude = {}, -- exclude these filetypes
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
{"folke/zen-mode.nvim", opts={
|
{
|
||||||
|
"folke/zen-mode.nvim",
|
||||||
|
opts = {
|
||||||
window = {
|
window = {
|
||||||
backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
|
backdrop = 0.95, -- shade the backdrop of the Zen window. Set to 1 to keep the same as Normal
|
||||||
-- height and width can be:
|
-- height and width can be:
|
||||||
@@ -138,8 +148,9 @@ return {
|
|||||||
font = "+4", -- (10% increase per step)
|
font = "+4", -- (10% increase per step)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}},
|
},
|
||||||
{
|
},
|
||||||
|
{
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
keys = {
|
keys = {
|
||||||
@@ -157,17 +168,17 @@ return {
|
|||||||
opts = {
|
opts = {
|
||||||
options = {
|
options = {
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
-- close_command = function(n) Snacks.bufdelete(n) end,
|
-- close_command = function(n) Snacks.bufdelete(n) end,
|
||||||
-- stylua: ignore
|
-- stylua: ignore
|
||||||
-- right_mouse_command = function(n) Snacks.bufdelete(n) end,
|
-- right_mouse_command = function(n) Snacks.bufdelete(n) end,
|
||||||
diagnostics = "nvim_lsp",
|
diagnostics = "nvim_lsp",
|
||||||
always_show_bufferline = false,
|
always_show_bufferline = false,
|
||||||
-- diagnostics_indicator = function(_, _, diag)
|
-- diagnostics_indicator = function(_, _, diag)
|
||||||
-- local icons = LazyVim.config.icons.diagnostics
|
-- local icons = LazyVim.config.icons.diagnostics
|
||||||
-- local ret = (diag.error and icons.Error .. diag.error .. " " or "")
|
-- local ret = (diag.error and icons.Error .. diag.error .. " " or "")
|
||||||
-- .. (diag.warning and icons.Warn .. diag.warning or "")
|
-- .. (diag.warning and icons.Warn .. diag.warning or "")
|
||||||
-- return vim.trim(ret)
|
-- return vim.trim(ret)
|
||||||
-- end,
|
-- end,
|
||||||
offsets = {
|
offsets = {
|
||||||
{
|
{
|
||||||
filetype = "neo-tree",
|
filetype = "neo-tree",
|
||||||
@@ -176,10 +187,10 @@ return {
|
|||||||
text_align = "left",
|
text_align = "left",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
-- ---@param opts bufferline.IconFetcherOpts
|
-- ---@param opts bufferline.IconFetcherOpts
|
||||||
-- get_element_icon = function(opts)
|
-- get_element_icon = function(opts)
|
||||||
-- return LazyVim.config.icons.ft[opts.filetype]
|
-- return LazyVim.config.icons.ft[opts.filetype]
|
||||||
-- end,
|
-- end,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
@@ -194,14 +205,14 @@ return {
|
|||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{"rhysd/committia.vim"},
|
{ "rhysd/committia.vim" },
|
||||||
{
|
{
|
||||||
's1n7ax/nvim-window-picker',
|
"s1n7ax/nvim-window-picker",
|
||||||
name = 'window-picker',
|
name = "window-picker",
|
||||||
event = 'VeryLazy',
|
event = "VeryLazy",
|
||||||
version = '2.*',
|
version = "2.*",
|
||||||
config = function()
|
config = function()
|
||||||
require'window-picker'.setup()
|
require("window-picker").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user