comparison runtime/syntax/meson.vim @ 24636:840665e74421

Update runtime files Commit: https://github.com/vim/vim/commit/3ec3217f0491e9ba8aa8ea02f7e454cd19a287ef Author: Bram Moolenaar <Bram@vim.org> Date: Sun May 16 12:39:47 2021 +0200 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Sun, 16 May 2021 12:45:04 +0200
parents 6d11fc4aa683
children babd9f1dbe12
comparison
equal deleted inserted replaced
24635:d3bbbedec49b 24636:840665e74421
1 " Vim syntax file 1 " Vim syntax file
2 " Language: Meson 2 " Language: Meson
3 " License: VIM License 3 " License: VIM License
4 " Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com> 4 " Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
5 " Liam Beguin <liambeguin@gmail.com>
5 " Last Change: 2019 Oct 18 6 " Last Change: 2019 Oct 18
6 " Credits: Zvezdan Petkovic <zpetkovic@acm.org> 7 " Credits: Zvezdan Petkovic <zpetkovic@acm.org>
7 " Neil Schemenauer <nas@meson.ca> 8 " Neil Schemenauer <nas@meson.ca>
8 " Dmitry Vasiliev 9 " Dmitry Vasiliev
9 " 10 "
15 " Optional highlighting can be controlled using these variables. 16 " Optional highlighting can be controlled using these variables.
16 " 17 "
17 " let meson_space_error_highlight = 1 18 " let meson_space_error_highlight = 1
18 " 19 "
19 20
20 " For version 5.x: Clear all syntax items. 21 if exists("b:current_syntax")
21 " For version 6.x: Quit when a syntax file was already loaded.
22 if version < 600
23 syntax clear
24 elseif exists("b:current_syntax")
25 finish 22 finish
26 endif 23 endif
27 24
28 " We need nocompatible mode in order to continue lines with backslashes. 25 " We need nocompatible mode in order to continue lines with backslashes.
29 " Original setting will be restored. 26 " Original setting will be restored.
30 let s:cpo_save = &cpo 27 let s:cpo_save = &cpo
31 set cpo&vim 28 set cpo&vim
32 29
33 " http://mesonbuild.com/Syntax.html 30 " http://mesonbuild.com/Syntax.html
34 syn keyword mesonConditional elif else if endif 31 syn keyword mesonConditional elif else if endif
35 syn keyword mesonRepeat foreach endforeach 32 syn keyword mesonRepeat foreach endforeach
36 syn keyword mesonOperator and not or 33 syn keyword mesonOperator and not or in
34 syn keyword mesonStatement continue break
37 35
38 syn match mesonComment "#.*$" contains=mesonTodo,@Spell 36 syn match mesonComment "#.*$" contains=mesonTodo,@Spell
39 syn keyword mesonTodo FIXME NOTE NOTES TODO XXX contained 37 syn keyword mesonTodo FIXME NOTE NOTES TODO XXX contained
40 38
41 " Strings can either be single quoted or triple counted across multiple lines, 39 " Strings can either be single quoted or triple counted across multiple lines,
115 \ shared_module 113 \ shared_module
116 \ static_library 114 \ static_library
117 \ subdir 115 \ subdir
118 \ subdir_done 116 \ subdir_done
119 \ subproject 117 \ subproject
118 \ summary
120 \ target_machine 119 \ target_machine
121 \ test 120 \ test
122 \ vcs_tag 121 \ vcs_tag
123 \ warning 122 \ warning
123 \ range
124 124
125 if exists("meson_space_error_highlight") 125 if exists("meson_space_error_highlight")
126 " trailing whitespace 126 " trailing whitespace
127 syn match mesonSpaceError display excludenl "\s\+$" 127 syn match mesonSpaceError display excludenl "\s\+$"
128 " mixed tabs and spaces 128 " mixed tabs and spaces
129 syn match mesonSpaceError display " \+\t" 129 syn match mesonSpaceError display " \+\t"
130 syn match mesonSpaceError display "\t\+ " 130 syn match mesonSpaceError display "\t\+ "
131 endif 131 endif
132 132
133 if version >= 508 || !exists("did_meson_syn_inits") 133 " The default highlight links. Can be overridden later.
134 if version <= 508 134 hi def link mesonStatement Statement
135 let did_meson_syn_inits = 1 135 hi def link mesonConditional Conditional
136 command -nargs=+ HiLink hi link <args> 136 hi def link mesonRepeat Repeat
137 else 137 hi def link mesonOperator Operator
138 command -nargs=+ HiLink hi def link <args> 138 hi def link mesonComment Comment
139 endif 139 hi def link mesonTodo Todo
140 140 hi def link mesonString String
141 " The default highlight links. Can be overridden later. 141 hi def link mesonEscape Special
142 HiLink mesonStatement Statement 142 hi def link mesonNumber Number
143 HiLink mesonConditional Conditional 143 hi def link mesonBuiltin Function
144 HiLink mesonRepeat Repeat 144 hi def link mesonConstant Number
145 HiLink mesonOperator Operator 145 if exists("meson_space_error_higlight")
146 HiLink mesonComment Comment 146 hi def link mesonSpaceError Error
147 HiLink mesonTodo Todo
148 HiLink mesonString String
149 HiLink mesonEscape Special
150 HiLink mesonNumber Number
151 HiLink mesonBuiltin Function
152 HiLink mesonConstant Number
153 if exists("meson_space_error_highlight")
154 HiLink mesonSpaceError Error
155 endif
156
157 delcommand HiLink
158 endif 147 endif
159 148
160 let b:current_syntax = "meson" 149 let b:current_syntax = "meson"
161 150
162 let &cpo = s:cpo_save 151 let &cpo = s:cpo_save