spacemacs/layers/+tools/lsp
syl20bnr ebe4c60264 Revert "Defer packages by default using use-package-always-defer"
This reverts commit 29c78ce841 and all other fixes
that have been made afterwards.

The motivation is that use-package is seen by many as a replacement for
`require`. Is use-package always defer the loading of packages then is breaks
this use case, this does not respect POLA so even if it was making Spacemacs
loading faster (up to 3s faster on some startup on my machine) we just cannot
use it, it would be irresponsible. Spacemacs should be easy to use, loading
performance will come with time but it is not a priority.
2018-03-03 23:40:10 -05:00
..
funcs.el lsp: add files header and rename lsp// functions 2018-02-18 22:53:07 -05:00
packages.el Revert "Defer packages by default using use-package-always-defer" 2018-03-03 23:40:10 -05:00
README.org lsp: respect 80 chars per line in README.org 2018-02-18 22:49:13 -05:00

LSP layer

Description

This layer adds support for basic language server protocol packages speaking language server protocol.

Features:

  • Cross references (definitions, references, document symbol, workspace symbol search and others)
  • Workspace-wide symbol rename
  • Symbol highlighting
  • Flycheck
  • Completion with company-lsp
  • Signature help with eldoc
  • Symbol documentation in a child frame (lsp-ui-doc)

Each language server may support the language server protocol in varying degree and they may also provide extensions, check the language server's website for details. M-x lsp-capabilities in a LSP buffer to list capabilities of the server.

Configuration

The LSP ecosystem is based on two packages: lsp-mode and lsp-ui. Please check out their documentation.

If you add lsp-*-enable to major mode hooks for auto initialization of language clients, customize lsp-project-whitelist lsp-project-blacklist to disable projects you don't want to enable LSP.

If some features doe not work as intended, here is a common check list.

  • M-x lsp-capabilities If the LSP workspace is initialized correctly
  • M-: xref-backend-functions should be (lsp--xref-backend) for cross references
  • M-: completion-at-point-functions should be (lsp-completion-at-point) for completion