tamago324 / nlsp-settings.nvim

A plugin for setting Neovim LSP with JSON or YAML files
MIT License
316 stars 18 forks source link

nvim-lsp-installer integration #18

Closed lopi-py closed 2 years ago

lopi-py commented 2 years ago

Get only installed servers to complete image

tamago324 commented 2 years ago

Thanks for the PR. However, I don't want to make it mandatory, because I can install LSP server without using nvim-lsp-installer. Therefore, I can't incorporate this PR as is.

Do you have any other ideas?

lopi-py commented 2 years ago

I can check if require'nvim-lsp-installer' throws an error to check if is installed

registerGen commented 2 years ago

Get only installed servers to complete

However, I don't want to make it mandatory, because I can install LSP server without using nvim-lsp-installer.

Maybe this is better.

for lsp, _ in pairs(require('lspconfig.configs')) do
  print(vim.inspect(lsp))
end
registerGen commented 2 years ago

We can use nvim-lspconfig to detect which LSP servers we've installed.

tamago324 commented 2 years ago

@registerGen require('lspconfig.configs') seems like a very good idea!

tamago324 commented 2 years ago

But I'm not sure. I think there can be any number of complementary candidates.

The reason is that you can enter the server name of the configuration file you want to open yourself. That's why I don't feel good about this PR.

lopi-py commented 2 years ago

Yeah, use lspconfig.configs is the better way, but if you like I can make it optional