hrsh7th / cmp-cmdline

nvim-cmp source for vim's cmdline
MIT License
493 stars 42 forks source link

Handle completion of % and # completion correctly. #83

Open iteratee opened 1 year ago

iteratee commented 1 year ago

The current behavior if you try to complete :e %:p:h or something similar replaces only the h with the path, which isn't the desired behavior, because then nvim tries to open the wrong filename. Detect this case and produce edits that will replace the entire % chain with modifiers.

iteratee commented 1 year ago

My solution may not be ideal. I would be happy to re-write it given some pointers. I'm new to lua and vim plugins.

aldevv commented 1 year ago

any plans on merging this? this problem is been a pain for a while @hrsh7th

fent commented 10 months ago

please :(

iteratee commented 6 months ago

I'll try and rebase my current solution and push it up.

0e4ef622 commented 4 months ago

I am installing from this PR using the commit hash, but it would be nice to have this merged.

FoamScience commented 2 months ago

In visual mode, completion doesn't keep track of typed chars, so generates wierdy items. Fixed and rebased in iteratee/cmp-cmdline#1 in case that takes some time to get merged, you can install from that PR instead