Skip to content

Commit fe9587a

Browse files
TomJo2000Freed-Wu
authored andcommitted
docs(configure/neovim): Recommend official upstream lsp configs
1 parent fabcf33 commit fe9587a

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

docs/resources/configure.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,22 @@ if executable('termux-language-server')
4040
endif
4141
```
4242

43-
## [Neovim](https://neovim.io)
43+
### [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) (upstream configs)
4444

45-
`~/.config/nvim/init.lua`:
45+
Example via [`lazy.nvim`](https://github.com/folke/lazy.nvim)\
46+
For other options see: [nvim-lspconfig#install](https://github.com/neovim/nvim-lspconfig#install)\
47+
Or the documentation for your plugin manager of choice.
48+
49+
`~/.config/nvim/init.vim`:
4650

4751
```lua
48-
vim.api.nvim_create_autocmd({ "BufEnter" }, {
49-
pattern = { "build.sh", "*.subpackage.sh", "PKGBUILD", "*.install",
50-
"makepkg.conf", "*.ebuild", "*.eclass", "color.map", "make.conf" },
51-
callback = function()
52-
vim.lsp.start({
53-
name = "termux",
54-
cmd = { "termux-language-server" }
55-
})
56-
end,
52+
require('lazy').setup({
53+
-- [...]
54+
{ 'neovim/nvim-lspconfig' },
55+
-- [...]
5756
})
57+
58+
vim.lsp.enable('termux_language_server')
5859
```
5960

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

0 commit comments

Comments
 (0)