kickstart.nvim icon indicating copy to clipboard operation
kickstart.nvim copied to clipboard

Unable to override `vim.g.have_nerd_font` in `custom/plugins/init.lua`

Open fabianskier opened this issue 1 year ago • 1 comments

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:

  1. Add vim.g.have_nerd_font = true in custom/plugins/init.lua.
  2. 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

fabianskier avatar Oct 04 '24 16:10 fabianskier

That line is unlikely to have conflicts, so I'd say go ahead and change it

rmacklin avatar Oct 05 '24 23:10 rmacklin

init.lua is yours to change! Please go ahead and change it in your own config/fork!

feoh avatar Oct 30 '24 17:10 feoh