align.nvim icon indicating copy to clipboard operation
align.nvim copied to clipboard

Use command-preview in nightly

Open ObserverOfTime opened this issue 2 years ago • 5 comments

Neovim nightly supports inccommand previews in user commands. See: https://neovim.io/doc/user/map.html#:command-preview

ObserverOfTime avatar Sep 16 '22 11:09 ObserverOfTime

Yeah it's what initially inspired me to add preview mode but unfortunately align.nvim doesnt use a command to run any functions, and instead uses a (poorly made) custom prompt, which is not usable with that feature as far as i know.

Vonr avatar Sep 16 '22 11:09 Vonr

Converting the functions to commands with arguments shouldn't be hard. Implementing the preview handler would probably be the harder part.

ObserverOfTime avatar Sep 16 '22 12:09 ObserverOfTime

I'll try to look into it but I have taken an internship and don't have nearly as much free time as I would like. For now, if anyone else is interested they can open a pull request to implement it, I'll be more likely to accept it if it doesn't break the current api, though thats unlikely without duplication.

Vonr avatar Sep 16 '22 12:09 Vonr

You can always merge it in another branch. I might try to implement it myself.

ObserverOfTime avatar Sep 16 '22 12:09 ObserverOfTime

Yep, that works too, might have to edit the master branch's README to direct people to the new one though.

Vonr avatar Sep 16 '22 12:09 Vonr