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

Calva shows two hover definitions for user-defined vars when a repl is connected #2091

Closed
bpringe opened this issue Feb 24, 2023 · 4 comments
Labels
bug Something isn't working lsp nrepl ux User experience related

Comments

@bpringe
Copy link
Member

bpringe commented Feb 24, 2023

image

It doesn't seem like this happens for core functions.

I haven't yet tried previous Calva versions.

@bpringe bpringe added bug Something isn't working ux User experience related labels Feb 24, 2023
@julienvincent
Copy link
Contributor

julienvincent commented Feb 25, 2023

I know this happens when there are two LSP clients running that are both governing the same file. Can you confirm if this is the case for your project, or are you sure this is a result of the REPL connection?

@PEZ
Copy link
Collaborator

PEZ commented Feb 25, 2023

We have some checks for if the REPL has an answer there, iirc. So it could be (my guess it is) to do with several lsp servers serving the same file, and be triggered when there is a REPL connection.

@bpringe
Copy link
Member Author

bpringe commented Feb 25, 2023

I've verified that there's only one clojure-lsp process running when I see the double hover entries. Also, clojure-lsp hover entries include the file path, and the repl ones don't. There's one of each, as you can see in the image.

@bpringe
Copy link
Member Author

bpringe commented Feb 25, 2023

Another thing to note is the difference in doc strings in the original image. I just did another test to verify that one entry is from the repl.

image

I added content to the doc string, evaluated the function, then removed the content without evaluating the function again. The repl entry still shows the evaluated version of the doc string (bottom), but clojure-lsp shows the current version in the file (top), as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lsp nrepl ux User experience related
Projects
None yet
Development

No branches or pull requests

3 participants