Skip to content

Commit

Permalink
📝 Update configure.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Dec 10, 2023
1 parent af6789d commit 9a14751
Showing 1 changed file with 47 additions and 13 deletions.
60 changes: 47 additions & 13 deletions docs/resources/configure.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
# Configure

See customization in
<https://zathura-language-server.readthedocs.io/en/latest/api/zathura-language-server.html#zathura_language_server.server.get_document>.
- For windows, change `~/.config` to `~/AppData/Local`
- For macOS, change `~/.config` to `~/Library`

## (Neo)[Vim](https://www.vim.org)

For vim:

- Change `~/.config/nvim` to `~/.vim`
- Change `init.vim` to `vimrc`

### [coc.nvim](https://github.com/neoclide/coc.nvim)

`~/.config/nvim/coc-settings.json`:

```json
{
"languageserver": {
"zathura": {
"command": "zathura-language-server",
"filetypes": [
"zathurarc",
],
"initializationOptions": {
"method": "builtin"
}
"zathurarc"
]
}
}
}
```

### [vim-lsp](https://github.com/prabirzathurarestha/vim-lsp)
### [vim-lsp](https://github.com/prabirshrestha/vim-lsp)

`~/.config/nvim/init.vim`:

```vim
if executable('zathura-language-server')
Expand All @@ -33,16 +39,15 @@ if executable('zathura-language-server')
\ 'name': 'zathura',
\ 'cmd': {server_info->['zathura-language-server']},
\ 'whitelist': ['zathurarc'],
\ 'initialization_options': {
\ 'method': 'builtin',
\ },
\ })
augroup END
endif
```

## [Neovim](https://neovim.io)

`~/.config/nvim/init.lua`:

```lua
vim.api.nvim_create_autocmd({ "BufEnter" }, {
pattern = { "zathurarc*" },
Expand All @@ -57,16 +62,45 @@ vim.api.nvim_create_autocmd({ "BufEnter" }, {

## [Emacs](https://www.gnu.org/software/emacs)

```elisp
`~/.emacs.d/init.el`:

```lisp
(make-lsp-client :new-connection
(lsp-stdio-connection
`(,(executable-find "zathura-language-server")))
:activation-fn (lsp-activate-on "zathurarc*")
:server-id "zathura")))
```

## [Helix](https://helix-editor.com/)

`~/.config/helix/languages.toml`:

```toml
[[language]]
name = "zathurarc"
language-servers = [ "zathura-language-server",]

[language_server.zathura-language-server]
command = "zathura-language-server"
```

## [KaKoune](https://kakoune.org/)

### [kak-lsp](https://github.com/kak-lsp/kak-lsp)

`~/.config/kak-lsp/kak-lsp.toml`:

```toml
[language_server.zathura-language-server]
filetypes = [ "zathurarc",]
command = "zathura-language-server"
```

## [Sublime](https://www.sublimetext.com)

`~/.config/sublime-text-3/Packages/Preferences.sublime-settings`:

```json
{
"clients": {
Expand All @@ -75,7 +109,7 @@ vim.api.nvim_create_autocmd({ "BufEnter" }, {
"zathura-language-server"
],
"enabled": true,
"selector": "source.zathura"
"selector": "source.zathurarc"
}
}
}
Expand Down

0 comments on commit 9a14751

Please sign in to comment.