refactor(cmp): Extract get_chat_mentions for third-party cmp source usage (#2027)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
local api = vim.api
|
||||
|
||||
---@class mentions_source : cmp.Source
|
||||
---@field get_mentions fun(): {description: string, command: AvanteMentions, details: string, shorthelp?: string, callback?: AvanteMentionCallback}[]
|
||||
---@field get_mentions fun(): AvanteMention[]
|
||||
local MentionsSource = {}
|
||||
MentionsSource.__index = MentionsSource
|
||||
|
||||
---@param get_mentions fun(): {description: string, command: AvanteMentions, details: string, shorthelp?: string, callback?: AvanteMentionCallback}[]
|
||||
---@param get_mentions fun(): AvanteMention[]
|
||||
function MentionsSource:new(get_mentions)
|
||||
local instance = setmetatable({}, MentionsSource)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user