diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-10-17 11:34:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-17 11:34:02 -0400 |
| commit | 0851e7dabed9fc9c019e22088029f36e9f3ec3e3 (patch) | |
| tree | 35a1abb6a3d08b49e6a45ad3de089b622e1605ae /runtime/doc/userfunc.txt | |
| parent | f8b704e019ed8194a5e873773670b263abd3dedf (diff) | |
| download | rneovim-master.tar.gz rneovim-master.tar.bz2 rneovim-master.zip | |
docs(help): specify h4 "function signature" format #42434master
Work towards enabling ["flow" layout](https://github.com/neovim/neovim/blob/9244da12e400ec0291450a5e9400d995e7a29b83/src/gen/gen_help_html.lua#L86-L88)
in all `:help` files.
Problem:
The final boss of vimdoc pseudo-structure: Vim's quasi-headings on
function signatures and excmd docs is visually distinctive but too
inconsistent for a nice parse rule.
Solution:
- Define the quasi-heading format as an "h4" variant, specified at
`:help help-tag-heading`.
- For simplicity and predictability, it is defined as any line that
ends with a help tag(s) preceded by 2 or more spaces (or 1 tab).
- Update existing docs.
- This one-time update has a lot of changes, but is very unlikely to
conflict with ported Vim-patches because (1) Vim rarely adds new
*excmds* that we want, and (2) *function* docs are auto-generated.
ref https://github.com/neovim/tree-sitter-vimdoc/issues/110
Diffstat (limited to 'runtime/doc/userfunc.txt')
| -rw-r--r-- | runtime/doc/userfunc.txt | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/runtime/doc/userfunc.txt b/runtime/doc/userfunc.txt index 39a153f101..8968c41c2e 100644 --- a/runtime/doc/userfunc.txt +++ b/runtime/doc/userfunc.txt @@ -36,8 +36,8 @@ instead of "s:" when the mapping is expanded outside of the script. There are only script-local functions, no buffer-local or window-local functions. - *:fu* *:function* *E128* *E129* *E123* *E454* *E1058* *E1068* -:fu[nction] List all functions and their arguments. +:fu[nction] *:fu* *:function* *E128* *E129* *E123* *E454* *E1058* *E1068* + List all functions and their arguments. :fu[nction][!] {name} List function {name}, annotated with line numbers unless "!" is given. @@ -147,8 +147,7 @@ See |:verbose-cmd| for more information. implies that the effect of |:nohlsearch| is undone when the function returns. - *:endf* *:endfunction* *E126* *E193* *W22* -:endf[unction] [argument] +:endf[unction] [argument] *:endf* *:endfunction* *E126* *E193* *W22* The end of a function definition. Best is to put it on a line by its own, without [argument]. @@ -166,8 +165,7 @@ See |:verbose-cmd| for more information. command, use line breaks instead of |:bar|: > :exe "func Foo()\necho 'foo'\nendfunc" < - *:delf* *:delfunction* *E130* *E131* *E933* -:delf[unction][!] {name} +:delf[unction][!] {name} *:delf* *:delfunction* *E130* *E131* *E933* Delete function {name}. {name} can also be a |Dictionary| entry that is a |Funcref|: > |