mirror of
https://github.com/zoriya/dotfiles.git
synced 2026-05-29 17:35:06 +00:00
Handling snippets autocompletions
This commit is contained in:
+1
-1
Submodule dwm/dwm updated: a67453bf8f...a293057de2
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user