Skip to content

Commit b15508a

Browse files
authored
Merge pull request #275 from alanz/hls-3
Use wz1000/hls-3 ghcide branch
2 parents c9083ba + 4564196 commit b15508a

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
path = ghcide
1313
# url = https://github.com/digital-asset/ghcide.git
1414
# url = https://github.com/alanz/ghcide.git
15-
# url = https://github.com/wz1000/ghcide.git
15+
url = https://github.com/wz1000/ghcide.git
1616
# url = https://github.com/fendor/ghcide.git
17-
url = https://github.com/bubba/ghcide.git
17+
# url = https://github.com/bubba/ghcide.git

exe/Main.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,18 @@ runLspMode lspArgs@LspArguments {..} = do
174174
hPutStrLn stderr $ " with plugins: " <> show (Map.keys $ ipMap idePlugins')
175175
hPutStrLn stderr $ " in directory: " <> dir
176176
hPutStrLn stderr "If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!"
177-
runLanguageServer options (pluginHandler plugins) getInitialConfig getConfigFromNotification $ \getLspId event vfs caps wProg wIndefProg -> do
177+
runLanguageServer options (pluginHandler plugins) getInitialConfig getConfigFromNotification $ \getLspId event vfs caps wProg wIndefProg _getConfig -> do
178178
t <- t
179179
hPutStrLn stderr $ "Started LSP server in " ++ showDuration t
180180
sessionLoader <- loadSession dir
181+
-- config <- fromMaybe defaultLspConfig <$> getConfig
181182
let options = (defaultIdeOptions sessionLoader)
182183
{ optReportProgress = clientSupportsProgress caps
183184
, optShakeProfiling = argsShakeProfiling
184185
, optTesting = IdeTesting argsTesting
185186
, optThreads = argsThreads
187+
-- , optCheckParents = checkParents config
188+
-- , optCheckProject = checkProject config
186189
}
187190
debouncer <- newAsyncDebouncer
188191
initialise caps (mainRule >> pluginRules plugins)

ghcide

Submodule ghcide updated 50 files

src/Ide/Plugin/Retrie.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ import Development.IDE.Core.Shake (IdeRule,
4949
IdeState (shakeExtras),
5050
runIdeAction, use,
5151
useWithStaleFast, use_)
52-
import Development.IDE.GHC.Error (isInsideSrcSpan,
53-
srcSpanToRange)
52+
import Development.IDE.GHC.Error (realSrcSpanToRange, isInsideSrcSpan)
5453
import Development.IDE.GHC.Util (hscEnv, prettyPrint, runGhcEnv)
5554
import Development.IDE.Types.Location
5655
import Development.Shake (RuleResult)
@@ -435,9 +434,9 @@ asTextEdits NoChange = []
435434
asTextEdits (Change reps _imports) =
436435
[ (Uri spanLoc, edit)
437436
| Replacement {..} <- nubOrdOn replLocation reps,
438-
s@(RealSrcSpan rspan) <- [replLocation],
437+
(RealSrcSpan rspan) <- [replLocation],
439438
let spanLoc = T.pack $ unpackFS $ srcSpanFile rspan,
440-
let edit = TextEdit (srcSpanToRange s) (T.pack replReplacement)
439+
let edit = TextEdit (realSrcSpanToRange rspan) (T.pack replReplacement)
441440
]
442441

443442
-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)