diff --git a/.gitmodules b/.gitmodules index 839d96ebd..009698acb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,6 +12,6 @@ path = ghcide # url = https://github.com/digital-asset/ghcide.git # url = https://github.com/alanz/ghcide.git - # url = https://github.com/wz1000/ghcide.git + url = https://github.com/wz1000/ghcide.git # url = https://github.com/fendor/ghcide.git - url = https://github.com/bubba/ghcide.git + # url = https://github.com/bubba/ghcide.git diff --git a/exe/Main.hs b/exe/Main.hs index 67f35c2a6..54a05f5ef 100644 --- a/exe/Main.hs +++ b/exe/Main.hs @@ -174,15 +174,18 @@ runLspMode lspArgs@LspArguments {..} = do hPutStrLn stderr $ " with plugins: " <> show (Map.keys $ ipMap idePlugins') hPutStrLn stderr $ " in directory: " <> dir hPutStrLn stderr "If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!" - runLanguageServer options (pluginHandler plugins) getInitialConfig getConfigFromNotification $ \getLspId event vfs caps wProg wIndefProg -> do + runLanguageServer options (pluginHandler plugins) getInitialConfig getConfigFromNotification $ \getLspId event vfs caps wProg wIndefProg _getConfig -> do t <- t hPutStrLn stderr $ "Started LSP server in " ++ showDuration t sessionLoader <- loadSession dir + -- config <- fromMaybe defaultLspConfig <$> getConfig let options = (defaultIdeOptions sessionLoader) { optReportProgress = clientSupportsProgress caps , optShakeProfiling = argsShakeProfiling , optTesting = IdeTesting argsTesting , optThreads = argsThreads + -- , optCheckParents = checkParents config + -- , optCheckProject = checkProject config } debouncer <- newAsyncDebouncer initialise caps (mainRule >> pluginRules plugins) diff --git a/ghcide b/ghcide index 7e895cfa5..b7de7ae89 160000 --- a/ghcide +++ b/ghcide @@ -1 +1 @@ -Subproject commit 7e895cfa53260b41996df707baec496a8f2c75dc +Subproject commit b7de7ae89469693b76d92ca433119d91d3a9aac0 diff --git a/src/Ide/Plugin/Retrie.hs b/src/Ide/Plugin/Retrie.hs index 9d50aa2f1..1f598ceba 100644 --- a/src/Ide/Plugin/Retrie.hs +++ b/src/Ide/Plugin/Retrie.hs @@ -49,8 +49,7 @@ import Development.IDE.Core.Shake (IdeRule, IdeState (shakeExtras), runIdeAction, use, useWithStaleFast, use_) -import Development.IDE.GHC.Error (isInsideSrcSpan, - srcSpanToRange) +import Development.IDE.GHC.Error (realSrcSpanToRange, isInsideSrcSpan) import Development.IDE.GHC.Util (hscEnv, prettyPrint, runGhcEnv) import Development.IDE.Types.Location import Development.Shake (RuleResult) @@ -435,9 +434,9 @@ asTextEdits NoChange = [] asTextEdits (Change reps _imports) = [ (Uri spanLoc, edit) | Replacement {..} <- nubOrdOn replLocation reps, - s@(RealSrcSpan rspan) <- [replLocation], + (RealSrcSpan rspan) <- [replLocation], let spanLoc = T.pack $ unpackFS $ srcSpanFile rspan, - let edit = TextEdit (srcSpanToRange s) (T.pack replReplacement) + let edit = TextEdit (realSrcSpanToRange rspan) (T.pack replReplacement) ] -------------------------------------------------------------------------------