Closed jez closed 6 years ago
Updated: screenshot in description.
Awesome! :)
One nit: it only highlights the >
in the prompt instead of everything before it, and then only if you have typed something on the same line.
This doesn't really matter though, as if it contains escape codes they get passed through anyway, and I suspect most users will do this anyway to get a coloured prompt when using stack ghci
. So if you're not fussed about that, I'm happy to merge it.
Oh that’s a good catch! I’ll poke around at that before we merge. On Sat, Jan 27, 2018 at 8:00 PM rdnetto notifications@github.com wrote:
Awesome! :)
One nit: it only highlights the > in the prompt instead of everything before it, and then only if you have typed something on the same line.
This doesn't really matter though, as if it contains escape codes they get passed through anyway, and I suspect most users will do this anyway to get a coloured prompt when using stack ghci. So if you're not fussed about that, I'm happy to merge it.
[image: intero_syntax] https://user-images.githubusercontent.com/1973389/35478809-4b223b38-043b-11e8-9f6f-964ce8c48ad6.png
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/parsonsmatt/intero-neovim/pull/135#issuecomment-361036605, or mute the thread https://github.com/notifications/unsubscribe-auth/AFSaVLvvOeBLLU0KCpqKPXxUuKrU1umYks5tO_DbgaJpZM4RtVk7 .
@jez Any progress on that point?
Ah, sorry for the radio silence on this! I haven't had much time lately, but today I do! I'll take another look at this and hopefully we can merge today or tomorrow.
No worries, I haven't been able to put much energy into this either :) Thanks!
Solarized Light | Solarized Dark |
---|---|
Actual colors will differ based on your installed colorscheme.
It's possible to override the default colors here by setting values for the color groups in your vimrc (i.e., we only provide default mappings if none are specified earlier—see comment about this in the code).
Features exemplified in the screenshots:
:kind
, :type-at
, :load
)This is just a start! Future work:
:
, even if the command is invalid).Also: @rdnetto I think that I fixed the issue you were seeing where part of your prompt was getting highlighted as if it were Haskell syntax. I'd love it if you could confirm this!
Just added one more potential thing to highlight on GHCi output.
@parsonsmatt @rdnetto bump on this?
Screenshots?
EDIT: Ah, you already posted some! If you're happy with this, then I am good to merge.
Following up from #64, I've pulled a few changes together into an MVP of syntax highlighting an intero terminal buffer:
:foo
commands are highlightedIt doesn't do much context-aware highlighting for individual commands yet, because I didn't know which ones were worth supporting. I mostly just use
:t
,:i
,:type-at
, and:l
, which are all pretty well supported without much effort.