Replies: 2 comments 4 replies
-
|
Ok so I just figured out that the best way to do it would be via the MiniFiles.synchronize function. Basically apply the willmethods in the They we apply the didmethods in the unexposed H.fs_actions_apply function after If you are ok with supporting lsp file actions natively in mini.files, Can I raise a PR to do so? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for sharing! This is originally discussed in #400 and another PR in #1586.
It was discussed in #1586. General idea is that it is still planned to be built into 'mini.files', but the priority is low-ish at the moment.
The main concern here is described here. The problem is that 'mini.files' can not reasonably guarantee that the actions will actually happen. Thus there needs to be a research about the case " It is the main blocker here as this requires dealing with several LSP servers while the coverage of how they implement these methods is limited. The best way for you to help is to share which LSP server(s) did you use to test this code and maybe try to investigate the described problem with them. The 'mini.files' code itself I'd rather do myself. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @echasnovski! Sorry for the ping again. I just realized mini.files does not have support for willdeletefiles, willcreatefiles and willrenamefiles requests for lsp. I just implemented this small snippet to make this happen. The issue I am facing here is that before calling didmethods, willmethods should be called and that too before the changes are made, and I needed a way to get the changes done by mini.files before they are done and once they are confirmed. I just tried looking at the autocommands and non of them seem to help. So Is there any way to expose an autocommand which will give all the changes data after the confirmation prompt is confirmed. That should help me implement the functionality perfectly. Also this does not yet support copy and move functionalities which I will add them later.
Beta Was this translation helpful? Give feedback.
All reactions