intellij-haskell icon indicating copy to clipboard operation
intellij-haskell copied to clipboard

Completions unavailable in stack REPL

Open retnuh opened this issue 6 years ago • 8 comments

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

retnuh avatar Nov 06 '19 13:11 retnuh

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

rikvdkleij avatar Nov 06 '19 21:11 rikvdkleij

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

retnuh avatar Nov 07 '19 01:11 retnuh

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.

Satoshi-Hara avatar Jun 14 '20 17:06 Satoshi-Hara

@Satoshi-Hara Thanks for your help!

rikvdkleij avatar Jun 14 '20 18:06 rikvdkleij

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 avatar Jan 05 '21 12:01 okouyad

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

okouyad avatar Jan 05 '21 12:01 okouyad

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.

Satoshi-Hara avatar Jan 06 '21 10:01 Satoshi-Hara

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?

zh4ngx avatar Mar 10 '22 07:03 zh4ngx