embark-theme / vim

An ambitious theme for vim
https://embark-theme.github.io/
MIT License
648 stars 26 forks source link

JavaScript: await and function name are the same color #38

Closed dmshvetsov closed 3 years ago

dmshvetsov commented 3 years ago

Hi! I liked this theme and decided to give it a try.

I have been using it for a minute or so, and I found it strange to read async / await JavaScript code. Please take a look:

Screen Shot 2021-03-28 at 10 57 33 PM

await is a keyword and graphql( in a function invocation. So it makes big difference if there is await or not and I used to that other themes have a separate color for keywords. In Embark you have the same color for function names and keywords.

I wonder if you think it will improve the theme if it has (at least slightly) different colors for function names and keywords?

skbolton commented 3 years ago

Hi @dmshvetsov. Sorry for the last response on this. Ever since I have moved embark to its own organization I haven't been the best with notifications since they no longer show up in my main account.

The theme definitely needs some tweaking to cover javascript better. I don't do a lot of javascript coding these days and so I haven't seen the painpoints. I would love any help that can be offered on this. The syntax rules defined in this plugin can be used to target specific javascript idoms to highlight them better.

In my mind async/await are control flow structures so they should be shown in the green color similar to the if statement here

What do you think?

skbolton commented 3 years ago

@dmshvetsov Decided to jump on and start working on this. Can you help me out and run the js-async-await branch and let me know what you think?

skbolton commented 3 years ago

Here is what on my end the highlight adjustments are looking like async-await

skbolton commented 3 years ago

I have felt like the javascript highlighting is way too heavy on the reds and yellows so I am hopeful to introduce more of the greens and blues that I love about this palette into the rules. Again let me know what you think.

dmshvetsov commented 3 years ago

Hi @skbolton 👋 . I'll check it soon 👍

dmshvetsov commented 3 years ago

yea! I like it 👍 👍

@skbolton how about trying to make operators like comparison ===, >= etc. the same color as if async/await?

for reference:

before

Screen Shot 2021-04-22 at 4 14 33 PM

after

Screen Shot 2021-04-22 at 4 13 30 PM
dmshvetsov commented 3 years ago

@skbolton how about trying to make operators like comparison ===, >= etc. the same color as if async/await?

Using it a little more, I no longer think that it's a good idea. I like how it is right now.

skbolton commented 3 years ago

Yeah I actually did that at first and went back on it as well. So glad we came to the same conclusion

skbolton commented 3 years ago

Resolved with #39

Closing for now. @dmshvetsov if you find other places where the syntax of javascript can be improved feel free to reach out or create a new issue. You should be able to point back to master branch and see the same changes.

dmshvetsov commented 3 years ago

@skbolton thanks a lot! 🙌