zargony / atom-language-rust

Rust language support in Atom - LOOKING FOR MAINTAINER, see #144
MIT License
116 stars 33 forks source link

Provide markdown syntax highlighting within doc comments #36

Open frewsxcv opened 9 years ago

frewsxcv commented 9 years ago

It might be possible to utilize the markdown+atom plugin grammar into this rust+atom plugin.

A similar example to this would be CSS or JS syntax highlighting within HTML documents https://github.com/atom/language-html

zargony commented 9 years ago

I like this idea. Markdown is quite common in comments, so highlighting comments (or maybe only doc comments?) would be nice.

Unfortunately, I'm quite busy with my main job at the moment and I don't get much time for Github. But feel free to submit a pull request ;)

MoritzKn commented 8 years ago

I've tried to implement this but struggle with a few edge cases:

Markdown block elements don't work in line doc comments: Demo with line doc comments

I guess this is because line comments are recognised individually

Stars in block doc comments: Stars in block doc comments

It's probably obvious why this happens, but I really don't know how to prevent this.

With normal block comments every thing works as expected: Working demo with normal doc block commnets

Every help is welcome!

Luthaf commented 7 years ago

I am trying to add a spell-checker for rust doc comment using the linter-spell package, and this would be needed to prevent spell checking of links, examples and other in documentation comments. I can not help here, as I do not know enough of javascript and atom internals. But I wanted to let you know that this would be really nice to have!

Nokel81 commented 7 years ago

Is there a branch were this is being worked on?

AlexGrafe commented 5 years ago

Is there an update to this discussion?

frewsxcv commented 4 years ago

Okay it's five years later and I completely forgot I opened this and opened an identical issue 🙃.

@MoritzKn I guess this is because line comments are recognised individually

Regarding the line comments issue, is it possible we could capture all the line comments as a single block, instead of capturing them individually? Could that get us closer?