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

syntax highlighting #10

Open
axyz opened this issue May 2, 2016 · 1 comment
Open

syntax highlighting #10

axyz opened this issue May 2, 2016 · 1 comment

Comments

@axyz
Copy link

axyz commented May 2, 2016

would be great to add some font-lock configuration to have syntax highlight inside jsdoc comments.

Keywords are already known and listed on variables and should not be hard to get regexps from them, the only possible tricky part would be to only apply font-lock o element inside jsdoc comments /** */ as it is going to be used as a minor mode and should not affect other fonts.

Also may need some work coloring arguments or similar stuff that is not a keyword but live in some specific positions, but for a first implementation also simple keyword highlighting would be a really good starting point.

I do not have experience in this field, but I guess some logic may be extracted from js2-mode however it can't be a full copy-paste as I think on js2-mode they are not using font-lock but their specific syntax highlighting engine

@wyuenho
Copy link

wyuenho commented Nov 10, 2017

If you use js2-mode, it's already highlighted. Adding font-lock config to js-doc mode will conflict with js2-mode's. It's probably a better idea to add to js-mode instead.

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

No branches or pull requests

2 participants