For example, I just had a case where I had an option defined/used inside
a function:
function s:foo()
""
" @option g:SomeOption boolean 1
"
" This option does some thing.
let l:dispatch=get(g:, 'SomeOption', 1)
" [code that uses the option here...]
endfunction
Note that @option is a bit different from @mapping and @command. The
latter generally will have one authoritative place where they are
defined and where their documentation can logically/obviously go. An
@option on the other hand, may be used in multiple places.
So it may make sense to either just document these elsewhere (like up in
the @plugin area), or get into the habit of making a centralized place
where option default values are defined, so that they can be documented
independently of their usage sites.
"
" - Initial release.
-syntax region docvimBlock start='\v^\s*""' end='\v^\zs\ze\s*($|[^ \t"])'
+syntax region docvimBlock start='\v^\s*""' end='\v^\zs\ze\s*($|[^ \t"])' containedin=vimFuncBody
syntax region docvimPre start='\v^\s*"\s+\zs```\s*$' end='\v^\s*"\s+```\s*$' containedin=docvimBlock contained keepend
syntax match docvimAnnotation '\v\@command( .+)?' containedin=docvimBlock contained