live-command.nvim icon indicating copy to clipboard operation
live-command.nvim copied to clipboard

Major improvements

Open smjonas opened this issue 2 years ago • 4 comments

This PR aims to significantly improve the command preview functionality by addressing highlighting and responsiveness issues present in the current implementation. Previously, vim.cmd was called from the preview callback to execute the command in the current Nvim instance due to the command being run from command mode.

To resolve these issues, the new approach implemented in this PR is to spawn a separate Neovim instance to execute the commands, making the command execution completely independent from the current instance. Of course, this may have some performance implications since a new Nvim instance has to be created in the setup function. Thus, I am looking for feedback on your experience and any issues you may encounter. But generally, the new implementation seems to work a lot better.

You can try out this feature by using the remote branch. I am pinging any of the users involved in the related issues, and would ask you to leave feedback if you are interested: @Mateiadrielrafael, @gregorias, @nfrid, @emmanueltouzery, @sibouras, @AckslD

Closes #6, closes #16, closes #24. closes #28.

TODO:

  • [x] fix issue where changes to the pipe directory are sometimes not detected when using mulitple Neovim instances
  • [x] log Libuv errors
  • [x] sync marks

smjonas avatar Apr 16 '23 09:04 smjonas

I'll check it out!

prescientmoon avatar Apr 16 '23 10:04 prescientmoon

This PR breaks the live preview for Subvert. When I run LSubvert on this branch, I do not get any live preview. I do get live-preview on the current main branch.

I do not see any crashes though, so that's OK.

gregorias avatar Apr 17 '23 06:04 gregorias

This PR breaks the live preview for Subvert. When I run LSubvert on this branch, I do not get any live preview. I do get live-preview on the current main branch.

Thanks for your feedback. I fixed an issue in the implementation and I hope the :LSubvert command is working for you now too: image

smjonas avatar Apr 17 '23 09:04 smjonas

Hi @smjonas ! This branch seems to work very well, although my lualine still flickers at times with cmdheight=0.

prescientmoon avatar Dec 18 '23 14:12 prescientmoon