Conversation
|
Hey Max, Sorry it took me a while because I got some urgent work yesterday. |
|
hey @max397574 any update? does it work for you? |
|
I will test this out later I'm not sure if we want plugin-specific code in the codebase I think the best solution would be to have a module somewhere where these integrations are stored and we also create a builtin one (which just adds the ()). I could also add the builtin one myself later configuration would then either be an option which takes a callback (so a function, to which the entry gets passed) |
max397574
left a comment
There was a problem hiding this comment.
looks good so far
see my comment for more information
| ---@field position? "auto"|"left"|"right" | ||
|
|
||
| --- Configuration of integrations with other plugin | ||
| ---@class care.config.integration |
There was a problem hiding this comment.
note to myself: add to docgen so it gets link after merging
lua/care/menu/confirm.lua
Outdated
|
|
||
| -- Integrates nvim-autopairs with care.nvim | ||
| if config.integration.autopairs then | ||
| local autopairs = require("nvim-autopairs") |
There was a problem hiding this comment.
still use pcall and use vim.notify to give a warning if autopairs is not available
because some people always manage to mess things up like this and I'd rather not get people reporting errors
There was a problem hiding this comment.
okey ill use pcall and vim.notify
okey I'll the integration code into a module
Are you saying to make it like this for the autocmd part? cmp.event:on(
"confirm_done",
cmp_autopairs.on_confirm_done({
filetypes = {
["*"] = {
["("] = {
kind = {
cmp.lsp.CompletionItemKind.Function,
cmp.lsp.CompletionItemKind.Method,
},
handler = handlers["*"],
},
},
},
})
)this is the code to integrate |
|
yes similar like what cmp does except that we use autocommands and not a weird self-built even system what do you think? |
|
Yeah I also think adding autocmd would be a great idea |
|
@HyperAfnan do you think you'll find time to finish this soon? Otherwise I could take this over |
|
Sorry, this week was too hectic for me, but tomorrow is Sunday, so I'll complete this by tomorrow. |
|
No worries |
|
Hey max , I have created an event listener for the event called confirm_done which is called in the |
😳 |
|
can you tell me how should it look like ? I'm out of ideas |
|
well just how it was before and then just add the code for the autopairs logic somewhere and a configuration recipe with how to setup the autocmd |
|
okey i gotcha |
No description provided.