Skip to content

Commit a7ed80b

Browse files
docs: update readme to use nvim-lspconfig (#8)
1 parent dd6ffd5 commit a7ed80b

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

README.md

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,11 @@ A Language Server for **proto3** files. It uses tree-sitter parser for all opera
88
- [x] Go to definition
99
- [x] Diagnostics
1010

11-
## Installation and testing
11+
## Installation
1212

13-
Run `cargo install protols` to install and add below to your `init.lua` until we start shipping this via Mason.
13+
Run `cargo install protols` to install and add below to setup using [`nvim-lspconfig`](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#protols) until we start shipping this via Mason.
1414

1515
```lua
16-
local client = vim.lsp.start_client({
17-
name = "protols",
18-
cmd = { vim.fn.expand("$HOME/.cargo/bin/protols") },
19-
})
20-
21-
if not client then
22-
vim.notify("Could not connect to protols server")
23-
end
24-
25-
vim.api.nvim_create_autocmd("FileType", {
26-
pattern = "proto",
27-
callback = function()
28-
vim.lsp.buf_attach_client(0, client)
29-
end,
30-
})
16+
require'lspconfig'.protols.setup{}
3117

3218
```

0 commit comments

Comments
 (0)