Skip to content

Commit

Permalink
docs: Add testing with neovim instructions (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
coder3101 authored Jun 10, 2024
1 parent f1521b5 commit 44a7757
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,22 @@
# protols
Language server for proto files

## Testing with neovim
```lua
local client = vim.lsp.start_client({
name = "protols",
cmd = { "<absolute path to protols binary>" },
})

if not client then
vim.notify("Could not connect to protols server")
end

vim.api.nvim_create_autocmd("FileType", {
pattern = "proto",
callback = function()
vim.lsp.buf_attach_client(0, client)
end,
})

```

0 comments on commit 44a7757

Please sign in to comment.