Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for go to definition and hover and diagnostics on single file #2

Merged
merged 4 commits into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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