How to run ExternalAnnotator right after PsiFile is committed to disk?


I'm working on a Haskell plugin (ideah, the version in JetBrains is currently outdated) and discovered that ExternalAnnotator is run before the PsiFile is commited to disk. As I understand, from this background thread I cannot start a WriteAction to Commit underlying document.
As result, external compilation runs over outdated file versions.

Is there a way to schedule ExternalAnnotator runs right after the file is committed?

1 comment

No. You need to pass the current text of the file to your external process via the standard input or another similar solution.


Please sign in to leave a comment.