-
Notifications
You must be signed in to change notification settings - Fork 29
Description
While vimdoc supports the notation of @dict
, which works with one form of dictionary functions, it skips all the functions that are not autoload.
For example, while you can use (example taken from maktaba)
""
" @dict Logger
" Interface for a plugin to send log messages to maktaba.
""
" @dict Logger
" Logs a {message} with [args...] at DEBUG level.
function! maktaba#log#Debug(message, ...) dict abort
call call('s:DoMessage', [s:LEVELS.DEBUG, self._context, a:message] + a:000)
endfunction
to generate something like
*maktaba.Logger*
Interface for a plugin to send log messages to maktaba.
Logger.Debug({message}, [args...]) *Logger.Debug()*
Logs a {message} with [args...] at DEBUG level.
you just can't do the following:
""
" @dict Unhappy
" It doesn't work!
let s:unhappy = {}
""
" @dict Unhappy
function! s:unhappy.WannaCry()
echo 'Sad though'
endfunction
Nothing shows up in the generated helpfile. It seems that vimdoc considers autoload function to be first class thing and ignores the dict-functions defined with the dot notation (a shortcut), no matter what kind of variable preceding the dot.
I am posting this issue because I am currently working out a plugin
that allows to define class in vim in a simpler way (Well, it maybe just a problem of style). My plugin uses the dot notation a lot and if vimdoc doesn't work with that, I will end up with no doc or some messy workaround code.
And I hope some support to this style can be patched in vimdoc.