aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc/lua.txt
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-10-09 19:31:14 +0800
committerGitHub <noreply@github.com>2024-10-09 11:31:14 +0000
commit8ef3dd3afa20024f439d8b7a69f316069c1909d3 (patch)
treedecc07a8049abe9989d29bade0cb3556504b579e /runtime/doc/lua.txt
parent0264870c0aa50fd4e34fb8a6b3c3c3cd88a22db7 (diff)
downloadrneovim-8ef3dd3afa20024f439d8b7a69f316069c1909d3.tar.gz
rneovim-8ef3dd3afa20024f439d8b7a69f316069c1909d3.tar.bz2
rneovim-8ef3dd3afa20024f439d8b7a69f316069c1909d3.zip
docs(lua): "vim.bo" is always equivalent to :setlocal (#30733)
vim.bo :lua vim.bo.textwidth = 80 :setglobal textwidth? textwidth=0 :setlocal :setlocal textwidth=80 :setglobal textwidth? textwidth=0 :set :set textwidth=80 :setglobal textwidth? textwidth=80
Diffstat (limited to 'runtime/doc/lua.txt')
-rw-r--r--runtime/doc/lua.txt9
1 files changed, 3 insertions, 6 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index 396f24a1aa..3e8d8bb62c 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -1464,12 +1464,9 @@ Option:remove({value}) *vim.opt:remove()*
• {value} (`string`) Value to remove
vim.bo[{bufnr}] *vim.bo*
- 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
- is an error.
-
- Note: this is equivalent to `:setlocal` for |global-local| options and
- `:set` otherwise.
+ Get or set buffer-scoped |options| for the buffer with number {bufnr}.
+ Like `:setlocal`. If {bufnr} is omitted then the current buffer is used.
+ Invalid {bufnr} or key is an error.
Example: >lua
local bufnr = vim.api.nvim_get_current_buf()