Closed blueyed closed 8 years ago
What do you mean by overwriting? (1) Use the same sign ID or (2) display a sign where syntastic displays one?
Are the signs created by syntastic identifiable somehow by inspecting getloclist(0)?
There is no way not give loclists created by syntastic a special treatment -- unless syntastic added a special marker. Anyway, I think the proper way would be to disable signs in syntastic when qfs is installed.
The output from getloclist(0)
looks like this:
[{'lnum': 59, 'bufnr': 3, 'col': 80, 'valid': 1, 'vcol': 0, 'nr': 0, 'type': 'E', 'pattern': '', 'text': 'line too long (152 > 79 characters) [E501]'}]
My use case here is that Syntastic adds a S>
sign (for a style issue), while it's being considered as an error by qfs.
(Regarding syntastic, it should probably handle style issues as a warning to begin with, but that's something different)
FWIW, w:quickfix_title
will be set to something like :SyntasticCheck flake8 (python)
for the location list window.
This won't help. I guess the best option is to temporarily set b:noquickfixsigns per relevant buffer when using syntastic.
But b:noquickfixsigns
would disable quickfixsigns altogether..
I am using Syntastic and quickfixsigns together almost everywhere.
After commit af52a0b, you should be able to set g:quickfixsign_protect_sign_rx to a regexp matching sign names that should not be overwritten. I cannot guarantee that this doesn't have any side effects I'm not currently aware of. Please let me know if this works as intended and if there are any problems with it.
Thanks!
It works with Neomake and g:quickfixsign_protect_sign_rx = '^neomake_'
.
Why is there a mixture of g:quickfixsign_*
and g:quickfixsigns_*
settings btw?
Here is what I have in my .vimrc for this test. Only QFS and syntastic are enabled.
source ~/.vim_inc2
filetype plugin indent on " enable detection, plugins and indenting in one step
syntax on
set nocompatible
set termencoding=utf-8
set encoding=utf-8
set updatetime=500
let g:quickfixsign_protect_sign_rx = 'SyntasticError|SyntasticWarning|SyntasticStyleError|SyntasticStyleWarning'
"let g:syntastic_auto_jump=1
"let g:syntastic_auto_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 1
let g:syntastic_error_symbol = "┃"
let g:syntastic_warning_symbol = "┃"
let syntastic_style_error_symbol = "┃"
let syntastic_style_warning_symbol = "┃"
let g:syntastic_enable_perl_checker=1
let g:syntastic_perl_checkers = ['perl', 'perlcritic']
If I uncomment lines for g:syntastic_auto_loc_list
or g:syntastic_auto_jump
and move the cursor just one line, my custom signs get overwritten by QFS. That is, instead of the bar I get >E
. I set updatetime
to 500 to make this visible directly (default is 4000). With those 2 lines uncommented it works as expected as long as I do not call :Errors
. If I do that and move again I have the same effect. I can work around this by just doing :w
but I do not know why.
quickfixsigns appears to overwrite the icon/symbol for all signs, although they might have one already (e.g. via Syntastic).
Syntastic uses different symbols for (style) warning/errors, and all of the appear to become "W>" through quickfixsigns.
Is it possible to detect if a symbol is already used/defined?
Removing
loc
fromquickfixsigns_classes
helps here, but the location list could be used in other contexts (let g:quickfixsigns_classes=['qfl', 'marks', 'vcsdiff', 'breakpoints']
).