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

TVP contains no project/library symbols #500

Closed
nkgm opened this issue Nov 26, 2022 · 6 comments
Closed

TVP contains no project/library symbols #500

nkgm opened this issue Nov 26, 2022 · 6 comments

Comments

@nkgm
Copy link

nkgm commented Nov 26, 2022

Describe the bug

Move the cursor to a symbol in a source file and invoke reveal_in_tree().

TVP appears with Projects and Libraries top level nodes fully collapsed. Upon expanding them, these nodes contain the full package structures for the underlying artifacts, but theres no leaf nodes, ie the package nodes are devoid of any actual symbols.

The only symbols found are under Projects > [ProjectName]-build for the sbt build itself.

Expected behavior

TVP should contain symbols for Projects and Libraries.

Operating system

macOS

Version of Metals

v0.11.9

Commit of nvim-metals

92f7451

@ckipp01
Copy link
Member

ckipp01 commented Nov 26, 2022

Hey @nkgm thanks for reporting. What version of Scala are you using? If Scala 3 then this isn't supported yet in Metals.

@nkgm
Copy link
Author

nkgm commented Nov 26, 2022

Hi @ckipp01, yes I'm using Scala 3, I wasn't aware of this limitation. Could this be why vim.lsp.buf.definition() also doesn't work in my project?

@ckipp01
Copy link
Member

ckipp01 commented Nov 26, 2022

No the definition request should for sure work. Do you have a minimal reproduction of a case where it's not working?

@nkgm
Copy link
Author

nkgm commented Nov 27, 2022

I created a minimal project for which definition() didn't work, pushed to github, and just before posting this comment, I gave it one last try and it worked! Maybe Metals needed more time indexing even though it's a super minimal project of 2 source files and no dependencies.

My main project on the other hand had way more time to "settle", yet I couldn't get it to work. Maybe it was :MetalsCompileClean or wiping and reimporting the build (all of which I had tried several times before opening this issue) or something else I did before going afk for a few hours but, when I'm back I give it another shot and it's working!

I had similar issues before where I couldn't tell if Metals is doing something or needs a restart. Would :MetalsToggleLogs show the full picture, or is there someplace else I should check?

If Scala 3 then this isn't supported yet in Metals.

Is there an issue or some other source tracking Scala 3 support I can refer to in the future?

@ckipp01
Copy link
Member

ckipp01 commented Nov 27, 2022

I had similar issues before where I couldn't tell if Metals is doing something or needs a restart. Would :MetalsToggleLogs show the full picture, or is there someplace else I should check?

Yea this should help a bit. At least it will show you if something is getting screwed up or not.

Is there an issue or some other source tracking Scala 3 support I can refer to in the future?

Yea you can take a look at the main Metals tracker and look for things tagged with Scala 3: https://github.com/scalameta/metals/issues?q=is%3Aissue+is%3Aopen+label%3A%22Scala+3%22.

@nkgm nkgm closed this as completed Nov 28, 2022
@nkgm
Copy link
Author

nkgm commented Nov 28, 2022

For reference: scalameta/metals#2859

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

No branches or pull requests

2 participants