You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for compiling this great mapping of emoji ↔️ plugin settings into a single handy plugin!
I recently updated my plugins and re-organized them using multiple pack directories, and the emoji for gitgutter stopped working. I didn't see anything in the docs for either plugin, but after a little searching, it seems that the gitgutter signs are only defined when the plugin is loaded. By moving gitgutter to pack/git/start/gitgutter and this plugin to pack/ui/start/emoji-icon-theme, I accidentally made this plugin load after gitgutter's signs had already been created.
I found a few workarounds:
Rename the plugin directory to an early sorting value, e.g. pack/00-init/start/emoji-icon-theme
This is simple for users to do, but a little bit annoying. It would need to be documented.
:call gitgutter#highlight#define_signs() to redefine the signs
This should be inside an if or a try/catch, in case this plugin loads before gitgutter.
It could be added to after/plugin/vim-emoji-icon-theme.vim, letting it run after gitgutter has loaded. No new vimrc config necessary.
autocommand VimEnter * call gitgutter#highlight#define_signs() could run after plugins have loaded.
I don't know that this is any better than just using an after dir.
packadd vim-emoji-icon-theme inside the user's vimrc
This would ensure this plugin loads before gitgutter. But it would need to be documented. And it'll need to be installed to opt. Annoying
However, as an added benefit, this would let the user override this plugin's emoji inside their own vimrc, without needing to add anything to after/plugin.
I'm using the second option in my own ~/.vim/after/plugin dir. But, IMO, the best approach would be second option (in this plugin's after/plugin dir), because that will work without adding anything new to documentation or the user's vimrc. Additionally, to get the benefits of the last option, user overrides could be handled by replacing the lets like so:
Hi, thanks for compiling this great mapping of emoji↔️ plugin settings into a single handy plugin!
I recently updated my plugins and re-organized them using multiple pack directories, and the emoji for gitgutter stopped working. I didn't see anything in the docs for either plugin, but after a little searching, it seems that the gitgutter signs are only defined when the plugin is loaded. By moving gitgutter to
pack/git/start/gitgutter
and this plugin topack/ui/start/emoji-icon-theme
, I accidentally made this plugin load after gitgutter's signs had already been created.I found a few workarounds:
pack/00-init/start/emoji-icon-theme
:call gitgutter#highlight#define_signs()
to redefine the signsif
or atry
/catch
, in case this plugin loads before gitgutter.after/plugin/vim-emoji-icon-theme.vim
, letting it run after gitgutter has loaded. No new vimrc config necessary.autocommand VimEnter * call gitgutter#highlight#define_signs()
could run after plugins have loaded.after
dir.packadd vim-emoji-icon-theme
inside the user's vimrcopt
. Annoyingafter/plugin
.I'm using the second option in my own
~/.vim/after/plugin
dir. But, IMO, the best approach would be second option (in this plugin'safter/plugin
dir), because that will work without adding anything new to documentation or the user's vimrc. Additionally, to get the benefits of the last option, user overrides could be handled by replacing thelet
s like so:What do you think? If you're interested, I should be able to put together a PR... but it might not happen this week. 😉
The text was updated successfully, but these errors were encountered: