Skip to content

Commit

Permalink
fix: type signature for enabled indicating ctx could be passed
Browse files Browse the repository at this point in the history
Closes #695
  • Loading branch information
Saghen committed Dec 21, 2024
1 parent bdece4e commit 3cb7208
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/blink/cmp/config/sources.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
--- @class blink.cmp.SourceProviderConfig
--- @field name string
--- @field module string
--- @field enabled? boolean | fun(ctx?: blink.cmp.Context): boolean Whether or not to enable the provider
--- @field enabled? boolean | fun(): boolean Whether or not to enable the provider
--- @field opts? table
--- @field async? boolean | fun(ctx: blink.cmp.Context): boolean Whether blink should wait for the source to return before showing the completions
--- @field timeout_ms? number | fun(ctx: blink.cmp.Context): number How long to wait for the provider to return before showing completions and treating it as asynchronous
Expand Down
2 changes: 1 addition & 1 deletion lua/blink/cmp/sources/lib/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
--- @field reload? fun(self: blink.cmp.Source): nil

--- @class blink.cmp.SourceOverride
--- @field enabled? fun(self: blink.cmp.Source, context: blink.cmp.Context): boolean
--- @field enabled? fun(self: blink.cmp.Source): boolean
--- @field get_trigger_characters? fun(self: blink.cmp.Source): string[]
--- @field get_completions? fun(self: blink.cmp.Source, context: blink.cmp.Context, callback: fun(response: blink.cmp.CompletionResponse | nil)): (fun(): nil) | nil
--- @field should_show_completions? fun(self: blink.cmp.Source, context: blink.cmp.Context, response: blink.cmp.CompletionResponse): boolean
Expand Down

0 comments on commit 3cb7208

Please sign in to comment.