Skip to content

Commit 59dc1ab

Browse files
authored
feat: Add support for go to definition and hover and diagnostics on single file (#2)
In a single file mode, the definition and hover support have been added.
1 parent 44a7757 commit 59dc1ab

File tree

10 files changed

+545
-57
lines changed

10 files changed

+545
-57
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/target
2+
/logs

Cargo.lock

Lines changed: 139 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,6 @@ tokio-util = { version = "0.7.11", features = ["compat"] }
1111
tower = "0.4.13"
1212
tracing = "0.1.40"
1313
tracing-subscriber = "0.3.18"
14+
tree-sitter-proto = { git = "https://github.com/coder3101/tree-sitter-proto", branch = "main" }
15+
tree-sitter = "0.22.6"
16+
tracing-appender = "0.2.3"

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
# protols
2-
Language server for proto files
2+
A Language Server for **proto3** files. It only uses tree-sitter parser for all operations and always runs in **single file mode**.
3+
4+
## Features
5+
- [x] Hover
6+
- [x] Go to definition
7+
- [x] Diagnostics
8+
9+
10+
## Installation and testing
11+
12+
Clone the repository and run `cargo install --path .` to install locally in your `~/.cargo/bin` and the below to your `init.lua` until we start shipping this via Mason.
313

4-
## Testing with neovim
514
```lua
615
local client = vim.lsp.start_client({
716
name = "protols",
8-
cmd = { "<absolute path to protols binary>" },
17+
cmd = { vim.fn.expand("$HOME/.cargo/bin/protols") },
918
})
1019

1120
if not client then

0 commit comments

Comments
 (0)