Notes on Neovim Options
There are two complementary ways of setting options via Lua.
The most convenient way for setting global and local options, e.g., in init.lua, is through vim.opt and friends: vim.opt: behaves like :set vim.opt_global: behaves like :setglobal vim.opt_local: behaves like :setlocal
There exists a more direct variable-like access using vim.o and friends, similarly to how you can get and set options via :echo &number and :let &listchars='space:_,tab:>~': vim.o: behaves like :set vim.go: behaves like :setglobal vim.bo: for buffer-scoped options vim.wo: for window-scoped options (can be double indexed)
https://neovim.io/doc/user/options.html#%3Aset
https://neovim.io/doc/user/options.html#%3Asetglobal
https://neovim.io/doc/user/options.html#%3Asetlocal
https://neovim.io/doc/user/lua.html#lua-options
https://neovim.io/doc/user/lua.html#vim.opt
https://neovim.io/doc/user/lua.html#vim.o