Closed mawkler closed 7 months ago
Confirmed with nvim-tree
Same applies to changing background.
It looks like we might not be persisting the user data from setup and set_icon.
I'd be most grateful if you could look at this one @mg979
Also noticed that we are not using the "NvimWebDevicons"
au group for the "OptionSet"
autocommand.
We should do that, as well as create it during setup.
I think this should be enough, @mawkler can you confirm?
@mg979 Seems to be working. Thank you!
workaround: use override_by_filename
and override_by_extension
. The overrides are persisted for these options (see https://github.com/nvim-tree/nvim-web-devicons/blob/master/lua/nvim-web-devicons.lua#L1915)
Overridden icons get reset when I change colorscheme.
To reproduce:
Configuration:
Click to expand
```lua local root = vim.fn.fnamemodify(vim.fn.expand('$HOME') .. 'nvim-test-config', ':p') for _, name in ipairs({ 'config', 'data', 'state', 'cache' }) do vim.env[('XDG_%s_HOME'):format(name:upper())] = root .. '/' .. name end -- bootstrap lazy local lazypath = root .. '/plugins/lazy.nvim' if not vim.loop.fs_stat(lazypath) then vim.fn.system({ 'git', 'clone', '--filter=blob:none', 'https://github.com/folke/lazy.nvim.git', lazypath, }) end vim.opt.runtimepath:prepend(lazypath) -- install plugins local plugins = { { 'romgrk/barbar.nvim', config = true }, { 'kyazdani42/nvim-web-devicons', config = function() require('nvim-web-devicons').setup({ override = { md = { icon = '', color = '#519aba', name = 'Markdown' } } }) end, } } require('lazy').setup(plugins, { root = root .. '/plugins', }) ```nvim -u ~/nvim-test-config/init.lua testfile.md
:colorscheme blue
:e