You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently each IDE needs to be configured for each Language Server implementation. It would be nice if there was a way for IDEs to automatically detect installed servers.
This is possible for Jupyter kernels, each Jupyter kernel installs its config in ~/.jupyter and VSCode can automatically detect all installed Jupyter kernels, no need for any additional configuration or extensions.
Similar setup should work for LSP. There can be some standard folder like ~/.lsp. Each installed Language Server would store its config there. This config will specify command to run the server and will contain a list of supported file patters (e.g. file extensions and special files like package.json or Cargo.toml to look for). If IDE detects that there is a Language Server suitable for the current file/directory it could ask user to run it.
The text was updated successfully, but these errors were encountered:
I find this idea interesting and it echoes a (5-years old already?) idea of a language server registry that would also include the provisioning steps. But I have some doubts about it:
Usually, there are small details that make that running the LS is more than just running a command: the client sometimes have to check for pre-requisites, pass some specific system properties, decide whether std or socket fits best, decide whether to store some extra logs, decide of a particular runtime to use, sometimes pass extra configuration settings upon startup... All that is hard to capture in such a list of installed LS as the final set of operation to properly run the LS is more dynamically computed.
From all my experiences I came to the same conclusion than @mickaelistria. Usually this work in a starter case but as soon as language servers need more configuration being able to customize things is a big help. What I definitely want to avoid is to maintain a configuration language to be able to express this.
Going by the servers supported in https://github.com/neovim/nvim-lspconfig/ I've the impression that the vast majority is really only cmd, filetypes and a way to detect a project root/workspace directory or signal if the server supports "single-file mode" (no workspace folder).
The project root detection is because in editors like nvim you don't start by creating a workspace folder, but you edit files directly (nvim path/to/file) and based on that file path you need to determine what the workspace folder could be. Usually that's stuff like .git, pyproject.toml, Cargo.toml.
Clients could still provide configuration options on top.
Currently each IDE needs to be configured for each Language Server implementation. It would be nice if there was a way for IDEs to automatically detect installed servers.
This is possible for Jupyter kernels, each Jupyter kernel installs its config in
~/.jupyter
and VSCode can automatically detect all installed Jupyter kernels, no need for any additional configuration or extensions.Similar setup should work for LSP. There can be some standard folder like
~/.lsp
. Each installed Language Server would store its config there. This config will specify command to run the server and will contain a list of supported file patters (e.g. file extensions and special files likepackage.json
orCargo.toml
to look for). If IDE detects that there is a Language Server suitable for the current file/directory it could ask user to run it.The text was updated successfully, but these errors were encountered: