-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
(Typescript) highlight obvious user defined type names (interface
, etc)
#3269
Comments
This is because we are not a full TypeScript parser (nor do we desire to be), we're more of a "fancy pattern matcher". As such it's impossible to know that Note: The I'd love to see someone attempt a plugin/grammar pairing that hooked up an entirely different parser - with our HTML generation. https://github.com/codemirror/lang-javascript would be a good choice I think. If you're interested in a project like that, let us know. |
Rules could be added for the simpler cases such as |
Tagging as "good first issue" as these simple cases shouldn't be too hard and there are examples from other modern grammars, like Wren. |
interface
, etc)
Also worth exploring if this could somehow just be handled by a general CamelCaseIsAClass rule... |
@joshgoebel I can pick this up, but will need some guidance as to which existing examples/files I can refer to and how I should approach this |
I dunno about samples. I think start might be just a |
I have a possible solution that I can link -- I noticed the |
Hi @joshgoebel, Thanks in advance, |
What is your suggested solution? Just make a PR with your changes and we'll have a look.
You can edit the existing tests or add new ones... if you look at the markup test js file itself you can uncomment a line to have it write the expectations for you, but you should still read the result to make sure it's correct... the developer tool in debug mode is also super helpful for this kind of thing. |
See this example:

as you can see in boudingRect params the
Rect
type has not been highlighted. also interface name.I think these one should be highlighted
The text was updated successfully, but these errors were encountered: