-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Replace vim.opt with vim.o #1495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)
I think there should be document about the difference between them, and why you use |
I added a comment explaining why I choose to use |
LGTM |
feoh
approved these changes
May 11, 2025
arsxhy
pushed a commit
to arsxhy/arsKickstart.nvim
that referenced
this pull request
May 11, 2025
* 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
dribic
added a commit
to dribic/nvim-files
that referenced
this pull request
May 11, 2025
* 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 Co-authored-by: Ori Perry <48057913+oriori1703@users.noreply.github.com> Signed-off-by: Dejan Ribič <dejan.ribic@gmail.com>
kumiau
pushed a commit
to kumiau/kickstart.nvim
that referenced
this pull request
May 12, 2025
* 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
viliusradz
pushed a commit
to viliusradz/kickstart.nvim
that referenced
this pull request
May 14, 2025
* 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
viliusradz
pushed a commit
to viliusradz/kickstart.nvim
that referenced
this pull request
May 14, 2025
* 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Even though this change is not mandatory until all of the plugins use the new
vim.o
interface, as discussed in #1264 , I think there it is still beneficial switching tovim.o
.In contrast to
vim.opt
,vim.o
opens the documentation on hover, and provides type hints which will be useful for beginners (and also experts who are just lazy ;).In addition it is more intuitive to get the value of the option (e.g.
vim.bo.modifiable
instead ofvim.opt_local.modifiable:get()
).The main downside is that it is less convenient in the cases where
vim.opt
provides a table (This is tracked in neovim/neovim#20107).So for now I left
vim.opt.listchars
andvim.opt.rtp
unchanged.