Skip to content

Cabal go to module's definition #4380

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

Merged
merged 30 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
f3cdcbd
forced PR 4375
VenInf Aug 12, 2024
169fa2c
get modules with names
VenInf Aug 12, 2024
a49ecea
finding hsSourceDirs
VenInf Aug 13, 2024
2ff597a
correct path, indefinite search(?)
VenInf Aug 13, 2024
5cc3906
formatting and docs
VenInf Aug 14, 2024
7cf0265
formatting
VenInf Aug 14, 2024
1236c06
Update plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal/Completion/Cabal…
VenInf Aug 16, 2024
adcd5b9
Add Goto Definition for cabal common sections (#4375)
ChristophHochrainer Aug 18, 2024
1bedad2
resolve merging issues
VenInf Aug 18, 2024
bd72add
resolve merging issues
VenInf Aug 18, 2024
3727a63
rm error call
VenInf Aug 18, 2024
b2e45e9
unnecessary parameter
VenInf Aug 18, 2024
766a362
docs
VenInf Aug 18, 2024
8869d6e
first test
VenInf Aug 19, 2024
a9470bd
+ test data
VenInf Aug 19, 2024
d77f879
+ test data
VenInf Aug 19, 2024
f834e47
Definition module
VenInf Aug 19, 2024
901adc0
formattings
VenInf Aug 19, 2024
5d149f4
separate test file
VenInf Aug 19, 2024
5e1a604
more tests
VenInf Aug 19, 2024
660dc88
refactoring and docs
VenInf Aug 20, 2024
13dd3db
docs
VenInf Aug 20, 2024
7f08ee2
grammar
VenInf Aug 20, 2024
306911e
Merge branch 'master' into cabal-go-to-modules-definition
VenInf Aug 20, 2024
adcbe09
rename gotoDefinition to gotoDefinitionAction
VenInf Aug 20, 2024
39b4389
fix merge issues
VenInf Aug 20, 2024
6906a94
Merge branch 'master' into cabal-go-to-modules-definition
VenInf Aug 20, 2024
cec4e54
Apply suggestions from code review
VenInf Aug 21, 2024
dcc045a
docs and small changes
VenInf Aug 21, 2024
25847d5
Merge branch 'master' into cabal-go-to-modules-definition
VenInf Aug 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
+ test data
  • Loading branch information
VenInf committed Aug 19, 2024
commit d77f87948370e4b69d70a9deafa1fa2aee4772a0
5 changes: 4 additions & 1 deletion plugins/hls-cabal-plugin/test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ gotoDefinitionTests = testGroup "Goto Definition"

gotoModuleDefinitionTests :: TestTree
gotoModuleDefinitionTests = testGroup "Goto Module Definition"
[ testGoToDefinitionLink "simple cabal test" "simple-cabal" "simple-cabal.cabal" (Position 8 23) "A.hs"
[ testGoToDefinitionLink "simple cabal test" "simple-cabal" "simple-cabal.cabal"
(Position 8 23) "A.hs"
, testGoToDefinitionLink "simple cabal test" ("goto-definition" </> "modules") "module-examples.cabal"
(Position 6 22) "A.hs"
]
where
getUriFromDefinition :: Show b => (Definition |? b) -> Uri
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ version: 0.1.0.0

library
exposed-modules: Library.Lib
-- ^ Position: (6, 22)
-- ^ Position: (6, 33)
other-modules: Library.Other.OtherLib
-- ^ Position: (6, 22)
-- ^ Position: (6, 44)

build-depends: base
hs-source-dirs: src
default-language: Haskell2010
Expand All @@ -16,14 +21,20 @@ executable exec
build-depends: base
other-modules:
Config
-- ^ Position: (22, 8)
-- ^ Position: (22, 14)

test-suite module-examples-test
type: exitcode-stdio-1.0
hs-source-dirs: src/test
main-is: Main.hs
other-modules:
Config
-- ^ Position: (31, 8)
-- ^ Position: (31, 14)
Library
-- ^ Position: (31, 8)
-- ^ Position: (31, 15)
build-depends: base

benchmark benchmark
Expand All @@ -32,4 +43,6 @@ benchmark benchmark
hs-source-dirs: src/bench
build-depends: base
other-modules:
Config
Config
-- ^ Position: (45, 28)
-- ^ Position: (45, 34)