[vim/vim] runtime/syntax/qf.vim: qfType contained in qfLineNr instead of qfText (Issue #21162)

5 views
Skip to first unread message

bactoeto

unread,
Aug 27, 2026, 9:19:10 AM (4 days ago) Aug 27
to vim/vim, Subscribed
bactoeto created an issue (vim/vim#21162)

Steps to reproduce

please check $VIMRUNTIM/syntax/qf.vim

The built-in quickfix syntax defines qfError/qfWarning/qfNote through
the qfType cluster:

syn cluster qfType contains=qfError,qfWarning,qfNote,qfInfo

but the cluster is only contained by qfLineNr:

syn match qfLineNr "[^|]*" contained nextgroup=qfSeparator2 contains=@qfType

The default quickfix display format is:

filename|line|text

so compiler messages are displayed in qfText, not qfLineNr.

For example:

main.c|42 col 5|error: undeclared identifier

"error" is part of qfText, therefore qfError never matches.

qfType should be contained by qfText:

syn match qfText ".*" contained contains=@qfType

so qfError/qfWarning/qfNote work for normal compiler output.

Expected behaviour

qfType should be contained by qfText:

syn match qfText ".*" contained contains=@qfType

so qfError/qfWarning/qfNote work for normal compiler output.

Version of Vim

VIM - Vi IMproved 9.1 (2024 Jan 02, compiled May 23 2025 00:48:59) Included patches: 1-948, 950-1230, 1242, 1244

Environment

OS: debian 13 x86_64
Terminal: Alacritty

Logs and stack traces


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21162@github.com>

dkearns

unread,
Aug 27, 2026, 10:00:52 AM (4 days ago) Aug 27
to vim/vim, Subscribed
dkearns left a comment (vim/vim#21162)

The default output format is, in full, filename|line-range col col-range error-type error-nr| message.

qfType is not intended to match any "error" string in the compiler message field but strictly one of the supported error types, matched by the 'efm' %t specifier and displayed in the error-type field.

Note: Multiline prefix specifiers %E, %W etc also generate an error type.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21162/5440225801@github.com>

bactoeto

unread,
Aug 27, 2026, 10:41:16 AM (4 days ago) Aug 27
to vim/vim, Subscribed
bactoeto left a comment (vim/vim#21162)

Thank you for the explanation! I understand now that qfType is intended to match the %t field.

I found that my issue was caused by using an errorformat without %t, for example:

%f:%l:%c:%m
%f:%l:%m

In that case, GCC diagnostics such as "error:" and "warning:" remain in the message field, so qfError/qfWarning cannot match them.

After loading the built-in GCC compiler definition with:

:compiler gcc

the errorformat uses rules such as:

%f:%l:%c: %trror: %m
%f:%l:%c: %tarning: %m

and qfType works as intended.

Sorry for the confusion. This was caused by my Vim setup not loading the GCC compiler definition.


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/21162/5440750647@github.com>

Reply all
Reply to author
Forward
0 new messages