SCSS variable matching
Hello, would it be possible to implement something like this? https://github.com/norcalli/nvim-colorizer.lua/pull/22
Yes, given i have to mostly copy the pr, but no eta.
Alright, that would be cool to have. I am not in a hurry to have it, just good to know it can (and will) be done!
Test and report
https://github.com/NvChad/nvim-colorizer.lua/pull/18
Thanks, that was fast! Currently it seems the colors are only highlighted when they're defined in the same file. Sadly this is only a little useful when using imports – as one often does with sass. But maybe that could be done later in an incremental PR?
Yes, i plan to add import support, just thinking how to actually implement it, because it's a big task, scanning other files, it can choke the editor.
Have to find an efficient way to scan imports.
Done, imports should be working now along with recursive variables
Yes, now they do work, thank you!
I'd hate to be a bother but when the colors come from a second-level import they are not highlighted. Only first-level imports work currently. If that explanation makes any sense?
Yes, now they do work, thank you!
I'd hate to be a bother but when the colors come from a second-level import they are not highlighted. Only first-level imports work currently. If that explanation makes any sense?
Check now
You've outdone yourself, thank you! I sadly am not qualified to review the PR but by my standards this issue is resolved.
You've outdone yourself, thank you! I sadly am not qualified to review the PR but by my standards this issue is resolved.
Even i am not qualified to review, it got quite complicated. But thank you for testing. Will merge it soon.
I have merged it to master.
@h0adp0re @Akianonymus I know I'm two years late, but I'm struggling getting this highlighting working (scss variables and color functions). Can you guys spot anything weird with my config:
{
"catgoose/nvim-colorizer.lua",
event = "BufReadPre",
opts = {},
config = function()
local colorizer = require("colorizer")
colorizer.setup({
filetypes = { "css", "scss" },
user_default_options = {
css = true,
mode = "background",
names = true,
RGBA = true,
RRGGBBAA = true,
sass = {
enable = true,
parsers = {
"css",
},
},
},
})
end,
},
I'm not sure if the sass highlighting is working right now. I've tried to use git bisect to find where it was actually highlighting but I could never find a working commit. If you can find a commit where this is working (maybe it's a problem with how I was testing) I can try to get this working.
@catgoose Right now, I just set enabled to false and I'm still getting all the highlighting I would get in a CSS file, so that's doable for now. I'm sorry, but I just don't have the bandwidth to contribute. I'll bookmark the issue to come back to it if I get any time.
@catgoose Right now, I just set enabled to false and I'm still getting all the highlighting I would get in a CSS file, so that's doable for now. I'm sorry, but I just don't have the bandwidth to contribute. I'll bookmark the issue to come back to it if I get any time.
Thanks. I plan to get to this issue, but I'm trying to finish up a few other things first.
any updates on this ?