mirror of
https://github.com/mentos1386/dotfiles.git
synced 2024-11-26 00:57:50 +00:00
fix(nvim): lsp complete requires a snippet engine
This commit is contained in:
parent
a23d047548
commit
38b4cdc78e
3 changed files with 8 additions and 4 deletions
|
@ -63,6 +63,9 @@
|
|||
|
||||
# Lua
|
||||
stylua
|
||||
|
||||
# Services
|
||||
flyctl
|
||||
];
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
|
|
|
@ -42,6 +42,8 @@ Plug("hrsh7th/cmp-path")
|
|||
Plug("hrsh7th/nvim-cmp")
|
||||
Plug("onsails/lspkind.nvim")
|
||||
Plug("folke/trouble.nvim")
|
||||
Plug("hrsh7th/vim-vsnip")
|
||||
Plug("hrsh7th/vim-vsnip-integ")
|
||||
|
||||
vim.call("plug#end")
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ cmp.setup({
|
|||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||
vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
|
||||
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||
|
@ -137,8 +137,7 @@ require("mason-lspconfig").setup({
|
|||
"docker_compose_language_service", -- docker-compose
|
||||
"eslint", -- eslint
|
||||
"elixirls", -- elixir
|
||||
"golangci_lint_ls", -- golangci-lint
|
||||
"gopls", -- gopls
|
||||
"gopls", -- golang
|
||||
"graphql", -- graphql
|
||||
"html", -- html
|
||||
"htmx", -- htmx
|
||||
|
@ -160,7 +159,7 @@ require("mason-lspconfig").setup({
|
|||
})
|
||||
|
||||
require("mason-lspconfig").setup_handlers({
|
||||
function(server_name) -- default handler (optional)
|
||||
function(server_name)
|
||||
require("lspconfig")[server_name].setup({
|
||||
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue