In other words, if my “primitive” editor has a thin layer of a client that can communicate with, say, the Java language server of the Eclipse IDE, my editor can obtain all the smart features that are exposed by the server and instantly be on par with Eclipse. Company and company-box are used to provide the auto-completion UI.Īll of a sudden, as long as you have a client in your editor that can communicate with the language servers, which are separately downloaded, any tool can become as intelligent and feature-rich as the popular IDEs and smart editors. If you’d like to read more about the inner workings, consider this post.Įmacs showing language-aware auto-completion powered by the clangd language server. In short, LSP decouples the tooling into servers and clients, with the former powering all the intelligent activities, and the latter being integrated into any development tool of your choice. That said, everything changed when Microsoft released its development of the Language Server Protocol. After all, this requires a deep understanding of both the programming language and the code, which is the main reason why IDEs are created in the first place. When compared with modern editors and IDEs (such as IntelliJ IDEA, P圜harm, and Visual Studio Code), old-school editors like Emacs or Vim fail to provide intelligent actions such as “auto-complete (Intellisense)”, “go to definition/references”, and “on-the-fly error checking” out-of-the-box. This post introduces the combination of Emacs and LSP, and how you can make your own editor “smarter” by using the same idea of communications between an editor client and multiple language servers.Įdit: Thank you for the support, this blog post got featured on the front page of Hacker News (YCombinator).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |