Skip to content

Commit

Permalink
fix(types): allow resolving empty response from blink.cmd.Source (#254)
Browse files Browse the repository at this point in the history
Right now it looks like the code does nil checks perfectly, and there is
no actual issue in resolving a nil value. However, the types still
specify that a response must always be present.
  • Loading branch information
mikavilpas authored Nov 4, 2024
1 parent a94bbaf commit 46a5f0b
Showing 1 changed file with 1 addition and 1 deletion.
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 @@ -12,7 +12,7 @@
--- @field new fun(config: blink.cmp.SourceProviderConfig): blink.cmp.Source
--- @field enabled? fun(self: blink.cmp.Source, context: blink.cmp.Context): boolean
--- @field get_trigger_characters? (fun(self: blink.cmp.Source): string[]) | nil
--- @field get_completions? fun(self: blink.cmp.Source, context: blink.cmp.Context, callback: fun(response: blink.cmp.CompletionResponse)): (fun(): nil) | nil
--- @field get_completions? fun(self: blink.cmp.Source, context: blink.cmp.Context, callback: fun(response: blink.cmp.CompletionResponse | nil)): (fun(): nil) | nil
--- @field filter_completions? (fun(self: blink.cmp.Source, response: blink.cmp.CompletionResponse): blink.cmp.CompletionItem[]) | nil
--- @field should_show_completions? (fun(self: blink.cmp.Source, context: blink.cmp.Context, response: blink.cmp.CompletionResponse): boolean) | nil
--- @field resolve? (fun(self: blink.cmp.Source, item: blink.cmp.CompletionItem, callback: fun(resolved_item: lsp.CompletionItem | nil)): ((fun(): nil) | nil)) | nil
Expand Down

0 comments on commit 46a5f0b

Please sign in to comment.