File tree Expand file tree Collapse file tree 8 files changed +62
-9
lines changed Expand file tree Collapse file tree 8 files changed +62
-9
lines changed Original file line number Diff line number Diff line change 1
- # Demo: Jump to defintion issue
1
+ # Demo: Jump to definition issue
2
+
3
+ ## Steps
4
+
5
+ - Open ` test/Spec.hs `
6
+ - Jump to def with ` testHelper ` works
7
+ - Jump to def with ` libraryFunction ` doesn't work
8
+
9
+ ## Known workaround
10
+
11
+ ` package.yaml ` contains
12
+
13
+ ``` yaml
14
+ tests :
15
+ demo-hls-jump-to-definition-test :
16
+ source-dirs : test
17
+ dependencies : demo-hls-jump-to-definition
18
+ ` ` `
19
+
20
+ if ` src` is additionally added as directory, it'll work.
21
+ Downside : Higher compile times, redundant
22
+
23
+ ` ` ` yaml
24
+ tests:
25
+ demo-hls-jump-to-definition-test:
26
+ source-dirs: test
27
+ dependencies: demo-hls-jump-to-definition
28
+ ` ` `
29
+
30
+ # # Versions
31
+
32
+ ```
33
+ haskell-language-server version: 0.9.0.0 (GHC: 8.8.3) (GIT hash: 6b6c405d14a29ab3d2e7dbb4e2f79229758d26ba)
34
+ cabal: 3.2.0.0
35
+ stack: 2.5.1
36
+ ghc: 8.8.3
37
+ ```
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,4 +3,4 @@ module Main where
3
3
import Lib
4
4
5
5
main :: IO ()
6
- main = someFunc
6
+ main = libraryFunction
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ cabal-version: 1.12
4
4
--
5
5
-- see: https://github.com/sol/hpack
6
6
--
7
- -- hash: c7959c36bf6aaa8424d22c1798f778516f3aa142da2756764ed808b597794177
7
+ -- hash: 9da40c309046377d92b7f821cb757c7f0e7d46ee05cb86a09cb46aa3c804eb92
8
8
9
9
name : demo-hls-jump-to-definition
10
10
version : 0.1.0.0
@@ -52,6 +52,7 @@ test-suite demo-hls-jump-to-definition-test
52
52
type : exitcode-stdio-1.0
53
53
main-is : Spec.hs
54
54
other-modules :
55
+ SpecHelper
55
56
Paths_demo_hls_jump_to_definition
56
57
hs-source-dirs :
57
58
test
Original file line number Diff line number Diff line change
1
+ cradle :
2
+ stack :
3
+ - path : " ./app"
4
+ component : " demo-hls-jump-to-definition:exe:demo-hls-jump-to-definition-exe"
5
+ - path : " ./test"
6
+ component : " demo-hls-jump-to-definition:test:demo-hls-jump-to-definition-test"
7
+ - path : " ./src"
8
+ component : " demo-hls-jump-to-definition:lib"
Original file line number Diff line number Diff line change 1
1
module Lib
2
- ( someFunc
2
+ ( libraryFunction
3
3
) where
4
4
5
- someFunc :: IO ()
6
- someFunc = putStrLn " someFunc "
5
+ libraryFunction :: IO ()
6
+ libraryFunction = putStrLn " libraryFunction "
Original file line number Diff line number Diff line change
1
+ import Lib ( libraryFunction )
2
+ import SpecHelper ( testHelper )
3
+
4
+
1
5
main :: IO ()
2
- main = putStrLn " Test suite not yet implemented"
6
+ main = do
7
+ testHelper -- Jump to defintion with testHelper is working
8
+ libraryFunction -- Jump to defintion with libraryFunction is not working
Original file line number Diff line number Diff line change
1
+ module SpecHelper where
2
+
3
+ testHelper :: IO ()
4
+ testHelper = putStrLn " testHelp"
You can’t perform that action at this time.
0 commit comments