You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-18
Original file line number
Diff line number
Diff line change
@@ -128,32 +128,29 @@ let g:ale_linters = {
128
128
\ }
129
129
```
130
130
131
+
For Vim8/NeoVim v0.5 using [jayli/vim-easycomplete](https://github.com/jayli/vim-easycomplete). Execute `:InstallLspServer sh` and config nothing. Maybe it's the easiest way to use bash-language-server in vim/nvim.
132
+
131
133
#### Neovim
132
134
133
-
For Neovim v0.8:
135
+
For Neovim 0.11+ with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
134
136
135
137
```lua
136
-
vim.api.nvim_create_autocmd('FileType', {
137
-
pattern='sh',
138
-
callback=function()
139
-
vim.lsp.start({
140
-
name='bash-language-server',
141
-
cmd= { 'bash-language-server', 'start' },
142
-
})
143
-
end,
144
-
})
138
+
vim.lsp.enable'bashls'
145
139
```
140
+
For Neovim 0.11+ without plugins
146
141
147
-
For NeoVim using [autozimu/LanguageClient-neovim][languageclient-neovim], add the following configuration to
148
-
`init.vim`:
149
-
150
-
```vim
151
-
let g:LanguageClient_serverCommands = {
152
-
\ 'sh': ['bash-language-server', 'start']
153
-
\ }
142
+
```lua
143
+
vim.lsp.config.bashls= {
144
+
cmd= { 'bash-language-server', 'start' },
145
+
filetypes= { 'bash', 'sh' }
146
+
}
147
+
vim.lsp.enable'bashls'
154
148
```
155
149
156
-
For Vim8/NeoVim v0.5 using [jayli/vim-easycomplete](https://github.com/jayli/vim-easycomplete). Execute `:InstallLspServer sh` and config nothing. Maybe it's the easiest way to use bash-language-server in vim/nvim.
150
+
For Neovim 0.10 or lower with [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
0 commit comments