parsonsmatt / intero-neovim

A neovim plugin for Intero, forked from ghcmod-vim
218 stars 28 forks source link

Neomake integration is borked - not showing anything #74

Closed decentral1se closed 7 years ago

decentral1se commented 7 years ago

It doesn't seem to work any more. Possibly related to https://github.com/parsonsmatt/intero-neovim/issues/68 because I can only see the errors when I run :InteroOpen.

decentral1se commented 7 years ago

@rdnetto, I have a REPL open and loaded and ran :InteroInfo and got:

Error detected while processing function intero#repl#info:                                                                                                                
line    2:                                                                                                                                                                
Intero is still starting up

See:

image

adelbertc commented 7 years ago

I am observing this as well. Updated the plugin this morning.

decentral1se commented 7 years ago

Following on from #69, I tried to run :InteroLoadCurrentModule first and got:

 3 Intero                                                                           
Error detected while processing function intero#repl#load_current_file:             
line    2:                                                                          
Intero is still starting up                                                         
Press ENTER or type command to continue  
rdnetto commented 7 years ago

Awesome, that confirms my theory - intero-neovim isn't recognizing the prompt.

Can one of you checkout the debugging_prompt_parsing branch and tell me what error message is displayed when Intero is starting? Intero's output would also be helpful.

decentral1se commented 7 years ago

After switching over to that branch and running :InteroLoadCurrentModule, I got:

Error detected while processing function intero#repl#load_current_file:                                                                                                   
line    1:                                                                                                                                                                
E121: Undefined variable: g:intero_started                                                                                                                                
E15: Invalid expression: !g:intero_started

Running :InteroOpen doesn't return any errors (REPL comes up), but running :InteroReload gives:

Error detected while processing function intero#repl#reload:                                                                                                              
line    2:                                                                                                                                                                
Intero is still starting up  

Not sure how to give more debugging information (any tips!?).

adelbertc commented 7 years ago

@rdnetto While this is happening would you mind reverting/un-doing these debugging changes and move them to another branch? At least vim-plug does not seem to allow you to pin a plugin on a hash, only versions, and right now it seems like master is broken?

decentral1se commented 7 years ago

@adelbertc you can jump jnto ~/.config/nvim/plugged/intero-neovim and git checkout yourself.

rdnetto commented 7 years ago

facepalm I should have looked at the screenshot more closely - @lwm you're using a custom prompt which doesn't contain >, which is why the regex isn't matching. Can you try setting g:intero_prompt_regex (replace the > with lambda) and see if that fixes the problem?

@adelbertc @eugleo Are you also using custom prompts?

Eugleo commented 7 years ago

@rdnetto Yes, I am. Will try once I return home.

decentral1se commented 7 years ago

@lwm you're using a custom prompt which doesn't contain >, which is why the regex isn't matching.

Ahhh, right.

I have the following set in my .ghci file:

:set prompt "\x03BB "

And so, I tried the following settings:

let g:intero_prompt_regex="'[^-]\x03BB'"

And:

let g:intero_prompt_regex="'[^-]λ'"

And on the master branch (after a fresh git pull) and the debugging_prompt_parsing branch.

No dice.

Eugleo commented 7 years ago

@rdnetto Well, once I edited the regex, it works! Great, thanks for help.

decentral1se commented 7 years ago

@Eugleo, could you pass me a diff of your changes? I'm probably just doing it wrong ...

Eugleo commented 7 years ago

@lwm I’m not at my Mac right now, but I’ll try to guess.

My .ghci file sets the prompt to ΣΠ: (notice the space at the end). And the regex setting in my init.vim is let g:intero_prompt_regex="[^-]: " (notice the space here again). And it works.

EDIT: In your case, as I guess from the screenshot, your prompt is λ (with a space), so the regex would be just ... ="λ ".

decentral1se commented 7 years ago

Thanks @Eugleo! Closing this one off then :beers: