mirror of
https://github.com/haskell/haskell-language-server.git
synced 2024-11-10 06:46:24 +03:00
Merge pull request #275 from alanz/hls-3
Use wz1000/hls-3 ghcide branch
This commit is contained in:
commit
b15508a46c
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -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
|
||||
|
@ -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)
|
||||
|
2
ghcide
2
ghcide
@ -1 +1 @@
|
||||
Subproject commit 7e895cfa53260b41996df707baec496a8f2c75dc
|
||||
Subproject commit b7de7ae89469693b76d92ca433119d91d3a9aac0
|
@ -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)
|
||||
]
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user