Replace vim.opt with vim.o (#1495)

* Replace vim.opt with vim.o

Because it offers a nicer interface and info on hover.
For now leave vim.opt when using the table interface (until vim.o
with tables is implemented)

* Add type hint for vim.opt.rtp

* Add a comment about using vim.opt instead of vim.o
This commit is contained in:
Ori Perry 2025-05-11 03:16:03 +03:00 committed by GitHub
parent 2b2f0f8364
commit c92ea7ca97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 32 additions and 24 deletions

View file

@ -50,7 +50,7 @@ return {
-- Only run the linter in buffers that you can modify in order to
-- avoid superfluous noise, notably within the handy LSP pop-ups that
-- describe the hovered symbol using Markdown.
if vim.opt_local.modifiable:get() then
if vim.bo.modifiable then
lint.try_lint()
end
end,