These slides are generated from an org file with some speaker notes and code blocks
Available at https://gjp.cc/lsp
wget gjp.cc/lsp-mode.org
# or
git clone github.com/gpittarelli/lsp-presentation
IDE features:
Implement language diagnostics once, as a server
All editors can share the smarts
Overview: https://langserver.org/
Spec: https://microsoft.github.io/language-server-protocol/specification
Minor mode:
Available on MELPA:
(require 'package)
(package-initialize)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(package-install 'lsp-mode)
(lsp-define-stdio-client
lsp-css
"css"
lsp-css--get-root
'("css-languageserver" "--stdio"))
(package-install 'lsp-css)
(defun my-rust-mode-setup ()
(company-mode)
(lsp-rust-enable)
(eldoc-mode t)
(flycheck-mode)
(lsp-ui-mode))
(add-hook 'rust-mode-hook #'my-rust-mode-setup)
(add-to-list 'auto-mode-alist '("\\.rs" . rust-mode))
Based on major mode and/or file extension, we should be able to automatically:
Note there's a couple defunct "emacs-lsp", etc. packages on GitHub from previous attempts by other people.
eglot is the only reasonably working alternative