raffazizzi / vscode-sxml

Scholarly XML. VSCode extension with features typically needed by academic encoding projects.
MIT License
29 stars 4 forks source link

Reload schemas that have changed on disk #10

Open jumpifnotzero opened 3 years ago

jumpifnotzero commented 3 years ago

Hi,

I found your plugin when looking for a RelaxNG validator. It appears to work great (thank you!), however I've noticed that it caches schemas/grammars indefinitely. This clearly works for well-defined schemas, however does not work when concurrently developing a RNG schema, forcing me to restart vscode to revalidate the XML.

The RNG schemas are in the same project and on disk. A solution that requires no further user action if preferred, e.g. adding the file's last-modified date to the cache preferred, but perhaps falling back to user-friven shortcut to flush the grammar cache could address this in a pinch.

Thanks!

raffazizzi commented 3 years ago

Thanks for your interest! Would you consider contributing a patch for this? I plan on making further improvements to this plugin in the near future (ie before June-ish because of a project that will make extensive use of the plugin).

angelozerr commented 1 year ago

@jumpifnotzero if you are interested, you could try vscode-xml (which can work without Java) because now we support RelaxNG https://github.com/redhat-developer/vscode-xml/blob/main/docs/Features/RelaxNGFeatures.md and it takes care of file modification like you need, see the following demo:

RelaxNGSupport