Skip to content

Commit f7835ed

Browse files
authored
Update Arch installation and add Neovim instructions (#90)
* Now available in the Arch Linux repos * Add instructions for Neovim
1 parent cd94503 commit f7835ed

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

README.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<img
1717
src="assets/example.png" alt="Example" width="400" >
1818

19-
No setup needed. Code book will automatically detect the language you are editing and mark issues for you. Note, Codebook will only mark issues for words that you control, where they are initially defined.
19+
No setup needed. Codebook will automatically detect the language you are editing and mark issues for you. Note, Codebook will only mark issues for words that you control, where they are initially defined.
2020

2121
Please gift us a ⭐ if you find Codebook useful!
2222

@@ -28,7 +28,7 @@ Codebook is the most popular spell checker for Zed! To install, go to the Extens
2828

2929
**Note**: The version that Zed displays in the extension menus is for the [Zed Extension](https://github.com/blopker/codebook-zed), and not the LSP version (this repo). The extension will automatically update the LSP. If that updater is broken for some reason, try uninstalling the extension and reinstalling.
3030

31-
If quickfix code actions are not showing up for specific languages, ensure your `settings.json` file incudes the special `"..."`, or `"codebook"`, value in any `language_servers` values defined:
31+
If quickfix code actions are not showing up for specific languages, ensure your `settings.json` file includes the special `"..."`, or `"codebook"`, value in any `language_servers` values defined:
3232

3333
```json
3434
"languages": {
@@ -60,10 +60,9 @@ editor](https://helix-editor.com/) by adding the LSP to the
6060
[language.toml](https://docs.helix-editor.com/languages.html) configuration
6161
file.
6262

63-
First, get the latest release from [Releases](https://github.com/blopker/codebook/releases) for your architecture.
63+
First, [install Codebook](#installation), and ensure that `codebook-lsp` is installed into your `$PATH`.
6464

65-
Then, ensure that `codebook-lsp` is installed into your `$PATH` and add into
66-
the Helix config file:
65+
Then, add into the Helix config file:
6766

6867
```toml
6968
[language-server.codebook]
@@ -78,14 +77,27 @@ language-servers = ["codebook"]
7877

7978
This can be verified with:
8079

81-
```shell
80+
```sh
8281
hx --health markdown
8382
```
8483

8584
Suggestions will appear in files opened, and
8685
[space-mode](https://docs.helix-editor.com/keymap.html#space-mode) `a` key
8786
binding can be used to accept suggestions.
8887

88+
### Neovim
89+
90+
[nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) includes a [configuration for Codebook](https://github.com/neovim/nvim-lspconfig/blob/master/lsp/codebook.lua).
91+
92+
First, [install Codebook](#installation), and ensure that `codebook-lsp` is installed into your `$PATH`.
93+
94+
[Install nvim-lspconfig](https://github.com/neovim/nvim-lspconfig?tab=readme-ov-file#install) if you have not already.
95+
Then, add the following to your Neovim configuration:
96+
97+
```sh
98+
vim.lsp.enable('cookbook')
99+
```
100+
89101
### Other Editors
90102

91103
Any editor that implements the Language Server Protocol should be compatible with Codebook. To get started, follow the [installation instructions](#installation), then consult your editor's documentation to learn how to configure and enable a new language server. For your reference, the following command starts the server such that it listens on `STDIN` and emits on `STDOUT`:
@@ -152,12 +164,12 @@ You can install the latest release using [eget](https://github.com/zyedidia/eget
152164
eget blopker/codebook
153165
```
154166

155-
### Arch User Repository
167+
### Arch Linux
156168

157-
The binary release is available on the AUR under the [codebook-bin](https://aur.archlinux.org/packages/codebook-bin) package. Arch users can easily install it with their favorite AUR helper, such as [paru](https://github.com/Morganamilo/paru):
169+
You can install the Codebook LSP using pacman:
158170

159171
```sh
160-
paru -S codebook-bin
172+
pacman -S codebook-lsp
161173
```
162174

163175
### Cargo Install

0 commit comments

Comments
 (0)