aboutsummaryrefslogtreecommitdiff
path: root/lua/colorizer/buffer.lua
diff options
context:
space:
mode:
authorakianonymus <anonymus.aki@gmail.com>2023-02-22 18:43:01 +0530
committerAkshay <anonymus.aki@gmail.com>2023-02-26 11:02:44 +0530
commit7e1f3b2a040e37895cc6797e5fb6032f9165e5c9 (patch)
tree5961df8743282bc7a157afd5c68923daf8135cc7 /lua/colorizer/buffer.lua
parentfeat: 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/buffer.lua')
-rw-r--r--lua/colorizer/buffer.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/colorizer/buffer.lua b/lua/colorizer/buffer.lua
index 2035d52..36588af 100644
--- a/lua/colorizer/buffer.lua
+++ b/lua/colorizer/buffer.lua
@@ -142,7 +142,7 @@ function buffer.highlight(buf, ns, line_start, line_end, options, options_local)
-- only update sass varibles when text is changed
if options_local.__event ~= "WinScrolled" and options.sass and options.sass.enable then
table.insert(returns.detach.functions, sass_cleanup)
- sass_update_variables(buf, 0, -1, nil, make_matcher(options.sass.parsers or { css = true }), options, options_local)
+ sass_update_variables(buf, 0, -1, nil, make_matcher(options.sass.parsers), options, options_local)
end
local data = buffer.parse_lines(buf, lines, line_start, options) or {}
@@ -199,6 +199,7 @@ local function getrow(buf)
end
local a = api.nvim_buf_call(buf, function()
+ ---@diagnostic disable-next-line: redundant-return-value
return {
vim.fn.line "w0",
vim.fn.line "w$",