5 ms·
Really interesting and this inspired me to build my own color scheme that focuses on the control flow and is much less of a rainbow than traditional color schem
by ponyous 3y ago
Really interesting and this inspired me to build my own color scheme that focuses on the control flow and is much less of a rainbow than traditional color schemes. For example, function calls, ifs, returns, ... are all white and bold. The rest of the code is less prominent.
Often colour schemes can be there "just" to reaffirm the structure of the code. If I ask one of my friend devs "what does green mean in your editor?" they won't know the answer until they look at the code. In my colour scheme you know that white and bold changes the flow of the code and requires more attention.
Type checking, linters and formatters take care of semantics. Ie. I don't need a string and number colored differently, because type checker will tell me it's not right.
I already open sourced the treesitter queries that enable the control flow color schemes in neovim: https://github.com/meznaric/nvim-controlflow-queries https://github.com/meznaric/nvim-controlflow-queries
If anyone is interested let me know and I will focus on open sourcing the color scheme this weekend.
- mst 3y agoIIRC elvis' hilighting works similarly, I remember that being pretty much the only synhi I've encountered in an editor that I didn't end up turning off with extreme prejudice. (I find I can skim code more easily when I can think about the structure at different levels - block, function, statement, expression etc. - and I find that for me, syntax hilighting often makes that harder and slower ... but "for me" is definitely load bearing in that statement)
- thechao 3y agoI use "print mode" syntax highlighting which is just bold, italics, and (rarely) underline, or some combination of those. It's a habit I picked up when I had one PI who was severely red-green color blind, and another who had mild yellow-blue issues.