Describe the bug
I'm having a problem with snippets. I can't get my own snippets working when lua-language-server is "working". I get auto completion and everything working fine but my own snippets never show up, my snippets will only show up when the language-server is stopped.
Load your snippets with a plugin that can load snippets with the same format as VSCode standard for snippets. (In my case I'm using vim-vsnip)
Open a lua file and have lua-lanuage-server working
Your snippets won't show up.
Expected behavior
Custom snippets to show up.
Screenshots
Example with server (custom snippets don't show up)
Example with no server (custom snippets are working)
Environment (please complete the following information):
OS: Arch Linux
Is WSL remote? NO
Client: Neovim builtin LSP.
Additional context
Server config
local nvim_lsp = require "lspconfig"
local luapath = "/home/rafa/.local/share/nvim/lua/sumneko_lua"
local luabin = luapath .. "/bin/Linux/lua-language-server"
nvim_lsp.sumneko_lua.setup {
cmd = {luabin, "-E", luapath .. "/main.lua"},
settings = {
Lua = {
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = "LuaJIT",
-- Setup your lua path
path = vim.split(package.path, ";")
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = {"vim"}
},
workspace = {
-- Make the server aware of Neovim runtime files
library = {
[vim.fn.expand("$VIMRUNTIME/lua")] = true,
[vim.fn.expand("$VIMRUNTIME/lua/vim/lsp")] = true
},
maxPreload = 10000
},
telemetry = {
enable = false
}
}
}
}
Provide logs
I have multiple files in the log directory, and I don't know which one I have to provide. Here are a couple of the last logs I've had:
Describe the bug I'm having a problem with snippets. I can't get my own snippets working when lua-language-server is "working". I get auto completion and everything working fine but my own snippets never show up, my snippets will only show up when the language-server is stopped.
To Reproduce Steps to reproduce the behavior:
Expected behavior Custom snippets to show up.
Screenshots Example with server (custom snippets don't show up)
Example with no server (custom snippets are working)
Environment (please complete the following information):
Additional context Server config
Provide logs I have multiple files in the log directory, and I don't know which one I have to provide. Here are a couple of the last logs I've had:
lfile_homerafa.config_nvim_lua_lsp.log service.log file_home_rafa.log