more config files
This commit is contained in:
parent
1b28ec5ec1
commit
1a25393183
22 changed files with 3628 additions and 1 deletions
36
private_dot_config/nvim/lua/config/nvim-cmp.lua
Normal file
36
private_dot_config/nvim/lua/config/nvim-cmp.lua
Normal file
|
@ -0,0 +1,36 @@
|
|||
local cmp = require("cmp")
|
||||
|
||||
cmp.setup {
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["UltiSnips#Anon"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert {
|
||||
["<Tab>"] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
["<S-Tab"] = function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end,
|
||||
["<C-u>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = false }),
|
||||
},
|
||||
sources = cmp.config.sources {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "ultisnips" },
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue