Skip to content

Commit 172982a

Browse files
dhall-lsp-server: Update to haskell-lsp 0.19 (#1626)
* dhall-lsp-server: Update to haskell-lsp 0.19 * Also update haskell-lsp to 0.19.0.0 in stack.yaml * Update to lsp-test 0.10 haskell-lsp 0.19 requires at least lsp-test 0.9. * Override parser-combinators version in stack lts Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent abb0da5 commit 172982a

File tree

6 files changed

+25
-28
lines changed

6 files changed

+25
-28
lines changed

dhall-lsp-server/dhall-lsp-server.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ library
5353
, dhall >= 1.28.0 && < 1.29
5454
, dhall-json >= 1.4 && < 1.7
5555
, filepath >= 1.4.2 && < 1.5
56-
, haskell-lsp >= 0.15.0.0 && < 0.18
56+
, haskell-lsp >= 0.19.0.0 && < 0.20
5757
, rope-utf16-splay >= 0.3.1.0 && < 0.4
5858
, hslogger >= 1.2.10 && < 1.4
5959
, lens >= 4.16.1 && < 4.19
@@ -115,8 +115,8 @@ Test-Suite tests
115115
GHC-Options: -Wall
116116
Build-Depends:
117117
base ,
118-
haskell-lsp-types >= 0.15.0 && < 0.18 ,
119-
lsp-test >= 0.6 && < 0.9 ,
118+
haskell-lsp-types >= 0.19.0 && < 0.20 ,
119+
lsp-test >= 0.9 && < 0.11 ,
120120
tasty >= 0.11.2 && < 1.3 ,
121121
tasty-hspec >= 1.1 && < 1.2 ,
122122
text >= 0.11 && < 1.3

dhall-lsp-server/src/Dhall/LSP/Handlers.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ readUri uri = do
111111
getVirtualFileFunc <- uses lspFuncs LSP.getVirtualFileFunc
112112
mVirtualFile <- liftIO $ getVirtualFileFunc (J.toNormalizedUri uri)
113113
case mVirtualFile of
114-
Just (LSP.VirtualFile _ rope _) -> return (Rope.toText rope)
114+
Just (LSP.VirtualFile _ _ rope) -> return (Rope.toText rope)
115115
Nothing -> fail $ "Could not find " <> show uri <> " in VFS."
116116

117117
loadFile :: J.Uri -> HandlerM (Expr Src Void)

dhall-lsp-server/src/Dhall/LSP/Server.hs

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,19 @@ syncOptions = J.TextDocumentSyncOptions
7777
-- Server capabilities. Tells the LSP client that we can execute commands etc.
7878
lspOptions :: LSP.Core.Options
7979
lspOptions = def { LSP.Core.textDocumentSync = Just syncOptions
80-
, LSP.Core.completionProvider =
81-
Just (J.CompletionOptions {
82-
_resolveProvider = Nothing
83-
, _triggerCharacters = Just [":", ".", "/"] })
84-
, LSP.Core.executeCommandProvider =
85-
-- Note that this registers the dhall.server.lint command
86-
-- with VSCode, which means that our plugin can't expose a
87-
-- command of the same name. In the case of dhall.lint we
88-
-- name the server-side command dhall.server.lint to work
89-
-- around this peculiarity.
90-
Just (J.ExecuteCommandOptions
91-
(J.List ["dhall.server.lint",
92-
"dhall.server.annotateLet",
93-
"dhall.server.freezeImport",
94-
"dhall.server.freezeAllImports"]))
95-
, LSP.Core.documentLinkProvider =
96-
Just (J.DocumentLinkOptions { _resolveProvider = Just False })
80+
, LSP.Core.completionTriggerCharacters = Just [':', '.', '/']
81+
-- Note that this registers the dhall.server.lint command
82+
-- with VSCode, which means that our plugin can't expose a
83+
-- command of the same name. In the case of dhall.lint we
84+
-- name the server-side command dhall.server.lint to work
85+
-- around this peculiarity.
86+
, LSP.Core.executeCommandCommands =
87+
Just
88+
[ "dhall.server.lint",
89+
"dhall.server.annotateLet",
90+
"dhall.server.freezeImport",
91+
"dhall.server.freezeAllImports"
92+
]
9793
}
9894

9995
lspHandlers :: MVar ServerState -> LSP.Core.Handlers

nix/haskell-lsp-types.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
}:
55
mkDerivation {
66
pname = "haskell-lsp-types";
7-
version = "0.17.0.0";
8-
sha256 = "77444fa262393ac58b72b5cb6a4b1db401cdea015b42cab427bb4681dcd1230e";
7+
version = "0.19.0.0";
8+
sha256 = "a942ab1e504d8ae61b586c9b048e3b1422ab793bd908062332180af01beb3921";
99
libraryHaskellDepends = [
1010
aeson base bytestring data-default deepseq filepath hashable lens
1111
network-uri scientific text unordered-containers

nix/haskell-lsp.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
}:
88
mkDerivation {
99
pname = "haskell-lsp";
10-
version = "0.17.0.0";
11-
sha256 = "fdd8c88739a782a8127b880d4326d49ca56e76bd071c4cc0524d49539b2d899d";
10+
version = "0.19.0.0";
11+
sha256 = "91885a0707e977ca4e6ab2bda4af3cc0ab5d7394e34c970d93e8e5d158965532";
1212
isLibrary = true;
1313
isExecutable = true;
1414
libraryHaskellDepends = [

stack.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ packages:
99
extra-deps:
1010
- th-lift-instances-0.1.13@sha256:2852e468511805cb25d9e3923c9e91647d008ab4a764ec0921e5e40ff8a8e874,2625
1111
- th-lift-0.8.0.1@sha256:cceb81b12c0580e02a7a3898b6d60cca5e1be080741f69ddde4f12210d8ba7ca,1960
12-
- haskell-lsp-0.17.0.0
13-
- haskell-lsp-types-0.17.0.0
12+
- haskell-lsp-0.19.0.0
13+
- haskell-lsp-types-0.19.0.0
1414
- rope-utf16-splay-0.3.1.0@sha256:15a53c57f8413d193054bb5f045929edae3b2669def4c6af63197b30dc1d5003
1515
- hnix-0.6.1@sha256:13da97c09489ccf0b908fbe7817401137559eebc377c00cd7b8a66b77e8c251b,24519
1616
- hashing-0.1.0.1@sha256:98861f16791946cdf28e3c7a6ee9ac8b72d546d6e33c569c7087ef18253294e7,2816
@@ -21,12 +21,13 @@ extra-deps:
2121
- HsYAML-0.2.0.0@sha256:4e554ee481650156a26a71b40f233979cd943f22ee887b70dae3b8b24de2932f,5273
2222
- HsYAML-aeson-0.2.0.0@sha256:04796abfc01cffded83f37a10e6edba4f0c0a15d45bef44fc5bb4313d9c87757,1791
2323
- ordered-containers-0.2.2@sha256:ebf2be3f592d9cf148ea6b8375f8af97148d44f82d8d04476899285e965afdbf,810
24-
- lsp-test-0.8.0.0
24+
- lsp-test-0.10.0.0
2525
- aeson-yaml-1.0.5.0@sha256:5786f021c1e088d6a5aa259120ec5b1f22bb1757f4427c1a87e0513d00f17f31,1975
2626
- prettyprinter-1.5.1@sha256:fca87c3e2611d3499a0341a59857e9b424a23f31646e4737d535a18582284f96,5375
2727
- atomic-write-0.2.0.7@sha256:3b626dfbc288cd070f1ac31b1c15ddd49822a923778ffe21f92b2116ffc72dc3,4584
2828
- megaparsec-8.0.0
2929
- cborg-json-0.2.2.0
30+
- parser-combinators-1.2.1
3031
nix:
3132
packages:
3233
- ncurses

0 commit comments

Comments
 (0)