laptop
This commit is contained in:
parent
d8032cc35d
commit
e945735fa1
61 changed files with 344 additions and 550 deletions
54
home/minimal/nvim/nvim-cmp.lua
Normal file
54
home/minimal/nvim/nvim-cmp.lua
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
local cmp = require'cmp'
|
||||
|
||||
cmp.setup({
|
||||
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||
end,
|
||||
},
|
||||
|
||||
mapping = cmp.mapping.preset.insert(
|
||||
{
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.abort(),
|
||||
['<Tab>'] = cmp.mapping.confirm({ select = false }),
|
||||
}
|
||||
),
|
||||
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'cmp_pandoc' },
|
||||
{ name = 'emoji' },
|
||||
{ name = 'fish' },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'path' },
|
||||
{ name = 'ultisnips' },
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline({ '/', '?' }, {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
mapping = cmp.mapping.preset.cmdline(),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
}),
|
||||
matching = { disallow_symbol_nonprefix_matching = false }
|
||||
})
|
||||
|
||||
-- Set up lspconfig.
|
||||
local capabilities = require('cmp_nvim_lsp').default_capabilities()
|
||||
Loading…
Add table
Add a link
Reference in a new issue