-
-
Notifications
You must be signed in to change notification settings - Fork 388
Cannot jump to definition #486
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
It still works for me. Can you provide more information? Version of hls, what editor+LSP client you're using, what cradle you're using, what actions you're taking, a log from lsp, etc. |
platform: Linux mint 19.3 |
Can you also provide a log from hls when the action doesn't work? |
|
And I just found another problem. I defined a function in a file, and then changed its type. When using this function in another file, the type is still displayed before modification. |
jump/go to definition should work for local package definition but for now it does not for libraries definitions (Data.List, Data.Maybe, Data.ByteString, etc), see https://github.com/haskell/ghcide/issues/61 |
Here is the definition of jump local package, not to the library definitions (Data.List, Data.Maybe, Data.ByteString, etc).
Another problem is that the function type I defined in other local files will be modified later. When the function is used in other files, the type is still before modification. |
@GordonGgx Maybe it can be related to #478? After upgrading HLS from |
well, I am try it. |
Only note that it is a difference between got no server response at all, not hover, no goto def, etc, and only miss one of the features. |
@vaclavsvejcar Now that I've switched to stack 2.5.0.1, there is still a problem that I can't jump to the definition.
|
Can you provide the source of your project in some form (e.g. on github) and what definition you're trying to jump to? So we can attempt to reproduce it. |
@googleson78 I just tried a demo template project of 'stack new'. Experience the Haskell language service plug-in of vscode. In template engineering, functions are defined in |
From the
|
I'm facing the same issue, I cannot jump to definition between files unless I opened (And I assume, hls processed) the file. Is there some issue tracking this limitation and the potential workarounds ? |
There is an old issue in ghcide about goto definition to external libraries: https://github.com/haskell/ghcide/issues/61 |
|
@GordonGgx so you have tried the hiedb branch and it does not have jump to external links definitions? |
This happens to me too, macos 10.15.7 just as the images @GordonGgx posted display. I have...
I did:
That works (it prints "someFunc", which makes sense for the tamplate code), so the repro is the standard? way to start a haskell project I guess. When I navigate to either Main.hs or Lib.hs for the first time, I see a message pop up:
Even though it says I should not worry, I think it could be the implicit cradle file... But I don't really get half of what I'm doing, so not sure. Hope it helps. |
|
@jneira Now you can jump to the definition in a lib library file. Can you provide a solution to jump to other lib files? Thank you |
@GordonGgx Sorry, but i dont understand what is the difference between a "lib library file" and "other lib files". |
I remember that it was possible to press and hold Ctrl and then use click to jump to the defined place, but now it can't.What's going on?
The text was updated successfully, but these errors were encountered: