是否可以使用 C# 生成 Visual Studio Code 扩展? [英] Is it possible to generate a Visual Studio Code extension with C#?

查看:18
本文介绍了是否可以使用 C# 生成 Visual Studio Code 扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 vscode 添加新的语言支持,我已经完成了一个 C# 调试器,但这是从 vscode 文档中提供的单声道调试器示例修改而来的.现在想做一个语言服务,想知道C#能不能做?

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#?

推荐答案

如果您使用名为 语言服务器协议.从理论上讲,它使您可以自由地以任何支持套接字通信的语言来实现语言支持.您仍然需要在 JS 中使用 VSCode 扩展来启动语言服务器,但除此之外它不需要做太多事情.

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.

几个例子:

在编写语言服务器时,您还需要一个实际实现其协议部分的库.看起来像 C# 一个已经存在.

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.

这篇关于是否可以使用 C# 生成 Visual Studio Code 扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆