Skip to content

Commit

Permalink
Add completion support for cabal files
Browse files Browse the repository at this point in the history
Currently supports:
* completions for keywords, sensitive to stanzas
* value completions for constant values, licenses, files and directories
  • Loading branch information
Jana Chadt authored and VeryMilkyJoe committed Jun 19, 2023
1 parent fc488d0 commit ada3138
Show file tree
Hide file tree
Showing 10 changed files with 1,310 additions and 241 deletions.
7 changes: 7 additions & 0 deletions plugins/hls-cabal-plugin/hls-cabal-plugin.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ library
exposed-modules:
Ide.Plugin.Cabal
Ide.Plugin.Cabal.Diagnostics
Ide.Plugin.Cabal.Completions
Ide.Plugin.Cabal.LicenseSuggest
Ide.Plugin.Cabal.Parse

Expand All @@ -45,8 +46,10 @@ library
-- This is a lot of work for almost zero benefit, so we just allow more versions here
-- and we eventually completely drop support for building HLS with stack.
, Cabal ^>=3.2 || ^>=3.4 || ^>=3.6 || ^>= 3.8 || ^>= 3.10
, containers
, deepseq
, directory
, filepath
, extra >=1.7.4
, ghcide == 2.0.0.0
, hashable
Expand All @@ -57,6 +60,7 @@ library
, regex-tdfa ^>=1.3.1
, stm
, text
, text-rope
, unordered-containers >=0.2.10.0

hs-source-dirs: src
Expand All @@ -71,11 +75,14 @@ test-suite tests
build-depends:
, base
, bytestring
, directory
, filepath
, ghcide
, hls-cabal-plugin
, hls-test-utils == 2.0.0.0
, lens
, lsp
, lsp-types
, tasty-hunit
, text

264 changes: 151 additions & 113 deletions plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs

Large diffs are not rendered by default.

Loading

0 comments on commit ada3138

Please sign in to comment.