Vonr / align.nvim

A minimal plugin for NeoVim for aligning lines
GNU General Public License v3.0
150 stars 4 forks source link

Use command-preview in nightly #2

Open ObserverOfTime opened 2 years ago

ObserverOfTime commented 2 years ago

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

Vonr commented 2 years ago

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.

ObserverOfTime commented 2 years ago

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

Vonr commented 2 years ago

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.

ObserverOfTime commented 2 years ago

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

Vonr commented 2 years ago

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