Skip to content

Commit bc32a2e

Browse files
authored
Upgrade to new haskell-lsp release (#203)
1 parent 133991b commit bc32a2e

File tree

7 files changed

+20
-19
lines changed

7 files changed

+20
-19
lines changed

src/Development/IDE/Core/FileStore.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ makeVFSHandle = do
7676
modifyVar_ vfsVar $ \(nextVersion, vfs) -> pure $ (nextVersion + 1, ) $
7777
case content of
7878
Nothing -> Map.delete uri vfs
79-
Just content -> Map.insert uri (VirtualFile nextVersion (Rope.fromText content) Nothing) vfs
79+
Just content -> Map.insert uri (VirtualFile nextVersion (Rope.fromText content)) vfs
8080
}
8181

8282
makeLSPVFSHandle :: LspFuncs c -> VFSHandle
@@ -139,7 +139,7 @@ getModificationTimeRule vfs =
139139
alwaysRerun
140140
mbVirtual <- liftIO $ getVirtualFile vfs $ filePathToUri' file
141141
case mbVirtual of
142-
Just (VirtualFile ver _ _) -> pure (Just $ BS.pack $ show ver, ([], Just $ VFSVersion ver))
142+
Just (VirtualFile ver _) -> pure (Just $ BS.pack $ show ver, ([], Just $ VFSVersion ver))
143143
Nothing -> liftIO $ fmap wrap (getModTime file')
144144
`catch` \(e :: IOException) -> do
145145
let err | isDoesNotExistError e = "File does not exist: " ++ file'

src/Development/IDE/LSP/LanguageServer.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ data Message
182182

183183
modifyOptions :: LSP.Options -> LSP.Options
184184
modifyOptions x = x{ LSP.textDocumentSync = Just $ tweakTDS origTDS
185-
, LSP.codeActionProvider = Just $ CodeActionOptionsStatic True }
185+
}
186186
where
187187
tweakTDS tds = tds{_openClose=Just True, _change=Just TdSyncIncremental, _save=Just $ SaveOptions Nothing}
188188
origTDS = fromMaybe tdsDefault $ LSP.textDocumentSync x

stack-ghc-lib.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ resolver: nightly-2019-09-16
22
packages:
33
- .
44
extra-deps:
5-
- haskell-lsp-0.17.0.0
6-
- haskell-lsp-types-0.17.0.0
7-
- lsp-test-0.8.0.0
5+
- haskell-lsp-0.18.0.0
6+
- haskell-lsp-types-0.18.0.0
7+
- lsp-test-0.8.2.0
88
- hie-bios-0.2.0
99
- ghc-lib-parser-8.8.1
1010
- ghc-lib-8.8.1

stack.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ resolver: nightly-2019-09-16
22
packages:
33
- .
44
extra-deps:
5-
- haskell-lsp-0.17.0.0
6-
- haskell-lsp-types-0.17.0.0
7-
- lsp-test-0.8.0.0
5+
- haskell-lsp-0.18.0.0
6+
- haskell-lsp-types-0.18.0.0
7+
- lsp-test-0.8.2.0
88
- hie-bios-0.2.1
99
nix:
1010
packages: [zlib]

stack84.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ packages:
33
- .
44

55
extra-deps:
6-
- haskell-lsp-0.17.0.0
7-
- haskell-lsp-types-0.17.0.0
8-
- lsp-test-0.8.0.0
6+
- haskell-lsp-0.18.0.0
7+
- haskell-lsp-types-0.18.0.0
8+
- lsp-test-0.8.2.0
99
- rope-utf16-splay-0.3.1.0
1010
- shake-0.18.3
1111
- filepattern-0.1.1

stack88.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ resolver: nightly-2019-10-27
22
packages:
33
- .
44
extra-deps:
5-
- haskell-lsp-0.17.0.0
6-
- lsp-test-0.8.0.0
5+
- haskell-lsp-0.18.0.0
6+
- haskell-lsp-types-0.18.0.0
7+
- lsp-test-0.8.2.0
78
- hslogger-1.3.0.0
89
- network-bsd-2.8.1.0
910
allow-newer: true

test/exe/Main.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ initializeResponseTests = withResource acquire release tests where
5959
, chk "NO completion" _completionProvider Nothing
6060
, chk "NO signature help" _signatureHelpProvider Nothing
6161
, chk " goto definition" _definitionProvider (Just True)
62-
, chk "NO goto type definition" _typeDefinitionProvider Nothing
63-
, chk "NO goto implementation" _implementationProvider Nothing
62+
, chk "NO goto type definition" _typeDefinitionProvider (Just $ GotoOptionsStatic False)
63+
, chk "NO goto implementation" _implementationProvider (Just $ GotoOptionsStatic False)
6464
, chk "NO find references" _referencesProvider Nothing
6565
, chk "NO doc highlight" _documentHighlightProvider Nothing
6666
, chk "NO doc symbol" _documentSymbolProvider Nothing
@@ -72,10 +72,10 @@ initializeResponseTests = withResource acquire release tests where
7272
_documentRangeFormattingProvider Nothing
7373
, chk "NO doc formatting on typing"
7474
_documentOnTypeFormattingProvider Nothing
75-
, chk "NO renaming" _renameProvider Nothing
75+
, chk "NO renaming" _renameProvider (Just $ RenameOptionsStatic False)
7676
, chk "NO doc link" _documentLinkProvider Nothing
77-
, chk "NO color" _colorProvider Nothing
78-
, chk "NO folding range" _foldingRangeProvider Nothing
77+
, chk "NO color" _colorProvider (Just $ ColorOptionsStatic False)
78+
, chk "NO folding range" _foldingRangeProvider (Just $ FoldingRangeOptionsStatic False)
7979
, chk "NO execute command" _executeCommandProvider Nothing
8080
, chk "NO workspace" _workspace nothingWorkspace
8181
, chk "NO experimental" _experimental Nothing

0 commit comments

Comments
 (0)