In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
How to analyze the Visual Studio language server protocol, I believe that many inexperienced people do not know what to do. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Language Server Protocol (LSP) is an important component of Visual Studio Code. The language server is actually a stand-alone compiler or parser that handles tasks such as compiler error reporting, text suspension, code completion (that is, IntelliSense), and so on.
Language server is not a new concept, Vim and Emacs have long been using it to implement code completion. The language server for C # is called OmniSharp and supports VS Code, Sublime, Atom, Emacs, Vim and Brackets.
VS Code implements another language server for TypeScript. Unlike OmniSharp, it is based on HTTP, "dealing with server processes through standard input and output, and using the JSON message format, similar to the request and response of the V8 debugger protocol."
VS Code now has two language servers, and Microsoft believes it is necessary to develop a common standard that will be followed by existing and future new languages. As a result, the language server protocol emerged.
The language server protocol uses JSON-RPC as the most basic message format. JSON-RPC is a more lightweight alternative to SOAP. Similar to SOAP, it has no special requirements for the transport layer, so it can be transmitted through standard input and output, pipes, sockets, and so on.
Visual Studio itself does not support the language server protocol, so you need to use an adapter to let the VS language service interact with the LSP client. The Microsoft Development Lab provides a tool called the language server protocol client.
In addition to client-side tools, you may also need a language extension. The language server protocol example on GitHub demonstrates how to create a language extension.
Adam Driscoll provides a more complex example of a Visual Studio language server protocol extension called PowerShell. Adam said:
I think we need to rely on LSP clients to support more languages in the future. Visual Studio and Visual Studio Code share the same language service, which is a great situation. But we can do better. LSP does not support debugging at this time. It's a special protocol. LSP is not perfect in Visual Stuido, and there is already a chart in the document to illustrate this problem. It will take time to perfect it.
After reading the above, have you mastered the method of how to analyze Visual Studio's language server protocol? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.