mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2025-01-07 08:27:35 +00:00
Add luasnip and lsp snippit support
This commit is contained in:
parent
38a0919865
commit
9778c8c5fa
@ -163,6 +163,8 @@ return require('packer').startup(function()
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"f3fora/cmp-spell",
|
||||
"L3MON4D3/LuaSnip",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,8 +8,12 @@ function M.config_cmp()
|
||||
completeopt = "menuone,noinsert,noselect",
|
||||
autocomplete = false,
|
||||
},
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
sources = {
|
||||
{name = "nvim_lsp"},
|
||||
{name = "luasnip"},
|
||||
{name = "buffer"},
|
||||
{name = "spell"},
|
||||
},
|
||||
|
@ -81,8 +81,7 @@ local function config_lsp()
|
||||
-- Maybe update capabilities
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
if utils.is_plugin_loaded("cmp-nvim-lsp") then
|
||||
capabilities = require("cmp_nvim_lsp").update_capabilities(
|
||||
capabilities, {snippetSupport = false})
|
||||
capabilities = require("cmp_nvim_lsp").update_capabilities(capabilities)
|
||||
end
|
||||
|
||||
for _, ls in ipairs(language_servers) do
|
||||
|
Loading…
Reference in New Issue
Block a user