mirror of
https://github.com/coder3101/protols.git
synced 2025-12-23 05:36:51 +00:00
Language Server for protocol buffers
|
|
||
|---|---|---|
| .github/workflows | ||
| src | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
protols
A Language Server for proto3 files. It uses tree-sitter parser for all operations and always runs in single file mode.
Features
- Hover
- Go to definition
- Diagnostics
Installation and testing
Clone the repository and run cargo install protols to install locally in your ~/.cargo/bin and the below to your init.lua until we start shipping this via Mason.
local client = vim.lsp.start_client({
name = "protols",
cmd = { vim.fn.expand("$HOME/.cargo/bin/protols") },
})
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,
})