Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make change timeout configurable, don't run typecheck if not needed
This is for psibi#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 the hook showed up. At first I thought I might just not register the hook if `dhall-use-header-line` was disabled, but that would create confusing 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.
- Loading branch information