网络科技

    今日:350| 主题:246377
收藏本版
互联网、科技极客的综合动态。

[其他] Language Server Protocol

[复制链接]
壹人天荒地老 发表于 2016-10-3 19:24:09
43 6

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
Language Server Protocol

   Note:A blog covering the background and mechanics of the protocol has been added to the Visual Studio Code site. Additionally today Red Hat , Eclipse Che andothers announced support for the protocol.
  The Language Server protocol is used between a tool (the client) and a language smartness provider (the server) to integrate features like auto complete, goto definition, find all references and alike into the tool. The following diagram illustrates the communication between a tool and the language server.
   
Language Server Protocol-1 (background,definition,maintained,particular,references)

  The language server maintains semantic information about a program implemented in a particular language.
  
       
  • When the user opens a document in the tool, it notifies the language server that the document was opened and that the truth of the document is now maintained by the tool in a memory buffer.   
  • When the user edits the document, the server is notified of the changes and updates the program's semantic information.   
  • As the user makes changes the language server analyses the document and notifies the tool with any errors and warnings (diagnostics) that it finds.   
  • When the user requests to go to the definition of a symbol, the client sends a definition request to the server. The server responds with the URI of the document and a range inside that document. Based on this information the tool opens the corresponding document at the position where the symbol is defined.   
  • When the user closes the document, a didClose notification is sent, informing the language server that the truth of the file is now on the file system.  
   The communication between the Editor/IDE host and the Language Server uses JSON RPC v2.0 . The protocol supports servers with different capabilities. The first request sent from the Editor/IDE to the language server informs the server about the supported language features.
   The first version of the protocol is based on experiences we gained while integrating OmniSharp and theTypeScript Server into VS Code . See thehistory section for a brief history on how the protocol evolved.
  Contributing

   If you are interested in fixing issues like typos or contributing directly to the protocol specification you can either file an issue or provide a pull request containing the changes to the protocol.md file.
  When proposing an extension to the specification, then please refer to an implementation of the proposed changes in a language server. This will help us in understanding the particular use case.
   This project has adopted the Microsoft Open Source Code of Conduct . For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.
  The Language Server Protocol

   The fileprotocol.md specifies the language server protocol.
  License

   Creative Commons Attribution / MIT
友荐云推荐




上一篇:别傻了,大公司的安全感是个伪命题
下一篇:Google's big hardware event: What to expect
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

mengnie 发表于 2016-10-7 04:04:50
mengnie回复的不是帖子,是寂寞!
回复 支持 反对

使用道具 举报

Yooee 发表于 2016-10-8 00:09:57
帮顶,帮顶,快速顶贴中・・・・・・
回复 支持 反对

使用道具 举报

胡笑 发表于 2016-10-11 11:42:48
报,报,报,报,报告楼主,我来了!
回复 支持 反对

使用道具 举报

635 发表于 2016-10-11 12:03:16
就算是一坨屎,也有遇见屎壳郎的那天。所以你大可不必为今天的自己有太多担忧。
回复 支持 反对

使用道具 举报

幼柏 发表于 2016-10-12 00:48:53
突然觉得壹人天荒地老说的很有道理,赞一个!
回复 支持 反对

使用道具 举报

邹胜龙 发表于 2016-10-12 00:49:15
确实说的很好
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表