Closed max397574 closed 2 years ago
It looks ok but I didn't understand why this is needed. Could you explain the fail case?
for me Neorg toc
didn't work
When I printed cmdline
just before the vim.fn.getcompletion
call it was just c
Sorry. I can't reproduce with neorg... (I'd install it but I can't see :Neorg toc
command)
did you load the toc module?
Sorry. I can't reproduce with neorg... (I'd install it but I can't see
:Neorg toc
command)
Hi, So if you quickly open a norg file, so something like nvim test.norg - you should be able to use Neorg toc [options] in maxes branch he fixed this issue, but to replicate
setup neorg config - open neorg file like nvim test.norg :Neorg toc [tab or what ever you use to get to the next argument] and that should be able to replicate it :)
Sorry. neorg looks like a powerful plugin. I didn't know how to use it easily.
require("neorg").setup({
load = {
["core.defaults"] = {}, -- Load all the default modules
["core.norg.qol.toc"] = {}
}
})
Thank you! I can see :Neorg toc
completion.
But I can't reproduce issue. I think the latest cmp-cmdline has not this issue.
-cmdline has not this
ah for me cmp here reverts back to normal cmd mode if that makes sense ?
so with maxes branch i can do the following :
While in master i get :
In this case you revert back to normal cmd if that makes sense
cmp.setup.cmdline(":", {
window = {
completion = {
border = { "🭽", "▔", "🭾", "▕", "🭿", "▁", "🭼", "▏" },
scrollbar = { "║" },
},
documentation = {
border = { "🭽", "▔", "🭾", "▕", "🭿", "▁", "🭼", "▏" },
scrollbar = { "║" },
},
},
sources = cmp.config.sources({
{ name = "cmdline", group_index = 1 },
-- { name = "cmdline_history", group_index = 2 },
}),
enabled = function()
return true
end,
})```
is the config im using
normal mode -> native completion ig
This fixes my #38 . I don't know if it's the right fix, but it works.
I've fixed this problem with another commit that including this approach. Thank you!
This fixes the regexes to only match at the beginning of the file before all the completions which included any of the regexes (e.g.
to
) didn't work