== Introduction

:link-lsp-ui: https://github.com/emacs-lsp/lsp-ui[lsp-ui]
:link-company-lsp: https://github.com/tigersoldier/company-lsp[company-lsp]

https://github.com/emacs-lsp/lsp-mode[lsp-mode] is a client/library
package that allows Emacs to communicate with
language servers
footnote:[A stand-alone, editor-agnostic program that provides IDE-like
functionality (completion, references, error checking, etc) over a
defined protocol. https://github.com/Sarcasm/irony-mode[irony-mode] and
https://github.com/rust-lang/rls[rls] are both language servers that use
different protocols to communicate.]
using Microsoft's
https://microsoft.github.io/language-server-protocol/[Language Server
Protocol]. `lsp-mode` aims to plug-in to the vast collection of
extensive Emacs tools and packages to provide a familiar, yet powerful
interface for programmers. `lsp-mode` also provides an API for Emacs
package developers to provide LSP support to users (see: {link-company-lsp},
https://github.com/emacs-lsp/lsp-treemacs[lsp-treemacs],
https://github.com/emacs-lsp/helm-lsp[helm-lsp]). It supports a wide
array of standard LSP methods, and can be extended with optimally work
with non-standard, language-specific functionality as well (see:
https://github.com/emacs-lsp/lsp-java[lsp-java],
https://github.com/MaskRay/emacs-ccls[emacs-ccls]).

Out of the box, it supports 25+ programming languages, with
various other external packages that provide more specific language
features. Adding support for a new language server can be accomplished
in a few lines of code, with more fine tuning and configuration options
available.

=== Basic Features

* Focuses on providing an asynchronous/non-blocking interface for as
  much functionality as possible.
* Real-time diagnostics/linting support (either via `flymake` for Emacs
  versions 26 and above, or
  https://github.com/flycheck/flycheck[flycheck], using {link-lsp-ui})
* Code completion - support for the (relatively basic)
  `completion-at-point` interface in Emacs, documented and asynchronous
  completion support provided by {link-company-lsp}.
* Documentation/highlight on hover: Basic, out of the box support
  provided using `eldoc`. Richer and more extensive functionality
  available in {link-lsp-ui}.
* Code Actions: Text based commands that provide refactoring/linting/code
  fixing. Supported natively with `lsp-execute-code-action`, and by {link-lsp-ui}.
  Otherwise known as "quick fixes" in Visual Studio Code.
* Code outline/explorer: In-built support for
  https://www.gnu.org/software/emacs/manual/html_node/emacs/Imenu.html[Imenu]/
  helm-imenu.
* Cross referencing, goto-definition, goto-implementation with
  https://www.gnu.org/software/emacs/manual/html_node/emacs/Xref.html[Xref].
* Code/Symbol Highlighting
* Formatting, On-type code formatting
* Debugging support with the
  https://microsoft.github.io/debug-adapter-protocol/[Debug Adapter Protocol]
  with https://github.com/emacs-lsp/dap-mode[dap-mode].
* Helm support using https://github.com/emacs-lsp/helm-lsp[helm-lsp]
