Can I keep syntastic from opening the Location List?
Asked Answered
L

2

8

I work in a lot of legacy files that are huge and previous devs didn't always follow proper styles, so syntastic gives me a ton of linting errors that I don't care about right now. I put syntastc into passive mode and manually check the file then close the location list, which works great. But, after I've manually checked it, every time I :w, the location list opens back up and shows the previous errors. I can't figure out a way to keep this from happening. Any suggestions?

Lovash answered 6/10, 2016 at 13:57 Comment(5)
Syntastic is not a mind reader. For this reason, you're supposed to run :SyntasticReset to let it know you want it to shut up, rather than just close the error window.Boyceboycey
thanks, I hadn't heard of the function. I guess I'll have to run that after checking so everything stays closed until I want it.Lovash
@lcd047: why would it open the location list in passive mode?Briolette
@eugeney Because BufEnter triggers a notification refresh, so that the error window gets updated when you switch buffers..Boyceboycey
@Boyceboycey That's good to know, thanks for clearing that up.Lovash
B
0

Do you have the syntastic_mode_map option set in your .vimrc? This may influence how Syntastic does automatic checking:

In passive mode, automatic checks are still done for filetypes in the "active_filetypes" array (and "passive_filetypes" is ignored). In active mode, automatic checks are not done for any filetypes in the "passive_filetypes" array ("active_filetypes" is ignored).

Briolette answered 6/10, 2016 at 14:21 Comment(1)
Yeah, I have the mode map set to passive in my vimrc, which turned off the auto checking for me. But the location list opens every time I save or move into that buffer from another buffer, such as a split.Lovash
M
11

One can prevent the location list from opening using syntastic_auto_loc_list=0. A pretty unobtrusive setup is:

let g:syntastic_always_populate_loc_list = 1
let g:syntastic_auto_loc_list = 0
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_auto_jump = 0

Combined with highlighting to see the errors better:

hi SpellBad term=reverse ctermbg=darkgreen
Marrin answered 25/1, 2017 at 13:35 Comment(0)
B
0

Do you have the syntastic_mode_map option set in your .vimrc? This may influence how Syntastic does automatic checking:

In passive mode, automatic checks are still done for filetypes in the "active_filetypes" array (and "passive_filetypes" is ignored). In active mode, automatic checks are not done for any filetypes in the "passive_filetypes" array ("active_filetypes" is ignored).

Briolette answered 6/10, 2016 at 14:21 Comment(1)
Yeah, I have the mode map set to passive in my vimrc, which turned off the auto checking for me. But the location list opens every time I save or move into that buffer from another buffer, such as a split.Lovash

© 2022 - 2024 — McMap. All rights reserved.