Sublime Forum

How can I trigger a binary to check for code validity every N seconds?



I am working on a custom interpreted programming language and would like to write an ST3 plugin that automatically triggers the language’s syntax checker – a natively compiled binary – after every ST3 editor keypress (or perhaps every N seconds) to check that the code is syntactically valid. I would then further like to display some indication of this validity (e.g. a tick versus a cross).

The syntax checker can be assumed to print ‘1’ when the code is valid and ‘0’ when invalid.

Can anyone help me with this?