Skip to content
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

Incorrect syntax highlighting? #6

Closed
kodaj opened this issue Jan 21, 2017 · 4 comments
Closed

Incorrect syntax highlighting? #6

kodaj opened this issue Jan 21, 2017 · 4 comments

Comments

@kodaj
Copy link

kodaj commented Jan 21, 2017

First of all: thanks a lot for writing Haskelly! I've only just started using it, and it's already helped me become a lot more productive. Keep it up, guys! The Haskell ecosystem is painfully lacking a simple and usable IDE - Haskelly might be the tool to fill this gap.

Regarding the potential bug: I've attached a screenshot of how the code below is syntax-colored in Haskelly - aren't all record fields supposed to look like the first one? I mean, shouldn't all record labels be colored yellow(ish) and their types be colored blue?

-- A snapshot of the strategy's state at some point in time.
data Strategy = Strategy {
    signalFinder :: SignalFinder
  , tradingState :: TradingState
  , position     :: Maybe Position
  , exitOrders   :: Maybe ExitOrders
  , tradeLog     :: TradeLog
  , pnl          :: PnL

syntax_coloring
}

Environment info: I'm using version 0.3.0 of Haskelly on Windows 10.

@martrik
Copy link
Collaborator

martrik commented Jan 21, 2017

@kodaj Thanks for your kind words, we really appreciate it. We've changed the Syntax Definition file that we were using to a new one (https://github.com/textmate/haskell.tmbundle) and the bug seems to be solved. The fix is available in the new version 0.3.1. Let us know if the bug has been solved. Thanks!

@kodaj
Copy link
Author

kodaj commented Jan 21, 2017

@martrik Thanks a lot for the quick reaction! It's looking much better now, but there's one thing I still don't quite understand: why is the first record label colored differently than the other labels? (Note that the :: is also colored differently on the first line.)

syntax_coloring

@martrik
Copy link
Collaborator

martrik commented Jan 21, 2017

I think this is due to the formatting that you are using to define the Type. To make the highlight be even you can either write the commas before the new line or start the first proper straight after the curly brace. For the Dark+ theme the former option seems to be the best one.

Dark+:
screen shot 2017-01-21 at 21 08 50

Monokai:
screen shot 2017-01-21 at 21 08 37

@kodaj
Copy link
Author

kodaj commented Jan 21, 2017

I see - thanks!

@kodaj kodaj closed this as completed Jan 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants