Skip to content

Commit

Permalink
feat: Add support for go to definition and hover and diagnostics on s…
Browse files Browse the repository at this point in the history
…ingle file (#2)

In a single file mode, the definition and hover support have been added.
  • Loading branch information
coder3101 authored Jun 16, 2024
1 parent 44a7757 commit 59dc1ab
Show file tree
Hide file tree
Showing 10 changed files with 545 additions and 57 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
/logs
139 changes: 139 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ tokio-util = { version = "0.7.11", features = ["compat"] }
tower = "0.4.13"
tracing = "0.1.40"
tracing-subscriber = "0.3.18"
tree-sitter-proto = { git = "https://github.com/coder3101/tree-sitter-proto", branch = "main" }
tree-sitter = "0.22.6"
tracing-appender = "0.2.3"
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
# protols
Language server for proto files
A Language Server for **proto3** files. It only uses tree-sitter parser for all operations and always runs in **single file mode**.

## Features
- [x] Hover
- [x] Go to definition
- [x] Diagnostics


## Installation and testing

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.

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

if not client then
Expand Down
Loading

0 comments on commit 59dc1ab

Please sign in to comment.