aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_options.lua
diff options
context:
space:
mode:
authorLuna Saphie Mittelbach <lunarlambda@gmail.com>2024-03-04 00:33:09 +0100
committerGitHub <noreply@github.com>2024-03-04 07:33:09 +0800
commit3df1211ebc4c7ec4562d0ad0fa51a24569b81e15 (patch)
treef464988822bddadee8dfb8fd77863c07460e3a2c /runtime/lua/vim/_options.lua
parent181b620580f166f575746738cd02586de6f61dc3 (diff)
downloadrneovim-3df1211ebc4c7ec4562d0ad0fa51a24569b81e15.tar.gz
rneovim-3df1211ebc4c7ec4562d0ad0fa51a24569b81e15.tar.bz2
rneovim-3df1211ebc4c7ec4562d0ad0fa51a24569b81e15.zip
docs(lua): clarify when `vim.bo`/`vim.wo` acts like `:setlocal` (#27708)
Diffstat (limited to 'runtime/lua/vim/_options.lua')
-rw-r--r--runtime/lua/vim/_options.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/runtime/lua/vim/_options.lua b/runtime/lua/vim/_options.lua
index bde9421552..b661ddfb22 100644
--- a/runtime/lua/vim/_options.lua
+++ b/runtime/lua/vim/_options.lua
@@ -271,10 +271,10 @@ vim.go = setmetatable({}, {
})
--- Get or set buffer-scoped |options| for the buffer with number {bufnr}.
---- Like `:set` and `:setlocal`. If [{bufnr}] is omitted then the current
---- buffer is used. Invalid {bufnr} or key is an error.
+--- If [{bufnr}] is omitted then the current buffer is used.
+--- Invalid {bufnr} or key is an error.
---
---- Note: this is equivalent to both `:set` and `:setlocal`.
+--- Note: this is equivalent to `:setlocal` for |global-local| options and `:set` otherwise.
---
--- Example:
---
@@ -287,9 +287,9 @@ vim.go = setmetatable({}, {
vim.bo = new_buf_opt_accessor()
--- Get or set window-scoped |options| for the window with handle {winid} and
---- buffer with number {bufnr}. Like `:setlocal` if {bufnr} is provided, like
---- `:set` otherwise. If [{winid}] is omitted then the current window is
---- used. Invalid {winid}, {bufnr} or key is an error.
+--- buffer with number {bufnr}. Like `:setlocal` if setting a |global-local| option
+--- or if {bufnr} is provided, like `:set` otherwise. If [{winid}] is omitted then
+--- the current window is used. Invalid {winid}, {bufnr} or key is an error.
---
--- Note: only {bufnr} with value `0` (the current buffer in the window) is
--- supported.