Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use wz1000/hls-3 ghcide branch #275

Merged
merged 1 commit into from
Aug 4, 2020
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 .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 4 additions & 1 deletion exe/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are commented out for now, should come from the hls config, but the default values are fine (check parents on save, always check project).

}
debouncer <- newAsyncDebouncer
initialise caps (mainRule >> pluginRules plugins)
Expand Down
2 changes: 1 addition & 1 deletion ghcide
Submodule ghcide updated 50 files
+1 −0 .gitignore
+1 −1 .hlint.yaml
+18 −0 README.md
+1 −1 bench/hist/Main.hs
+5 −6 bench/lib/Experiments.hs
+13 −0 cabal.project
+14 −3 exe/Main.hs
+3 −3 extension/package-lock.json
+18 −3 ghcide.cabal
+2 −0 hie.yaml
+40 −39 session-loader/Development/IDE/Session.hs
+17 −0 session-loader/Development/IDE/Session/VersionCheck.hs
+6 −9 src-ghc810/Development/IDE/GHC/HieAst.hs
+6 −9 src-ghc86/Development/IDE/GHC/HieAst.hs
+1 −0 src-ghc86/Development/IDE/GHC/HieTypes.hs
+6 −9 src-ghc88/Development/IDE/GHC/HieAst.hs
+140 −43 src/Development/IDE/Core/Compile.hs
+40 −22 src/Development/IDE/Core/FileStore.hs
+0 −2 src/Development/IDE/Core/OfInterest.hs
+2 −2 src/Development/IDE/Core/Preprocessor.hs
+11 −0 src/Development/IDE/Core/RuleTypes.hs
+148 −78 src/Development/IDE/Core/Rules.hs
+25 −34 src/Development/IDE/Core/Shake.hs
+140 −29 src/Development/IDE/GHC/Compat.hs
+18 −24 src/Development/IDE/GHC/Error.hs
+5 −1 src/Development/IDE/GHC/Util.hs
+3 −3 src/Development/IDE/Import/DependencyInformation.hs
+2 −2 src/Development/IDE/LSP/LanguageServer.hs
+16 −3 src/Development/IDE/LSP/Notifications.hs
+26 −28 src/Development/IDE/LSP/Outline.hs
+205 −9 src/Development/IDE/Plugin/CodeAction.hs
+72 −10 src/Development/IDE/Plugin/Completions.hs
+122 −60 src/Development/IDE/Plugin/Completions/Logic.hs
+16 −16 src/Development/IDE/Plugin/Completions/Types.hs
+4 −2 src/Development/IDE/Spans/AtPoint.hs
+4 −9 src/Development/IDE/Spans/Common.hs
+42 −30 src/Development/IDE/Spans/Documentation.hs
+8 −8 src/Development/IDE/Types/Location.hs
+34 −0 src/Development/IDE/Types/Options.hs
+1 −0 stack-ghc-lib.yaml
+3 −0 stack.yaml
+3 −1 stack810.yaml
+4 −0 stack84.yaml
+3 −0 stack88.yaml
+8 −0 test/data/boot/A.hs
+2 −0 test/data/boot/A.hs-boot
+7 −0 test/data/boot/B.hs
+8 −0 test/data/boot/C.hs
+1 −0 test/data/boot/hie.yaml
+531 −143 test/exe/Main.hs
7 changes: 3 additions & 4 deletions src/Ide/Plugin/Retrie.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
]

-------------------------------------------------------------------------------
Expand Down