-
Notifications
You must be signed in to change notification settings - Fork 47
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: I noticed filetypes override other filetype configs #134
Comments
Yeah strange. The |
I have a little more work to do, but could you try with the |
Does that branch work for you? |
I have gotten it to work, but I get an error when I call set up even with an empty table |
I have been able to find the culprit. I just created a PR for the fix. Let me know if there other things I should do before closing this. |
Thanks, I'll look at your PR. Though, I am still working on the |
Yep, that's right. Could you test latest on that branch? Using the following setup opts, filetype settings should be respected including {
filetypes = {
"*",
html = {
names = true,
names_opts = {
lowercase = true,
uppercase = false,
camelcase = false,
strip_digits = false,
},
names_custom = {
one = "#0000ff",
two = "#00ff00",
three = "#ff0000",
four = "#0eae90",
seven = "#f0f000",
nine = "#fa0ce0",
},
tailwind = false,
},
lua = {
names = true,
names_opts = {
lowercase = false,
uppercase = true,
camelcase = true,
strip_digits = true,
},
names_custom = {
four = "#ffefaf",
five = "#3f0fb0",
six = "#f000f0",
seven = "#00ff00",
},
tailwind = true,
},
css = {
names = true,
names_custom = {
nine = "#fac00e",
},
},
javascript = { names = true },
javascriptreact = { names = true },
},
user_default_options = {
names = false,
names_custom = {
four = "#00ff00",
five = "#fafaaa",
six = "#ffafff",
seven = "#abcdef",
nine = "#ff0000",
},
RGB = true,
RRGGBB = true,
RRGGBBAA = true,
AARRGGBB = true,
rgb_fn = true,
hsl_fn = true,
css = true,
css_fn = true,
mode = "background",
sass = { enable = false, parsers = { "css" } },
virtualtext = "",
virtualtext_inline = true,
virtualtext_mode = "foreground",
always_update = false,
},
buftypes = {},
user_commands = true,
lazy_load = false,
} |
I just updated, still on |
I noticed the lag too. I'll take a look later today or tomorrow. |
Thank you for taking your time. |
No problem! Can you try that branch again. I think I fixed the performance issues. |
I have been using for the past 30 minutes, no issues so far. The only issue I noticed is from the names custom, some colors works, some don't. I think the user_default is overriding the names_custom in the filetype settings. Using the exact config you sent. See all filetype have the same highlight for custom names. But when I remove Should I leave this issue opened or you still need me to test later? |
Describe the bug
A description of what the bug is.
What I mean is, I set the default option to make name false but then set HTML and CSS filetype to true. If I open HTML or CSS first, it makes name true for that instance and it always highlight names for other filetypes I did not specify. If I open other filetypes first, it doesn't highlight names even for HTML and CSS. I do not know if I am explaining this well.
To Reproduce
Provide your config and steps to reproduce.
You can use
test/minimal.lua
to produce a minimal config.Expected behavior
A description of what you expected to happen.
I expect it to highlight name only in HTML, CSS and js, the rest should get the defaults. Moving from filetypes should not disrupt this
Operating System:
Fedora 41
Neovim Version:
Tried this both with
NVIM v0.11.0-dev-1545+ga4f575abd8
andNVIM v0.10.2
The text was updated successfully, but these errors were encountered: