kickstart.nvim
kickstart.nvim copied to clipboard
Support for `init_options` in mason LSP setup handler
Describe the bug I'm not entirely sure it's a "bug" per se. I tried to install Intelephense (LSP for PHP) and Mason provides schema for license key:
intelephense.licenceKey
But it doesn't work. I made a mason-lspconfig.nvim ticket and it seems it doesn't work because it has to be passed as initialization option so I guess something like this might be needed for more LSP servers:
local servers = {
-- [...]
intelephense = {
settings = { -- settings according to schema
intelephense = { foo = bar },
},
init_options = { -- sever specific init flags
licenceKey = 'key goes here',
},
},
}
-- [...]
mason_lspconfig.setup_handlers {
function(server_name)
require('lspconfig')[server_name].setup {
capabilities = capabilities,
on_attach = on_attach,
settings = servers[server_name][settings],
init_options = servers[server_name][init_options],
}
end,
}
To Reproduce Steps to reproduce the behavior:
- install kickstart.nvim's
init.lua - setup Intelephense with license key:
local servers = { -- [...] intelephense = { intelephense = { licenceKey = 'key goes here' }, }, } - save, quit NeoVim, open PHP project and see there's no message about Intelephense premium features getting activated
My hope is that whoever at Mason LSP Config project is responsible for Intelephense integration, has a license key to test and confirm it, if needed.
Desktop (please complete the following information):
- OS: Manjaro Linux 22.0.0
- Terminal: urxvt v9.30
Neovim Version
- Output of running
:versionfrom inside of neovim:
NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3