Skip to content

Commit

Permalink
Merge pull request #153 from yochem/self-to-source
Browse files Browse the repository at this point in the history
fix: pass source to get_trigger_characters
  • Loading branch information
max397574 authored Dec 11, 2024
2 parents 37477ef + 4a57ddf commit dba715e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lua/care/source.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ end
function Source:get_trigger_characters()
local trigger_characters = {}
if self.source.get_trigger_characters then
return self.source.get_trigger_characters()
return self.source:get_trigger_characters()
end
return trigger_characters
end
Expand Down
4 changes: 2 additions & 2 deletions lua/care/types/source.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
--- An example for this could be `.`, `\\` and `/` when working with paths.
---
--- ```lua
--- function my_source.get_trigger_characters()
--- function my_source:get_trigger_characters()
--- return { ".", "\\", "/" }
--- end
--- ```
---@field get_trigger_characters? fun(): string[]
---@field get_trigger_characters? fun(self: care.source): string[]
--- The keyword pattern is used to overwrite the keyword pattern from the config per source. It
--- should basically represent the format of entries the source will provide as regex.
---@field keyword_pattern? string
Expand Down

0 comments on commit dba715e

Please sign in to comment.