Skip to content

Not work in neovim #68

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

Closed
tyanxie opened this issue Mar 28, 2025 · 5 comments · Fixed by #69
Closed

Not work in neovim #68

tyanxie opened this issue Mar 28, 2025 · 5 comments · Fixed by #69

Comments

@tyanxie
Copy link

tyanxie commented Mar 28, 2025

Hi, i am very happy to see a new version finally released, but when I upgraded protols from 0.9.0 to 0.11.1 through mason, I found that the related functions did not work.

For example, I have a very simple demo.proto file. My cursor is on DemoReq and I want to use lsp's go to definition. At this time, a warning pops up.

Image

In addition, the error prompt does not seem to work. When I delete the ; symbol at the end of the first line, there is no error prompt as expected.

Finally, I also tried to add a protols.toml file in the working directory and enter the content, but it still does not work.

LspInfo:

==============================================================================
vim.lsp: require("vim.lsp.health").check()

- LSP log level : WARN
- Log path: /data/home/tyanxie/.local/state/nvim/lsp.log
- Log size: 1796 KB

vim.lsp: Active Clients ~
- protols (id: 1)
    Root directory: nil
    Command: /data/home/tyanxie/.local/share/nvim/mason/bin/protols
    Settings: vim.empty_dict()
    Attached buffers: 2
- taplo (id: 2)
    Root directory: nil
    Command: /data/home/tyanxie/.local/share/nvim/mason/bin/taplo lsp stdio
    Settings: vim.empty_dict()
    Attached buffers: 

vim.lsp: File Watcher ~
- file watching "(workspace/didChangeWatchedFiles)" disabled on all clients

vim.lsp: Position Encodings ~
- No buffers contain mixed position encodings

log:

2025-03-28T03:20:43.362865Z  INFO protols::lsp: Connected with client Neovim 0.10.4+ge96f75a4e6
2025-03-28T03:20:43.403979Z ERROR protols::lsp: failed to get tree uri=file:///data/home/tyanxie/demo/demo.proto
2025-03-28T03:20:44.405610Z ERROR protols::lsp: failed to get tree uri=file:///data/home/tyanxie/demo/demo.proto
2025-03-28T03:20:45.406306Z ERROR protols::lsp: failed to get tree uri=file:///data/home/tyanxie/demo/demo.proto
2025-03-28T03:20:45.791371Z ERROR protols::lsp: failed to get tree uri=file:///data/home/tyanxie/demo/demo.proto
2025-03-28T03:20:45.791925Z ERROR protols::lsp: failed to get tree uri=file:///data/home/tyanxie/demo/demo.proto
@coder3101
Copy link
Owner

coder3101 commented Mar 28, 2025

Do you mean the same example was working before 0.11.1 in earlier releases?

As per log, it seems the file wasn't parsed at all. So I would expect nothing to work. But I wonder why.

@tyanxie
Copy link
Author

tyanxie commented Mar 28, 2025

Do you mean the same example was working before 0.11.1 in earlier releases?

As per log, it seems the file wasn't parsed at all. So I would expect nothing to work. But I wonder why.

In my case, version v0.9.0 works well.

@asharkhan3101
Copy link
Collaborator

I'll take a look at over the weekends

@asharkhan3101
Copy link
Collaborator

I am able to reproduce this, it is related with not being able to find a workspace root. If you git init in that directory. It will work as expected. I'll fix in a few hours!

@tyanxie
Copy link
Author

tyanxie commented Mar 28, 2025

I am able to reproduce this, it is related with not being able to find a workspace root. If you git init in that directory. It will work as expected. I'll fix in a few hours!

Thanks for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants