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
2935if 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
4144endif
4245```
4346
4447## [ Neovim] ( https://neovim.io )
4548
49+ ` ~/.config/nvim/init.lua ` :
50+
4651``` lua
4752vim .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