mirror of
https://github.com/neovim/neovim.git
synced 2025-11-10 12:35:29 +00:00
docs(lua): restore missing indexing for vim.bo and vim.wo (#28751)
This commit is contained in:
@@ -1412,7 +1412,7 @@ Option:remove({value}) *vim.opt:remove()*
|
|||||||
Parameters: ~
|
Parameters: ~
|
||||||
• {value} (`string`) Value to remove
|
• {value} (`string`) Value to remove
|
||||||
|
|
||||||
vim.bo *vim.bo*
|
vim.bo[{bufnr}] *vim.bo*
|
||||||
Get or set buffer-scoped |options| for the buffer with number {bufnr}. If
|
Get or set buffer-scoped |options| for the buffer with number {bufnr}. If
|
||||||
{bufnr} is omitted then the current buffer is used. Invalid {bufnr} or key
|
{bufnr} is omitted then the current buffer is used. Invalid {bufnr} or key
|
||||||
is an error.
|
is an error.
|
||||||
@@ -1462,7 +1462,7 @@ vim.o *vim.o*
|
|||||||
print(vim.o.foo) -- error: invalid key
|
print(vim.o.foo) -- error: invalid key
|
||||||
<
|
<
|
||||||
|
|
||||||
vim.wo *vim.wo*
|
vim.wo[{winid}][{bufnr}] *vim.wo*
|
||||||
Get or set window-scoped |options| for the window with handle {winid} and
|
Get or set window-scoped |options| for the window with handle {winid} and
|
||||||
buffer with number {bufnr}. Like `:setlocal` if setting a |global-local|
|
buffer with number {bufnr}. Like `:setlocal` if setting a |global-local|
|
||||||
option or if {bufnr} is provided, like `:set` otherwise. If {winid} is
|
option or if {bufnr} is provided, like `:set` otherwise. If {winid} is
|
||||||
|
|||||||
@@ -614,6 +614,12 @@ local function render_fun_header(fun, cfg)
|
|||||||
if fun.classvar then
|
if fun.classvar then
|
||||||
nm = fmt('%s:%s', fun.classvar, nm)
|
nm = fmt('%s:%s', fun.classvar, nm)
|
||||||
end
|
end
|
||||||
|
if nm == 'vim.bo' then
|
||||||
|
nm = 'vim.bo[{bufnr}]'
|
||||||
|
end
|
||||||
|
if nm == 'vim.wo' then
|
||||||
|
nm = 'vim.wo[{winid}][{bufnr}]'
|
||||||
|
end
|
||||||
|
|
||||||
local proto = fun.table and nm or nm .. '(' .. table.concat(args, ', ') .. ')'
|
local proto = fun.table and nm or nm .. '(' .. table.concat(args, ', ') .. ')'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user