From 7e1f3b2a040e37895cc6797e5fb6032f9165e5c9 Mon Sep 17 00:00:00 2001 From: akianonymus Date: Wed, 22 Feb 2023 18:43:01 +0530 Subject: 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 --- lua/colorizer/buffer.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lua/colorizer/buffer.lua') 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$", -- cgit v1.2.3-70-g09d2