Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use nvim_set_hl to speed up startup time
On my machine, prior to this change, the colorscheme adds about 8ms to the startup time of neovim. Using the newly introduced API `nvim_set_hl`, it’s a little under 3ms, so that’s more than a two times speedup! Special care is taken to handle the `fmt` argument, as that’s the least friendly to `nvim_set_hl`. This change strives to be backward compatible. Once neovim version 0.7.0 will be widely spread enough, further performance gain are within reach by: * removing the fallback that calls `string.format` * defining the `group_settings` so that those can be passed to `nvim_set_hl` directly
- Loading branch information