Closed noscript closed 10 years ago
I think I'm missing something. I tried to debug s:QflSign(item)
, it always returns 'QFS_QFL'. This is content of a:item
:
{'lnum': 30, 'bufnr': 1, 'col': 6, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ' warning: unused variable ‘a’ [-Wunused-variable]'} {'lnum': 34, 'bufnr': 1, 'col': 3, 'valid': 1, 'vcol': 0, 'nr': -1, 'type': '', 'pattern': '', 'text': ' error: ‘msg1’ was not declared in this scope'}
Shouldn't 'type' contains 'W' and 'E'?
Yes. I guess the &errorformat in use doesn't detect whether it's an error or a warning. If this info is important to you, you should change the &efm used. Which compiler? do you use?
I use gcc, errorformat is default.
I was debugging s:ListSign()
from ec55910, at the line get(g:quickfixsign_type_rx, ft, [])
the function get()
always returns an empty dictionary. I checked vim docs, looks like get()
doesn't support regexps for {key}
parameter, which is '*'
as coming from g:quickfixsign_type_rx
.
For example if I explicitly set
let g:quickfixsign_type_rx = {'cpp': [['E', '\c\<error\>'], ['W', '\c\<warning\>']]}
then it works. Sort of good news :)
Is it possible? Right now both type of entries in quickfix share the same sign.
P.S. vim-cuteErrorMarker plugin can do it