Mercurial > vim
annotate runtime/syntax/zserio.vim @ 34359:0447bf3a88a5 v9.1.0110
patch 9.1.0110: filetype: add 'Config.in' filetype detection
Commit: https://github.com/vim/vim/commit/5f20f050efed3431beaf85739f0113e9ef0abd8e
Author: Brandon Maier <brandon.maier@collins.com>
Date: Wed Feb 14 22:30:06 2024 +0100
patch 9.1.0110: filetype: add 'Config.in' filetype detection
The 'Config.in' file type is for Buildroot configuration files.
Buildroot Config.in files use the same Kconfig backend as the Linux
kernel's Kconfig files.
Buildroot also has other filename variants that follow "Config.in.*",
they are used to distinguish multiple Config.in files in the same
directory.
See https://buildroot.org/downloads/manual/manual.html#_literal_config_in_literal_file
closes: #14038
Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 14 Feb 2024 22:45:02 +0100 |
parents | 0fdb758ceec2 |
children |
rev | line source |
---|---|
33114
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Vim syntax file |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 " Language: Zserio |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 " Maintainer: Dominique Pellé <dominique.pelle@gmail.com> |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 " Last Change: 2023 Jun 18 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 " |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 " Zserio is a serialization schema language for modeling binary |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 " data types, bitstreams or file formats. Based on the zserio |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 " language it is possible to automatically generate encoders and |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 " decoders for a given schema in various target languages |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 " (e.g. Java, C++, Python). |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 " |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 " Zserio is an evolution of the DataScript language. |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 " |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 " For more information, see: |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 " - http://zserio.org/ |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 " - https://github.com/ndsev/zserio |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 " quit when a syntax file was already loaded |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 if exists("b:current_syntax") |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 finish |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 endif |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 let s:keepcpo= &cpo |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 set cpo&vim |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 syn case match |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 syn keyword zserioPackage import package zserio_compatibility_version |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 syn keyword zserioType bit bool string |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 syn keyword zserioType int int8 int16 int32 int64 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 syn keyword zserioType uint8 uint16 uint32 uint64 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 syn keyword zserioType float16 float32 float64 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 syn keyword zserioType varint varint16 varint32 varint64 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 syn keyword zserioType varuint varsize varuint16 varuint32 varuint64 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 syn keyword zserioAlign align |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 syn keyword zserioLabel case default |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 syn keyword zserioConditional if condition |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 syn keyword zserioBoolean true false |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 syn keyword zserioCompound struct union choice on enum bitmask subtype |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 syn keyword zserioKeyword function return |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 syn keyword zserioOperator lengthof valueof instanceof numbits isset |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 syn keyword zserioRpc service pubsub topic publish subscribe |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 syn keyword zserioRule rule_group rule |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
44 syn keyword zserioStorageClass const implicit packed instantiate |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
45 syn keyword zserioTodo contained TODO FIXME XXX |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
46 syn keyword zserioSql sql sql_table sql_database sql_virtual sql_without_rowid |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
47 syn keyword zserioSql explicit using |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
48 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
49 " zserioCommentGroup allows adding matches for special things in comments. |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
50 syn cluster zserioCommentGroup contains=zserioTodo |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
51 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
52 syn match zserioOffset display "^\s*[a-zA-Z_:\.][a-zA-Z0-9_:\.]*\s*:" |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
53 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
54 syn match zserioNumber display "\<\d\+\>" |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
55 syn match zserioNumberHex display "\<0[xX]\x\+\>" |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
56 syn match zserioNumberBin display "\<[01]\+[bB]\>" contains=zserioBinaryB |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
57 syn match zserioBinaryB display contained "[bB]\>" |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
58 syn match zserioOctal display "\<0\o\+\>" contains=zserioOctalZero |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
59 syn match zserioOctalZero display contained "\<0" |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
60 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
61 syn match zserioOctalError display "\<0\o*[89]\d*\>" |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
62 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
63 syn match zserioCommentError display "\*/" |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
64 syn match zserioCommentStartError display "/\*"me=e-1 contained |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
65 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
66 syn region zserioCommentL |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
67 \ start="//" skip="\\$" end="$" keepend |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
68 \ contains=@zserioCommentGroup,@Spell |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
69 syn region zserioComment |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
70 \ matchgroup=zserioCommentStart start="/\*" end="\*/" |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
71 \ contains=@zserioCommentGroup,zserioCommentStartError,@Spell extend |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
72 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
73 syn region zserioString |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
74 \ start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
75 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
76 syn sync ccomment zserioComment |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
77 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
78 " Define the default highlighting. |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
79 hi def link zserioType Type |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
80 hi def link zserioEndian StorageClass |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
81 hi def link zserioStorageClass StorageClass |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
82 hi def link zserioAlign Label |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
83 hi def link zserioLabel Label |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
84 hi def link zserioOffset Label |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
85 hi def link zserioSql PreProc |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
86 hi def link zserioCompound Structure |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
87 hi def link zserioConditional Conditional |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
88 hi def link zserioBoolean Boolean |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
89 hi def link zserioKeyword Statement |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
90 hi def link zserioRpc Keyword |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
91 hi def link zserioRule Keyword |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
92 hi def link zserioString String |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
93 hi def link zserioNumber Number |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
94 hi def link zserioNumberBin Number |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
95 hi def link zserioBinaryB Special |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
96 hi def link zserioOctal Number |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
97 hi def link zserioOctalZero Special |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
98 hi def link zserioOctalError Error |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
99 hi def link zserioNumberHex Number |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
100 hi def link zserioTodo Todo |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
101 hi def link zserioOperator Operator |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
102 hi def link zserioPackage Include |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
103 hi def link zserioCommentError Error |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
104 hi def link zserioCommentStartError Error |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
105 hi def link zserioCommentStart zserioComment |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
106 hi def link zserioCommentL zserioComment |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
107 hi def link zserioComment Comment |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
108 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
109 let b:current_syntax = "zserio" |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
110 |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
111 let &cpo = s:keepcpo |
0fdb758ceec2
runtime(zserio): add zserio syntax (#13005)
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
112 unlet s:keepcpo |