]> git.rmz.io Git - dotfiles.git/blob - vim/syntax/qmake.vim
update weechat conf
[dotfiles.git] / vim / syntax / qmake.vim
1 " qmake project syntax file
2 " Language: qmake project
3 " Maintainer: Arto Jonsson <ajonsson@kapsi.fi>
4 " https://github.com/artoj/qmake-syntax-vim/
5
6 if exists("b:current_syntax")
7 finish
8 endif
9
10 syntax case match
11
12 " Comment
13 syn match qmakeComment "#.*"
14
15 " Variables
16 syn match qmakeVariable /[A-Z_]\+\s*=/he=e-1
17 syn match qmakeVariable /[A-Z_]\+\s*\(+\|-\||\|*\|\~\)=/he=e-2
18
19 " Value of a variable
20 syn match qmakeValue /$$[A-Z_]\+/
21 syn match qmakeValue /$${[A-Z_]\+}/
22
23 " Environment variable
24 syn match qmakeEnvVariable /$([A-Z_]\+)/
25 syn match qmakeEnvVariable /$$([A-Z_]\+)/
26
27 " Qt build configuration
28 syn match qmakeQtConfiguration /$$\[[A-Z_]\+\]/
29
30 " Builtins
31 " + contains
32 " + CONFIG
33 syn keyword qmakeBuiltin basename count dirname error exists
34 syn keyword qmakeBuiltin find for include infile isEmpty join member message
35 syn keyword qmakeBuiltin prompt quote sprintf system unique warning
36
37 " Scopes
38 syn match qmakeScope /[0-9A-Za-z_-]\+\(|\|:\)/he=e-1
39 syn match qmakeScope /[0-9A-Za-z_-]\+\s*{/he=e-1
40
41 hi def link qmakeComment Comment
42 hi def link qmakeVariable Identifier
43 hi def link qmakeBuiltin Function
44 hi def link qmakeValue PreProc
45 hi def link qmakeEnvVariable PreProc
46 hi def link qmakeQtConfiguration PreProc
47 hi def link qmakeScope Conditional
48
49 let b:current_syntax = "qmake"