Make change timeout configurable, don't run typecheck if not needed #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is for #17. It looks like there was already some intent expressed
in the code to not run the after change hook if
dhall-use-header-line
was disabled, but it wasn't enacted when thehook showed up. At first I thought I might just not register the hook
if
dhall-use-header-line
was disabled, but that would createconfusing behavior if the user live-configured their emacs to enable
that. So the hook will always fire but it will be a no-op if the type
won't be used.
Also for good measure I moved the timeout into an option so folks who
are having performance problems but don't want to completely abandon
buffer type can make a tradeoff in feedback cycle time for
responsiveness.
The motivation behind this is that on moderately large files, running
the type check every second makes any modification to the buffer
completely lock up. I'm happy to turn off the buffer type feature keep
the rest of the functionality like auto-reformatting and syntax
highlighting.