rikvdkleij / intellij-haskell

IntelliJ plugin for Haskell
https://rikvdkleij.github.io/intellij-haskell/
Apache License 2.0
1.31k stars 94 forks source link

Warning about prompt-cont #413

Closed sir4ur0n closed 5 years ago

sir4ur0n commented 5 years ago

I have customized many things including prompt-cont in my ~/.ghci to have a better support for multi line edition in GHCI.

However this raises many warnings in Intellij haskell:

15:21   Stack REPL could not be started for target `api-haskell:lib` because Some flags have not been recognized: prompt-cont, λ| 

FWIW here's my .ghci file:

-- Better prompt
:set prompt "\ESC[36m\n%s\n\ESC[0;34mλ> \ESC[m"
-- For multi line (e.g. when defining a type with let), the following prompts are different and don't repeat the modules
:set prompt-cont "\ESC[0;34mλ| \ESC[m"

In turn, those warnings seem to break Intellij (cannot navigate to definition, etc.).

I found https://github.com/rikvdkleij/intellij-haskell/issues/212 but I was wondering if the code still works?

FYI my current project uses GHC 8.6.3/8.6.4 (stackage range 13.10 - 13.16).

rikvdkleij commented 5 years ago

It looks like those settings break the Intero REPL which has it's own ghci options. Do not know why.

rikvdkleij commented 5 years ago

Btw #212 is about running a REPL inside IntelliJ (which is not used as Haskell backend).

sir4ur0n commented 5 years ago

I just tested Intero directly with my .ghci file. I do get a warning but it doesn't seem to break anything: image

Maybe Intellij Haskell should ignore warnings? Or log them but not break?

rikvdkleij commented 5 years ago

The issue is not your .ghci file but the confusing error message.

Plugin only shows this kind of error message when the REPL can not be started because a dependency could not be successfully build.

I will fix issue of the confusing error message.

sir4ur0n commented 5 years ago

Thanks, I'll wait for the next beta release to try this 😄

rikvdkleij commented 5 years ago

Should be solved in beta46.

sir4ur0n commented 5 years ago

Thank you!