echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
4.47k stars 175 forks source link

feat(base16): allow to only use cterm colors #889

Closed arcxio closed 1 month ago

arcxio commented 1 month ago

Make config.palette optional if config.use_cterm is provided as a table with cterm colors.

Resolve #456

arcxio commented 1 month ago

the rationale given for not implementing this seems to be that the suggestion in the issue (allowing use_cterm to have a special value that enables default cterm support) would add additional complexity to base16's setup. my solution is simpler and more obvious and would make gui and cterm highlighting symmetrical, which IMO makes more sense than arbitrarily treating cterm highlighting as fallback-only second-class citizen, considering termguicolors is disabled by default

echasnovski commented 1 month ago

Thanks for the PR!

my solution is simpler and more obvious and would make gui and cterm highlighting symmetrical, which IMO makes more sense than arbitrarily treating cterm highlighting as fallback-only second-class citizen, considering termguicolors is disabled by default

I appreciate the effort, but this is exactly what 'mini.base16' does and will keep doing: "gui highlighting" is the main concern for color scheme while "cterm highlighting" is a fallback. The reason for this is the ever growing number of people who use terminal emulators with "gui highlighting" support. This is now even more reasonable choice on Neovim>=0.10 as there is an automated 'termguicolors' detection depending on terminal emulator capabilities.

Closing as not planned.

arcxio commented 1 month ago

The reason for this is the ever growing number of people who use terminal emulators with "gui highlighting" support

the goal is not to support terminal emulators without gui highlighting, but to avoid dublicating base colors for a terminal emulator and neovim and to make neovim's colors consistent with every other terminal application, which is one of the main selling points of base16. in my terminal emulator 10 is already configured as a bright green I want to see and I don't understand why the same hex code has to be repeated in my neovim config to use the same bright green. or even better, writing #000000 for every color in a pallette just so it can be sensibly ignored, like in a linked issue - this is not a good design choice to force users to hack around the plugin for no good reason: cterm highlighting isn't deprecated and has its use.

echasnovski commented 1 month ago

this is not a good design choice to force users to hack around the plugin for no good reason.

Nobody forces anyone to hack anything. 'mini.base16' is a color scheme generator that applies highlight groups based on the supplied hex colors. Support for 0-15 colors is secondary. This is a design choice aimed for an easier long term maintainability.

arcxio commented 1 month ago

This is a design choice aimed for an easier long term maintainability

based on the docs I didn't get that supplying hex colors is a core to mini.base16's design and I didn't think that making palette optional would hurt long term maintainability, I wouldn't submit this if I realized that, but I don't feel the full scope of your work of course, and I respect it. thanks for your consideration.