-
Notifications
You must be signed in to change notification settings - Fork 83
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
Add Haddock highlighting #54
base: master
Are you sure you want to change the base?
Conversation
Stupid question. What benefits does this have? I thought |
There is a highlight group called "PreProc" that is used for C pragmas. I would think haddock is very the definition of a "special comment," as it is literally a comment with special meaning in some contexts. If you have a lot of haddock and find it distracting, you might rather choose a less intense color, but personally I like it to stand out. If I find myself needing to refer to comments frequently to be able to understand and use my code, it is helpful to have a visual reminder that the doc-comments really should be exported. It also helps identify places where I'm accidentally not writing haddock when I meant to, which is usually a silent error. |
syn region haskellHaddockLineComment start='-- \$\w\+' end='^\(\s*--\)\@!' contains=hsFIXME,@Spell | ||
syn region haskellHaddockLineComment start='-- ^' end='^\(\s*--\)\@!' contains=hsFIXME,@Spell | ||
" Haddock sections for import lists | ||
syn match hsHaddockSection '-- \*.*$' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... it looks like I'm not even use this anywhere. Must be vestigial. If you decide after all that this is worth pulling, I'll remove it.
I recall that I made the pragmas |
Oh! Good to know... Patching that is a much bigger pain... |
Is there any hope that this will be merged? |
I swiped some highlighting tricks from my old
syntax/haskell.vim
file. This particular group adds highlighting of Haddock docs asSpecialComment
s