Upgrade to new haskell-lsp release (#203)

This commit is contained in:
Moritz Kiefer 2019-11-18 09:37:10 +01:00 committed by GitHub
parent 133991b711
commit bc32a2eab3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 20 additions and 19 deletions

View File

@ -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'

View File

@ -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

View File

@ -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

View File

@ -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]

View File

@ -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

View File

@ -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

View File

@ -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