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

Highlight function, class, interface, type definitions #35

Closed
wants to merge 1 commit into from

Conversation

kageru
Copy link

@kageru kageru commented Jul 1, 2020

Pictures say more than words, so here is one.

Function/constructor calls aren’t highlighted yet.
I would like to add that as well, but that feels like a separate issue to me, and I don’t know if you even want it.

@udalov udalov self-assigned this Jul 1, 2020
@udalov
Copy link
Owner

udalov commented Jul 1, 2020

Thanks for the contribution. I feel I might have an unpopular opinion here, but I would prefer to keep this functionality disabled by default (see #30). The reason why I prefer that is because I don't see a clear balance between not highlighting anything, and highlighting all declaration names which would lead to visual clutter.

In particular, it would make sense to also highlight property (val/var) names, since a lot of the times they carry the same meaning as functions. But then... do we want to also highlight local variables? If yes, then a lot more will be highlighted and it would be more difficult to distinguish stuff colored in one way versus the other. If not, then we need to track context in the syntax scheme to distinguish properties from local variables, and that would complicate the syntax plugin a lot.

@kageru
Copy link
Author

kageru commented Jul 1, 2020

I see. I’m kind of used to having most things (including function definition and function calls) highlighted for other languages (e.g. rust-vim), but I can see your point, also regarding the complexity of the highlighting rules.
Kind of my bad for not going through the open issues to find your previous statements on this.

I guess I’ll keep my fork for personal use, and if and when I have the time and motivation to read about how feature toggles in vim plugins work, I’ll return and address #30.

@kageru kageru closed this Jul 1, 2020
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

Successfully merging this pull request may close these issues.

2 participants