Unable to override `vim.g.have_nerd_font` in `custom/plugins/init.lua`
Describe the bug
I am unable to override vim.g.have_nerd_font in my custom/plugins/init.lua when the main init.lua has it set to false. The main init.lua file contains the following setting:
vim.g.have_nerd_font = false
I attempted to override it by adding the following line to my custom/plugins/init.lua:
vim.g.have_nerd_font = true
However, this doesn't seem to work. My expectation was that settings in the custom/ directory would override those from the main configuration, but it doesn't seem to be the case in this instance.
I would prefer not to change the main init.lua file to avoid conflicts when pulling updates from the main repository. Is this the correct approach, or should I consider changing the main init.lua?
To Reproduce
Steps to reproduce the behavior:
- Add vim.g.have_nerd_font = true in custom/plugins/init.lua.
- Open Neovim and inspect the value of vim.g.have_nerd_font to see that it remains false.
Desktop
- OS:
macOS 15.0 - Terminal:
kitty
Neovim Version
NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1727870382
That line is unlikely to have conflicts, so I'd say go ahead and change it
init.lua is yours to change! Please go ahead and change it in your own config/fork!