Per-project configuration without reopening neovim #132
-
Hi, I'm very happy with lsp and I successfully configured it to let's say have lua version to 5.4 in a project using this version and luaJIT for neovim directory or others projects using it. It work fine if I start neovim and go to one project, then close it and open it again and go to the other project. Is it possible to make it work without reopening neovim ? initial config called : local lsp = require('lsp-zero')
lsp.preset('per-project')
lsp.configure('sumneko_lua',
{
settings =
{
Lua =
{
diagnostics =
{
globals = { 'vim', 'awesome' }
}
}
}
})
lsp.setup()
vim.diagnostic.config({
virtual_text = true,
}) first local project config file : local lsp = require('lsp-zero')
lsp.use('sumneko_lua',
{
settings =
{
Lua =
{
runtime =
{
version = 'LuaJIT'
}
}
}
}) second local project config file : local lsp = require('lsp-zero')
lsp.use('sumneko_lua',
{
settings =
{
Lua =
{
runtime =
{
version = 'Lua 5.4'
}
}
}
}) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
For that you would have to use |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm not too familiar with lua but I was wondering how one can create the config in the project i.e. how do I name the config file. |
Beta Was this translation helpful? Give feedback.
For that you would have to use
lspconfig
directly.lsp-zero
will not let you change the configuration of a language server.