1
0

Split plugins into files by category

This commit is contained in:
2025-09-21 18:21:43 +02:00
parent f33ecb78ee
commit 78698d82e6
13 changed files with 259 additions and 267 deletions

View File

@@ -0,0 +1,49 @@
return {
-- nvim-cmp
{ 'dcampos/nvim-snippy' },
{
'hrsh7th/nvim-cmp',
dependencies = {
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
'hrsh7th/cmp-buffer',
'dcampos/cmp-snippy'
},
lazy = false,
config = function()
local cmp = require'cmp'
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
require'snippy'.expand_snippet(args.body)
end,
},
mapping = {
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
-- Specify `cmp.config.disable` if you want to remove the default `<C-y>` mapping.
['<C-y>'] = cmp.config.disable,
['<C-e>'] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close(),
}),
['<CR>'] = cmp.mapping.confirm({ select = false }),
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'snippy' },
}, {
{ name = 'path' },
}, {
{ name = 'buffer' },
}),
view = {
entries = 'native',
},
})
end
}
}