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
Add highlighting for variables #106
Comments
Local variables aren't highlighted by default because some people don't like them to be; however, they are matched as |
The command doesn't work for me. |
You're right, I forgot that |
I think highlighting variables perfectly is not possible with highlighting system of Vim/Neovim. Since it requires Crystal parser. Until parsing the source into Crystal abstract syntax tree, it cannot be determined that the identifier is variable or not. Neovim's tree-sitter support may change the situation in the future, though. |
The problem I have with the highlighting is that variables blend with the code:
puts arr
is just one color - grey, which can be confusing:
Also variables within anonymous functions are colored just when they're defined:
only the
x
between the pipes is colored while the second use ofx
is not.Here's a picture of a test program and the highlighting I have.
The text was updated successfully, but these errors were encountered: