Skip to content

Commit 79cf5a5

Browse files
editor: refactor clojure lsp page and format for Material for MkDocs
1 parent 7ed9fa1 commit 79cf5a5

2 files changed

Lines changed: 50 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- clojure-cli: `clojure -X:deps pom`
1010
- install: debian packages approach for OpenJDK rather than a specific Ubuntu tab
1111
- install: recommended OpenJDK versions of 17 and 21 as hint
12+
- editor: refactor Clojure LSP page and format for Material for MkDocs
1213

1314
## Added
1415
- button link to Clojure CLI releases changelog to view available versions

docs/clojure-editors/clojure-lsp/index.md

Lines changed: 49 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,68 @@
1-
# Clojure LSP
1+
# Language Server Protocol
22

3-
The Language Server Protocol provides a standard set of tools that are used to developer any programming language. These tools are typically provides with a language specific server.
3+
[:globe_with_meridians: Language Server Protocol](https://microsoft.github.io/language-server-protocol/) provides a standard to provide a common set of development tools, e.g. code completion, syntax highlighting, refactor and language diagnostics.
44

5-
clojure-lsp is an implementation of an LSP server, for Clojure and ClojureScript languages.
5+
Each language requires a specific LSP server implementation.
6+
7+
An editor or plugin provides an LSP client that uses data from language servers, providing information about source code and enabling development tools to understand the code structure.
8+
9+
10+
## Clojure LSP
11+
12+
[:globe_with_meridians: clojure-lsp](https://clojure-lsp.io/) is an implementation of an LSP server for Clojure and ClojureScript languages. Clojure LSP is built on top of [clj-kondo]() which provides the static analysis of Clojure and ClojureScript code.
13+
14+
Most Clojure aware editors provide an LSP client.
615

716
![Clojure LSP example screenshot](https://emacs-lsp.github.io/lsp-mode/tutorials/images/clojure-call-hierarchy.png)
817

918

1019
## Install
1120

12-
Follow your preferred option on the [Clojure LSP installation guide](https://clojure-lsp.io/installation/)
21+
[Clojure LSP installation guide](https://clojure-lsp.io/installation/) covers multiple operating systems.
22+
23+
=== "Linux"
24+
25+
Practicalli recommends downloading the `clojure-lsp-native-linux-amd64` from [GitHub release page](https://github.com/clojure-lsp/clojure-lsp/releases)
26+
27+
Extracts the `clojure-lsp` binary to `~/.local/bin/clojure-lsp`
28+
29+
=== "Homebrew"
30+
Clojure LSP project provides a custom tap for installing the latest version.
31+
32+
!!! NOTE ""
33+
```shell
34+
brew install clojure-lsp/brew/clojure-lsp-native
35+
```
1336

14-
Practicalli downloads the clojure-lsp-native-linux-amd64.zip file from [GitHub release page](https://github.com/clojure-lsp/clojure-lsp/releases)and extracts the `clojure-lsp` binary to `~/.local/bin/clojure-lsp`.
37+
??? WARNING "Homebrew default package deprecated"
38+
The `clojure-lsp` formula is deprecated and should not be used.
1539

16-
`clojure-lsp -v` in a terminal will test if the the install is working.
40+
`brew remove clojure-lsp` if the default clojure-lsp was installed
1741

18-
??? HINT "Editors may install Clojure LSP for you"
42+
Check Clojure LSP server is working via the command line
43+
44+
!!! NOTE ""
45+
```shell
46+
clojure-lsp --version
47+
```
48+
49+
50+
??? HINT "Editors may install Clojure LSP"
1951
Spacemacs LSP layer will prompt to install a language server when first opening a file of a major mode where LSP is enabled. E.g. when a Clojure related file is opened, the Clojure LSP server is downloaded if not installed (or not found on the Emacs path).
2052

53+
Neovim package called mason manages the install of lint & format tools as well as LSP servers.
54+
2155
VSCode Calva plugin includes the clojure-lsp server, although an external server can be configured.
2256

2357

58+
## Configure
59+
60+
61+
62+
??? "Practicalli Clojure LSP Configuration"
63+
64+
65+
2466
## References
2567

2668
* [LSP mode - A guide on disabling / enabling features](https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/) - if the Emacs UI is too cluttered or missing visual features

0 commit comments

Comments
 (0)