mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 10:49:08 +00:00
fix(indent): use correct hl based on indent. Fixes #422
This commit is contained in:
parent
9b6b11fbf2
commit
627af7342c
1 changed files with 2 additions and 2 deletions
|
@ -303,7 +303,7 @@ end
|
|||
---@private
|
||||
function M.render_scope(scope, state)
|
||||
local indent = (scope.indent or 2)
|
||||
local hl = get_hl(scope.indent + 1, config.scope.hl)
|
||||
local hl = get_hl(math.floor(scope.indent / state.shiftwidth) + 1, config.scope.hl)
|
||||
local from, to = bounds(scope, state)
|
||||
local col = indent - state.leftcol
|
||||
|
||||
|
@ -350,7 +350,7 @@ function M.render_chunk(scope, state)
|
|||
return
|
||||
end
|
||||
local from, to = bounds(scope, state)
|
||||
local hl = get_hl(scope.indent + 1, config.chunk.hl)
|
||||
local hl = get_hl(math.floor(scope.indent / state.shiftwidth) + 1, config.chunk.hl)
|
||||
local char = config.chunk.char
|
||||
|
||||
---@param l number
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue