Skip to content

Commit a1e13bf

Browse files
committed
Completions support for cabal-project plugin
1 parent c33a7f1 commit a1e13bf

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed

haskell-language-server.cabal

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,77 @@ test-suite hls-cabal-project-plugin-tests
402402
, hls-plugin-api
403403
, cabal-install
404404

405+
-----------------------------
406+
-- cabal project plugin
407+
-----------------------------
408+
409+
flag cabalProject
410+
description: Enable cabalProject plugin
411+
default: True
412+
manual: True
413+
414+
common cabalProject
415+
if flag(cabalProject)
416+
build-depends: haskell-language-server:hls-cabal-project-plugin
417+
cpp-options: -Dhls_cabal_project
418+
419+
library hls-cabal-project-plugin
420+
import: defaults, pedantic, warnings
421+
if !flag(cabal)
422+
buildable: False
423+
exposed-modules:
424+
Ide.Plugin.CabalProject
425+
426+
427+
build-depends:
428+
, bytestring
429+
, Cabal-syntax >= 3.7
430+
, containers
431+
, deepseq
432+
, directory
433+
, filepath
434+
, extra >=1.7.4
435+
, ghcide == 2.9.0.1
436+
, hashable
437+
, hls-plugin-api == 2.9.0.1
438+
, hls-graph == 2.9.0.1
439+
, lens
440+
, lsp ^>=2.7
441+
, lsp-types ^>=2.3
442+
, regex-tdfa ^>=1.3.1
443+
, text
444+
, text-rope
445+
, transformers
446+
, unordered-containers >=0.2.10.0
447+
, containers
448+
, process
449+
, aeson
450+
, Cabal
451+
, pretty
452+
453+
hs-source-dirs: plugins/hls-cabal-project-plugin/src
454+
455+
test-suite hls-cabal-project-plugin-tests
456+
import: defaults, pedantic, test-defaults, warnings
457+
if !flag(cabalProject)
458+
buildable: False
459+
type: exitcode-stdio-1.0
460+
hs-source-dirs: plugins/hls-cabal-project-plugin/test
461+
main-is: Main.hs
462+
other-modules:
463+
build-depends:
464+
, bytestring
465+
, Cabal-syntax >= 3.7
466+
, extra
467+
, filepath
468+
, ghcide
469+
, haskell-language-server:hls-cabal-project-plugin
470+
, hls-test-utils == 2.9.0.1
471+
, lens
472+
, lsp-types
473+
, text
474+
, hls-plugin-api
475+
405476
-----------------------------
406477
-- class plugin
407478
-----------------------------

test.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#include <iostream>
2+
int main() { std::cout << "OK
3+
"; return 0; }

0 commit comments

Comments
 (0)