如何把VS Code的Language Server Protocol整合到Eclipse中来
Eclipse官方已經在著手做這件事情了,在Oxygen中,Eclipse提供了LSP4E擴展點(language server protocal for eclipse)來支持language server protocal,TM4E(textmate for eclipse)來支持語法高亮。
簡單來說,我們可以用一個editor去實現對多種語言的語法補全和高亮顯示,就跟VS code的效果一樣,是不是很神奇,有木有很驚喜。
下面是官方給的教程,挺簡單的,主要原理是利用本機安裝的node.js在Eclipse這個平臺上運行c#的language server js文件(這個文件在vs code的安裝源碼里面就能找到)
http://www.eclipse.org/community/eclipse_newsletter/2017/may/article3.php
然后Eclipse Lab里面有一個BlueSky的項目,里面主要是用language server protocol做對各種前段語言的支持。Show u the code:
https://github.com/mickaelistria/eclipse-bluesky
同時附上Microsoft開源的language server protocol庫:
https://github.com/Microsoft/language-server-protocol/wiki/Protocol-Implementations
這段時間自己利用language server protocol做了對Groovy的語法補全和高亮支持的Eclipse Plugin,過段時間出一個詳細的教程。
下面附上做這個插件時找到的各種資料:
https://www.slideshare.net/mickaelistria/eclipsecon-europe-2016-s-cela-mistria-eclipse-generic-and-extensible-editor-and-language-servers
https://github.com/eclipselabs/lsp4e-python
https://github.com/LucasBullen/LSP4J_Tutorial
?
轉載于:https://www.cnblogs.com/hibou/p/7763267.html
總結
以上是生活随笔為你收集整理的如何把VS Code的Language Server Protocol整合到Eclipse中来的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: JSP自定义标签开发与打包
- 下一篇: 7-20(排序) 奥运排行榜(25 分)