Skip to content

Commit

Permalink
refactor: renames TriggerConfig type to ModeConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
rasulomaroff committed Jan 15, 2024
1 parent 0a45456 commit 8284855
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lua/reactive/snapshot.lua
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ end

---@param preset_name string
---@param inc_mode string
---@param inc_mode_config Reactive.TriggerConfig
---@param inc_mode_config Reactive.ModeConfig
---@param constraints TriggerConstraints<boolean>
function M:merge_snapshot(preset_name, inc_mode, inc_mode_config, constraints)
if Util.is_op(inc_mode) and inc_mode_config.operators then
Expand Down
8 changes: 4 additions & 4 deletions lua/reactive/state.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ local Util = require 'reactive.util'

---@class TriggerConstraints<V>: { winhl?: V, hl?: V }

---@class Reactive.TriggerConfig
---@class Reactive.ModeConfig
---@field winhl? table<string, string | table<string, any>>
---@field hl? table<string, table<string, any>>
---@field operators? table<string, Reactive.TriggerConfig>
---@field opfuncs? table<string, Reactive.TriggerConfig>
---@field operators? table<string, Reactive.ModeConfig>
---@field opfuncs? table<string, Reactive.ModeConfig>
---@field exact? boolean | TriggerConstraints<boolean>
---@field frozen? boolean | TriggerConstraints<boolean>
---@field from? fun(modes: { from: string, to: string })
Expand All @@ -18,7 +18,7 @@ local Util = require 'reactive.util'
---@field lazy? boolean
---@field priority? number
---@field skip? TriggerConstraints<fun(): boolean> | fun(): boolean
---@field modes table<string | table<string>, Reactive.TriggerConfig>
---@field modes table<string | table<string>, Reactive.ModeConfig>
---@field static? table<string, table>
---@field init? fun(preset: Reactive.Preset)

Expand Down

0 comments on commit 8284855

Please sign in to comment.