Skip to content

Commit a586145

Browse files
committed
📝 Update configure.md
Fix #3
1 parent ddcc0df commit a586145

File tree

2 files changed

+68
-19
lines changed

2 files changed

+68
-19
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
2-
exclude: ^templates/.*|.*\.json$
2+
exclude: ^templates/|\.json$
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.5.0
6+
rev: v4.6.0
77
hooks:
88
- id: check-added-large-files
99
- id: fix-byte-order-marker
@@ -47,7 +47,7 @@ repos:
4747
hooks:
4848
- id: check-mailmap
4949
- repo: https://github.com/rhysd/actionlint
50-
rev: v1.6.26
50+
rev: v1.7.0
5151
hooks:
5252
- id: actionlint
5353
- repo: https://github.com/adrienverge/yamllint
@@ -69,18 +69,18 @@ repos:
6969
- mdformat-config
7070
- mdformat-web
7171
- repo: https://github.com/DavidAnson/markdownlint-cli2
72-
rev: v0.12.1
72+
rev: v0.13.0
7373
hooks:
7474
- id: markdownlint-cli2
7575
additional_dependencies:
7676
- markdown-it-texmath
7777
- repo: https://github.com/astral-sh/ruff-pre-commit
78-
rev: v0.2.1
78+
rev: v0.4.4
7979
hooks:
8080
- id: ruff
8181
- id: ruff-format
8282
- repo: https://github.com/kumaraditya303/mirrors-pyright
83-
rev: v1.1.350
83+
rev: v1.1.362
8484
hooks:
8585
- id: pyright
8686

docs/resources/configure.md

Lines changed: 62 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
11
# Configure
22

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

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

8+
For vim:
9+
10+
- Change `~/.config/nvim` to `~/.vim`
11+
- Change `init.vim` to `vimrc`
12+
813
### [coc.nvim](https://github.com/neoclide/coc.nvim)
914

15+
`~/.config/nvim/coc-settings.json`:
16+
1017
```json
1118
{
1219
"languageserver": {
1320
"tmux": {
1421
"command": "tmux-language-server",
1522
"filetypes": [
1623
"tmux"
17-
],
18-
"initializationOptions": {
19-
"method": "builtin"
20-
}
24+
]
2125
}
2226
}
2327
}
2428
```
2529

26-
### [vim-lsp](https://github.com/prabirtmuxrestha/vim-lsp)
30+
### [vim-lsp](https://github.com/prabirshrestha/vim-lsp)
31+
32+
`~/.config/nvim/init.vim`:
2733

2834
```vim
2935
if executable('tmux-language-server')
@@ -33,19 +39,18 @@ if executable('tmux-language-server')
3339
\ 'name': 'tmux',
3440
\ 'cmd': {server_info->['tmux-language-server']},
3541
\ 'whitelist': ['tmux'],
36-
\ 'initialization_options': {
37-
\ 'method': 'builtin',
38-
\ },
3942
\ })
4043
augroup END
4144
endif
4245
```
4346

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

49+
`~/.config/nvim/init.lua`:
50+
4651
```lua
4752
vim.api.nvim_create_autocmd({ "BufEnter" }, {
48-
pattern = { "tmux.conf" },
53+
pattern = { "tmux.conf", ".tmux.conf" },
4954
callback = function()
5055
vim.lsp.start({
5156
name = "tmux",
@@ -57,16 +62,45 @@ vim.api.nvim_create_autocmd({ "BufEnter" }, {
5762

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

60-
```elisp
65+
`~/.emacs.d/init.el`:
66+
67+
```lisp
6168
(make-lsp-client :new-connection
6269
(lsp-stdio-connection
6370
`(,(executable-find "tmux-language-server")))
64-
:activation-fn (lsp-activate-on "tmux.conf")
71+
:activation-fn (lsp-activate-on "tmux.conf" ".tmux.conf" )
6572
:server-id "tmux")))
6673
```
6774

75+
## [Helix](https://helix-editor.com/)
76+
77+
`~/.config/helix/languages.toml`:
78+
79+
```toml
80+
[[language]]
81+
name = "tmux"
82+
language-servers = [ "tmux-language-server",]
83+
84+
[language_server.tmux-language-server]
85+
command = "tmux-language-server"
86+
```
87+
88+
## [KaKoune](https://kakoune.org/)
89+
90+
### [kak-lsp](https://github.com/kak-lsp/kak-lsp)
91+
92+
`~/.config/kak-lsp/kak-lsp.toml`:
93+
94+
```toml
95+
[language_server.tmux-language-server]
96+
filetypes = [ "tmux",]
97+
command = "tmux-language-server"
98+
```
99+
68100
## [Sublime](https://www.sublimetext.com)
69101

102+
`~/.config/sublime-text-3/Packages/Preferences.sublime-settings`:
103+
70104
```json
71105
{
72106
"clients": {
@@ -80,3 +114,18 @@ vim.api.nvim_create_autocmd({ "BufEnter" }, {
80114
}
81115
}
82116
```
117+
118+
## [Visual Studio Code](https://code.visualstudio.com/)
119+
120+
[An official support of generic LSP client is pending](https://github.com/microsoft/vscode/issues/137885).
121+
122+
### [vscode-glspc](https://gitlab.com/ruilvo/vscode-glspc)
123+
124+
`~/.config/Code/User/settings.json`:
125+
126+
```json
127+
{
128+
"glspc.serverPath": "tmux-language-server",
129+
"glspc.languageId": "tmux"
130+
}
131+
```

0 commit comments

Comments
 (0)