-
Notifications
You must be signed in to change notification settings - Fork 13
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
Execute Cmd line transformer into a separate nvim instance #54
Comments
What are you trying to achieve? |
I would like to process / transform the results of a big data set in a separate instance of nvim such that the current is not blocked by this processing. I was considering something like rpcrequest to an --embed nvim instance, for example. This could be extended to the preview too, having the preview be computed in a separate child nvim instance, have that child instance server address / pipe to write to, and consume it by fzf As it is now, the pipe preview reads/writes is the server address of the main nvim editor instance from whrere fzf was started. That could block if the processing is timeconsuming |
I see where you are coming from, I think this would have to be a different helper function because using a different process will dramatically change the expectations for how shared and mutable state would work (and the reduced ergonomics). It would be a bit involved, using a headless nvim like we do to handle communication with the main process, but the headless nvim itself would have to complete the processing. The function would have to be provided as a string in an argument. Reading the source code of the |
FYI, this is how fzf-lua’s
and if |
I wasn't aware of |
@ibhagwan yes i am aware indeed, i have read through the source. Besides icon transforms, what else is the multi process used for, by the way ? Now that you have a lot of the shell escape functionality figured out in a more general way (being cross platform and all) would you consider contributing some of this effort eventually to this library ? Could be helpful for people wanting to build something small. |
It’s used for everything that requires processing in a separate process, mostly icons but also ctags processing as another example, the code can take any lua string (or string.dump) as its processor.
If you look at the contributors to this project I’ve done that in the past, I have over 20 contributions in this repo unfortunately I have no time for that anymore but that’s the beauty of open source, have it it :) |
Hello i would like to ask if / how would it be possible to feed the function transformer to be executed into a separate nvim instance, then fed into fzf, or if fzf allows to have a
transformer
argument similarly to thepreview
where we could pass in the action like we do for preview.Say we have the following example, in the cmd line transformer each line could be expensive, however having it transform in the main instance, could lead to blocking even before the fzf window is opened.
The text was updated successfully, but these errors were encountered: