Clojure LSP provides a standard set of features for editing and manipulating source code, e.g. autocompletion, code navigation, refactor code, inline syntax errors and idiom warnings.
LSP and the REPL
The REPL is used to design Clojure effectively by providing instant feedback on code expressions as they are written and evaluated. A REPL based workflow supports the most effective approach to development of Clojure apps and services. Clojure LSP supports the editing activities to write Clojure code effectively, providing a static analysis of the code base that drives advance editing, navigation and refactor tasks.
Install Clojure CLIλ︎
Install Clojure CLI - Practicall Clojure
LSP layer configurationλ︎
lsp layer to
.spacemacs will automatically use LSP for Clojure formatting, autocompletion and syntax checking.
LSP will override some features provided by CIDER, so you may wish to configure lsp and lsp UI.
practicalli/spacemacs.d provides an LSP configuration with minimal UI elements and no conflicts with CIDER.
(lsp :variables lsp-ui-doc-enable nil ;; disable all doc popups lsp-ui-sideline-enable nil ;; disable sideline bar for less distraction treemacs-space-between-root-nodes nil) ;; no spacing in treemacs views
The Language Server Protocol (LSP) is a specification for tooling developers, defining a protocol for editors to talk to a language server and provide static analysis features, such as refactoring, symbol navigation, code completion, syntax highlighting.
A standard protocol means an LSP server implementation can support a wide range of tools, reducing the work of editor maintainers and helping ensure common features are available across all editors. LSP does not provide any implementation, this is left to tooling and editor developers.
- Configure Emacs as a Clojure IDE guide
- A guide on disabling/enabling lsp-mode features
- Emacs LSP UI website and emacs-lsp/lsp-ui repository