VS Code lets you to install a Language Server like ccls or clang as another extension. But how do I connect it to my new custom extension? I can see information how to write your own language server, but not how to leverage existing ones.
Related
Let's say I have lots of extensions installed in VS Code for Angular, React, Ruby, K8s, Docker and I would like to use only a group of extensions that are needed for my development in the moment, like when I create some small app in Angular for local use I don't need extensions for K8s or Ruby. So is there any way to create some groups of extensions and use them only when I choose them and for the rest of time they behave like disabled extensions?
According to the overview at https://microsoft.github.io/language-server-protocol/overviews/lsp/overview/, VSCode language servers are essentially JSON-RPC servers. Once VSCode is open and running at least 1 language server, how can you tell what port that language server is running on in order to access it from outside of VSCode?
I want to make an experimental application where a VSCode language server is the back-end for a custom code editor that runs in a separate process.
A language server is usually a console application launched by VSCode based on configuration, and its stdin/stdout streams are redirected. There is no port opened usually. Aka, JSON-RPC is a protocol over stdin/stdout, not JSON over HTTP.
If you want to integrate a language server with your own editor, you might fully implement the language server protocol client on the editor side, so that it can perform the same language server process management and stdin/stdout stream redirection. There are many open source projects out there for famous editors, such as
https://github.com/autozimu/LanguageClient-neovim
https://github.com/atom-community/atom-languageclient
Depending on the programming language your editor is built upon, you can find more specific examples to follow.
I am developing a free software code coverage tool that leverages LSP. I do not want to reinvent the wheel in order to specify and launch a particular language server. What seems to make sense is to use VSCode to obtain the LS extension from the marketplace which will establish an entry in ~/.vscode/extensions. Once I have the extension on my computer I would use it to launch the LS much as VSCode does.
So now I need to grok this extension format to develop a launcher inside my tool. I am looking for specs, examples, tutorials, code or other material that will help, especially from other developers who have done this already.
I am already quite familiar with the LSP spec and some Microsoft VSCode sites and articles, fwiw.
Perhaps a link to the VSCode source where it leverages an extension to launch a language server would be helpful.
I have created a VS Code extension that I want to distribute within my organization. My system runs behind a corporate proxy threfore when I try to create a publisher using the command vsce create-publisher (publisher name) I get following error:
ERROR tunneling socket could not be established, statusCode=407
It does not accept --proxy-server option that VS Code supports while installing extensions.
proxies are not supported by VSCE for now. It can published outside corporate networks only. This issue is open for last three years on github.
Please find this issue link.
https://github.com/Microsoft/vscode-vsce/issues/157
I've taken a look at the VS Code documentation on creating a language server but can only see reference to a nodejs implementation. Is there SDK support for creating a language server written in C#? Ultimately this would be a DNX or Core 1.0 library.
It doesn't matter which language is being used to create a language server. as long as you are able to communicate with it from within Visual Studio Code.
A common way to establish the communication is made by using the VSCode Language Server Protocol.
You can build your language service in C#, Java, C++, Delphi or whatever language as long as you create a command line server which is able to handle that protocol.
You can see how a language server in C# is implemented when you take a look at the OmniSharp project.