-
Notifications
You must be signed in to change notification settings - Fork 332
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
Jump to definition in Chipyard with vim-lsp #6097
Comments
Thanks for the report. Do you have anything meaningful in metals logs |
Thanks for taking your time.
|
I also filed an issue with vim-lsp to get all relevant parties onboard. As I mentioned there, a hello world scala project works flawlessly, so basic vim-lsp and metals do work. I'm willing to take the time to debug and would be happy for advice. |
This is starting |
Thanks, that was helpful. I somewhat got it building. After installing and running bloop server, import the build in metals doctor I am able to "jump to definition", but only if I start vim at the root directory and open files from there. Going to generators/.../src/main/scala and opening a scala file from there again gives me an error about scala-cli. |
Yes, only then metals will import the
This might just require an initial compile to finish for the submodule (build target) to work. So if you come back to a submodule you've work in before it should work right away. |
Ok, that will waste many people many hours, an error message might be nice. But thanks anyway.
Nope, it's fragile. Closing and opening the file and trying again, might or might not work, sometimes takes a second, sometings hangs forever, then you have to go to a different class and try that one which usually works, then you can go back, try the original one which then works most of the time. Anyway, thank you very much, I got it working now, your help is much appreciated. I'm closing this now. (And hopefully this issue will help people in the future searching for this issue.) |
I tried to get "Jump to definition" working with vim, vim-lsp for chipyard.
Chipyard is a complicated multi-gitsubmodule project.
I set up coursier, metals, bloop, etcetera and nothing works.
I am able to run http://127.0.0.1:5031 but nothing helps.
I followed the advice at https://www.scala-lang.org/blog/2020/10/27/bsp-in-sbt.html and nothing helps.
I think I had it running once with bloop but as soon as I went away and returned to the computer it was not working again.
Also this always show up when editing:
Selecting 1 fires up doctor in a browser window.
Universal Ctags is somewhat working but a working LSP would be better.
Any help? I'm able to try out any advice.
Expected behaviour:
Hit Ctrl-] in vim and jump to the definition of the class.
Operating system:
Linux
Java version:
17.0.9
Editor/extension:
vim-lsp
Metals version:
1.2.0
Workspace information:
0. scala-cli v1.1.2
The text was updated successfully, but these errors were encountered: