Add formatting and some buffer context

This commit is contained in:
mjhika 2023-09-07 11:25:08 -04:00
parent fffc2e3d46
commit 6a34515c0e
2 changed files with 19 additions and 0 deletions

View file

@ -331,6 +331,7 @@ mason_lspconfig.setup_handlers {
-- [[ Configure nvim-cmp ]]
-- See `:help cmp`
local cmp = require 'cmp'
local lspkind = require('lspkind')
local luasnip = require 'luasnip'
require('luasnip.loaders.from_vscode').lazy_load()
luasnip.config.setup {}
@ -374,7 +375,19 @@ cmp.setup {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
{ name = 'conjure' },
{ name = 'buffer' }
},
formatting = {
format = lspkind.cmp_format({
mode = 'symbol_text',
menu = ({
buffer = "[Buffer]",
conjure = "[Conjure]",
nvim_lsp = "[LSP]",
luasnip = "[LuaSnip]"
})
})
}
}
-- The line beneath this is called `modeline`. See `:help modeline`