diff options
author | akianonymus <anonymus.aki@gmail.com> | 2023-02-22 18:43:01 +0530 |
---|---|---|
committer | Akshay <anonymus.aki@gmail.com> | 2023-02-26 11:02:44 +0530 |
commit | 7e1f3b2a040e37895cc6797e5fb6032f9165e5c9 (patch) | |
tree | 5961df8743282bc7a157afd5c68923daf8135cc7 /lua/colorizer/sass.lua | |
parent | feat: Improve hsl parser (diff) |
fix: Improve individual opts behaviour | #48
See https://github.com/NvChad/nvim-colorizer.lua/issues/48
css is true, names is true: Show names
css is true, names is unset: Show names
css is true, names is false: Don't show names
Diffstat (limited to 'lua/colorizer/sass.lua')
-rw-r--r-- | lua/colorizer/sass.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lua/colorizer/sass.lua b/lua/colorizer/sass.lua index 5f08137..02d5701 100644 --- a/lua/colorizer/sass.lua +++ b/lua/colorizer/sass.lua @@ -163,10 +163,10 @@ local function sass_parse_lines(buf, line_start, content, name) if last_modified then -- grab the full path v = uv.fs_realpath(v) - SASS[buf].CURRENT_IMPORTS[name][v] = true + SASS[buf].CURRENT_IMPORTS[name][v or ""] = true if not SASS[buf].WATCH_IMPORTS[name][v] then - SASS[buf].IMPORTS[name][v] = last_modified + SASS[buf].IMPORTS[name][v or ""] = last_modified local c, ind = {}, 0 for l in io.lines(v) do ind = ind + 1 @@ -177,6 +177,7 @@ local function sass_parse_lines(buf, line_start, content, name) local function watch_callback() local dimen = vim.api.nvim_buf_call(buf, function() + ---@diagnostic disable-next-line: redundant-return-value return { vim.fn.line "w0", vim.fn.line "w$", vim.fn.line "$", vim.api.nvim_win_get_height(0) } end) -- todo: Improve this to only refresh highlight for visible lines |