Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Upgrade to new haskell-lsp release #203

Merged
merged 1 commit into from
Nov 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Development/IDE/Core/FileStore.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion src/Development/IDE/LSP/LanguageServer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions stack-ghc-lib.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
6 changes: 3 additions & 3 deletions stack84.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions stack88.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions test/exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down