ap / vim-css-color

Preview colours in source code while editing
http://www.vim.org/scripts/script.php?script_id=5056
MIT License
1.77k stars 78 forks source link

Configuration (Documentation) #153

Open wolfisberg opened 3 years ago

wolfisberg commented 3 years ago

Is there any documentation about possible configurations of this plugin?

I can't seem to find any and searching from issues I get the sense that some things can be configured.

For example the plugin works out of the box for .css and .sh files, but not for .lua and .rasi (admittedly the last one is pretty niche). Can support be enabled/disabled on a file type basis?

ap commented 3 years ago

Support for each filetype has to be implemented separately; see the contents of the after/syntax/ directory. This is by design.

Once added there is no option to disable support for a filetype, although there are a few functions which are meant as supported API but remain undocumented, which you can call from autocommands to approximate various configuration options. None of this should be the way it is, I’ve never just never gotten around to tidying it up properly.

ap commented 3 years ago

(It’s not as straightforward how to make disabling filetypes configurable as it might seem, because of how the plugin is structured with the loaders in after/syntax/ and the main code in autoload/. (That will probably change. I think.))