扩展时如何在 VSCODE 上发布 LSP 语言服务器 [英] How to publish a LSP language server on VSCODE as we do extension
问题描述
已经通过官方网站,发布扩展的整个过程有很好的记录:vscode 发布扩展
Have been through official site, the whole process is very well documented for publishing extension : vscode publish extension
我的疑问是关于在 vscode 中发布语言服务器(LSP),因为 LSP 的文件结构与扩展的文件结构不同,即扩展只有客户端,但 LSP 分别具有客户端和服务器目录,如 LSP 代码 和 扩展代码.
My doubt is regarding publish Language server(LSP) in vscode as file structure for LSP is different from that of Extension i.e extension just have Client but LSP has both Client and server directory separately as in LSP Code and Extension code.
我需要在 client
和 server
目录中分别运行 vsce publish
吗?
Do i need to run vsce publish
separately in client
and server
directory ?
已经通过 stackoverflow 中的各种答案作为 here.
Have been through various answers in stackoverflow as here.
任何帮助将不胜感激.
推荐答案
您应该只需要发布扩展本身(客户端)而不是服务器.
You should only need to publish the extension itself (the client) and not the server.
LSP 示例有点奇怪,因为它并排显示了客户端和服务器文件夹,而服务器实际上是客户端的依赖项.您可以将服务器作为节点模块引入,也可以像示例一样将服务器 JS 复制到客户端.然后只需在客户端运行 vsce publish
将所有内容推送到市场
The LSP example is a little weird because it shows the client and server folders side by side, whereas the server is actually a dependency of the client. You can either pull in the server as a node module or copy the server JS into the client like the example does. Then just run vsce publish
in the client to push everything up to the marketplace
这篇关于扩展时如何在 VSCODE 上发布 LSP 语言服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!