File tree 2 files changed +11
-1
lines changed
src/Ide/Plugin/Cabal/Completion
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ cabalKeywords =
63
63
(" extra-tmp-files:" , filePathCompleter)
64
64
]
65
65
66
- -- | Map, containing all stanzas in a cabal file as keys
66
+ -- | Map, containing all stanzas in a cabal file as keys,
67
67
-- and lists of their possible nested keywords as values.
68
68
stanzaKeywordMap :: Map StanzaType (Map KeyWordName Completer )
69
69
stanzaKeywordMap =
@@ -73,6 +73,7 @@ stanzaKeywordMap =
73
73
(" test-suite" , testSuiteFields <> libExecTestBenchCommons),
74
74
(" benchmark" , benchmarkFields <> libExecTestBenchCommons),
75
75
(" foreign-library" , foreignLibraryFields <> libExecTestBenchCommons),
76
+ (" common" , libExecTestBenchCommons),
76
77
(" flag" , flagFields),
77
78
(" source-repository" , sourceRepositoryFields)
78
79
]
Original file line number Diff line number Diff line change @@ -188,6 +188,9 @@ getContextTests =
188
188
, (Stanza " source-repository" (Just " head" ), KeyWord " type:" )
189
189
, (Stanza " source-repository" (Just " head" ), KeyWord " type:" )
190
190
, (Stanza " source-repository" (Just " head" ), None )
191
+ , (Stanza " common" (Just " cabalfmt" ), None )
192
+ , (Stanza " common" (Just " cabalfmt" ), None )
193
+ , (Stanza " common" (Just " cabalfmt" ), KeyWord " build-depends:" )
191
194
]
192
195
$ \ fileContent posPrefInfo ->
193
196
callGetContext (cursorPos posPrefInfo) (prefixText posPrefInfo) fileContent
@@ -276,4 +279,10 @@ source-repository head
276
279
location: https://github.com/haskell/haskell-language-server
277
280
278
281
^
282
+ common cabalfmt
283
+
284
+ ^
285
+ build-depends: haskell-language-server:hls-cabal-fmt-plugin
286
+ ^ ^
287
+ cpp-options: -Dhls_cabalfmt
279
288
|]
You can’t perform that action at this time.
0 commit comments