diff options
author | Jongwook Choi <wookayin@gmail.com> | 2024-01-04 11:09:13 -0500 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2024-01-09 13:33:18 +0000 |
commit | f40df63bdca33d343cada6ceaafbc8b765ed7cc6 (patch) | |
tree | c2cff75c7e2ba371be3957cd6120840b1fd4dd9a /runtime/doc/api.txt | |
parent | d54156ed08b84e6c7f22334a4f3a4d4f84798604 (diff) | |
download | rneovim-f40df63bdca33d343cada6ceaafbc8b765ed7cc6.tar.gz rneovim-f40df63bdca33d343cada6ceaafbc8b765ed7cc6.tar.bz2 rneovim-f40df63bdca33d343cada6ceaafbc8b765ed7cc6.zip |
fix(docs): make lines not overflow in vim docs
Problem: Some lines in the generated vim doc are overflowing, not
correctly wrapped at 78 characters. This happens when docs body contains
several consecutive 'inline' elements generated by doxygen.
Solution: Take into account the current column offset of the last line,
and prepend some padding before doc_wrap().
Diffstat (limited to 'runtime/doc/api.txt')
-rw-r--r-- | runtime/doc/api.txt | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/runtime/doc/api.txt b/runtime/doc/api.txt index 07e4473ac2..5b464debca 100644 --- a/runtime/doc/api.txt +++ b/runtime/doc/api.txt @@ -1277,7 +1277,8 @@ nvim_paste({data}, {crlf}, {phase}) *nvim_paste()* • {data} Multiline input. May be binary (containing NUL bytes). • {crlf} Also break lines at CR and CRLF. • {phase} -1: paste in a single call (i.e. without streaming). To - "stream" a paste, call `nvim_paste` sequentially with these `phase` values: + "stream" a paste, call `nvim_paste` sequentially + with these `phase` values: • 1: starts the paste (exactly once) • 2: continues the paste (zero or more times) • 3: ends the paste (exactly once) @@ -2095,7 +2096,8 @@ nvim_buf_attach({buffer}, {send_buffer}, {*opts}) *nvim_buf_attach()* will be `nvim_buf_changedtick_event`. Not for Lua callbacks. • {opts} Optional parameters. - • on_lines: Lua callback invoked on change. Return `true` to detach. Args: + • on_lines: Lua callback invoked on change. Return `true` to + detach. Args: • the string "lines" • buffer handle • b:changedtick @@ -2108,7 +2110,8 @@ nvim_buf_attach({buffer}, {send_buffer}, {*opts}) *nvim_buf_attach()* • on_bytes: Lua callback invoked on change. This callback receives more granular information about the - change compared to on_lines. Return `true` to detach. Args: + change compared to on_lines. Return `true` to + detach. Args: • the string "bytes" • buffer handle • b:changedtick @@ -2704,7 +2707,8 @@ nvim_buf_set_extmark({buffer}, {ns_id}, {line}, {col}, {*opts}) wrapped lines. • hl_mode : control how highlights are combined with the highlights of the text. Currently only affects virt_text - highlights, but might affect `hl_group` in later versions. + highlights, but might affect `hl_group` in + later versions. • "replace": only show the virt_text color. This is the default. • "combine": combine with background text color. @@ -3141,8 +3145,8 @@ nvim_open_win({buffer}, {enter}, {*config}) *nvim_open_win()* • height: Window height (in character cells). Minimum of 1. • bufpos: Places float relative to buffer text (only when relative="win"). Takes a tuple of zero-indexed [line, - column]. `row` and `col` if given are applied relative to this position, else they - default to: + column]. `row` and `col` if given are + applied relative to this position, else they default to: • `row=1` and `col=0` if `anchor` is "NW" or "NE" • `row=0` and `col=0` if `anchor` is "SW" or "SE" (thus like a tooltip near the buffer text). @@ -3157,8 +3161,9 @@ nvim_open_win({buffer}, {enter}, {*config}) *nvim_open_win()* • external: GUI should display the window as an external top-level window. Currently accepts no other positioning configuration together with this. - • zindex: Stacking order. floats with higher `zindex` go on top on floats with lower indices. Must be larger - than zero. The following screen elements have hard-coded + • zindex: Stacking order. floats with higher `zindex` go on + top on floats with lower indices. Must be larger than + zero. The following screen elements have hard-coded z-indices: • 100: insert completion popupmenu • 200: message scrollback @@ -3351,7 +3356,8 @@ nvim_clear_autocmds({*opts}) *nvim_clear_autocmds()* • NOTE: Cannot be used with {pattern} • group: (string|int) The augroup name or id. - • NOTE: If not passed, will only delete autocmds not in any group. + • NOTE: If not passed, will only delete autocmds not in any + group. nvim_create_augroup({name}, {*opts}) *nvim_create_augroup()* Create or get an autocommand group |autocmd-groups|. @@ -3375,7 +3381,9 @@ nvim_create_augroup({name}, {*opts}) *nvim_create_augroup()* • |autocmd-groups| nvim_create_autocmd({event}, {*opts}) *nvim_create_autocmd()* - Creates an |autocommand| event handler, defined by `callback` (Lua function or Vimscript function name string) or `command` (Ex command string). + Creates an |autocommand| event handler, defined by `callback` (Lua + function or Vimscript function name string) or `command` (Ex command + string). Example using Lua callback: >lua vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, { |