Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major improvements #29

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Major improvements #29

wants to merge 2 commits into from

Conversation

smjonas
Copy link
Owner

@smjonas smjonas commented Apr 16, 2023

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:

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

@prescientmoon
Copy link

I'll check it out!

@gregorias
Copy link

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.

@smjonas smjonas force-pushed the remote branch 2 times, most recently from 37606be to db3294e Compare April 17, 2023 09:10
@smjonas
Copy link
Owner Author

smjonas commented Apr 17, 2023

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 smjonas force-pushed the remote branch 7 times, most recently from cc37d38 to 85f7d8b Compare April 20, 2023 12:55
@smjonas smjonas marked this pull request as ready for review April 20, 2023 12:56
@smjonas smjonas force-pushed the remote branch 2 times, most recently from 29a0244 to c0592db Compare April 28, 2023 16:37
@smjonas smjonas marked this pull request as draft April 28, 2023 16:40
@smjonas smjonas force-pushed the remote branch 4 times, most recently from e34f8f5 to d55ad8b Compare May 1, 2023 17:44
@prescientmoon
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants