Skip to content

Commit 59f2968

Browse files
Jana ChadtVeryMilkyJoe
Jana Chadt
authored andcommitted
Add completion support for cabal files
Currently supports: * completions for keywords, sensitive to stanzas * value completions for constant values, licenses, files and directories
1 parent fc488d0 commit 59f2968

File tree

10 files changed

+1316
-253
lines changed

10 files changed

+1316
-253
lines changed

plugins/hls-cabal-plugin/hls-cabal-plugin.cabal

+7
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ library
2727
exposed-modules:
2828
Ide.Plugin.Cabal
2929
Ide.Plugin.Cabal.Diagnostics
30+
Ide.Plugin.Cabal.Completions
3031
Ide.Plugin.Cabal.LicenseSuggest
3132
Ide.Plugin.Cabal.Parse
3233

@@ -45,8 +46,10 @@ library
4546
-- This is a lot of work for almost zero benefit, so we just allow more versions here
4647
-- and we eventually completely drop support for building HLS with stack.
4748
, Cabal ^>=3.2 || ^>=3.4 || ^>=3.6 || ^>= 3.8 || ^>= 3.10
49+
, containers
4850
, deepseq
4951
, directory
52+
, filepath
5053
, extra >=1.7.4
5154
, ghcide == 2.0.0.0
5255
, hashable
@@ -57,6 +60,7 @@ library
5760
, regex-tdfa ^>=1.3.1
5861
, stm
5962
, text
63+
, text-rope
6064
, unordered-containers >=0.2.10.0
6165

6266
hs-source-dirs: src
@@ -71,11 +75,14 @@ test-suite tests
7175
build-depends:
7276
, base
7377
, bytestring
78+
, directory
7479
, filepath
7580
, ghcide
7681
, hls-cabal-plugin
7782
, hls-test-utils == 2.0.0.0
7883
, lens
84+
, lsp
7985
, lsp-types
8086
, tasty-hunit
8187
, text
88+

plugins/hls-cabal-plugin/src/Ide/Plugin/Cabal.hs

+151-113
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)