Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Applying css features via filetype table doesn't override defaults #58

Open
daephx opened this issue Apr 18, 2023 · 0 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@daephx
Copy link

daephx commented Apr 18, 2023

Application Versions:

OS: WSL2 Ubuntu 22.04
Neovim: NVIM v0.10.0-dev

Colorizer Version::

Note: This didn't work with my setup.
find ~/.config/nvim/ -type d -name 'nvim-colorizer.lua' -exec git rev-parse HEAD \;

The provided command outputted: b1f99fc618c2f4f262dde607785c3eac9fc61933
This is the actual installed version: dde3084

Describe the bug

This might be tangentially related to #48.

For my config I don't like names or RGB to be globally enabled, but for css filetypes these can be helpful.
So I figured the css = true option would be a concise way to allow those features to be limited to only css filetypes.

This does not work, requiring the user to explicitly override the disabled options defined in user_default_options.

setup = {
  user_default_options = {
    RGB = false, -- annoying in some contexts
    names = false, -- annoying in some contexts
    mode = "background",
  },
  filetypes = {
    "*", -- Use default options for all other filetypes

    -- This should be sufficient to ensure all css features are enabled
    -- css = { css = true },

    -- Unfortunately, these settings need to be explicitly enabled to override user_default_options
    css = { css = true, names = true, RGB = true },
  },
}
@daephx daephx added the bug Something isn't working label Apr 18, 2023
@catgoose catgoose self-assigned this Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants