Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add async versions of GhcModInfoPreview && GhcModInfo #104

Open
adam-singer opened this issue Oct 10, 2016 · 1 comment
Open

Add async versions of GhcModInfoPreview && GhcModInfo #104

adam-singer opened this issue Oct 10, 2016 · 1 comment

Comments

@adam-singer
Copy link

Would be nice to have async versions of GhcModInfoPreview and GhcModInfo. I'm looking to wire up

set updatetime=1000
autocmd CursorHold *.hs GhcModInfoPreview
autocmd CursorHoldI *.hs GhcModInfoPreview

but the calls tend to have a higher lag time then expected.

@BlackCapCoder
Copy link

I ended up doing this, which is better but not perfect:

let moved = 0
autocmd FileType haskell autocmd CursorMoved *
  \ exec "GhcModTypeClear" |
  \ let moved = 1

autocmd FileType haskell autocmd CursorHold *
  \ if moved == 1 |
  \   exec "GhcModType" |
  \   let moved = 0 |
  \ endif

set updatetime=500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants