-
-
Notifications
You must be signed in to change notification settings - Fork 389
textDocument/definition not working #2654
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
Comments
not sure if I am missing something? |
Go to definition appears to be working fine for me. Can you produce a minimal reproduction i.e. an actual file to test on? |
@drsooch |
Seems to work for me. |
Could have something to do with using |
@drsooch https://github.com/dewijones92/helloworld/blob/master/app/Main.hs FYI it compiles and runs fine
But the go to definition does not work
|
Can you check your HLS logs when attempting to goto definition? |
@drsooch here? |
should be in |
Please consult the troubleshooting section in the documentation also. |
@drsooch
|
Does anybody have any idea? |
Try deleting cache directories. I forget exactly if there are others but there is one in |
@eddiemundo I checked to see if there was a cache file but there isn't one Here is the server version:
Trying on a project generated by Any tips? lsp logs
|
Assuming you've passed the
It seems weird to me that there is no cache directory called |
yeah, it should be somewhere, and |
@jneira Can anyone see why features like "go to definition" aren't working? many thanks So I tried again using I captured all the logs of the server:
|
Have you tried another editor? Also, It seems odd to me that HLS is reporting 0MB of Live Bytes. |
It doesn't seem to load the component for some reason. |
Do you see an error anywhere like "ghcide compiled against <...> ghc but current using <..>" because otherwise it never gets to the part where it sets the cache directories for the .o .hi, and .hie files, or creates the Also, I don't know how stack works I wonder if it's OK if ghc and cabal are not found when you do probe tools. |
@dewijones92 i hope you dont mind i edited your comments to collapse logs, it can be done wrapping them with
|
yeah the How did you install hls? letting the extension download it for you, via ghcup or installing it from source?
It is fine if you are loading a stack project |
not yet |
@jneira
|
hmm Btw we deprecated the install script with #2491 (announced in the last release: https://github.com/haskell/haskell-language-server/releases/tag/1.6.0.0) and it will be removed soon, we will provide new instructions on how install hls from source without the script here: https://haskell-language-server.readthedocs.io/en/latest/installation.html#installation-from-source but they are not availble yet This concrete error has an entry in the troubleshooting section: https://haskell-language-server.readthedocs.io/en/latest/troubleshooting.html#wrong-server-binary-being-used |
@jneira |
Your environment
Which OS do you use:
POP OS
haskell LSP server version
ce41b6459af131c845f942bd39e356f02b6306fa master, tag: 1.6.0.0
Which LSP client (editor/plugin) do you use:
emacs
Describe your project (alternative: link to the project):
stack.yaml
Steps to reproduce
Hover over
noto
on line 16 and try to go to it's definitionIn this file https://github.com/dewijones92/helloworld/blob/master/app/Main.hs
Expected behaviour
Cursour should go to line 9 where
noto
is definedActual behaviour
nothing - the lsp server does not return the function definition location
Include debug information
The text was updated successfully, but these errors were encountered: