Language Server Protocol (LSP, not to be confused with the Louisiana State Police), is a protocol for communication between a editor and an IDE. The reasoning behind the use of LSP is that the work done to provide new features and improvements can be done in a single language server, which then communicates over a socket or other interface with any editor that implements the protocol, as opposed to a crazy quilt of editors implementing features one by one.
A list of Emacs-supported languages can be found here. I strongly recommend using LSP for any language you develop in, with the possible exception of Rust, as the LSP clients have some bug in them that I have yet to work around to my satisfaction.
An example configuration for automatically activating lsp-mode
when
entering dart-mode
:
;; Dart/Flutter
(add-hook
'dart-mode-hook
(lambda ()
(lsp)))
The LSP package will try and autodetect the correct language server
when the major mode is activated. If lsp-mode
is invoked without an
installed server, the user can select a server for the client to
download and install.