You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking to add a source for my plugin, to blink.
For context, the buffer I would like blink to work in is a custom filetype but with a buftype of nofile. So with my custom source:
-- codecompanion.integrations.blink.init.lualocalM= {}
functionM.new()
returnsetmetatable({}, { __index=M })
endfunctionM:get_trigger_characters()
return { "/" }
endfunctionM:enabled(context)
ifcontextthenreturnvim.bo[context.bufnr].filetype=="codecompanion"endreturntrue-- force this to be enabled for the purposes of this demoendfunctionM:get_completions(context, callback)
print("ENABLED")
endreturnM
A simple solution for this could be to add a setting alongside blocked_filetypes that overrides the check for buftype and always enables blink? Maybe something like always_enable_in or always_enable_filetypes. Most plugins I can think of that would need this functionality have their own filetype. I guess sources should be able to add their filetypes and maybe it should be a source setting? But if you want to limit the number of settings, or as temporary solution, you could just add the filetype override setting and instruct the user to add the plugin filetype in the install instructions of the source?
Really looking forward to having blink support in CodeCompanion, it's a great plugin!
I'm looking to add a source for my plugin, to blink.
For context, the buffer I would like blink to work in is a custom filetype but with a buftype of
nofile
. So with my custom source:and my lazy config:
I will only ever see the printed message
enabled
, if I do:set buftype=
and then hit the trigger character in the buffer.The text was updated successfully, but these errors were encountered: