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

Support highlighting of lambda params? #8

Closed
hanyuone opened this issue Jul 29, 2017 · 6 comments
Closed

Support highlighting of lambda params? #8

hanyuone opened this issue Jul 29, 2017 · 6 comments

Comments

@hanyuone
Copy link

hanyuone commented Jul 29, 2017

Support highlighting of this:

[1, 2, 3].map { |a| a + 1 }

The a in |a| should be highlighted as a parameter.

@faustinoaq
Copy link
Member

faustinoaq commented Jul 29, 2017 via email

@faustinoaq
Copy link
Member

faustinoaq commented Jul 29, 2017

screenshot_20170729_040047
^^^^ <~ Not solution

Notice the blue a in |a|

Edit: see comments below

@hanyuone
Copy link
Author

hanyuone commented Jul 29, 2017

Shouldn't it be highlighted in the same way as a parameter, though? Why is there a need for two highlighting methods?

I'm using VS Code's Monokai, and I don't see the highlighting.

@faustinoaq
Copy link
Member

faustinoaq commented Jul 29, 2017

~~Unless I change this line to Ruby, other VSCode themes does't recognize the crystal delimiter.~~~

"begin": "(?<=\\{|do|\\{\\s|do\\s)(\\|)",
"captures": {
  "1": {
    "name": "punctuation.separator.variable.crystal"
  }
},

Edit: see comment below

@faustinoaq
Copy link
Member

faustinoaq commented Jul 29, 2017

I found a lot of dirty code when I converted .tmLanguage to .json

I'll do a PR fixing this issue.

Internally related to #7

@faustinoaq faustinoaq mentioned this issue Jul 29, 2017
@faustinoaq
Copy link
Member

Fixed on #9

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