Handling snippets autocompletions

This commit is contained in:
Zoe Roux
2022-03-30 17:58:30 +02:00
parent 900ca0d6b6
commit f26c5704d0
3 changed files with 10 additions and 3 deletions
+1 -1
Submodule dwm/dwm updated: a67453bf8f...a293057de2
+8 -2
View File
@@ -8,6 +8,11 @@ if not lsn_status_ok then
return
end
require("luasnip/loaders/from_vscode").lazy_load()
vim.opt.completeopt = { "menuone", "preview", }
vim.opt.pumheight = 15
local kind_icons = {
Text = "",
Method = "",
@@ -76,11 +81,12 @@ cmp.setup({
end
end, { "i", "s" }),
},
sources = cmp.config.sources({
sources = {
{ name = "nvim_lsp" },
{ name = 'luasnip' },
{ name = "buffer" },
{ name = "path" },
}),
},
formatting = {
fields = { "abbr", "kind" },
format = function(entry, vim_item)
+1
View File
@@ -84,6 +84,7 @@ return packer.startup(function(use)
"hrsh7th/cmp-cmdline",
"hrsh7th/nvim-cmp",
"L3MON4D3/LuaSnip",
"saadparwaiz1/cmp_luasnip",
}
use "rafamadriz/friendly-snippets"
use "ray-x/lsp_signature.nvim"