mirror of
https://github.com/mentos1386/dotfiles.git
synced 2024-11-22 15:43:42 +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
|
# Lua
|
||||||
stylua
|
stylua
|
||||||
|
|
||||||
|
# Services
|
||||||
|
flyctl
|
||||||
];
|
];
|
||||||
|
|
||||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
# 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("hrsh7th/nvim-cmp")
|
||||||
Plug("onsails/lspkind.nvim")
|
Plug("onsails/lspkind.nvim")
|
||||||
Plug("folke/trouble.nvim")
|
Plug("folke/trouble.nvim")
|
||||||
|
Plug("hrsh7th/vim-vsnip")
|
||||||
|
Plug("hrsh7th/vim-vsnip-integ")
|
||||||
|
|
||||||
vim.call("plug#end")
|
vim.call("plug#end")
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ cmp.setup({
|
||||||
snippet = {
|
snippet = {
|
||||||
-- REQUIRED - you must specify a snippet engine
|
-- REQUIRED - you must specify a snippet engine
|
||||||
expand = function(args)
|
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('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||||
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
|
||||||
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
|
||||||
|
@ -137,8 +137,7 @@ require("mason-lspconfig").setup({
|
||||||
"docker_compose_language_service", -- docker-compose
|
"docker_compose_language_service", -- docker-compose
|
||||||
"eslint", -- eslint
|
"eslint", -- eslint
|
||||||
"elixirls", -- elixir
|
"elixirls", -- elixir
|
||||||
"golangci_lint_ls", -- golangci-lint
|
"gopls", -- golang
|
||||||
"gopls", -- gopls
|
|
||||||
"graphql", -- graphql
|
"graphql", -- graphql
|
||||||
"html", -- html
|
"html", -- html
|
||||||
"htmx", -- htmx
|
"htmx", -- htmx
|
||||||
|
@ -160,7 +159,7 @@ require("mason-lspconfig").setup({
|
||||||
})
|
})
|
||||||
|
|
||||||
require("mason-lspconfig").setup_handlers({
|
require("mason-lspconfig").setup_handlers({
|
||||||
function(server_name) -- default handler (optional)
|
function(server_name)
|
||||||
require("lspconfig")[server_name].setup({
|
require("lspconfig")[server_name].setup({
|
||||||
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
capabilities = require("cmp_nvim_lsp").default_capabilities(),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue