-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Vim help syntax recognizes backtick-quoted strings as short code snippets. It doesn't show the backticks, and applies a highlight group. However, it appears to only recognize these quotes if they appear on a single line. Vimdoc's paragraph algorithm will reflow comment text without regard to backtick placement, which can lead a snippet to be awkwardly split across two lines, losing the special treatment in the help buffer.
Example:
""
" @public
" @dict Lexer
" Attempts to read an identifier at the current position, returning a
" @dict(Token) with `type = 'identifier'` if successful and an empty dict
" otherwise. By default, this calls
" `self.ReadPatternAs('\v^\k+', 'identifier')` Language-specific lexers may
" set a different ReadIdentifier function property.
function! foo#ReadIdentifier() abort dict
" ...
endfunction
Vimdoc turns this into
Lexer.ReadIdentifier() *Lexer.ReadIdentifier()*
Attempts to read an identifier at the current position, returning a
|foo.Token| with `type = 'identifier'` if successful and an empty dict
otherwise. By default, this calls `self.ReadPatternAs('\v^\k+',
'identifier')` Language-specific lexers may set a different ReadIdentifier
function property.
Metadata
Metadata
Assignees
Labels
No labels