more config files

This commit is contained in:
Cy Pokhrel 2024-10-22 11:53:19 -04:00
parent 1b28ec5ec1
commit 1a25393183
No known key found for this signature in database
GPG key ID: 1200FBE36C2ADE2E
22 changed files with 3628 additions and 1 deletions

View 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" },
}
}