File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
src/Ide/Plugin/Cabal/Completion Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ cabalKeywords =
6363 (" extra-tmp-files:" , filePathCompleter)
6464 ]
6565
66- -- | Map, containing all stanzas in a cabal file as keys
66+ -- | Map, containing all stanzas in a cabal file as keys,
6767-- and lists of their possible nested keywords as values.
6868stanzaKeywordMap :: Map StanzaType (Map KeyWordName Completer )
6969stanzaKeywordMap =
@@ -73,6 +73,7 @@ stanzaKeywordMap =
7373 (" test-suite" , testSuiteFields <> libExecTestBenchCommons),
7474 (" benchmark" , benchmarkFields <> libExecTestBenchCommons),
7575 (" foreign-library" , foreignLibraryFields <> libExecTestBenchCommons),
76+ (" common" , libExecTestBenchCommons),
7677 (" flag" , flagFields),
7778 (" source-repository" , sourceRepositoryFields)
7879 ]
Original file line number Diff line number Diff line change @@ -188,6 +188,9 @@ getContextTests =
188188 , (Stanza " source-repository" (Just " head" ), KeyWord " type:" )
189189 , (Stanza " source-repository" (Just " head" ), KeyWord " type:" )
190190 , (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:" )
191194 ]
192195 $ \ fileContent posPrefInfo ->
193196 callGetContext (cursorPos posPrefInfo) (prefixText posPrefInfo) fileContent
@@ -276,4 +279,10 @@ source-repository head
276279 location: https://github.com/haskell/haskell-language-server
277280
278281 ^
282+ common cabalfmt
283+
284+ ^
285+ build-depends: haskell-language-server:hls-cabal-fmt-plugin
286+ ^ ^
287+ cpp-options: -Dhls_cabalfmt
279288|]
You can’t perform that action at this time.
0 commit comments