-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Cursor is left in the command line while compiling #38
Comments
This was traditionally a shortcoming of just how vim plugins work. There was no facility for running tasks in the background, so everything was synchronous. That's all changed in the last year or so, but to my shame I haven't taken the time to make any contributions to this plugin to bring it up to the state of the art. I use a plugin called I have some configuration in my dotfiles (which I'll provide the relevant snippet from shortly) that uses the guts of this script via neomake to achieve what I think you're after: compilation in the background, and population of the loc-list with any warnings/errors. |
There are a few ways to set this up but the bottom line is you need the Then you'll want to have something like the following in your function! s:flycheck_postprocess(entry)
if a:entry.text =~ 'Warning: '
let a:entry.type = 'W'
let a:entry.text = substitute(a:entry.text, 'Warning: ', '', "g")
else
let a:entry.type = 'E'
endif
endfunction
let g:neomake_erlang_flycheck_maker = {
\ 'exe': '/YOUR/PATH/TO/vim-erlang-compiler/compiler/erlang_check.erl',
\ 'args': ['--nooutdir'],
\ 'errorformat': '%f:%l: %m,%f: %m',
\ 'postprocess': function('s:flycheck_postprocess')
\ } With this all in place, you should be able to run LMK how it works out, and I'll help where I can. I'm normally in #vim-erlang on freenode so if IRC is your thing feel free to ask in there and I will answer when I can. Otherwise, feel free to reply here and we'll get you up and running. Cheers! |
Thanks. If I've gotta do that, I might just go back to my syntastic + syntaxerl setup that I had until recently. Though using erlang_check might be better than syntaxerl. I'll have a play with it. |
...and because compiling takes a while, it prevents me from navigating around in my source file for a fraction of a second after I save, and leaves unsightly escape codes sitting there.
The text was updated successfully, but these errors were encountered: