Custom-setups completion in cabal files#4848
Conversation
fendor
left a comment
There was a problem hiding this comment.
LGTM, thank you, just one nitpick :)
| [ ("setup-depends:", noopCompleter) | ||
| , ("build-depends:", noopCompleter) | ||
| , ("build-tools:", noopCompleter) | ||
| , ("default-language:", constantCompleter ["GHC2021", "Haskell2010", "Haskell98"]) |
There was a problem hiding this comment.
There are definitely other default-language usages in this file, could you deduplicate them?
Unsure whether we should deduplicate only the fields, or full completion item...
VeryMilkyJoe
left a comment
There was a problem hiding this comment.
Looks good, thank you!
|
Implemented the Review @fendor suggested, while doing so i tried getting the Language Names from Cabal itself. found this on there Documentation can we import this somehow and use directly ? I could not find anything related to this so did it locally ! Thanks a lot for review !! |
|
@vidit-od https://hackage-content.haskell.org/package/Cabal-syntax-3.16.1.0/docs/Language-Haskell-Extension.html#t:Language and maybe https://hackage-content.haskell.org/package/Cabal-syntax-3.16.1.0/docs/Language-Haskell-Extension.html#v:knownLanguages You just need to find a way to print them again in a human readable way 🤔 Perhaps the same way we print |
0b2a928 to
dc6f303
Compare
Fixes #4645
This PR aims at fixing the issue where users did not see completions for custom-setup stanza. The reason for this was lack of stanza mapping for custom-setups.
we fix this by making a
customsetupfieldsand map it to our target stanza.