1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:50:05 +08:00

docs(clojure): update clojure guide

This commit is contained in:
wsdjeg 2023-04-01 19:52:53 +08:00
parent 34934b2bd7
commit cf74aaf4a0

View File

@ -19,6 +19,9 @@ Each of the following sections will be covered:
- [Enable language layer](#enable-language-layer)
- [code completion](#code-completion)
- [Language server](#language-server)
- [neovim(`>=0.5.0`)](#neovim050)
- [vim or neovim(`<0.5.0`)](#vim-or-neovim050)
- [alternate file jumping](#alternate-file-jumping)
- [code running](#code-running)
- [REPL support](#repl-support)
@ -46,6 +49,50 @@ for more info, you can read the [lang#clojure](../layers/lang/clojure/) layer do
By default the autocomplete layer has been enabled, so after loading `lang#clojure` layer, the code completion
for clojure language should work well.
### Language server
There are two ways to configure the clojure language server protocol.
#### neovim(`>=0.5.0`)
If you are using `nvim(>=0.5.0)`. You need to use `enabled_clients` to specific the language servers.
for example:
```toml
[[layers]]
name = 'lsp'
enabled_clients = ['clojure_lsp']
```
To override the command of client, you may need to use `override_client_cmds` option:
```toml
[[layers]]
name = "lsp"
enabled_clients = ['clojure_lsp']
[layers.override_client_cmds]
clojure_lsp = ['clojure-lsp']
```
You need to install [`clojure-lsp`](https://clojure-lsp.io/installation/).
```
scoop install clojure-lsp
```
#### vim or neovim(`<0.5.0`)
To enable language server protocol support, you may need to enable lsp layer.
```toml
[[layers]]
name = "lsp"
filetypes = [
"clojure"
]
[layers.override_cmd]
clojure = ['clojure-lsp']
```
### alternate file jumping