diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2025-11-26 01:17:06 -0500 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2025-12-06 20:33:02 -0500 |
| commit | ebb7c38ca2e59ca7b413750d83ac1cf38d7bb180 (patch) | |
| tree | 0c76cb2be97df9433579c7577bd0d425739a2cdf /runtime/lua/vim/_meta/api.lua | |
| parent | 45ca080bd184c826bae5c25911430cb4fa5c5528 (diff) | |
docs: misc
fix https://github.com/neovim/neovim.github.io/issues/419
Co-authored-by: Rob Pilling <robpilling@gmail.com>
Diffstat (limited to 'runtime/lua/vim/_meta/api.lua')
| -rw-r--r-- | runtime/lua/vim/_meta/api.lua | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/runtime/lua/vim/_meta/api.lua b/runtime/lua/vim/_meta/api.lua index 38bf263aaf..039d5c7372 100644 --- a/runtime/lua/vim/_meta/api.lua +++ b/runtime/lua/vim/_meta/api.lua @@ -1721,8 +1721,7 @@ function vim.api.nvim_open_term(buffer, opts) end --- If -1 is provided, a top-level split will be created. `vertical` and `split` are --- only valid for normal windows, and are used to control split direction. For `vertical`, --- the exact direction is determined by 'splitright' and 'splitbelow'. ---- Split windows cannot have `bufpos`/`row`/`col`/`border`/`title`/`footer` ---- properties. +--- Split windows cannot have `bufpos`, `row`, `col`, `border`, `title`, `footer` properties. --- --- With relative=editor (row=0,col=0) refers to the top-left corner of the --- screen-grid and (row=Lines-1,col=Columns-1) refers to the bottom-right @@ -1735,23 +1734,19 @@ function vim.api.nvim_open_term(buffer, opts) end --- could let floats hover outside of the main window like a tooltip, but --- this should not be used to specify arbitrary WM screen positions. --- ---- Example: window-relative float +--- Examples: --- --- ```lua ---- vim.api.nvim_open_win(0, false, ---- {relative='win', row=3, col=3, width=12, height=3}) ---- ``` +--- -- Window-relative float with 'statusline' enabled: +--- local w1 = vim.api.nvim_open_win(0, false, +--- {relative='win', row=3, col=3, width=40, height=4}) +--- vim.wo[w1].statusline = vim.o.statusline --- ---- Example: buffer-relative float (travels as buffer is scrolled) ---- ---- ```lua +--- -- Buffer-relative float (travels as buffer is scrolled): --- vim.api.nvim_open_win(0, false, ---- {relative='win', width=12, height=3, bufpos={100,10}}) ---- ``` ---- ---- Example: vertical split left of the current window +--- {relative='win', width=40, height=4, bufpos={100,10}}) --- ---- ```lua +--- -- Vertical split left of the current window: --- vim.api.nvim_open_win(0, false, { split = 'left', win = 0, }) --- ``` --- @@ -1957,7 +1952,7 @@ function vim.api.nvim_parse_cmd(str, opts) end --- - "error": Dict with error, present only if parser saw some --- error. Contains the following keys: --- - "message": String, error message in printf format, translated. ---- Must contain exactly one "%.*s". +--- Must contain exactly one `%.*s`. --- - "arg": String, error message argument. --- - "len": Amount of bytes successfully parsed. With flags equal to "" --- that should be equal to the length of expr string. |
