Skip to content

Commit 555abb7

Browse files
authored
Merge pull request #702 from jsta/patch-1
Use built-in LSP instead of abandoned LanguageClient-neovim, closes #701
2 parents 9a70065 + 8818e2d commit 555abb7

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,20 @@ The following editors are supported by installing the corresponding extensions:
6464

6565
- Sublime Text: [R-IDE](https://github.com/REditorSupport/sublime-ide-r)
6666

67-
- Vim/NeoVim: [LanguageClient-neovim](https://github.com/autozimu/LanguageClient-neovim) with settings
67+
- NeoVim: NeoVim's LSP client with settings
6868

69-
```vim
70-
let g:LanguageClient_serverCommands = {
71-
\ 'r': ['R', '--no-echo', '-e', 'languageserver::run()'],
72-
\ }
69+
```lua
70+
vim.lsp.config['r_language_server'] = {
71+
settings = {
72+
filetypes = { "r", "rmd" },
73+
},
74+
}
75+
vim.api.nvim_create_autocmd("FileType", {
76+
pattern = { "r", "rmd" },
77+
callback = function()
78+
vim.lsp.start(vim.lsp.config["r_language_server"])
79+
end,
80+
}
7381
```
7482

7583
or, if you use [coc.nvim](https://github.com/neoclide/coc.nvim), you can do one of two things:

0 commit comments

Comments
 (0)