Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lsp4e-dev] Multiple language servers in Eclipse 4.13



On Tue, Nov 5, 2019 at 10:50 AM Bati <batinex@xxxxxxxxx> wrote:
Hello,

Hi,
 
I am wondering about multiple language server support for a language. Let's say I am writing a YAML language server. Nowadays, in Eclipse there is a VSCode YAML Language Server. For now, it seems that sometimes Eclipse uses my language server or VSCode language server. Is there a way to configure which language server should be used?

LSP4E uses both language servers for operations that are "compoundable" (hover, completion) and would kind of randomly take one for non-compoundable ones (go to definition, rename...).
You can disable a language server via preferences. Window > Preferences > Language Servers for the UI, or using the preference API programmatically to do so (make sure you don't automate disabling a language server without warning the user first, or you'll make users confused and angry).
But the overall idea is that they shouldn't be 2 language servers for the same language in the best world, your Yaml LS should probably assume the VSCode LS is here and already does most of the work, and your LS could simply add the missing features. Also, maybe it's worth considering directly contributing to the VSCode LS rather than building a new one. And if your files are actually "specialized" files, ie not pure yaml, then you can also consider creating your own content-type (and maybe even file extension) to associate your LS to it.

HTH
--
Mickael Istria
Eclipse IDE developer, for Red Hat Developers

Back to the top