Update generated neovim config
This commit is contained in:
@ -35,6 +35,8 @@
|
||||
---@field whitelist rainbow_delimiters.language[]?
|
||||
---Blacklist for languages not to highlight
|
||||
---@field blacklist rainbow_delimiters.language[]?
|
||||
---Dynamic condition whether to enable rainbow highlighting
|
||||
---@field condition (fun(bufnr: number): boolean)?
|
||||
---Logging with log file and log level
|
||||
---@field log rainbow_delimiters.logging?
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ local function reduce_extmark(extmark)
|
||||
return {
|
||||
start_row = extmark[2],
|
||||
start_col = extmark[3],
|
||||
end_row = extmark[4].end_col,
|
||||
end_row = extmark[4].end_row,
|
||||
end_col = extmark[4].end_col,
|
||||
hl_group = extmark[4].hl_group,
|
||||
}
|
||||
|
||||
@ -81,6 +81,13 @@ local M = {
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
enabled_when = function(bufnr)
|
||||
local conf = vim.g.rainbow_delimiters
|
||||
if not conf or not conf.condition then
|
||||
return true
|
||||
end
|
||||
return conf.condition(bufnr)
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ local schema = {
|
||||
priority = true,
|
||||
blacklist = true,
|
||||
whitelist = true,
|
||||
condition = true,
|
||||
log = {level = true, file = true},
|
||||
}
|
||||
|
||||
|
||||
@ -35,10 +35,11 @@ end
|
||||
|
||||
---Wraps the given strategy with a new strategy that switches colours like a
|
||||
---chain of Christmas lights.
|
||||
---@param strategy rainbow_delimiters.strategy The original strategy
|
||||
---@param strategy rainbow_delimiters.strategy? Original strategy (default global)
|
||||
---@param delay integer? Time between switches in milliseconds (default 500)
|
||||
---@return rainbow_delimiters.strategy christmas_lights A new strategy object
|
||||
function M.lights(strategy, delay)
|
||||
strategy = strategy or require 'rainbow-delimiters.strategy.global'
|
||||
delay = delay or 500
|
||||
local timer = uv.new_timer()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user