rikvdkleij / intellij-haskell

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

Completions unavailable in stack REPL #481

Open retnuh opened 5 years ago

retnuh commented 5 years ago

Hi there, I'm running ghci using the stack REPL template. For whatever reason, the only completions available seem to be keywords.

Completions are available in the editor windows.

I'm running 1.0.0-beta55 on MacOS w/

IntelliJ IDEA 2019.2.4 (Ultimate Edition) Build #IU-192.7142.36, built on October 29, 2019 Runtime version: 11.0.4+10-b304.77 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o macOS 10.14.6 GC: ParNew, ConcurrentMarkSweep Memory: 1981M Cores: 8 Registry: Non-Bundled Plugins: intellij.haskell, izhangzhihao.rainbow.brackets, org.intellij.scala, org.root.HoogleIt, training

rikvdkleij commented 5 years ago

It could be that you first have to load a file.

retnuh commented 5 years ago

No, it doesn't complete functions that are definitely in scope. If I load the module again using :l it still doesn't complete.

Satoshi-Hara commented 4 years ago

Hello @retnuh . I faced similar issue. And I found cause. The cause is using different shell between 'Mac login shell' and 'Console shell'. In my case, 'Mac login shell' is bash and 'Console shell' is zsh. After using zsh for both, I can get completions after input ':l Main' command.

rikvdkleij commented 4 years ago

@Satoshi-Hara Thanks for your help!

okouyad commented 3 years ago

Hi Same, issue but how to know which one is used ? Where is the Console Shell defined vs Login Shell ? I see things about login shell online but not console shell

okouyad commented 3 years ago

I'd like to stick to bash, how can i do that ?

Satoshi-Hara commented 3 years ago

Hello @okouyad

A shrot while ago, I made new haskell project using Intellij-haskell plugin while bash as Login shell. And completion is available in REPL. At first in REPL window, I input ':l Main' then message "error: module ‘Main’ cannot be found locally" shown. But after that message, completion worked.

My Intellij environment is below.

I'm running 1.0.0-beta84 on MacOS. OS version is 11.1. IntelliJ IDEA 2020.2.3 (Ultimate Edition) Build #IU-202.7660.26, built on October 6, 2020 Runtime version: 11.0.8+10-b944.34 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.macOS 10.16

At June 2020 I posted above, I imported haskell project made out by 'stack new' command with using 'zsh' on iTerm. And that time, I had used bash as my Login shell . Currently it seems Login shell is irrelvant about REPL completion.

zh4ngx commented 2 years ago

I am suddenly facing this issue after having updated IDEA. Can you explain what is meant by "using different shell" - in particular, in what context? Is there something that needs to be configured for the stack REPL?