Skip to content

Commit 2c068eb

Browse files
authored
Merge pull request #611 from Benjman/patch-1
NeoVim v0.8 simplified LSP bootstrapping #610
2 parents 9cf4c5d + 7508132 commit 2c068eb

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

README.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,20 @@ let g:ale_linters = {
8383

8484
#### Neovim
8585

86+
For Neovim v0.8:
87+
88+
```lua
89+
vim.api.nvim_create_autocmd('FileType', {
90+
pattern = 'sh',
91+
callback = function()
92+
vim.lsp.start({
93+
name = 'bash-language-server',
94+
cmd = { 'bash-language-server', 'start' },
95+
})
96+
end,
97+
})
98+
```
99+
86100
For NeoVim using [autozimu/LanguageClient-neovim][languageclient-neovim], add the following configuration to
87101
`init.vim`:
88102

@@ -92,22 +106,6 @@ let g:LanguageClient_serverCommands = {
92106
\ }
93107
```
94108

95-
For NeoVim v0.5(nightly) using its built-in lsp, install [neovim/nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) and add the following configuration to either your `init.vim` or `init.lua`
96-
97-
`init.vim`:
98-
99-
```vim
100-
lua require'lspconfig'.bashls.setup{}
101-
```
102-
103-
or
104-
105-
`init.lua`:
106-
107-
```lua
108-
require'lspconfig'.bashls.setup{}
109-
```
110-
111109
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.
112110

113111
#### Oni

0 commit comments

Comments
 (0)