You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I would like to request an asynchronous version of the execute_command function. Currently, it runs synchronously, which can block Neovim’s IO when executing long-running commands. One instance of this issue is in lua/neo-tree/git/status.lua within the M.status function. In this function, the following command is executed:
For large repositories, the git ls-files command can take a significant amount of time, thereby blocking the UI and affecting overall performance.
Running commands asynchronously would help keep the Neovim UI responsive, even when dealing with large repositories or slow-running git commands. This issue is particularly evident in my setup where I use baredot to manage my dotfiles, with the git root set to the home directory. In such cases, operations that run across many files in the home directory can lead to noticeable delays and a degraded user experience.
Describe the solution you'd like.
A possible solution is to refactor execute_command (or create a new async variant) to use asynchronous job control (e.g., via vim.loop or another suitable async library) to run external commands without blocking the main event loop. This change would involve:
Refactoring the current synchronous implementation.
Ensuring that the async version properly collects and returns the output.
Optionally providing a callback or promise-based API to integrate smoothly with existing code.
Describe alternatives you've considered.
No response
Additional Context
I believe that this improvement would not only help in the specific context of Git operations but also enhance the overall performance of neo-tree.nvim when dealing with external commands. Given the rising importance of async programming in Neovim plugin development, this change would be a forward-compatible improvement.
The text was updated successfully, but these errors were encountered:
Did you check the docs?
Is your feature request related to a problem? Please describe.
I would like to request an asynchronous version of the execute_command function. Currently, it runs synchronously, which can block Neovim’s IO when executing long-running commands. One instance of this issue is in lua/neo-tree/git/status.lua within the M.status function. In this function, the following command is executed:
For large repositories, the git ls-files command can take a significant amount of time, thereby blocking the UI and affecting overall performance.
Running commands asynchronously would help keep the Neovim UI responsive, even when dealing with large repositories or slow-running git commands. This issue is particularly evident in my setup where I use baredot to manage my dotfiles, with the git root set to the home directory. In such cases, operations that run across many files in the home directory can lead to noticeable delays and a degraded user experience.
Describe the solution you'd like.
A possible solution is to refactor execute_command (or create a new async variant) to use asynchronous job control (e.g., via vim.loop or another suitable async library) to run external commands without blocking the main event loop. This change would involve:
Describe alternatives you've considered.
No response
Additional Context
I believe that this improvement would not only help in the specific context of Git operations but also enhance the overall performance of neo-tree.nvim when dealing with external commands. Given the rising importance of async programming in Neovim plugin development, this change would be a forward-compatible improvement.
The text was updated successfully, but these errors were encountered: