minecraft-creator-tools icon indicating copy to clipboard operation
minecraft-creator-tools copied to clipboard

Feature: events for create / update / delete of files

Open DaanV2 opened this issue 9 months ago • 2 comments

Thinking of how this can be turned into an LSP for IDE like vscode, or just general tools.

It would be great if there was a watch mode like most testframeworks / typescript compilers have 🤔

(you add --watch to the cli).

I have been thinking on how this tool could serve as the basis (or library) for such a tool / LSP for IDE.

But it would require a feature to be put in, that I know from the blockception vscode extension:

  • The dataset can deal with the creation, update, or deletion of a file, and those events can also trigger new diagnostic changes or updates.

So my request is that you add / change / refactor the codebase to allow for such events, (create, update or delete of files).

  • This usually requires tracking or mapping of URI to identifiers. And even possibly tracking who references who

DaanV2 avatar Mar 04 '25 13:03 DaanV2

Let me know more detail on how you are thinking of using this, but I could maybe add some filesystemwatcher behaviors/events and have MCTools get smarter about auto-reloading files if they are touched. That would make mctools better - especially when editing local files, but would that be useful for your scenario?

mammerla avatar Mar 19 '25 16:03 mammerla

intheory yes, all LSP for IDE like vscode are driven on events like:

onSave onClose onDelete onCreate

so having that baseline supported in this would allow at least for creating an LSP. since all it really does is query a dataset and apply new changes :)

If you want I can show demo some of the internal workings of the blockceptions vscode and LSP's

DaanV2 avatar Mar 19 '25 19:03 DaanV2