-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamically set the prompt regex #79
Comments
I'm not sure I'm a big fan of this. Users can set a prompt in
seems like a reasonable thing IMO. |
Iterating over the possible files should be fairly trivial. I agree that users manually setting the prompt will break this, but it seems like quite a corner case. (We could fix this easily by adding a handler for
It looks like the best way to do this would be to use The second approach is considerably simpler, but means users lose the ability to have a coloured prompt which matches their colour scheme. e.g. I use tldr; forcing the prompt sounds good to me (though maybe to EDIT: Actually, looks like GHC 8.2 colorizes the error messages in GHCi too, so the prompt is all we care about for now. |
For all those who struggle with their custom prompt and find this issue here is one way to put to use what @rdnetto said above: In your neovim config do Plug 'parsonsmatt/intero-neovim' " or whatever plugin manager you use
let g:intero_ghci_options = '-ghci-script ' . expand('~/.ghc/intero.conf')
let g:intero_prompt_regex = "Intero> " And create the file
Obviously the file can also be somewhere else apart from |
Many people users have a custom prompt set, but it's not obvious that the regex needs to be configured, or that that's the source of the problem (see #74).
Rather than relying on the assumption that the prompt contains a
>
, we should just parse~/.ghci
and set it to something sane. Note that we'll need to handle the various escape sequences GHCi allows.The text was updated successfully, but these errors were encountered: