haskell-language-server
haskell-language-server copied to clipboard
[help] How to avoid the prompt?
When I hover my cursor on the comment, the language server shows a prompt and highlight a large range of text (shown in the figure), which is visually disturbing and annoying, how can I disable it?
Also why does the beginning of each line of the prompt have a meaningless $d
?

Your environment
macOS
Steps to reproduce
git clone [email protected]:atzeus/FRPNow.git
and open the project.
logs of the vscode LSP extension
2022-07-22 03:22:24.2880000 [client] INFO Found server executable in $PATH: haskell-language-server-wrapper
2022-07-22 03:22:24.2890000 [client] INFO Activating the language server in working dir: /private/tmp/FRPNow (the workspace folder)
2022-07-22 03:22:24.2890000 [client] INFO run command: haskell-language-server-wrapper --lsp
2022-07-22 03:22:24.2890000 [client] INFO debug command: haskell-language-server-wrapper --lsp
2022-07-22 03:22:24.2890000 [client] INFO server environment variables:
2022-07-22 03:22:24.2920000 [client] INFO Starting language server
No 'hie.yaml' found. Try to discover the project type!
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 1.7.0.0 aarch64 ghc-9.2.2
Current directory: /private/tmp/FRPNow
Operating system: darwin
Arguments: ["--lsp"]
Cradle directory: /private/tmp/FRPNow
Cradle type: Cabal
Tool versions found on the $PATH
cabal: 3.6.2.0
stack: 2.7.5
ghc: 9.2.2
Consulting the cradle to get project GHC version...
Project GHC version: 9.2.2
haskell-language-server exe candidates: ["haskell-language-server-9.2.2","haskell-language-server"]
Launching haskell-language-server exe at:/Users/cjw/.ghcup/bin/haskell-language-server-9.2.2
2022-07-22T03:22:28.796729Z | Info | No log file specified; using stderr.
2022-07-22T03:22:28.798655Z | Info | haskell-language-server version: 1.7.0.0 (GHC: 9.2.2) (PATH: /Users/cjw/.ghcup/hls/1.7.0.0/lib/haskell-language-server-1.7.0.0/bin/haskell-language-server-9.2.2)
2022-07-22T03:22:28.799552Z | Info | Directory: /private/tmp/FRPNow
2022-07-22T03:22:28.799685Z | Info | Starting (haskell-language-server) LSP server...
GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
PluginIds: [ pragmas
, floskell
, fourmolu
, ormolu
, stylish-haskell
, rename
, callHierarchy
, class
, eval
, importLens
, qualifyImportedNames
, refineImports
, moduleName
, alternateNumberFormat
, selectionRange
, changeTypeSignature
, ghcide-hover-and-symbols
, ghcide-code-actions-imports-exports
, ghcide-code-actions-type-signatures
, ghcide-code-actions-bindings
, ghcide-code-actions-fill-holes
, ghcide-completions
, ghcide-type-lenses
, ghcide-core
, LSPRecorderCallback ]
2022-07-22T03:22:28.801772Z | Info | Logging heap statistics every 60.00s
2022-07-22T03:22:28.863435Z | Info | Staring LSP server...
If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
2022-07-22T03:22:28.893740Z | Info | Started LSP server in 0.03s
2022-07-22T03:22:29.336628Z | Info | Registering IDE configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri 2313317384494205454 "file:///private/tmp/FRPNow"], clientSettings = hashed Nothing}
[Info - 11:22:29 AM] haskell-language-server version: 1.7.0.0 (GHC: 9.2.2) (PATH: /Users/cjw/.ghcup/hls/1.7.0.0/lib/haskell-language-server-1.7.0.0/bin/haskell-language-server-9.2.2)
[Info - 11:22:29 AM] Directory: /private/tmp/FRPNow
[Info - 11:22:29 AM] Starting (haskell-language-server) LSP server...
GhcideArguments {argsCommand = LSP, argsCwd = Nothing, argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
PluginIds: [ pragmas
, floskell
, fourmolu
, ormolu
, stylish-haskell
, rename
, callHierarchy
, class
, eval
, importLens
, qualifyImportedNames
, refineImports
, moduleName
, alternateNumberFormat
, selectionRange
, changeTypeSignature
, ghcide-hover-and-symbols
, ghcide-code-actions-imports-exports
, ghcide-code-actions-type-signatures
, ghcide-code-actions-bindings
, ghcide-code-actions-fill-holes
, ghcide-completions
, ghcide-type-lenses
, ghcide-core
, LSPRecorderCallback ]
[Info - 11:22:29 AM] Logging heap statistics every 60.00s
2022-07-22T03:22:29.352386Z | Info | Cradle path: Control/FRPNow/EvStream.hs
2022-07-22T03:22:29.352678Z | Warning | No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for Control/FRPNow/EvStream.hs.
Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie).
You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error.
[Info - 11:22:29 AM] Staring LSP server...
If you are seeing this in a terminal, you probably should have run WITHOUT the --lsp option!
[Info - 11:22:29 AM] Started LSP server in 0.03s
[Info - 11:22:29 AM] Registering IDE configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri 2313317384494205454 "file:///private/tmp/FRPNow"], clientSettings = hashed Nothing}
[Info - 11:22:29 AM] Cradle path: Control/FRPNow/EvStream.hs
[Warn - 11:22:29 AM] No [cradle](https://github.com/mpickering/hie-bios#hie-bios) found for Control/FRPNow/EvStream.hs.
Proceeding with [implicit cradle](https://hackage.haskell.org/package/implicit-hie).
You should ignore this message, unless you see a 'Multi Cradle: No prefixes matched' error.
Thank you for your bug report! Moved it to the hls repo which is providing this functionality
Unfortunately, you can't disable it unless you disabled all hover messages, AFAIK.
They($d) are HieAST symbols and stored in HieDb, HieDb supplies all information and hls display it without any filter besides the request location.
It often appears while pointing to a wildcard symbol or a symbol in the cpp pragma.
Not sure how your project caused this, but indeed we should deal with these messages deliberately.
I've occasionally seen things like this before where Haddock comments seem to get associated with a declaration, so you get hovers when you are on them, which seems wrong.