Add a comment about using vim.opt instead of vim.o

This commit is contained in:
orip 2025-04-30 00:48:00 +03:00
parent b5a884ce80
commit b4bb1ea692
1 changed files with 5 additions and 0 deletions

View File

@ -144,6 +144,11 @@ vim.o.splitbelow = true
-- Sets how neovim will display certain whitespace characters in the editor. -- Sets how neovim will display certain whitespace characters in the editor.
-- See `:help 'list'` -- See `:help 'list'`
-- and `:help 'listchars'` -- and `:help 'listchars'`
--
-- Notice listchars is set using `vim.opt` instead of `vim.o`.
-- It is very similar to `vim.o` but offers an interface for conveniently interacting with tables.
-- See `:help lua-options`
-- and `:help lua-options-guide`
vim.o.list = true vim.o.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' } vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }