LSP, or Language Server Protocol, makes programming easier by introducing features like more precise auto-completion and definition lookup. It may have scratched your itches, and you are wondering what the experience is like in Emacs.
Emacs has mainly two LSP clients out there, eglot and lsp-mode. Eglot is lightweight, and it could almost run out of the box. So in this post I will briefly show you how to use eglot.
As a user, we only need to know these commands to get started:
M-x eglot connects to an LSP server for the current project
M-x flymake-goto-next-error goes to previous error
M-x flymake-goto-prev-error goes to next error
M-. or M-x xref-find-definitions finds the definition and opens it in the current window
M-. or M-x xref-pop-marker-stack jumps back
M-? or M-x xref-find-references finds the references
Occasionally, we may need:
M-x company-complete to trigger completions manually
I've also made a video to demonstrate the workflow as below:
And, the emacs-showcase.el is following for the video: