chore(nvim): improved cmp performance and added fugitive
This commit is contained in:
parent
3190c83a91
commit
1d5291c270
3 changed files with 28 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
return {
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
"yioneko/nvim-cmp",
|
||||
branch = "perf",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp", -- lsp
|
||||
|
@ -28,6 +29,10 @@ return {
|
|||
luasnip.lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
performance = {
|
||||
debounce = 0,
|
||||
throttle = 0,
|
||||
},
|
||||
mapping = {
|
||||
["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
|
|
|
@ -6,5 +6,6 @@ return {
|
|||
require("blame").setup()
|
||||
end
|
||||
},
|
||||
"https://github.com/tpope/vim-fugitive"
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,22 @@ return {
|
|||
{
|
||||
"stevearc/dressing.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
input = {
|
||||
override = function(conf)
|
||||
conf.col = -1
|
||||
conf.row = 0
|
||||
return conf
|
||||
end,
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"smjonas/inc-rename.nvim",
|
||||
opts = {
|
||||
input_buffer_type = "dressing",
|
||||
save_in_cmdline_history = true,
|
||||
}
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
|
@ -165,6 +181,10 @@ return {
|
|||
client.server_capabilities.semanticTokensProvider = nil
|
||||
end
|
||||
|
||||
local rename_func = function()
|
||||
return ":IncRename " .. vim.fn.expand("<cword>")
|
||||
end
|
||||
|
||||
-- Mappings.
|
||||
local bufopts = { noremap = true, silent = true, buffer = ev.buf }
|
||||
vim.keymap.set("n", "<space>e", vim.diagnostic.open_float, bufopts)
|
||||
|
@ -176,7 +196,7 @@ return {
|
|||
vim.keymap.set("n", "gi", fzflua.lsp_implementations, bufopts)
|
||||
vim.keymap.set("n", "<space>k", vim.lsp.buf.signature_help, bufopts)
|
||||
vim.keymap.set("n", "<space>D", vim.lsp.buf.type_definition, bufopts)
|
||||
vim.keymap.set("n", "<space>rn", vim.lsp.buf.rename, bufopts)
|
||||
vim.keymap.set("n", "<space>rn", rename_func(), bufopts)
|
||||
vim.keymap.set("n", "<space>ca", vim.lsp.buf.code_action, bufopts)
|
||||
vim.keymap.set("n", "<space>ge", vim.diagnostic.goto_next, bufopts)
|
||||
vim.keymap.set("n", "<space>gE", vim.diagnostic.goto_prev, bufopts)
|
||||
|
|
Loading…
Add table
Reference in a new issue