yaml-language-server icon indicating copy to clipboard operation
yaml-language-server copied to clipboard

Question about server plugins support

Open matheusccastroo opened this issue 2 years ago • 3 comments

Hello, everyone!

From what I saw from the docs, the language server doesn't support server plugins (it does support some at some extent, but not for adding custom logic to completions and etc). Are there any plans to support it?

My use case is the following: I have an extension that depends on the yaml-language-server and I would like to, in some cases, improve the autocompletion for a specific key/value in my YAML file.

With the server plugins, I could do like the typescript server (https://code.visualstudio.com/api/references/contribution-points#contributes.typescriptServerPlugins) and contribute with a plugin that would handle such cases for me, while the rest would work as normal.

As of now, the only alternative solution I have would be to create my own language server - but this brings it's own set of problems.

matheusccastroo avatar Apr 11 '23 22:04 matheusccastroo

The referenced support is specific to the Typescript language server. We do not have equivalent functionality but support an extension API that allows plugins to update the schema used dynamically.

gorkem avatar Apr 23 '23 19:04 gorkem

@gorkem Yeah, I saw the extension API for the schema, but this won't help in my case. Are there any plans for the plugin support (like what typescript language server does)? If not, is this something you guys would accept a PR for?

matheusccastroo avatar Apr 24 '23 11:04 matheusccastroo

It is not really on our plans but that does not mean we would not accept it. However, before doing a PR can you write an RFC about what kind of functionality, or API you are thinking about?

gorkem avatar May 03 '23 04:05 gorkem