1
0

Custom syntax highlighting

For c and quickfix
Function to format the quickfix and location jump lists
Fixed issue with "help" window layouts accessing incorrect variable
This commit is contained in:
2025-09-25 00:04:21 +01:00
parent ce611a0e14
commit da251e7223
3 changed files with 136 additions and 7 deletions

View File

@@ -0,0 +1,28 @@
syn clear
" I have completely overriden the formatting for the quickfix and location list buffers so this
" has to be changed to give proper highlighting of the new format
"
syn match qfSignError "\[!\]" contained
syn match qfSignWarn "\[#\]" contained
syn match qfSignSearch "\[\~\]" contained
syn match qfFileName "^[^:]*" contains=@qfSign nextgroup=qfSeparator1
syn match qfSeparator1 ":" contained nextgroup=qfLineNr
syn match qfLineNr "[^:|]*" contained nextgroup=qfSeparator2,qfSeparator3
syn match qfSeparator2 ":" contained nextgroup=qfColumnNr
syn match qfColumnNr "[^|]*" contained
syn match qfSeparator3 "|" contained
syn cluster qfSign contains=qfSignError,qfSignWarn,qfSignSearch
hi clear qfFileName
hi clear qfLineNr
hi def link qfSignError DiagnosticSignError
hi def link qfSignWarn DiagnosticSignWarn
hi def link qfSignSearch LineNr
hi def link qfFileName Function
hi def link qfLineNr Number
hi def link qfColumnNr Number
let b:current_syntax = "qf"