The helper for registering autocmds has a pattern hardcoded of "package.json" (see permalink above) like this: vim.cmd("autocmd " .. constants.AUTOGROUP .. " " .. event .. " package.json " .. command)
This works for the BufEnter autocmds but does not work for the ColorScheme autocmds as the pattern looks to match on the name of the color scheme and NOT the buffer name (package.json).
Issues
Plugin Version
Neovim Version
Neovim Version
0.11
Branch
master
Actual behavior
https://github.com/vuki656/package-info.nvim/blob/018bc10e28b00e28e239b1fff7c497304f8b1bf5/lua/package-info/utils/register-autocmd.lua#L7
The helper for registering autocmds has a pattern hardcoded of "package.json" (see permalink above) like this:
vim.cmd("autocmd " .. constants.AUTOGROUP .. " " .. event .. " package.json " .. command)
This works for the BufEnter autocmds but does not work for the ColorScheme autocmds as the pattern looks to match on the name of the color scheme and NOT the buffer name (package.json).
Here is where it is called during the
__register_colorscheme_initialization
function: https://github.com/vuki656/package-info.nvim/blob/018bc10e28b00e28e239b1fff7c497304f8b1bf5/lua/package-info/config.lua#L129So this ColorScheme autocmd never actually fires unless you had a color scheme / theme named "package.json" 😉
Expected behavior
Need to use something like
*
instead ofpackage.json
when registering autocmd for ColorScheme.Steps to reproduce
Try changing color scheme and the autocmd will not fire.
Package info config
defaults
Other information
No response
Help
No, sorry.
Implementation help
No response