vim-colortemplate icon indicating copy to clipboard operation
vim-colortemplate copied to clipboard

Q: Can you elaborate on the Neovim compatibility directive? And why doesn't it exist in v3?

Open lifepillar opened this issue 1 year ago • 5 comments

[This is a question from Vim's colorschemes repo, which I am answering here to keep things on-topic.]

I didn't even know there was Neovim compatibility before 😅 Can you comment on that?

Colortemplate v2 (but not v3) can parse a Neovim directive, which can be added to a template and set to yes or to only. When set to yes, the generated colorscheme is compatible with both Vim and Neovim: this the most compatible option, as it generates a colorscheme that should work everywhere. When set to only, the colorscheme is optimized for Neovim only: there are no if has('nvim') statements and no use of t_xx options (except as a fallback), g:terminal_ansi_color is not generated, … maybe something else I don't remember.

I haven't ported the Neovim directive to Colortemplate v3, and I don't plan to do it. Colortemplate v3 has a backend setting, though, which can be used to set the “backend” code generator. For now, it supports legacy Vim script, and vim9 script. It is not too difficult to add a new backend, so a neovim backend may be feasible. But if we go that way, I'd like someone else to help maintaining Neovim compatibility, as I am not a Neovim user. I plan to open this project to collaborators when v3 enters the beta stage, so if you are interested let me know!

lifepillar avatar Jun 11 '23 20:06 lifepillar