Short answer: Not possible at the moment, but feasible, desirable, and could be done in a near future
“PT” in “PTFM” is Prompt-Toolkit, a well-known terminal UI in python (they even wrote pyvim with PT as a proof-of-concept). That said, the name can change :), I’m not happy with it.
At the moment the main internal tree is quite tied to the UI. I did thought a clean architecture with clear separation of concern, mainly for maintainability, but I took some shortcuts that blur the lines.
I plan a rework/cleanup of the internal architecture to be able to manipulate other trees than the file system (https://tree-sitter.github.io/tree-sitter/ comes to mind), I might end up with something where the UI itself is plugable.
On the other hand, the very point of PTFM is to develop the UI outside of the editor, I did try a long ago to implement the tree view in Kakoune, with an external server, it was a mess (Kudos for kaktree ).
With this design an editor integration is two-fold:
- adding a
ClientControler class like those that implement a handful of methods to communicate with the editor. (at the moment I took a lot of shortcuts here, but the implementing class will be chose in ptfm command line).
This solves another problem: the controler interacts with the editor and with the WM. In the future PTFM will use python dynamic class creation to cover the whole matrix.