-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
bug: Disabling default options does not work #566
Comments
You're right. Its not possible to disable options this way. I've updated the docs and added a work-around: https://www.lazyvim.org/configuration#default-settings |
@folke You're mentioning that to disable default options we should add |
setting it to anything that isn't |
Thanks for the workaround, works great. |
Did you check docs and existing issues?
Neovim version (nvim -v)
NVIM v0.9.0-dev-920+gc9b0fe1f41
Operating system/version
Arch Linux
Describe the bug
Trying to disable the default options following the docs does not work. They are still loaded.
Loading the options seems to happen within
init
, whereas mergingopts
happens insetup
after the defaultoptions.lua
has already been loaded.lazyvim.config.init
is called fromplugins/core.lua
.Disabling
autocmds
andkeymaps
the same way works. Modifyingdefaults.options
inlua/lazyvim/config/init.lua
works as expected.Steps To Reproduce
options
using this plugin inlua/plugins/disable-options.lua
nvim -V1 --headless -c "verbose set splitbelow? | q"
Expected Behavior
When setting
defaults.options = false
, the default options should not be loaded.Repro
Run with
nvim -u repro.lua --headless -V1 -c "verbose set splitbelow? | q"
, first run is a bit verbose, but will end printing thatsplitbelow
was set and where. Second run only prints the setting.The text was updated successfully, but these errors were encountered: