diff --git a/src/Development/IDE/Core/FileStore.hs b/src/Development/IDE/Core/FileStore.hs index 161d890dce..159650e3e4 100644 --- a/src/Development/IDE/Core/FileStore.hs +++ b/src/Development/IDE/Core/FileStore.hs @@ -76,7 +76,7 @@ makeVFSHandle = do modifyVar_ vfsVar $ \(nextVersion, vfs) -> pure $ (nextVersion + 1, ) $ case content of Nothing -> Map.delete uri vfs - Just content -> Map.insert uri (VirtualFile nextVersion (Rope.fromText content) Nothing) vfs + Just content -> Map.insert uri (VirtualFile nextVersion (Rope.fromText content)) vfs } makeLSPVFSHandle :: LspFuncs c -> VFSHandle @@ -139,7 +139,7 @@ getModificationTimeRule vfs = alwaysRerun mbVirtual <- liftIO $ getVirtualFile vfs $ filePathToUri' file case mbVirtual of - Just (VirtualFile ver _ _) -> pure (Just $ BS.pack $ show ver, ([], Just $ VFSVersion ver)) + Just (VirtualFile ver _) -> pure (Just $ BS.pack $ show ver, ([], Just $ VFSVersion ver)) Nothing -> liftIO $ fmap wrap (getModTime file') `catch` \(e :: IOException) -> do let err | isDoesNotExistError e = "File does not exist: " ++ file' diff --git a/src/Development/IDE/LSP/LanguageServer.hs b/src/Development/IDE/LSP/LanguageServer.hs index f55233f54d..134410d095 100644 --- a/src/Development/IDE/LSP/LanguageServer.hs +++ b/src/Development/IDE/LSP/LanguageServer.hs @@ -182,7 +182,7 @@ data Message modifyOptions :: LSP.Options -> LSP.Options modifyOptions x = x{ LSP.textDocumentSync = Just $ tweakTDS origTDS - , LSP.codeActionProvider = Just $ CodeActionOptionsStatic True } + } where tweakTDS tds = tds{_openClose=Just True, _change=Just TdSyncIncremental, _save=Just $ SaveOptions Nothing} origTDS = fromMaybe tdsDefault $ LSP.textDocumentSync x diff --git a/stack-ghc-lib.yaml b/stack-ghc-lib.yaml index 4cb7f8c3a5..bdcdba7a4d 100644 --- a/stack-ghc-lib.yaml +++ b/stack-ghc-lib.yaml @@ -2,9 +2,9 @@ resolver: nightly-2019-09-16 packages: - . extra-deps: -- haskell-lsp-0.17.0.0 -- haskell-lsp-types-0.17.0.0 -- lsp-test-0.8.0.0 +- haskell-lsp-0.18.0.0 +- haskell-lsp-types-0.18.0.0 +- lsp-test-0.8.2.0 - hie-bios-0.2.0 - ghc-lib-parser-8.8.1 - ghc-lib-8.8.1 diff --git a/stack.yaml b/stack.yaml index aa830594a3..145809200e 100644 --- a/stack.yaml +++ b/stack.yaml @@ -2,9 +2,9 @@ resolver: nightly-2019-09-16 packages: - . extra-deps: -- haskell-lsp-0.17.0.0 -- haskell-lsp-types-0.17.0.0 -- lsp-test-0.8.0.0 +- haskell-lsp-0.18.0.0 +- haskell-lsp-types-0.18.0.0 +- lsp-test-0.8.2.0 - hie-bios-0.2.1 nix: packages: [zlib] diff --git a/stack84.yaml b/stack84.yaml index 51711fe4e2..942e217df4 100644 --- a/stack84.yaml +++ b/stack84.yaml @@ -3,9 +3,9 @@ packages: - . extra-deps: -- haskell-lsp-0.17.0.0 -- haskell-lsp-types-0.17.0.0 -- lsp-test-0.8.0.0 +- haskell-lsp-0.18.0.0 +- haskell-lsp-types-0.18.0.0 +- lsp-test-0.8.2.0 - rope-utf16-splay-0.3.1.0 - shake-0.18.3 - filepattern-0.1.1 diff --git a/stack88.yaml b/stack88.yaml index 21295e591c..000650616c 100644 --- a/stack88.yaml +++ b/stack88.yaml @@ -2,8 +2,9 @@ resolver: nightly-2019-10-27 packages: - . extra-deps: -- haskell-lsp-0.17.0.0 -- lsp-test-0.8.0.0 +- haskell-lsp-0.18.0.0 +- haskell-lsp-types-0.18.0.0 +- lsp-test-0.8.2.0 - hslogger-1.3.0.0 - network-bsd-2.8.1.0 allow-newer: true diff --git a/test/exe/Main.hs b/test/exe/Main.hs index 8a1779b3b5..2a52302d9e 100644 --- a/test/exe/Main.hs +++ b/test/exe/Main.hs @@ -59,8 +59,8 @@ initializeResponseTests = withResource acquire release tests where , chk "NO completion" _completionProvider Nothing , chk "NO signature help" _signatureHelpProvider Nothing , chk " goto definition" _definitionProvider (Just True) - , chk "NO goto type definition" _typeDefinitionProvider Nothing - , chk "NO goto implementation" _implementationProvider Nothing + , chk "NO goto type definition" _typeDefinitionProvider (Just $ GotoOptionsStatic False) + , chk "NO goto implementation" _implementationProvider (Just $ GotoOptionsStatic False) , chk "NO find references" _referencesProvider Nothing , chk "NO doc highlight" _documentHighlightProvider Nothing , chk "NO doc symbol" _documentSymbolProvider Nothing @@ -72,10 +72,10 @@ initializeResponseTests = withResource acquire release tests where _documentRangeFormattingProvider Nothing , chk "NO doc formatting on typing" _documentOnTypeFormattingProvider Nothing - , chk "NO renaming" _renameProvider Nothing + , chk "NO renaming" _renameProvider (Just $ RenameOptionsStatic False) , chk "NO doc link" _documentLinkProvider Nothing - , chk "NO color" _colorProvider Nothing - , chk "NO folding range" _foldingRangeProvider Nothing + , chk "NO color" _colorProvider (Just $ ColorOptionsStatic False) + , chk "NO folding range" _foldingRangeProvider (Just $ FoldingRangeOptionsStatic False) , chk "NO execute command" _executeCommandProvider Nothing , chk "NO workspace" _workspace nothingWorkspace , chk "NO experimental" _experimental Nothing