OLD | NEW |
1 " Copyright 2014 The Chromium Authors. All rights reserved. | 1 " Copyright 2014 The Chromium Authors. All rights reserved. |
2 " Use of this source code is governed by a BSD-style license that can be | 2 " Use of this source code is governed by a BSD-style license that can be |
3 " found in the LICENSE file. | 3 " found in the LICENSE file. |
4 " | 4 " |
5 " gn.vim: Vim syntax file for GN. | 5 " gn.vim: Vim syntax file for GN. |
6 " | 6 " |
7 " Quit when a (custom) syntax file was already loaded | 7 " Quit when a (custom) syntax file was already loaded |
8 "if exists("b:current_syntax") | 8 "if exists("b:current_syntax") |
9 "finish | 9 "finish |
10 "endif | 10 "endif |
(...skipping 26 matching lines...) Expand all Loading... |
37 syn keyword gnFunctions set_default_toolchain set_defaults | 37 syn keyword gnFunctions set_default_toolchain set_defaults |
38 syn keyword gnFunctions set_sources_assignment_filter template tool | 38 syn keyword gnFunctions set_sources_assignment_filter template tool |
39 syn keyword gnFunctions toolchain toolchain_args write_file | 39 syn keyword gnFunctions toolchain toolchain_args write_file |
40 hi def link gnFunctions Macro | 40 hi def link gnFunctions Macro |
41 | 41 |
42 " Variables | 42 " Variables |
43 syn keyword gnVariable all_dependent_configs allow_circular_includes_from | 43 syn keyword gnVariable all_dependent_configs allow_circular_includes_from |
44 syn keyword gnVariable args asmflags cflags cflags_c cflags_cc cflags_objc | 44 syn keyword gnVariable args asmflags cflags cflags_c cflags_cc cflags_objc |
45 syn keyword gnVariable cflags_objcc check_includes complete_static_lib | 45 syn keyword gnVariable cflags_objcc check_includes complete_static_lib |
46 syn keyword gnVariable configs data data_deps defines depfile deps | 46 syn keyword gnVariable configs data data_deps defines depfile deps |
47 syn keyword gnVariable forward_dependent_configs_from include_dirs inputs | 47 syn keyword gnVariable include_dirs inputs ldflags lib_dirs libs |
48 syn keyword gnVariable ldflags lib_dirs libs output_extension output_name | 48 syn keyword gnVariable output_extension output_name outputs public |
49 syn keyword gnVariable outputs public public_configs public_deps script | 49 syn keyword gnVariable public_configs public_deps scripte sources testonly |
50 syn keyword gnVariable sources testonly visibility | 50 syn keyword gnVariable visibility |
51 hi def link gnVariable Keyword | 51 hi def link gnVariable Keyword |
52 | 52 |
53 " Strings | 53 " Strings |
54 syn region gnString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spe
ll | 54 syn region gnString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=@Spe
ll |
55 hi def link gnString String | 55 hi def link gnString String |
56 | 56 |
57 " Comments | 57 " Comments |
58 syn keyword gnTodo contained TODO FIXME XXX BUG NOTE | 58 syn keyword gnTodo contained TODO FIXME XXX BUG NOTE |
59 syn cluster gnCommentGroup contains=gnTodo | 59 syn cluster gnCommentGroup contains=gnTodo |
60 syn region gnComment start="#" end="$" contains=@gnCommentGroup,@
Spell | 60 syn region gnComment start="#" end="$" contains=@gnCommentGroup,@
Spell |
(...skipping 11 matching lines...) Expand all Loading... |
72 "syn match gnOperator /-=/ | 72 "syn match gnOperator /-=/ |
73 "syn match gnOperator /\s>\s/ | 73 "syn match gnOperator /\s>\s/ |
74 "syn match gnOperator /\s<\s/ | 74 "syn match gnOperator /\s<\s/ |
75 "syn match gnOperator /\s+\s/ | 75 "syn match gnOperator /\s+\s/ |
76 "syn match gnOperator /\s-\s/ | 76 "syn match gnOperator /\s-\s/ |
77 "hi def link gnOperator Operator | 77 "hi def link gnOperator Operator |
78 | 78 |
79 syn sync minlines=500 | 79 syn sync minlines=500 |
80 | 80 |
81 let b:current_syntax = "gn" | 81 let b:current_syntax = "gn" |
OLD | NEW |