mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
vim-patch:f30eb4a: runtime(qf): Update syntax file, match second delimiter
Match both | separators and link to the Delimiter highlight group.
fixes vim/vim#16584
closes: vim/vim#16590
f30eb4a170
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
committed by
Christian Clason
parent
e6b84fab83
commit
ad8e0cfc1d
@@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: Quickfix window
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2023 Aug 10
|
||||
" Language: Quickfix window
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2025 Feb 07
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
@@ -9,11 +9,14 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" A bunch of useful C keywords
|
||||
syn match qfFileName "^[^|]*" nextgroup=qfSeparator
|
||||
syn match qfSeparator "|" nextgroup=qfLineNr contained
|
||||
syn match qfLineNr "[^|]*" contained contains=qfError
|
||||
syn match qfError "error" contained
|
||||
syn match qfFileName "^[^|]*" nextgroup=qfSeparator1
|
||||
syn match qfSeparator1 "|" contained nextgroup=qfLineNr
|
||||
syn match qfLineNr "[^|]*" contained nextgroup=qfSeparator2 contains=@qfType
|
||||
syn match qfSeparator2 "|" contained nextgroup=qfText
|
||||
syn match qfText ".*" contained
|
||||
|
||||
syn match qfError "error" contained
|
||||
syn cluster qfType contains=qfError
|
||||
|
||||
" Hide file name and line number for help outline (TOC).
|
||||
if has_key(w:, 'qf_toc') || get(w:, 'quickfix_title') =~# '\<TOC$'
|
||||
@@ -22,9 +25,13 @@ if has_key(w:, 'qf_toc') || get(w:, 'quickfix_title') =~# '\<TOC$'
|
||||
endif
|
||||
|
||||
" The default highlighting.
|
||||
hi def link qfFileName Directory
|
||||
hi def link qfLineNr LineNr
|
||||
hi def link qfError Error
|
||||
hi def link qfFileName Directory
|
||||
hi def link qfLineNr LineNr
|
||||
hi def link qfSeparator1 Delimiter
|
||||
hi def link qfSeparator2 Delimiter
|
||||
hi def link qfText Normal
|
||||
|
||||
hi def link qfError Error
|
||||
|
||||
let b:current_syntax = "qf"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user