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 #336

Open
Nikita240 opened this issue Dec 12, 2014 · 2 comments
Open

Syntax highlighting #336

Nikita240 opened this issue Dec 12, 2014 · 2 comments

Comments

@Nikita240
Copy link

Documentation syntax highlighting for all languages would be very nice!

How it is:

How it should be:

@Nikita240
Copy link
Author

Grr I couldn't figure out how to add unique docblockr syntax definitions on top of the language specific scopes.

Best I could do is something like this:
image

view.add_regions("test", list(view.sel()), "keyword.other", flags=sublime.DRAW_SOLID_UNDERLINE | sublime.DRAW_NO_FILL | sublime.DRAW_NO_OUTLINE)

Select a tag and copy paste the command above in the console to test it.

@Nikita240
Copy link
Author

#337

It turns out the trick is to to add the language scopes on top of the docblockr scopes and not the other way around.

This initial commit is very primitive. It simply finds an opening tag /**, a closing tag */ and looks for a regex @\w+ in between them.

I've got to sleep, but if someone wants to add more comment styles or languages, here is some good reference to get started.
http://sublime-text-unofficial-documentation.readthedocs.org/en/latest/extensibility/syntaxdefs.html
http://sublime-text-unofficial-documentation.readthedocs.org/en/latest/reference/syntaxdefs.html

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

1 participant