-
-
Notifications
You must be signed in to change notification settings - Fork 367
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 for src not working if defined as library #1286
Comments
Well hidden, we have that documented: https://github.com/haskell/haskell-language-server/tree/master/ghcide#limitations-to-multi-component-support Essentially, if you want goto definition to work, you need to open a file from each component, e.g. open something from |
It doesn't work for me, even if there is a file from As I mentioned I'm currently also testing with the 6b6c405 which contains Is it working for you @fendor / @jneira with the example I posted and the same or a different hls version or different editor / environment? |
I tested with a nearly vanilla setup of vscode with the hls extension. The behavior is the same, even though the target file is open. I'm noticing this error. Any chance it has something to do with the issue or is it independent? (see Update)
UpdateI doubt the |
With With |
Closing this, because it looks very good. |
Will include jump to definition fix <haskell/haskell-language-server#1286>
Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:haskell-language-server version: 0.9.0.0 (GHC: 8.8.3) (PATH: /home/andreas/.local/bin/haskell-language-server-wrapper) (GIT hash: 6b6c405d14a29ab3d2e7dbb4e2f79229758d26ba) Tool versions found on the $PATH cabal: 3.2.0.0 stack: 2.5.1 ghc: 8.8.3
Which lsp-client do you use: coc.nvim version: 0.0.80-6e5a2aaeb5
Describe your project (alternative: link to the project): https://github.com/andys8/demo-haskell-language-server-jump-to-def-issue
Contents of
hie.yaml
:Steps to reproduce
I created a demo project: https://github.com/andys8/demo-haskell-language-server-jump-to-def-issue
The project setup is done with
stack new
and only slightly modified.test/Spec.hs
testHelper
workslibraryFunction
doesn't workThe workaround is to add
src
dir tosource-dirs
, but this has the downside of duplication and higher compile times.Expected behaviour
Jump to definition is working for
libraryFunction
/ dependencies.Actual behaviour
Jump to definition works only for
source-dirs
.Include debug information
Execute in the root of your project the command
haskell-language-server --debug .
and paste the logs here:Debug output:
Paste the logs from the lsp-client, e.g. for VS Code
LSP logs:
The text was updated successfully, but these errors were encountered: