How does set mouse+=a translate to the equivalent Lua Neovim setting?
vim.opt.mouse returns a mouse option object.
You can use Option:append(value) to append a string value to an option like this.
-- These are equivalent
vim.opt.mouse:append('a')
vim.opt.mouse = vim.opt.mouse + 'a'
Learn more in :h vim.opt:append()
There is also a vim.o.mouse, which returns the option as a string. You can also append a string value to it using ...
vim.o.mouse = vim.o.mouse .. 'a'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With