Skip to content

Commit

Permalink
Adjust doc
Browse files Browse the repository at this point in the history
  • Loading branch information
notomo committed Jun 22, 2023
1 parent daa050b commit a572730
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/gesture.nvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ GestureInfo *GestureInfo*
- Prefers `can_match` over `inputs`.

- {name} (string?) a displayed name
- {inputs} (GestureInputDefinition[]?) |GestureInputDefinition|
- {inputs} (GestureInputDefinition[]?) ref: |GestureInputDefinition|
- {match} ((fun(ctx:GestureActionContext):boolean)?) This is called on every |gesture.draw()| and |gesture.finish()|. If returns true, it means the gesture matches current context.
- {can_match} ((fun(ctx:GestureActionContext):boolean)?) This is called on every |gesture.draw()|. If returns false, it means the gesture can not match anymore.
- {action} (string|fun(ctx:GestureActionContext)|table) an action executed on matched. can use callable table.
Expand All @@ -93,7 +93,7 @@ GestureActionContext *GestureActionContext*

- {last_position} (integer[]) the last position drawn by gesture
- {window_ids} (integer[]) window ids that gesture traces
- {inputs} (GestureInput[]) |GestureInput|
- {inputs} (GestureInput[]) ref: |GestureInput|

GestureInputOption *GestureInputOption*

Expand Down
4 changes: 2 additions & 2 deletions lua/gesture/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ end
--- - Prefers `can_match` over `inputs`.
--- @class GestureInfo
--- @field name string? a displayed name
--- @field inputs GestureInputDefinition[]? |GestureInputDefinition|
--- @field inputs GestureInputDefinition[]? ref: |GestureInputDefinition|
--- @field match (fun(ctx:GestureActionContext):boolean)? This is called on every |gesture.draw()| and |gesture.finish()|. If returns true, it means the gesture matches current context.
--- @field can_match (fun(ctx:GestureActionContext):boolean)? This is called on every |gesture.draw()|. If returns false, it means the gesture can not match anymore.
--- @field action string|fun(ctx:GestureActionContext)|table an action executed on matched. can use callable table.
Expand All @@ -44,7 +44,7 @@ end
--- @class GestureActionContext
--- @field last_position integer[] the last position drawn by gesture
--- @field window_ids integer[] window ids that gesture traces
--- @field inputs GestureInput[] |GestureInput|
--- @field inputs GestureInput[] ref: |GestureInput|

--- Register a gesture.
--- @param info GestureInfo: |GestureInfo|
Expand Down

0 comments on commit a572730

Please sign in to comment.