From 8416433a1be8d2a73f23adb331158dac9d2ec9c0 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 9 Dec 2020 08:29:28 +0100 Subject: [PATCH 01/25] Bump ghcide to incoming 0.6 --- ghcide | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcide b/ghcide index 9b8aaf9b06..6a7790a549 160000 --- a/ghcide +++ b/ghcide @@ -1 +1 @@ -Subproject commit 9b8aaf9b06846571cc0b5d46680e686e4f9153a3 +Subproject commit 6a7790a54963d50c605ede0ca1609a4a713c6988 From f70d5baa13f4ec731c67c19eb3f8b152e990e9e1 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 9 Dec 2020 09:41:06 +0100 Subject: [PATCH 02/25] Update hackage index to 2020-12-09T06:57:58Z --- cabal.project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cabal.project b/cabal.project index 4d64265352..d17c232452 100644 --- a/cabal.project +++ b/cabal.project @@ -25,6 +25,6 @@ package ghcide write-ghc-environment-files: never -index-state: 2020-12-03T03:58:05Z +index-state: 2020-12-09T06:57:58Z allow-newer: data-tree-print:base From 4696e0e04586562299fa09a1b208e4e1b6c6a71c Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 9 Dec 2020 09:41:25 +0100 Subject: [PATCH 03/25] Bump up ghcide lower bound to 0.6 --- haskell-language-server.cabal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 5391928d54..b4611c77ce 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -59,10 +59,10 @@ library , containers , data-default , ghc - , ghcide >=0.5 + , ghcide >=0.6 , gitrev , haskell-lsp ^>=0.22 - , hie-bios >=0.6.1 && <0.8 + , hie-bios >=0.7.1 && <0.8 , hls-plugin-api >=0.5 , hslogger , optparse-applicative From 00db35153e2ff5facae6db57aded5f75b386f4f5 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 9 Dec 2020 09:41:50 +0100 Subject: [PATCH 04/25] Update stack config to use ghcide-0.6 --- stack-8.10.1.yaml | 11 +++++++---- stack-8.10.2.yaml | 9 +++++---- stack-8.6.4.yaml | 9 +++++++-- stack-8.6.5.yaml | 9 +++++++-- stack-8.8.2.yaml | 10 +++++++--- stack-8.8.3.yaml | 8 ++++++-- stack-8.8.4.yaml | 11 +++++++---- stack.yaml | 9 +++++++-- 8 files changed, 53 insertions(+), 23 deletions(-) diff --git a/stack-8.10.1.yaml b/stack-8.10.1.yaml index 08b8638274..adf8a6fdb0 100644 --- a/stack-8.10.1.yaml +++ b/stack-8.10.1.yaml @@ -18,19 +18,21 @@ extra-deps: commit: c59655f10d5ad295c2481537fc8abf0a297d9d1c - Cabal-3.0.2.0 - clock-0.7.2 -- data-tree-print-0.1.0.2 +- data-tree-print-0.1.0.2@rev:2 - floskell-0.10.4 - fourmolu-0.3.0.0 - ghc-lib-8.10.2.20200916 - ghc-lib-parser-8.10.2.20200916 +- heapsize-0.3.0 - hie-bios-0.7.1 -- hlint-3.2 +- hlint-3.2.3 - HsYAML-aeson-0.2.0.0@rev:2 - implicit-hie-cradle-0.3.0.2 - implicit-hie-0.1.2.5 - lsp-test-0.11.0.6 - monad-dijkstra-0.1.1.2 -- opentelemetry-0.4.2 +- opentelemetry-0.6.1 +- opentelemetry-extra-0.6.1 - ormolu-0.1.4.1 - refinery-0.3.0.0 - retrie-0.1.1.1 @@ -44,7 +46,8 @@ flags: retrie: BuildExecutable: false -# for data-tree-print's bounds on base (>=4.8 && <4.14); using base-4.14.0.0. +# for brittany's bounds on strict (>=0.3.2 && <0.4); using strict-0.4.0.1. +# https://github.com/lspitzner/brittany/issues/328 allow-newer: true nix: diff --git a/stack-8.10.2.yaml b/stack-8.10.2.yaml index 4767dffd0f..25b04bee14 100644 --- a/stack-8.10.2.yaml +++ b/stack-8.10.2.yaml @@ -1,4 +1,4 @@ -resolver: nightly-2020-11-22 +resolver: nightly-2020-12-09 packages: - . @@ -18,14 +18,14 @@ extra-deps: commit: c59655f10d5ad295c2481537fc8abf0a297d9d1c - Cabal-3.0.2.0 - clock-0.7.2 -- data-tree-print-0.1.0.2 +- data-tree-print-0.1.0.2@rev:2 - floskell-0.10.4 - fourmolu-0.3.0.0 +- heapsize-0.3.0 - implicit-hie-cradle-0.3.0.2 - implicit-hie-0.1.2.5 - lsp-test-0.11.0.6 - monad-dijkstra-0.1.1.2 -- opentelemetry-0.4.2 - refinery-0.3.0.0 - retrie-0.1.1.1 - stylish-haskell-0.12.2.0 @@ -38,7 +38,8 @@ flags: retrie: BuildExecutable: false -# for data-tree-print's bounds on base (>=4.8 && <4.14); using base-4.14.0.0. +# for brittany's bounds on strict (>=0.3.2 && <0.4); using strict-0.4.0.1. +# https://github.com/lspitzner/brittany/issues/328 allow-newer: true nix: diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index fc1ab647f6..1232009d82 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -32,17 +32,21 @@ extra-deps: - fuzzy-0.1.0.0 # - ghcide-0.1.0 - ghc-check-0.5.0.1 +- ghc-events-0.13.0 - ghc-exactprint-0.6.3.2 - ghc-lib-8.10.2.20200916 - ghc-lib-parser-8.10.2.20200916 - ghc-lib-parser-ex-8.10.0.16 - ghc-source-gen-0.4.0.0 +- ghc-trace-events-0.1.2.1 - haddock-api-2.22.0@rev:1 - haddock-library-1.8.0 +- hashable-1.3.0.0 - haskell-lsp-0.22.0.0 - haskell-lsp-types-0.22.0.0 +- heapsize-0.3.0 - hie-bios-0.7.1 -- hlint-3.2 +- hlint-3.2.3 - HsYAML-0.2.1.0@rev:1 - HsYAML-aeson-0.2.0.0@rev:2 - implicit-hie-cradle-0.3.0.2 @@ -51,7 +55,8 @@ extra-deps: - lens-4.18 - lsp-test-0.11.0.6 - monad-dijkstra-0.1.1.2 -- opentelemetry-0.4.2 +- opentelemetry-0.6.1 +- opentelemetry-extra-0.6.1 - optics-core-0.2 - optparse-applicative-0.15.1.0 - ormolu-0.1.4.1 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 406b28464f..b48f225490 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -31,17 +31,21 @@ extra-deps: - fuzzy-0.1.0.0 # - ghcide-0.1.0 - ghc-check-0.5.0.1 +- ghc-events-0.13.0 - ghc-exactprint-0.6.3.2 - ghc-lib-8.10.2.20200916 - ghc-lib-parser-8.10.2.20200916 - ghc-lib-parser-ex-8.10.0.16 - ghc-source-gen-0.4.0.0 +- ghc-trace-events-0.1.2.1 - haddock-api-2.22.0@rev:1 - haddock-library-1.8.0 +- hashable-1.3.0.0 - haskell-lsp-0.22.0.0 - haskell-lsp-types-0.22.0.0 +- heapsize-0.3.0 - hie-bios-0.7.1 -- hlint-3.2 +- hlint-3.2.3 - HsYAML-0.2.1.0@rev:1 - HsYAML-aeson-0.2.0.0@rev:2 - implicit-hie-cradle-0.3.0.2 @@ -50,7 +54,8 @@ extra-deps: - lens-4.18 - lsp-test-0.11.0.6 - monad-dijkstra-0.1.1.2 -- opentelemetry-0.4.2 +- opentelemetry-0.6.1 +- opentelemetry-extra-0.6.1 - optics-core-0.2 - optparse-applicative-0.15.1.0 - ormolu-0.1.4.1 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index bbdbb4dbd8..78ba0c9c51 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -25,18 +25,21 @@ extra-deps: - extra-1.7.3 - floskell-0.10.4 - fourmolu-0.3.0.0 -# - ghcide-0.1.0 +# - ghcide-0.6.0 - ghc-check-0.5.0.1 +- ghc-events-0.13.0 - ghc-exactprint-0.6.3.2 - ghc-lib-8.10.2.20200916 - ghc-lib-parser-8.10.2.20200916 - ghc-lib-parser-ex-8.10.0.16 +- ghc-trace-events-0.1.2.1 - haddock-library-1.8.0 - haskell-lsp-0.22.0.0 - haskell-lsp-types-0.22.0.0 - haskell-src-exts-1.21.1 +- heapsize-0.3.0 - hie-bios-0.7.1 -- hlint-3.2 +- hlint-3.2.3 - hoogle-5.0.17.11 - hsimport-0.11.0 - HsYAML-0.2.1.0@rev:1 @@ -46,7 +49,8 @@ extra-deps: - implicit-hie-0.1.2.5 - lsp-test-0.11.0.6 - monad-dijkstra-0.1.1.2 -- opentelemetry-0.4.2 +- opentelemetry-0.6.1 +- opentelemetry-extra-0.6.1 - ormolu-0.1.4.1 - refinery-0.3.0.0 - retrie-0.1.1.1 diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index e40078b1d8..66a3c589eb 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -25,13 +25,15 @@ extra-deps: - extra-1.7.3 - floskell-0.10.4 - fourmolu-0.3.0.0 -# - ghcide-0.1.0 +# - ghcide-0.6.0 - ghc-exactprint-0.6.3.2 - ghc-lib-8.10.2.20200916 - ghc-lib-parser-8.10.2.20200916 +- ghc-trace-events-0.1.2.1 - haskell-src-exts-1.21.1 +- heapsize-0.3.0 - hie-bios-0.7.1 -- hlint-3.2 +- hlint-3.2.3 - HsYAML-aeson-0.2.0.0@rev:2 - hoogle-5.0.17.11 - hsimport-0.11.0 @@ -40,6 +42,8 @@ extra-deps: - implicit-hie-0.1.2.5 - lsp-test-0.11.0.6 - monad-dijkstra-0.1.1.2 +- opentelemetry-0.6.1 +- opentelemetry-extra-0.6.1 - ormolu-0.1.4.1 - refinery-0.3.0.0 - retrie-0.1.1.1 diff --git a/stack-8.8.4.yaml b/stack-8.8.4.yaml index 1a427717d0..f04a81e68c 100644 --- a/stack-8.8.4.yaml +++ b/stack-8.8.4.yaml @@ -1,4 +1,4 @@ -resolver: lts-16.23 +resolver: lts-16.25 packages: - . @@ -22,14 +22,15 @@ extra-deps: - cabal-plan-0.6.2.0 - clock-0.7.2 - constrained-dynamic-0.1.0.0 -- extra-1.7.3 - floskell-0.10.4 - fourmolu-0.3.0.0 -# - ghcide-0.1.0 +# - ghcide-0.6.0 - ghc-exactprint-0.6.3.2 +- ghc-trace-events-0.1.2.1 - haskell-src-exts-1.21.1 +- heapsize-0.3.0 - hie-bios-0.7.1 -- hlint-3.2 +- hlint-3.2.3 - HsYAML-aeson-0.2.0.0@rev:2 - hoogle-5.0.17.11 - hsimport-0.11.0 @@ -38,6 +39,8 @@ extra-deps: - implicit-hie-0.1.2.5 - lsp-test-0.11.0.6 - monad-dijkstra-0.1.1.2 +- opentelemetry-0.6.1 +- opentelemetry-extra-0.6.1 - refinery-0.3.0.0 - retrie-0.1.1.1 - semigroups-0.18.5 diff --git a/stack.yaml b/stack.yaml index 406b28464f..5fcab7abd3 100644 --- a/stack.yaml +++ b/stack.yaml @@ -29,17 +29,21 @@ extra-deps: - floskell-0.10.4 - fourmolu-0.3.0.0 - fuzzy-0.1.0.0 -# - ghcide-0.1.0 +# - ghcide-0.6.0 - ghc-check-0.5.0.1 - ghc-exactprint-0.6.3.2 +- ghc-events-0.13.0 - ghc-lib-8.10.2.20200916 - ghc-lib-parser-8.10.2.20200916 - ghc-lib-parser-ex-8.10.0.16 - ghc-source-gen-0.4.0.0 +- ghc-trace-events-0.1.2.1 - haddock-api-2.22.0@rev:1 - haddock-library-1.8.0 +- hashable-1.3.0.0 - haskell-lsp-0.22.0.0 - haskell-lsp-types-0.22.0.0 +- heapsize-0.3.0 - hie-bios-0.7.1 - hlint-3.2 - HsYAML-0.2.1.0@rev:1 @@ -50,7 +54,8 @@ extra-deps: - lens-4.18 - lsp-test-0.11.0.6 - monad-dijkstra-0.1.1.2 -- opentelemetry-0.4.2 +- opentelemetry-0.6.1 +- opentelemetry-extra-0.6.1 - optics-core-0.2 - optparse-applicative-0.15.1.0 - ormolu-0.1.4.1 From 9caea6f44f016434b7402ee0b67e3491ab5dbbd5 Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 9 Dec 2020 13:40:36 +0100 Subject: [PATCH 05/25] Use definitive ghcide-0.6 --- ghcide | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcide b/ghcide index 6a7790a549..baafe2cb82 160000 --- a/ghcide +++ b/ghcide @@ -1 +1 @@ -Subproject commit 6a7790a54963d50c605ede0ca1609a4a713c6988 +Subproject commit baafe2cb82215f992ded3e3c1bd03507553aae86 From 3c7143d3179fef6f3574f315b707beb214460b2d Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 9 Dec 2020 13:42:04 +0100 Subject: [PATCH 06/25] Leverage new ghcide loading options --- exe/Wrapper.hs | 5 +++-- haskell-language-server.cabal | 2 +- src/Ide/Main.hs | 7 +++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/exe/Wrapper.hs b/exe/Wrapper.hs index 61dc26cd99..8a0c452be1 100644 --- a/exe/Wrapper.hs +++ b/exe/Wrapper.hs @@ -7,7 +7,8 @@ import Control.Monad.Extra import Data.Foldable import Data.List import Data.Void -import HIE.Bios +import Development.IDE.Session (findCradle, defaultLoadingOptions) +import HIE.Bios hiding (findCradle) import HIE.Bios.Environment import HIE.Bios.Types import Ide.Arguments @@ -135,7 +136,7 @@ getRuntimeGhcVersion' cradle = do -- of the project that may or may not be accurate. findLocalCradle :: FilePath -> IO (Cradle Void) findLocalCradle fp = do - cradleConf <- findCradle fp + cradleConf <- (findCradle defaultLoadingOptions) fp crdl <- case cradleConf of Just yaml -> do hPutStrLn stderr $ "Found \"" ++ yaml ++ "\" for \"" ++ fp ++ "\"" diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index b4611c77ce..fca3471ec5 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -62,7 +62,6 @@ library , ghcide >=0.6 , gitrev , haskell-lsp ^>=0.22 - , hie-bios >=0.7.1 && <0.8 , hls-plugin-api >=0.5 , hslogger , optparse-applicative @@ -170,6 +169,7 @@ executable haskell-language-server-wrapper build-depends: , ghc , ghc-paths + , ghcide , gitrev , haskell-language-server , hie-bios diff --git a/src/Ide/Main.hs b/src/Ide/Main.hs index 6feef3702e..4eda145c40 100644 --- a/src/Ide/Main.hs +++ b/src/Ide/Main.hs @@ -34,19 +34,18 @@ import Development.IDE.Core.Shake import Development.IDE.LSP.LanguageServer import Development.IDE.LSP.Protocol import Development.IDE.Plugin -import Development.IDE.Session +import Development.IDE.Session (loadSession, findCradle, defaultLoadingOptions) import Development.IDE.Types.Diagnostics import Development.IDE.Types.Location import Development.IDE.Types.Logger import Development.IDE.Types.Options -import HIE.Bios.Cradle import qualified Language.Haskell.LSP.Core as LSP import Ide.Arguments import Ide.Logger import Ide.Plugin import Ide.Version import Ide.Plugin.Config -import Ide.Types (IdePlugins, ipMap) +import Ide.Types (IdePlugins, ipMap) import Language.Haskell.LSP.Messages import Language.Haskell.LSP.Types import qualified System.Directory.Extra as IO @@ -158,7 +157,7 @@ runLspMode lspArgs@LspArguments{..} idePlugins = do putStrLn $ "Found " ++ show (length files) ++ " files" putStrLn "\nStep 2/4: Looking for hie.yaml files that control setup" - cradles <- mapM findCradle files + cradles <- mapM (findCradle defaultLoadingOptions) files let ucradles = nubOrd cradles let n = length ucradles putStrLn $ "Found " ++ show n ++ " cradle" ++ ['s' | n /= 1] From 16e8e89cb4c6fa232b2215e8775c586d884e216b Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 9 Dec 2020 21:09:07 +0100 Subject: [PATCH 07/25] Add shake-bench component to nix build --- nix/default.nix | 1 + shell.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/nix/default.nix b/nix/default.nix index 625382b3cd..02ed1cbea1 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -17,6 +17,7 @@ let haskellPackages.extend (pkgs.haskell.lib.packageSourceOverrides { haskell-language-server = gitignoreSource ../.; ghcide = gitignoreSource ../ghcide; + shake-bench = gitignoreSource ../ghcide/shake-bench; hie-compat = gitignoreSource ../ghcide/hie-compat; hls-plugin-api = gitignoreSource ../hls-plugin-api; hls-tactics-plugin = gitignoreSource ../plugins/tactics; diff --git a/shell.nix b/shell.nix index c91cacdbed..0b0df7427e 100644 --- a/shell.nix +++ b/shell.nix @@ -26,6 +26,7 @@ let defaultCompiler = "ghc" + lib.replaceStrings ["."] [""] haskellPackages.ghc. packages = p: [ p.haskell-language-server p.ghcide + p.shake-bench p.hie-compat p.hls-plugin-api p.hls-tactics-plugin From ea146922598e41234f76ffc504e5cbabce93f57c Mon Sep 17 00:00:00 2001 From: jneira Date: Wed, 9 Dec 2020 21:10:33 +0100 Subject: [PATCH 08/25] Use brittany version compat with ghc-8.10 --- cabal.project | 4 ++-- stack-8.10.1.yaml | 8 ++------ stack-8.10.2.yaml | 8 ++------ stack-8.6.4.yaml | 4 ++-- stack-8.6.5.yaml | 4 ++-- stack-8.8.2.yaml | 5 ++--- stack-8.8.3.yaml | 4 ++-- stack-8.8.4.yaml | 4 ++-- stack.yaml | 4 ++-- 9 files changed, 18 insertions(+), 27 deletions(-) diff --git a/cabal.project b/cabal.project index d17c232452..e0ffe04263 100644 --- a/cabal.project +++ b/cabal.project @@ -10,8 +10,8 @@ packages: source-repository-package type: git - location: https://github.com/bubba/brittany.git - tag: c59655f10d5ad295c2481537fc8abf0a297d9d1c + location: https://github.com/lspitzner/brittany.git + tag: 0a710ab27147d4f7981fe4ca343b43136ee36919 tests: true diff --git a/stack-8.10.1.yaml b/stack-8.10.1.yaml index adf8a6fdb0..c3aa894e3b 100644 --- a/stack-8.10.1.yaml +++ b/stack-8.10.1.yaml @@ -14,8 +14,8 @@ ghc-options: "$everything": -haddock extra-deps: -- github: bubba/brittany - commit: c59655f10d5ad295c2481537fc8abf0a297d9d1c +- github: lspitzner/brittany + commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 - Cabal-3.0.2.0 - clock-0.7.2 - data-tree-print-0.1.0.2@rev:2 @@ -46,10 +46,6 @@ flags: retrie: BuildExecutable: false -# for brittany's bounds on strict (>=0.3.2 && <0.4); using strict-0.4.0.1. -# https://github.com/lspitzner/brittany/issues/328 -allow-newer: true - nix: packages: [ icu libcxx zlib ] diff --git a/stack-8.10.2.yaml b/stack-8.10.2.yaml index 25b04bee14..f55be2c34e 100644 --- a/stack-8.10.2.yaml +++ b/stack-8.10.2.yaml @@ -14,8 +14,8 @@ ghc-options: "$everything": -haddock extra-deps: -- github: bubba/brittany - commit: c59655f10d5ad295c2481537fc8abf0a297d9d1c +- github: lspitzner/brittany + commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 - Cabal-3.0.2.0 - clock-0.7.2 - data-tree-print-0.1.0.2@rev:2 @@ -38,10 +38,6 @@ flags: retrie: BuildExecutable: false -# for brittany's bounds on strict (>=0.3.2 && <0.4); using strict-0.4.0.1. -# https://github.com/lspitzner/brittany/issues/328 -allow-newer: true - nix: packages: [ icu libcxx zlib ] diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index 1232009d82..a085023a34 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -19,8 +19,8 @@ extra-deps: - apply-refact-0.8.2.1 - ansi-terminal-0.10.3 - base-compat-0.10.5 -- github: bubba/brittany - commit: c59655f10d5ad295c2481537fc8abf0a297d9d1c +- github: lspitzner/brittany + commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 - butcher-1.3.3.1 - Cabal-3.0.2.0 - cabal-plan-0.6.2.0 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index b48f225490..304a35f334 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -18,8 +18,8 @@ extra-deps: - apply-refact-0.8.2.1 - ansi-terminal-0.10.3 - base-compat-0.10.5 -- github: bubba/brittany - commit: c59655f10d5ad295c2481537fc8abf0a297d9d1c +- github: lspitzner/brittany + commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 - butcher-1.3.3.1 - Cabal-3.0.2.0 - cabal-plan-0.6.2.0 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 78ba0c9c51..8bc5919b8a 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -15,9 +15,8 @@ ghc-options: extra-deps: - aeson-1.5.2.0 -- apply-refact-0.8.2.1 -- github: bubba/brittany - commit: c59655f10d5ad295c2481537fc8abf0a297d9d1c +- github: lspitzner/brittany + commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 - butcher-1.3.3.2 - bytestring-trie-0.2.5.0 - clock-0.7.2 diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index 66a3c589eb..a53ea1cb70 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -16,8 +16,8 @@ ghc-options: extra-deps: - aeson-1.5.2.0 - apply-refact-0.8.2.1 -- github: bubba/brittany - commit: c59655f10d5ad295c2481537fc8abf0a297d9d1c +- github: lspitzner/brittany + commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 - bytestring-trie-0.2.5.0 - cabal-plan-0.6.2.0 - clock-0.7.2 diff --git a/stack-8.8.4.yaml b/stack-8.8.4.yaml index f04a81e68c..fc50d9b7d7 100644 --- a/stack-8.8.4.yaml +++ b/stack-8.8.4.yaml @@ -16,8 +16,8 @@ ghc-options: extra-deps: - aeson-1.5.2.0 - apply-refact-0.8.2.1 -- github: bubba/brittany - commit: c59655f10d5ad295c2481537fc8abf0a297d9d1c +- github: lspitzner/brittany + commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 - bytestring-trie-0.2.5.0 - cabal-plan-0.6.2.0 - clock-0.7.2 diff --git a/stack.yaml b/stack.yaml index 5fcab7abd3..238c04e01d 100644 --- a/stack.yaml +++ b/stack.yaml @@ -18,8 +18,8 @@ extra-deps: - apply-refact-0.8.2.1 - ansi-terminal-0.10.3 - base-compat-0.10.5 -- github: bubba/brittany - commit: c59655f10d5ad295c2481537fc8abf0a297d9d1c +- github: lspitzner/brittany + commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 - butcher-1.3.3.1 - Cabal-3.0.2.0 - cabal-plan-0.6.2.0 From 4457ef5e60e51e710e279a5ec12591bf1a65bf36 Mon Sep 17 00:00:00 2001 From: jneira Date: Fri, 11 Dec 2020 13:16:42 +0100 Subject: [PATCH 09/25] Use ghcide version fixed for ghc-8.x --- ghcide | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcide b/ghcide index baafe2cb82..27b4250bb2 160000 --- a/ghcide +++ b/ghcide @@ -1 +1 @@ -Subproject commit baafe2cb82215f992ded3e3c1bd03507553aae86 +Subproject commit 27b4250bb245cbe44c2d63eeda5743d9807fe4a0 From 1a6bb07967e16b66f30b0378dc206769d279f687 Mon Sep 17 00:00:00 2001 From: Peter Wicks Stringfield Date: Sat, 12 Dec 2020 11:55:44 -0600 Subject: [PATCH 10/25] Ensure that loading testfiles produces at least one diagnostic. completion/Context.hs used to generate a diagnostic for the unused "x", but no longer does so without -Wunused-binds. completion/Completion.hs used to generate a diagnostic for the unused import of Data.Maybe, but no longer does so without -Wunused-imports. We could add these flags like: {-# OPTIONS_GHC -Wunused-binds #-} But that would force us to update all the hardcoded line numbers in the unit tests. Instead we just add a redundant id, carefully positioned to avoid disturbing any hardcoded positions. --- test/testdata/completion/Completion.hs | 2 +- test/testdata/completion/Context.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/testdata/completion/Completion.hs b/test/testdata/completion/Completion.hs index d6480903b6..1e394a8f21 100644 --- a/test/testdata/completion/Completion.hs +++ b/test/testdata/completion/Completion.hs @@ -6,4 +6,4 @@ main :: IO () main = putStrLn "hello" foo :: Either a b -> Either a b -foo = id \ No newline at end of file +foo = id id diff --git a/test/testdata/completion/Context.hs b/test/testdata/completion/Context.hs index 45c5befb10..8ca546e055 100644 --- a/test/testdata/completion/Context.hs +++ b/test/testdata/completion/Context.hs @@ -1,4 +1,4 @@ module Context where import Control.Concurrent as Conc foo :: Int -> Int -foo x = abs 42 \ No newline at end of file +foo x = abs $ id 42 From c807d442fea767d991347eaf5859403d445de6a4 Mon Sep 17 00:00:00 2001 From: Peter Wicks Stringfield Date: Sat, 12 Dec 2020 12:19:09 -0600 Subject: [PATCH 11/25] Update completion tests to reflect the renewed support for snippets in ghcide 6.0. --- test/functional/Completion.hs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/functional/Completion.hs b/test/functional/Completion.hs index d49626c000..c4f2fd0671 100644 --- a/test/functional/Completion.hs +++ b/test/functional/Completion.hs @@ -29,8 +29,8 @@ tests = testGroup "completions" [ item ^. label @?= "putStrLn" item ^. kind @?= Just CiFunction item ^. detail @?= Just ":: String -> IO ()" - item ^. insertTextFormat @?= Just PlainText - item ^. insertText @?= Nothing + item ^. insertTextFormat @?= Just Snippet + item ^. insertText @?= Just "putStrLn ${1:String}" , ignoreTestBecause "no support for itemCompletion/resolve requests" $ testCase "itemCompletion/resolve works" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do @@ -105,8 +105,8 @@ tests = testGroup "completions" [ liftIO $ do item ^. label @?= "LANGUAGE" item ^. kind @?= Just CiKeyword - item ^. insertTextFormat @?= Just PlainText - item ^. insertText @?= Nothing + item ^. insertTextFormat @?= Just Snippet + item ^. insertText @?= Just "LANGUAGE ${1:extension} #-}" , testCase "completes pragmas no close" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" @@ -120,8 +120,8 @@ tests = testGroup "completions" [ liftIO $ do item ^. label @?= "LANGUAGE" item ^. kind @?= Just CiKeyword - item ^. insertTextFormat @?= Just PlainText - item ^. insertText @?= Nothing + item ^. insertTextFormat @?= Just Snippet + item ^. insertText @?= Just "LANGUAGE ${1:extension}" , testCase "completes options pragma" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" @@ -135,8 +135,8 @@ tests = testGroup "completions" [ liftIO $ do item ^. label @?= "OPTIONS_GHC" item ^. kind @?= Just CiKeyword - item ^. insertTextFormat @?= Just PlainText - item ^. insertText @?= Nothing + item ^. insertTextFormat @?= Just Snippet + item ^. insertText @?= Just "OPTIONS_GHC -${1:option} #-}" , testCase "completes ghc options pragma values" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" From 7fad57c44a00fad2d3c0c8e6dea1da161c24ca8a Mon Sep 17 00:00:00 2001 From: Peter Wicks Stringfield Date: Sat, 12 Dec 2020 12:21:04 -0600 Subject: [PATCH 12/25] Enable disabled tests for the code completion snippets. Snippets are back in ghcide 0.6.0. --- test/functional/Completion.hs | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/test/functional/Completion.hs b/test/functional/Completion.hs index c4f2fd0671..d1f87c4566 100644 --- a/test/functional/Completion.hs +++ b/test/functional/Completion.hs @@ -199,7 +199,6 @@ tests = testGroup "completions" [ snippetTests :: TestTree snippetTests = testGroup "snippets" [ - ignoreTestBecause "no support for snippets" $ testCase "work for argumentless constructors" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" _ <- waitForDiagnosticsFrom doc @@ -211,10 +210,9 @@ snippetTests = testGroup "snippets" [ let item = head $ filter ((== "Nothing") . (^. label)) compls liftIO $ do item ^. insertTextFormat @?= Just Snippet - item ^. insertText @?= Just "Nothing" + item ^. insertText @?= Just "Nothing " - , ignoreTestBecause "no support for snippets" $ - testCase "work for polymorphic types" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do + , testCase "work for polymorphic types" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" _ <- waitForDiagnosticsFrom doc @@ -229,8 +227,7 @@ snippetTests = testGroup "snippets" [ item ^. insertTextFormat @?= Just Snippet item ^. insertText @?= Just "foldl ${1:b -> a -> b} ${2:b} ${3:t a}" - , ignoreTestBecause "no support for snippets" $ - testCase "work for complex types" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do + , testCase "work for complex types" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" _ <- waitForDiagnosticsFrom doc @@ -245,8 +242,7 @@ snippetTests = testGroup "snippets" [ item ^. insertTextFormat @?= Just Snippet item ^. insertText @?= Just "mapM ${1:a -> m b} ${2:t a}" - , ignoreTestBecause "no support for snippets" $ - testCase "work for infix functions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do + , testCase "work for infix functions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" _ <- waitForDiagnosticsFrom doc @@ -259,10 +255,9 @@ snippetTests = testGroup "snippets" [ item ^. label @?= "filter" item ^. kind @?= Just CiFunction item ^. insertTextFormat @?= Just Snippet - item ^. insertText @?= Just "filter`" + item ^. insertText @?= Just "filter ${1:a -> Bool} ${2:[a]}" - , ignoreTestBecause "no support for snippets" $ - testCase "work for infix functions in backticks" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do + , testCase "work for infix functions in backticks" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" _ <- waitForDiagnosticsFrom doc @@ -275,10 +270,9 @@ snippetTests = testGroup "snippets" [ item ^. label @?= "filter" item ^. kind @?= Just CiFunction item ^. insertTextFormat @?= Just Snippet - item ^. insertText @?= Just "filter" + item ^. insertText @?= Just "filter ${1:a -> Bool} ${2:[a]}" - , ignoreTestBecause "no support for snippets" $ - testCase "work for qualified infix functions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do + , testCase "work for qualified infix functions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" _ <- waitForDiagnosticsFrom doc @@ -291,10 +285,9 @@ snippetTests = testGroup "snippets" [ item ^. label @?= "intersperse" item ^. kind @?= Just CiFunction item ^. insertTextFormat @?= Just Snippet - item ^. insertText @?= Just "intersperse`" + item ^. insertText @?= Just "intersperse ${1:a} ${2:[a]}" - , ignoreTestBecause "no support for snippets" $ - testCase "work for qualified infix functions in backticks" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do + , testCase "work for qualified infix functions in backticks" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" _ <- waitForDiagnosticsFrom doc @@ -307,7 +300,7 @@ snippetTests = testGroup "snippets" [ item ^. label @?= "intersperse" item ^. kind @?= Just CiFunction item ^. insertTextFormat @?= Just Snippet - item ^. insertText @?= Just "intersperse" + item ^. insertText @?= Just "intersperse ${1:a} ${2:[a]}" , testCase "respects lsp configuration" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" From 20cef9e8d52b2ac08c665014182d5d96a92683a4 Mon Sep 17 00:00:00 2001 From: Peter Wicks Stringfield Date: Sat, 12 Dec 2020 14:47:13 -0600 Subject: [PATCH 13/25] Disable test for completionSnippetsOn option, ghcide does not support it. --- test/functional/Completion.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/functional/Completion.hs b/test/functional/Completion.hs index d1f87c4566..d902460f13 100644 --- a/test/functional/Completion.hs +++ b/test/functional/Completion.hs @@ -302,7 +302,8 @@ snippetTests = testGroup "snippets" [ item ^. insertTextFormat @?= Just Snippet item ^. insertText @?= Just "intersperse ${1:a} ${2:[a]}" - , testCase "respects lsp configuration" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do + , ignoreTestBecause "ghcide does not support the completionSnippetsOn option" $ + testCase "respects lsp configuration" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" _ <- waitForDiagnosticsFrom doc From 56629b1d70cf77c7d7e68119de0de8c67bf11f3d Mon Sep 17 00:00:00 2001 From: Peter Wicks Stringfield Date: Sat, 12 Dec 2020 14:49:52 -0600 Subject: [PATCH 14/25] Fix test for code completion of qualified name. Stop messing around the editing the file and reloading it. We are trying to test code completion, not editing files, and the extra complexity is making it harder to maintain the test. --- test/functional/Completion.hs | 19 +------------------ test/testdata/completion/Context.hs | 2 +- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/test/functional/Completion.hs b/test/functional/Completion.hs index d902460f13..fef31e7183 100644 --- a/test/functional/Completion.hs +++ b/test/functional/Completion.hs @@ -366,28 +366,11 @@ contextTests = testGroup "contexts" [ , testCase "completes qualified type suggestions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Context.hs" "haskell" _ <- waitForDiagnosticsFrom doc - let te = TextEdit (Range (Position 2 17) (Position 2 17)) " -> Conc." - _ <- applyEdit doc te - -- The module doesn't parse right now. So we are using stale data. HLS - -- can give us completions for "Conc." but it can't tell that we are in - -- a context where we expect a type. compls <- getCompletions doc (Position 2 26) liftIO $ do - -- forkOn is an inappropriate completion in a type context. - compls `shouldContainCompl` "forkOn" + compls `shouldNotContainCompl` "forkOn" compls `shouldContainCompl` "MVar" compls `shouldContainCompl` "Chan" - let te' = TextEdit (Range (Position 2 26) (Position 2 26)) "MVar" - _ <- applyEdit doc te' - -- The module can now be parsed. Wait until it has been. - _ <- waitForDiagnosticsFrom doc - -- HLS can see that we are expecting a type. - compls' <- getCompletions doc (Position 2 26) - liftIO $ do - -- forkOn is gone. - compls' `shouldNotContainCompl` "forkOn" - compls' `shouldContainCompl` "MVar" - compls' `shouldContainCompl` "Chan" ] shouldContainCompl :: [CompletionItem] -> T.Text -> Assertion diff --git a/test/testdata/completion/Context.hs b/test/testdata/completion/Context.hs index 8ca546e055..2f6effccb6 100644 --- a/test/testdata/completion/Context.hs +++ b/test/testdata/completion/Context.hs @@ -1,4 +1,4 @@ module Context where import Control.Concurrent as Conc -foo :: Int -> Int +foo :: Int -> Int -> Conc.MVar foo x = abs $ id 42 From 3e6378a5f69c1e80cac3d5c3876ac5d31fa7fb1f Mon Sep 17 00:00:00 2001 From: Peter Wicks Stringfield Date: Sun, 13 Dec 2020 12:47:44 -0600 Subject: [PATCH 15/25] Ensure that the testfiles produce at least one diagnostic. --- test/functional/FunctionalCodeAction.hs | 5 +++-- test/testdata/Highlight.hs | 2 +- test/testdata/redundantImportTest/src/CodeActionRedundant.hs | 3 ++- test/testdata/redundantImportTest/src/MultipleImports.hs | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/test/functional/FunctionalCodeAction.hs b/test/functional/FunctionalCodeAction.hs index 81bfa2a243..9e7b1149f4 100644 --- a/test/functional/FunctionalCodeAction.hs +++ b/test/functional/FunctionalCodeAction.hs @@ -276,7 +276,7 @@ redundantImportTests = testGroup "redundant import code actions" [ -- provides workspace edit property which skips round trip to -- the server contents <- documentContents doc - liftIO $ contents @?= "module CodeActionRedundant where\nmain :: IO ()\nmain = putStrLn \"hello\"" + liftIO $ contents @?= "{-# OPTIONS_GHC -Wunused-imports #-}\nmodule CodeActionRedundant where\nmain :: IO ()\nmain = putStrLn \"hello\"\n" , testCase "doesn't touch other imports" $ runSession hlsCommand noLiteralCaps "test/testdata/redundantImportTest/" $ do doc <- openDoc "src/MultipleImports.hs" "haskell" @@ -285,7 +285,8 @@ redundantImportTests = testGroup "redundant import code actions" [ executeCommand cmd contents <- documentContents doc liftIO $ (T.lines contents) @?= - [ "module MultipleImports where" + [ "{-# OPTIONS_GHC -Wunused-imports #-}" + , "module MultipleImports where" , "import Data.Maybe" , "foo :: Int" , "foo = fromJust (Just 3)" diff --git a/test/testdata/Highlight.hs b/test/testdata/Highlight.hs index 8d92d18779..b58460b896 100644 --- a/test/testdata/Highlight.hs +++ b/test/testdata/Highlight.hs @@ -2,4 +2,4 @@ module Highlight where foo :: Int foo = 3 bar = foo - where baz = let x = foo in x + where baz = let x = foo in id x diff --git a/test/testdata/redundantImportTest/src/CodeActionRedundant.hs b/test/testdata/redundantImportTest/src/CodeActionRedundant.hs index 870fc5b16a..f56d232f27 100644 --- a/test/testdata/redundantImportTest/src/CodeActionRedundant.hs +++ b/test/testdata/redundantImportTest/src/CodeActionRedundant.hs @@ -1,4 +1,5 @@ +{-# OPTIONS_GHC -Wunused-imports #-} module CodeActionRedundant where import Data.List main :: IO () -main = putStrLn "hello" \ No newline at end of file +main = putStrLn "hello" diff --git a/test/testdata/redundantImportTest/src/MultipleImports.hs b/test/testdata/redundantImportTest/src/MultipleImports.hs index 4bc5508b61..7a8278b1d3 100644 --- a/test/testdata/redundantImportTest/src/MultipleImports.hs +++ b/test/testdata/redundantImportTest/src/MultipleImports.hs @@ -1,3 +1,4 @@ +{-# OPTIONS_GHC -Wunused-imports #-} module MultipleImports where import Data.Foldable import Data.Maybe From 4d5253725b3735dbf5614c57a716f3b697ebbdc3 Mon Sep 17 00:00:00 2001 From: jneira Date: Sat, 12 Dec 2020 12:50:28 +0100 Subject: [PATCH 16/25] Use brittany last released version --- cabal.project | 7 +------ haskell-language-server.cabal | 2 +- stack-8.10.1.yaml | 3 +-- stack-8.10.2.yaml | 3 +-- stack-8.6.4.yaml | 3 +-- stack-8.6.5.yaml | 3 +-- stack-8.8.2.yaml | 3 +-- stack-8.8.3.yaml | 3 +-- stack-8.8.4.yaml | 3 +-- stack.yaml | 3 +-- 10 files changed, 10 insertions(+), 23 deletions(-) diff --git a/cabal.project b/cabal.project index e0ffe04263..3fd7b0a89b 100644 --- a/cabal.project +++ b/cabal.project @@ -8,11 +8,6 @@ packages: ./plugins/hls-explicit-imports-plugin ./plugins/hls-retrie-plugin -source-repository-package - type: git - location: https://github.com/lspitzner/brittany.git - tag: 0a710ab27147d4f7981fe4ca343b43136ee36919 - tests: true package * @@ -25,6 +20,6 @@ package ghcide write-ghc-environment-files: never -index-state: 2020-12-09T06:57:58Z +index-state: 2020-12-11T18:53:33Z allow-newer: data-tree-print:base diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index fca3471ec5..20b9b6d558 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -143,7 +143,7 @@ executable haskell-language-server , unordered-containers if flag(agpl) - build-depends: brittany + build-depends: brittany >= 0.13.1.0 other-modules: Ide.Plugin.Brittany include-dirs: include diff --git a/stack-8.10.1.yaml b/stack-8.10.1.yaml index c3aa894e3b..684ee46436 100644 --- a/stack-8.10.1.yaml +++ b/stack-8.10.1.yaml @@ -14,8 +14,7 @@ ghc-options: "$everything": -haddock extra-deps: -- github: lspitzner/brittany - commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 +- brittany-0.13.1.0 - Cabal-3.0.2.0 - clock-0.7.2 - data-tree-print-0.1.0.2@rev:2 diff --git a/stack-8.10.2.yaml b/stack-8.10.2.yaml index f55be2c34e..065d95c53d 100644 --- a/stack-8.10.2.yaml +++ b/stack-8.10.2.yaml @@ -14,8 +14,7 @@ ghc-options: "$everything": -haddock extra-deps: -- github: lspitzner/brittany - commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 +- brittany-0.13.1.0 - Cabal-3.0.2.0 - clock-0.7.2 - data-tree-print-0.1.0.2@rev:2 diff --git a/stack-8.6.4.yaml b/stack-8.6.4.yaml index a085023a34..fab0cb0a9a 100644 --- a/stack-8.6.4.yaml +++ b/stack-8.6.4.yaml @@ -19,8 +19,7 @@ extra-deps: - apply-refact-0.8.2.1 - ansi-terminal-0.10.3 - base-compat-0.10.5 -- github: lspitzner/brittany - commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 +- brittany-0.13.1.0 - butcher-1.3.3.1 - Cabal-3.0.2.0 - cabal-plan-0.6.2.0 diff --git a/stack-8.6.5.yaml b/stack-8.6.5.yaml index 304a35f334..871bb4a844 100644 --- a/stack-8.6.5.yaml +++ b/stack-8.6.5.yaml @@ -18,8 +18,7 @@ extra-deps: - apply-refact-0.8.2.1 - ansi-terminal-0.10.3 - base-compat-0.10.5 -- github: lspitzner/brittany - commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 +- brittany-0.13.1.0 - butcher-1.3.3.1 - Cabal-3.0.2.0 - cabal-plan-0.6.2.0 diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index 8bc5919b8a..adffd7b995 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -15,8 +15,7 @@ ghc-options: extra-deps: - aeson-1.5.2.0 -- github: lspitzner/brittany - commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 +- brittany-0.13.1.0 - butcher-1.3.3.2 - bytestring-trie-0.2.5.0 - clock-0.7.2 diff --git a/stack-8.8.3.yaml b/stack-8.8.3.yaml index a53ea1cb70..0ef996cfbb 100644 --- a/stack-8.8.3.yaml +++ b/stack-8.8.3.yaml @@ -16,8 +16,7 @@ ghc-options: extra-deps: - aeson-1.5.2.0 - apply-refact-0.8.2.1 -- github: lspitzner/brittany - commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 +- brittany-0.13.1.0 - bytestring-trie-0.2.5.0 - cabal-plan-0.6.2.0 - clock-0.7.2 diff --git a/stack-8.8.4.yaml b/stack-8.8.4.yaml index fc50d9b7d7..9c994cc8ed 100644 --- a/stack-8.8.4.yaml +++ b/stack-8.8.4.yaml @@ -16,8 +16,7 @@ ghc-options: extra-deps: - aeson-1.5.2.0 - apply-refact-0.8.2.1 -- github: lspitzner/brittany - commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 +- brittany-0.13.1.0 - bytestring-trie-0.2.5.0 - cabal-plan-0.6.2.0 - clock-0.7.2 diff --git a/stack.yaml b/stack.yaml index 238c04e01d..d7842be85a 100644 --- a/stack.yaml +++ b/stack.yaml @@ -18,8 +18,7 @@ extra-deps: - apply-refact-0.8.2.1 - ansi-terminal-0.10.3 - base-compat-0.10.5 -- github: lspitzner/brittany - commit: 0a710ab27147d4f7981fe4ca343b43136ee36919 +- brittany-0.13.1.0 - butcher-1.3.3.1 - Cabal-3.0.2.0 - cabal-plan-0.6.2.0 From 10fb8773e3dc91cb900c78f907121397e0ca74d2 Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 13 Dec 2020 14:06:36 +0100 Subject: [PATCH 17/25] Use ghcide-0.6.0.1 --- ghcide | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghcide b/ghcide index 27b4250bb2..3ae1b20962 160000 --- a/ghcide +++ b/ghcide @@ -1 +1 @@ -Subproject commit 27b4250bb245cbe44c2d63eeda5743d9807fe4a0 +Subproject commit 3ae1b20962ebff960dc1c045952daf8e56668a00 From 0e250a4ed13c5089d3ea17e251dd919b1bac4261 Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 13 Dec 2020 21:41:37 +0100 Subject: [PATCH 18/25] Add apply-refact to stack-8.8.2.yaml --- stack-8.8.2.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/stack-8.8.2.yaml b/stack-8.8.2.yaml index adffd7b995..bfa19aa1df 100644 --- a/stack-8.8.2.yaml +++ b/stack-8.8.2.yaml @@ -15,6 +15,7 @@ ghc-options: extra-deps: - aeson-1.5.2.0 +- apply-refact-0.8.2.1 - brittany-0.13.1.0 - butcher-1.3.3.2 - bytestring-trie-0.2.5.0 From 7135541894ba6354ec4f3d32420c186113483c94 Mon Sep 17 00:00:00 2001 From: jneira Date: Sun, 13 Dec 2020 23:54:29 +0100 Subject: [PATCH 19/25] Replacing waitForDiagnostics with sleep --- test/functional/Completion.hs | 42 +++++++++++--------------- test/testdata/completion/Completion.hs | 2 +- test/testdata/completion/Context.hs | 2 +- 3 files changed, 19 insertions(+), 27 deletions(-) diff --git a/test/functional/Completion.hs b/test/functional/Completion.hs index fef31e7183..c6284aaf17 100644 --- a/test/functional/Completion.hs +++ b/test/functional/Completion.hs @@ -13,12 +13,12 @@ import Test.Tasty import Test.Tasty.ExpectedFailure (ignoreTestBecause) import Test.Tasty.HUnit import qualified Data.Text as T +import System.Time.Extra (sleep) tests :: TestTree tests = testGroup "completions" [ testCase "works" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc let te = TextEdit (Range (Position 5 7) (Position 5 24)) "put" _ <- applyEdit doc te @@ -35,7 +35,6 @@ tests = testGroup "completions" [ , ignoreTestBecause "no support for itemCompletion/resolve requests" $ testCase "itemCompletion/resolve works" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc let te = TextEdit (Range (Position 5 7) (Position 5 24)) "put" _ <- applyEdit doc te @@ -54,7 +53,8 @@ tests = testGroup "completions" [ , testCase "completes imports" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc + + liftIO $ sleep 4 let te = TextEdit (Range (Position 1 17) (Position 1 26)) "Data.M" _ <- applyEdit doc te @@ -68,7 +68,8 @@ tests = testGroup "completions" [ , testCase "completes qualified imports" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc + + liftIO $ sleep 4 let te = TextEdit (Range (Position 2 17) (Position 1 25)) "Dat" _ <- applyEdit doc te @@ -82,7 +83,8 @@ tests = testGroup "completions" [ , testCase "completes language extensions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc + + liftIO $ sleep 4 let te = TextEdit (Range (Position 0 24) (Position 0 31)) "" _ <- applyEdit doc te @@ -95,7 +97,8 @@ tests = testGroup "completions" [ , testCase "completes pragmas" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc + + liftIO $ sleep 4 let te = TextEdit (Range (Position 0 4) (Position 0 34)) "" _ <- applyEdit doc te @@ -110,7 +113,6 @@ tests = testGroup "completions" [ , testCase "completes pragmas no close" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc let te = TextEdit (Range (Position 0 4) (Position 0 24)) "" _ <- applyEdit doc te @@ -125,7 +127,8 @@ tests = testGroup "completions" [ , testCase "completes options pragma" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc + + liftIO $ sleep 4 let te = TextEdit (Range (Position 0 4) (Position 0 34)) "OPTIONS" _ <- applyEdit doc te @@ -141,8 +144,6 @@ tests = testGroup "completions" [ , testCase "completes ghc options pragma values" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc - let te = TextEdit (Range (Position 0 0) (Position 0 0)) "{-# OPTIONS_GHC -Wno-red #-}\n" _ <- applyEdit doc te @@ -156,7 +157,7 @@ tests = testGroup "completions" [ , testCase "completes with no prefix" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc + compls <- getCompletions doc (Position 5 7) liftIO $ any ((== "!!") . (^. label)) compls @? "" @@ -175,7 +176,7 @@ tests = testGroup "completions" [ , testCase "have implicit foralls on basic polymorphic types" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc + let te = TextEdit (Range (Position 5 7) (Position 5 9)) "id" _ <- applyEdit doc te compls <- getCompletions doc (Position 5 9) @@ -185,7 +186,7 @@ tests = testGroup "completions" [ , testCase "have implicit foralls with multiple type variables" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc + let te = TextEdit (Range (Position 5 7) (Position 5 24)) "flip" _ <- applyEdit doc te compls <- getCompletions doc (Position 5 11) @@ -201,7 +202,6 @@ snippetTests :: TestTree snippetTests = testGroup "snippets" [ testCase "work for argumentless constructors" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc let te = TextEdit (Range (Position 5 7) (Position 5 24)) "Nothing" _ <- applyEdit doc te @@ -214,7 +214,6 @@ snippetTests = testGroup "snippets" [ , testCase "work for polymorphic types" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc let te = TextEdit (Range (Position 5 7) (Position 5 24)) "fold" _ <- applyEdit doc te @@ -229,7 +228,6 @@ snippetTests = testGroup "snippets" [ , testCase "work for complex types" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc let te = TextEdit (Range (Position 5 7) (Position 5 24)) "mapM" _ <- applyEdit doc te @@ -244,7 +242,6 @@ snippetTests = testGroup "snippets" [ , testCase "work for infix functions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc let te = TextEdit (Range (Position 5 7) (Position 5 24)) "even `filte" _ <- applyEdit doc te @@ -259,7 +256,6 @@ snippetTests = testGroup "snippets" [ , testCase "work for infix functions in backticks" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc let te = TextEdit (Range (Position 5 7) (Position 5 24)) "even `filte`" _ <- applyEdit doc te @@ -274,7 +270,6 @@ snippetTests = testGroup "snippets" [ , testCase "work for qualified infix functions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc let te = TextEdit (Range (Position 5 7) (Position 5 24)) "\"\" `Data.List.interspe" _ <- applyEdit doc te @@ -289,7 +284,6 @@ snippetTests = testGroup "snippets" [ , testCase "work for qualified infix functions in backticks" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc let te = TextEdit (Range (Position 5 7) (Position 5 24)) "\"\" `Data.List.interspe`" _ <- applyEdit doc te @@ -305,7 +299,6 @@ snippetTests = testGroup "snippets" [ , ignoreTestBecause "ghcide does not support the completionSnippetsOn option" $ testCase "respects lsp configuration" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc let config = object [ "haskell" .= (object ["completionSnippetsOn" .= False])] @@ -316,7 +309,6 @@ snippetTests = testGroup "snippets" [ , testCase "respects client capabilities" $ runSession hlsCommand noSnippetsCaps "test/testdata/completion" $ do doc <- openDoc "Completion.hs" "haskell" - _ <- waitForDiagnosticsFrom doc checkNoSnippets doc ] @@ -349,7 +341,7 @@ contextTests :: TestTree contextTests = testGroup "contexts" [ testCase "only provides type suggestions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Context.hs" "haskell" - _ <- waitForDiagnosticsFrom doc + compls <- getCompletions doc (Position 2 17) liftIO $ do compls `shouldContainCompl` "Integer" @@ -357,7 +349,7 @@ contextTests = testGroup "contexts" [ , testCase "only provides value suggestions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Context.hs" "haskell" - _ <- waitForDiagnosticsFrom doc + compls <- getCompletions doc (Position 3 9) liftIO $ do compls `shouldContainCompl` "abs" @@ -365,7 +357,7 @@ contextTests = testGroup "contexts" [ , testCase "completes qualified type suggestions" $ runSession hlsCommand fullCaps "test/testdata/completion" $ do doc <- openDoc "Context.hs" "haskell" - _ <- waitForDiagnosticsFrom doc + compls <- getCompletions doc (Position 2 26) liftIO $ do compls `shouldNotContainCompl` "forkOn" diff --git a/test/testdata/completion/Completion.hs b/test/testdata/completion/Completion.hs index 1e394a8f21..9427f3dc03 100644 --- a/test/testdata/completion/Completion.hs +++ b/test/testdata/completion/Completion.hs @@ -6,4 +6,4 @@ main :: IO () main = putStrLn "hello" foo :: Either a b -> Either a b -foo = id id +foo = id diff --git a/test/testdata/completion/Context.hs b/test/testdata/completion/Context.hs index 2f6effccb6..0f3d350879 100644 --- a/test/testdata/completion/Context.hs +++ b/test/testdata/completion/Context.hs @@ -1,4 +1,4 @@ module Context where import Control.Concurrent as Conc foo :: Int -> Int -> Conc.MVar -foo x = abs $ id 42 +foo x = abs 42 From be6db04653ccc1f040cb1c1b0010f8ac97c49b06 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 14 Dec 2020 00:17:58 +0100 Subject: [PATCH 20/25] Adapt brittany golden test --- test/testdata/Format.brittany.formatted.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testdata/Format.brittany.formatted.hs b/test/testdata/Format.brittany.formatted.hs index 9ecc458524..03aef77efa 100644 --- a/test/testdata/Format.brittany.formatted.hs +++ b/test/testdata/Format.brittany.formatted.hs @@ -1,8 +1,8 @@ module Format where import Data.List -import Prelude import Data.Int +import Prelude foo :: Int -> Int foo 3 = 2 foo x = x From 94f8095bf5d86341dc72e4954f350c7f726d17f1 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 14 Dec 2020 07:55:17 +0100 Subject: [PATCH 21/25] Adapt floskell golden test --- test/testdata/Format.floskell.formatted.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testdata/Format.floskell.formatted.hs b/test/testdata/Format.floskell.formatted.hs index 02de9c673d..ac0b2ebfb6 100644 --- a/test/testdata/Format.floskell.formatted.hs +++ b/test/testdata/Format.floskell.formatted.hs @@ -1,8 +1,8 @@ module Format where import Data.List -import Prelude import Data.Int +import Prelude foo :: Int -> Int foo 3 = 2 From cd17a0a76bca26c98dbdd25bde4d0ebfafb47218 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 14 Dec 2020 09:03:21 +0100 Subject: [PATCH 22/25] Adapt brittany+floskell golden test --- test/testdata/Format.brittany_post_floskell.formatted.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testdata/Format.brittany_post_floskell.formatted.hs b/test/testdata/Format.brittany_post_floskell.formatted.hs index 9cbb33715c..6ea6a00b8d 100644 --- a/test/testdata/Format.brittany_post_floskell.formatted.hs +++ b/test/testdata/Format.brittany_post_floskell.formatted.hs @@ -1,8 +1,8 @@ module Format where +import Data.Int import Data.List import Prelude -import Data.Int foo :: Int -> Int foo 3 = 2 From 47660745a9efb717804df5a146d8d8e60a0552aa Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 14 Dec 2020 10:52:42 +0100 Subject: [PATCH 23/25] Ensure ghcide-0.6.0.1 in cabal config --- cabal.project | 2 +- haskell-language-server.cabal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cabal.project b/cabal.project index 3fd7b0a89b..f1872a8547 100644 --- a/cabal.project +++ b/cabal.project @@ -20,6 +20,6 @@ package ghcide write-ghc-environment-files: never -index-state: 2020-12-11T18:53:33Z +index-state: 2020-12-13T11:31:58Z allow-newer: data-tree-print:base diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index 20b9b6d558..c9cc6e16df 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -59,7 +59,7 @@ library , containers , data-default , ghc - , ghcide >=0.6 + , ghcide >=0.6.0.1 , gitrev , haskell-lsp ^>=0.22 , hls-plugin-api >=0.5 From 4a58f1fbca7de4e47e99bf580be688a55809e8f1 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 14 Dec 2020 10:58:45 +0100 Subject: [PATCH 24/25] Update ChangeLog with 0.7 changes --- ChangeLog.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/ChangeLog.md b/ChangeLog.md index 75a840c76f..8d192fac59 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,5 +1,79 @@ # Changelog for haskell-language-server +## 0.7.0 + +* This version contains mainly refactors and updates of upstream packages +* It bumps up some formatter versions: + * ormolu is 0.1.4.1 + * fourmolu is 0.3.0.0 + * brittany is 0.13.1.0 +* It uses last implicit-hie-cradle-0.3.0.2, with some [bug](https://github.com/Avi-D-coder/implicit-hie/issues/29) [fixes](https://github.com/Avi-D-coder/implicit-hie/issues/30) +* It uses last ghcide-0.6.0.1 with [improvements and bug fixes](https://github.com/haskell/ghcide/blob/master/CHANGELOG.md#060-2020-12-06): + * Do not enable every "unnecessary" warning by default + * Improvements over completions: + * record fields + * identifiers not in explicit import lists + * extend explicit import list automatically + +Thanks to all haskell-language-server, ghcide and other upstream packages contributors (the list continue growing healthy) for make this release possible. + +### Pull requests merged + +- Miscellanous fixes: correct tactic plugin package metadata and cabal.hie.yaml/stack.hie.yaml +([#672)](https://github.com/haskell/haskell-language-server/pull/672) by @berberman +- Remove unnecessary pluginId setting and user Better Map functions in tactics plugin +([#669)](https://github.com/haskell/haskell-language-server/pull/669) by @jhrcek +- Do not suggest explicitly disabled pragmas +([#666)](https://github.com/haskell/haskell-language-server/pull/666) by @berberman +- fixed hie.yaml.stack +([#664)](https://github.com/haskell/haskell-language-server/pull/664) by @tittoassini +- Add pragmas completions +([#662)](https://github.com/haskell/haskell-language-server/pull/662) by @gdevanla +- Enable code completion tests +([#657)](https://github.com/haskell/haskell-language-server/pull/657) by @peterwicksstringfield +- Enable highlight unittests +([#656)](https://github.com/haskell/haskell-language-server/pull/656) by @peterwicksstringfield +- Fix document symbols unit tests. +([#655)](https://github.com/haskell/haskell-language-server/pull/655) by @peterwicksstringfield +- Delete duplicate cabal clause for applyrefact2 +([#654)](https://github.com/haskell/haskell-language-server/pull/654) by @peterwicksstringfield +- Add extra-source-files for split plugins +([#650)](https://github.com/haskell/haskell-language-server/pull/650) by @berberman +- [nix-shell] Actually use gitignore +([#649)](https://github.com/haskell/haskell-language-server/pull/649) by @pepeiborra +- idempotent command and code cleanup +([#648)](https://github.com/haskell/haskell-language-server/pull/648) by @tittoassini +- Split the Imports and Retrie plugins +([#647)](https://github.com/haskell/haskell-language-server/pull/647) by @pepeiborra +- Simplify and Bump implicit-hie version constraints +([#645)](https://github.com/haskell/haskell-language-server/pull/645) by @Avi-D-coder +- Fix and enable disabled code action unit tests, fix fallback handler +([#643)](https://github.com/haskell/haskell-language-server/pull/643) by @peterwicksstringfield +- Add Ghcide hie.yaml instruction for Stack users +([#641)](https://github.com/haskell/haskell-language-server/pull/641) by @Sir4ur0n +- Upgrade the Nix build system +([#639)](https://github.com/haskell/haskell-language-server/pull/639) by @pepeiborra +- No longer needed to build once for Stack +([#637)](https://github.com/haskell/haskell-language-server/pull/637) by @Sir4ur0n +- Preserve the last empty comment line after eval plugin +([#631)](https://github.com/haskell/haskell-language-server/pull/631) by @expipiplus1 +- Update fourmolu to 0.3.0.0 +([#624)](https://github.com/haskell/haskell-language-server/pull/624) by @gwils +- Add hspec-discover to build-tool-depends in tactics plugin +([#623)](https://github.com/haskell/haskell-language-server/pull/623) by @gwils +- Add build to ghc-8.10.2 and windows +([#619)](https://github.com/haskell/haskell-language-server/pull/619) by @jneira +- Module Name Plugin: Treat modules starting with lowercase as Main module +([#616)](https://github.com/haskell/haskell-language-server/pull/616) by @konn +- Bump ormolu to 0.1.4.1 +([#614)](https://github.com/haskell/haskell-language-server/pull/614) by @AlistairB +- Fix fourmolu plugin inconsistent formatting +([#599)](https://github.com/haskell/haskell-language-server/pull/599) by @zweimach +- Hlint: bring over idea2Message for formatting +([#598)](https://github.com/haskell/haskell-language-server/pull/598) by @alanz +- Makes dictionary argument exclusion logic in Tactic plugin more robust +([#508)](https://github.com/haskell/haskell-language-server/pull/508) by @konn + ## 0.6.0 0.6.0 includes two brand new plugins! From ac99654e583a9798d3cb5430a2d687289018a477 Mon Sep 17 00:00:00 2001 From: jneira Date: Mon, 14 Dec 2020 19:58:49 +0100 Subject: [PATCH 25/25] Bump package versions --- haskell-language-server.cabal | 2 +- hls-plugin-api/hls-plugin-api.cabal | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/haskell-language-server.cabal b/haskell-language-server.cabal index c9cc6e16df..70873b6688 100644 --- a/haskell-language-server.cabal +++ b/haskell-language-server.cabal @@ -1,7 +1,7 @@ cabal-version: 2.2 category: Development name: haskell-language-server -version: 0.6.0.0 +version: 0.7.0.0 synopsis: LSP server for GHC description: Please see the README on GitHub at diff --git a/hls-plugin-api/hls-plugin-api.cabal b/hls-plugin-api/hls-plugin-api.cabal index 1cffd0ae0b..f88f7be36a 100644 --- a/hls-plugin-api/hls-plugin-api.cabal +++ b/hls-plugin-api/hls-plugin-api.cabal @@ -1,6 +1,6 @@ cabal-version: 2.2 name: hls-plugin-api -version: 0.5.0.0 +version: 0.5.0.1 synopsis: Haskell Language Server API for plugin communication description: Please see the README on GitHub at