emacs-lsp / lsp-haskell

lsp-mode :heart: haskell
https://emacs-lsp.github.io/lsp-haskell
GNU General Public License v3.0
227 stars 56 forks source link

hls cannot work #94

Closed dwuggh closed 3 years ago

dwuggh commented 3 years ago

I created a new stack project test, change the resolver to ghc-8.10.1, and open app/Main.hs with emacs.

it seems hls can be started, but all capabilities failed to work.

Here's some info. from *lsp-haskell-stderr*:

Consulting the cradle to get project GHC version...
Project GHC version: 8.10.1
haskell-language-server exe candidates: ["haskell-language-server-8.10.1","haskell-language-server-8.10","haskell-language-server"]
Launching haskell-language-server exe at:/home/dwuggh/.ghcup/bin/haskell-language-server-8.10.1
haskell-language-server version: 0.6.0.0 (GHC: 8.10.1) (PATH: /home/dwuggh/.ghcup/bin/haskell-language-server-8.10.1~0.6.0) (GIT hash: 372a12e797069dc3ac4fa33dcaabe3b992999d7c)
Starting (haskell-language-server)LSP server...
  with arguments: LspArguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = True, argsLogFile = Just "/tmp/hls.log", argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "brittany",PluginId "eval",PluginId "floskell",PluginId "fourmolu",PluginId "ghcide",PluginId "hlint",PluginId "importLens",PluginId "moduleName",PluginId "ormolu",PluginId "pragmas",PluginId "retrie",PluginId "stylish-haskell",PluginId "tactic"]
  in directory: /home/dwuggh/Documents
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 Started LSP server in 0.01s

from *Messages*:

Error processing message (wrong-type-argument hash-table-p (:result (:capabilities (:typeDefinitionProvider t :foldingRangeProvider nil :textDocumentSync (:openClose t :change 2 :save nil) :workspace (:workspaceFolders (:supported t :changeNotifications t)) :implementationProvider t :documentRangeFormattingProvider t :documentHighlightProvider t :executeCommandProvider (:commands ["589636:eval:evalCommand" "589636:ghcide:typesignature.add" "589636:hlint:applyOne" "589636:hlint:applyAll" "589636:importLens:ImportLensCommand" "589636:moduleName:edit" "589636:pragmas:addPragma" "589636:retrie:retrieCommand" "589636:tactic:tacticsAutoCommand" "589636:tactic:tacticsIntrosCommand" "589636:tactic:tacticsDestructCommand" "589636:tactic:tacticsHomomorphismCommand" "589636:tactic:tacticsDestructLambdaCaseCommand" "589636:tactic:tacticsHomomorphismLambdaCaseCommand"]) :renameProvider nil :colorProvider nil :definitionProvider t :hoverProvider t :codeActionProvider t :completionProvider (:triggerCharacters ["."] :resolveProvider nil) :codeLensProvider nil :documentSymbolProvider t :documentFormattingProvider t)) :jsonrpc "2.0" :id 1)).

BTW, everything works fine before I updated these packages.

michaelpj commented 3 years ago

Are you sure you're on the latest lsp-mode? At any rate, this is a type error from inside lsp-mode, so you'll have better luck opening the issue there.