Remove vim and add nvim config
This commit is contained in:
parent
92b6c017d1
commit
e06ce1a49a
26 changed files with 665 additions and 66 deletions
34
nvim/lua/plugins/cmp.lua
Normal file
34
nvim/lua/plugins/cmp.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
event = "InsertEnter",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
},
|
||||
config = function()
|
||||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup({
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.close(),
|
||||
["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
}),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
}),
|
||||
})
|
||||
|
||||
vim.cmd([[
|
||||
set completeopt=menuone,noinsert,noselect
|
||||
highlight! default link CmpItemKind CmpItemMenuDefault
|
||||
]])
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue