Skip to content

Commit 44a7757

Browse files
authored
docs: Add testing with neovim instructions (#1)
1 parent f1521b5 commit 44a7757

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,22 @@
11
# protols
22
Language server for proto files
3+
4+
## Testing with neovim
5+
```lua
6+
local client = vim.lsp.start_client({
7+
name = "protols",
8+
cmd = { "<absolute path to protols binary>" },
9+
})
10+
11+
if not client then
12+
vim.notify("Could not connect to protols server")
13+
end
14+
15+
vim.api.nvim_create_autocmd("FileType", {
16+
pattern = "proto",
17+
callback = function()
18+
vim.lsp.buf_attach_client(0, client)
19+
end,
20+
})
21+
22+
```

0 commit comments

Comments
 (0)