2

I want to add ansible DSL (based on yaml) support for Visual Studio 2022 (with extension), I found a language server for ansible DSL in visual studio code, and I want to port this language server into my extension for Visual Studio 2022.

Can anybody point to any references or even examples of existing porting?

I think porting with minimal changing is very useful, because we can update language server based on original language server with every changes.

I request sample in https://github.com/microsoft/VSSDK-Extensibility-Samples/issues/279#issue-1589674661

sorosh_sabz
  • 2,356
  • 2
  • 32
  • 53
  • I found basic Q&A about writing language extension adding to vscode, https://stackoverflow.com/q/30687783/1539100 , but I think it is irrelevant, from my question – sorosh_sabz Feb 16 '23 at 08:47
  • You might first create a completely new extension following this guide, https://learn.microsoft.com/en-us/visualstudio/extensibility/adding-an-lsp-extension?view=vs-2022 and its official sample, and then cut/paste the useful code to your original extension project. – Lex Li Feb 16 '23 at 16:56
  • It is not clear for me to how to use language server (from for example ansible language server) into extension. – sorosh_sabz Feb 16 '23 at 17:03
  • ? https://learn.microsoft.com/en-us/visualstudio/extensibility/adding-an-lsp-extension?view=vs-2022#main-interface---ilanguageclient You initialize a `ILanguageClient` to point to the LSP server executable. Exactly the same thing like in VS Code. – Lex Li Feb 16 '23 at 17:27

0 Answers0