Nvim: remove coq and other config files
This commit is contained in:
58
.config/nvim/after/plugin/nvim-cmp.rc.lua
Normal file
58
.config/nvim/after/plugin/nvim-cmp.rc.lua
Normal file
@@ -0,0 +1,58 @@
|
||||
-- Setup nvim-cmp.
|
||||
local cmp = require'cmp'
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
-- For `vsnip` user.
|
||||
-- vim.fn["vsnip#anonymous"](args.body)
|
||||
|
||||
-- For `luasnip` user.
|
||||
-- require('luasnip').lsp_expand(args.body)
|
||||
|
||||
-- For `ultisnips` user.
|
||||
vim.fn["UltiSnips#Anon"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<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' }),
|
||||
['<tab>'] = cmp.mapping.confirm({ select = true }),
|
||||
['<C-e>'] = cmp.mapping({
|
||||
i = cmp.mapping.abort(),
|
||||
c = cmp.mapping.close(),
|
||||
}),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
|
||||
{ name = 'path' },
|
||||
|
||||
{ name = 'ultisnips' },
|
||||
|
||||
{ name = 'calc' },
|
||||
|
||||
{ name = 'cmp_git' },
|
||||
}, {
|
||||
{ name = 'buffer', keyword_length = 5, max_item_count = 10, priority = -5 },
|
||||
}),
|
||||
--experimental = {
|
||||
-- native_menu = false
|
||||
--}
|
||||
})
|
||||
|
||||
cmp.setup.cmdline('/', {
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
cmp.setup.cmdline(':', {
|
||||
sources = {
|
||||
{ name = 'cmdline' }
|
||||
},
|
||||
mapping = cmp.mapping.preset.cmdline()
|
||||
})
|
||||
|
||||
require("cmp_git").setup()
|
||||
Reference in New Issue
Block a user