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

Fix highlighting of type names and type references #285

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tobil4sk
Copy link
Contributor

No description provided.

@HerringtonDarkholme
Copy link
Owner

Is there any reference can be used? class is not also function in JavaScript, thus TypeScript.

@tobil4sk
Copy link
Contributor Author

The builtin javascript syntax in vim links javascriptType to Type, not Function.

https://github.com/vim/vim/blob/cba93cab533b5da26b9e4a4338c1dc6e8aa3d409/runtime/syntax/javascript.vim#L59
https://github.com/vim/vim/blob/cba93cab533b5da26b9e4a4338c1dc6e8aa3d409/runtime/syntax/javascript.vim#L113

I think in these cases such as a class/interface declaration it is clear that the type is intended to be used as a type rather than a function, even if it is technically a function because of javascript's implementation details.

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