Is it possible to generate a Visual Studio Code extension with C#?

假装没事ソ 提交于 2019-12-11 10:57:07

问题


I am working on adding a new language support to vscode, and I have finished a debugger with C#, but this is modified from the mono-debugger sample provided in vscode document. Now I would like to make a language service, so I would like to know if it is possible to do it with C#?


回答1:


This is possible if you use an abstraction layer called the Language Server Protocol. Theoretically, it gives you the freedom to implement language support in any language that supports socket communication. You will still need a VSCode extension in JS that starts the language server, but it doesn't need to do much beyond that.

A few examples:

  • Java Language Server implemented in Java
  • Python Language Server implemented in Python
  • C/C++ Language Server implemented in C++
  • etc.

When writing a language server, you will also need a library that actually implements the protocol part of it. Looks like for C# one already exists.



来源:https://stackoverflow.com/questions/50828638/is-it-possible-to-generate-a-visual-studio-code-extension-with-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!