Compare commits

..

3 Commits

Author SHA1 Message Date
Adam Stankiewicz
d15651463a Update 2019-11-15 17:27:14 +01:00
Adam Stankiewicz
0c79dd3e73 Update 2019-11-12 21:56:06 +01:00
Adam Stankiewicz
4e95df7c7e Update 2019-11-04 09:04:28 +01:00
42 changed files with 1790 additions and 510 deletions

View File

@@ -152,7 +152,7 @@ If you need full functionality of any plugin, please use it directly with your p
- [raml](https://github.com/IN3D/vim-raml) (syntax, ftplugin)
- [reason](https://github.com/reasonml-editor/vim-reason-plus) (syntax, indent)
- [rspec](https://github.com/sheerun/rspec.vim) (syntax)
- [rst](https://github.com/marshallward/vim-restructuredtext) (syntax, autoload, ftplugin)
- [rst](https://github.com/marshallward/vim-restructuredtext) (syntax, indent, autoload, ftplugin)
- [ruby](https://github.com/vim-ruby/vim-ruby) (syntax, indent, compiler, autoload, ftplugin)
- [rust](https://github.com/rust-lang/rust.vim) (syntax, indent, compiler, autoload, ftplugin)
- [sbt](https://github.com/derekwyatt/vim-sbt) (syntax)

View File

@@ -2,6 +2,11 @@ if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript')
" modified from html.vim
" For matchit plugin
if get(g:, 'vim_jsx_pretty_disable_tsx', 0)
finish
endif
if exists("loaded_matchit")
let b:match_ignorecase = 0
let b:match_words = '(:),\[:\],{:},<:>,' .

View File

@@ -21,7 +21,7 @@ if exists('s:did_indent')
endif
setlocal indentexpr=GetJsxIndent()
setlocal indentkeys=0{,0},0),0],0\,,!^F,o,O,e,*<Return>,<>>,<<>,/
setlocal indentkeys=0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/
function! GetJsxIndent()
return jsx_pretty#indent#get(function('GetJavascriptIndent'))

View File

@@ -9,6 +9,10 @@ if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript')
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if get(g:, 'vim_jsx_pretty_disable_tsx', 0)
finish
endif
if exists('b:did_indent')
let s:did_indent = b:did_indent
unlet b:did_indent
@@ -22,7 +26,7 @@ if exists('s:did_indent')
endif
setlocal indentexpr=GetJsxIndent()
setlocal indentkeys=0{,0},0),0],0\,,!^F,o,O,e,*<Return>,<>>,<<>,/
setlocal indentkeys=0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/
function! GetJsxIndent()
return jsx_pretty#indent#get(function('GetTypescriptIndent'))

View File

@@ -36,6 +36,19 @@ if exists('g:cpp_member_variable_highlight') && g:cpp_member_variable_highlight
hi def link cCustomMemVar Function
endif
" -----------------------------------------------------------------------------
" Highlight POSIX functions.
" -----------------------------------------------------------------------------
if exists('g:cpp_posix_standard') && g:cpp_posix_standard
syn keyword cPOSIXFunction socket accept bind connect getsockname
syn keyword cPOSIXFunction listen recv recvfrom recvmsg
syn keyword cPOSIXFunction send sendto sendmsg setsockopt socketpair
syn keyword cPOSIXFunction htonl htons ntohl ntohs
syn keyword cPOSIXFunction inet_ntop inet_pton getaddrinfo
syn keyword cPOSIXFunction poll select pselect
hi def link cPOSIXFunction Function
endif
" -----------------------------------------------------------------------------
" Source: aftersyntaxc.vim
" -----------------------------------------------------------------------------

View File

@@ -633,21 +633,19 @@ syntax keyword cppSTLios unitbuf
syntax keyword cppSTLios uppercase
"syntax keyword cppSTLios ws
syntax keyword cppSTLiterator back_insert_iterator
syntax keyword cppSTLiterator bidirectional_iterator
syntax keyword cppSTLiterator const_iterator
syntax keyword cppSTLiterator const_reverse_iterator
syntax keyword cppSTLiterator forward_iterator
syntax keyword cppSTLiterator front_insert_iterator
syntax keyword cppSTLiterator input_iterator
syntax keyword cppSTLiterator insert_iterator
syntax keyword cppSTLiterator istreambuf_iterator
syntax keyword cppSTLiterator istream_iterator
syntax keyword cppSTLiterator ostreambuf_iterator
syntax keyword cppSTLiterator ostream_iterator
syntax keyword cppSTLiterator iterator
syntax keyword cppSTLiterator ostream_iterator
syntax keyword cppSTLiterator output_iterator
syntax keyword cppSTLiterator random_access_iterator
syntax keyword cppSTLiterator raw_storage_iterator
syntax keyword cppSTLiterator reverse_bidirectional_iterator
syntax keyword cppSTLiterator move_iterator
syntax keyword cppSTLiterator reverse_iterator
syntax keyword cppSTLiterator_tag bidirectional_iterator_tag
syntax keyword cppSTLiterator_tag forward_iterator_tag
@@ -1593,6 +1591,8 @@ endif " C++14
if !exists("cpp_no_cpp17")
syntax keyword cppSTLnamespace pmr
" algorithm
syntax keyword cppSTLfunction clamp
syntax keyword cppSTLfunction for_each_n
@@ -1985,87 +1985,278 @@ endif " C++17
if !exists("cpp_no_cpp20")
" type_traits
syntax keyword cppSTLtype remove_cvref remove_cvref_t
syntax keyword cppType char8_t
syntax keyword cppStatement co_yield co_return co_await
syntax keyword cppStorageClass consteval
syntax keyword cppSTLnamespace ranges
" algorithm
syntax keyword cppSTLfunction shift_left
syntax keyword cppSTLfunction shift_right
syntax keyword cppSTLfunction lexicographical_compare_three_way
" bit
syntax keyword cppSTLcast bit_cast
syntax keyword cppSTLfunction ispow2
syntax keyword cppSTLfunction ceil2
syntax keyword cppSTLfunction floor2
syntax keyword cppSTLfunction log2p1
syntax keyword cppSTLfunction rotl
syntax keyword cppSTLfunction rotr
syntax keyword cppSTLfunction countl_zero
syntax keyword cppSTLfunction countl_one
syntax keyword cppSTLfunction countr_zero
syntax keyword cppSTLfunction countr_one
syntax keyword cppSTLfunction popcount
syntax keyword cppSTLtype endian
" compare
syntax keyword cppSTLtype weak_equality
syntax keyword cppSTLtype strong_equality
syntax keyword cppSTLtype partial_ordering
syntax keyword cppSTLtype weak_ordering
syntax keyword cppSTLtype strong_ordering
syntax keyword cppSTLtype common_comparison_category
syntax keyword cppSTLtype compare_three_way_result
syntax keyword cppSTLtype compare_three_way
syntax keyword cppSTLtype strong_order
syntax keyword cppSTLtype weak_order
syntax keyword cppSTLtype parital_order
syntax keyword cppSTLtype compare_strong_order_fallback
syntax keyword cppSTLtype compare_weak_order_fallback
syntax keyword cppSTLtype compare_parital_order_fallback
syntax keyword cppSTLfunction is_eq
syntax keyword cppSTLfunction is_neq
syntax keyword cppSTLfunction is_lt
syntax keyword cppSTLfunction is_lteq
syntax keyword cppSTLfunction is_gt
syntax keyword cppSTLfunction is_gteq
" format
syntax keyword cppSTLtype formatter
syntax keyword cppSTLtype basic_format_parse_context
syntax keyword cppSTLtype format_parse_context
syntax keyword cppSTLtype wformat_parse_context
syntax keyword cppSTLtype basic_format_context
syntax keyword cppSTLtype format_context
syntax keyword cppSTLtype wformat_context
syntax keyword cppSTLtype basic_format_arg
syntax keyword cppSTLtype basic_format_args
syntax keyword cppSTLtype format_args
syntax keyword cppSTLtype wformat_args
syntax keyword cppSTLtype format_args_t
syntax keyword cppSTLtype format_error
syntax keyword cppSTLfuntion format
syntax keyword cppSTLfuntion format_to
syntax keyword cppSTLfuntion format_to_n
syntax keyword cppSTLfuntion formatted_size
syntax keyword cppSTLfuntion vformat
syntax keyword cppSTLfuntion vformat_to
syntax keyword cppSTLfuntion visit_format_arg
syntax keyword cppSTLfuntion make_format_args
syntax keyword cppSTLfuntion make_wformat_args
" iterator
syntax keyword cppSTLtype default_sentinel_t unreachable_sentinel_t
syntax keyword cppSTLiterator common_iterator
syntax keyword cppSTLiterator counted_iterator
syntax keyword cppSTLiterator_tag contiguous_iterator_tag
" memory
syntax keyword cppSTLfunction to_address
syntax keyword cppSTLfunction assume_aligned
syntax keyword cppSTLfunction make_unique_default_init
syntax keyword cppSTLfunction allocate_shared_default_init
" source_location
syntax keyword cppSTLtype source_location
" span
syntax keyword cppSTLtype span
syntax keyword cppSTLfunction as_bytes
syntax keyword cppSTLfunction as_writable_bytes
syntax keyword cppSTLconstant dynamic_extent
" syncstream
syntax keyword cppSTLtype basic_syncbuf
syntax keyword cppSTLtype basic_osyncstream
syntax keyword cppSTLtype syncbuf
syntax keyword cppSTLtype wsyncbuf
syntax keyword cppSTLtype osyncstream
syntax keyword cppSTLtype wosyncstream
" type_traits
syntax keyword cppSTLtype remove_cvref remove_cvref_t
syntax keyword cppSTLtype common_reference common_reference_t
syntax keyword cppSTLfunction is_constant_evaluated
syntax keyword cppSTLfunction is_pointer_interconvertible
syntax keyword cppSTLfunction is_corresponding_member
syntax keyword cppSTLtype is_nothrow_convertible
syntax keyword cppSTLbool is_nothrow_convertible_v
syntax keyword cppSTLtype is_layout_compatible
syntax keyword cppSTLbool is_layout_compatible_v
syntax keyword cppSTLtype is_bounded_array
syntax keyword cppSTLbool is_bounded_array_v
syntax keyword cppSTLtype is_unbounded_array
syntax keyword cppSTLbool is_unbounded_array_v
syntax keyword cppSTLtype is_pointer_interconvertible_base_of
syntax keyword cppSTLbool is_pointer_interconvertible_base_of_v
syntax keyword cppSTLtype has_strong_structural_equality
syntax keyword cppSTLbool has_strong_structural_equality_v
" version
" TODO
endif
if exists('g:cpp_concepts_highlight') && g:cpp_concepts_highlight
if exists('g:cpp_concepts_highlight')
syntax keyword cppStatement concept
syntax keyword cppStorageClass requires
syntax keyword cppSTLtype DefaultConstructible
syntax keyword cppSTLtype MoveConstructible
syntax keyword cppSTLtype CopyConstructible
syntax keyword cppSTLtype MoveAssignable
syntax keyword cppSTLtype CopyAssignable
syntax keyword cppSTLtype Destructible
syntax keyword cppSTLtype TriviallyCopyable
syntax keyword cppSTLtype TrivialType
syntax keyword cppSTLtype StandardLayoutType
syntax keyword cppSTLtype PODType
syntax keyword cppSTLtype EqualityComparable
syntax keyword cppSTLtype LessThanComparable
syntax keyword cppSTLtype Swappable
syntax keyword cppSTLtype ValueSwappable
syntax keyword cppSTLtype NullablePointer
syntax keyword cppSTLtype Hash
syntax keyword cppSTLtype Allocator
syntax keyword cppSTLtype FunctionObject
syntax keyword cppSTLtype Callable
syntax keyword cppSTLtype Predicate
syntax keyword cppSTLtype BinaryPredicate
syntax keyword cppSTLtype Compare
syntax keyword cppSTLtype Container
syntax keyword cppSTLtype ReversibleContainer
syntax keyword cppSTLtype AllocatorAwareContainer
syntax keyword cppSTLtype SequenceContainer
syntax keyword cppSTLtype ContiguousContainer
syntax keyword cppSTLtype AssociativeContainer
syntax keyword cppSTLtype UnorderedAssociativeContainer
syntax keyword cppSTLtype DefaultInsertable
syntax keyword cppSTLtype CopyInsertable
syntax keyword cppSTLtype CopyInsertable
syntax keyword cppSTLtype MoveInsertable
syntax keyword cppSTLtype EmplaceConstructible
syntax keyword cppSTLtype Erasable
syntax keyword cppSTLtype Iterator
syntax keyword cppSTLtype InputIterator
syntax keyword cppSTLtype OutputIterator
syntax keyword cppSTLtype ForwardIterator
syntax keyword cppSTLtype BidirectionalIterator
syntax keyword cppSTLtype RandomAccessIterator
syntax keyword cppSTLtype ContiguousIterator
syntax keyword cppSTLtype UnformattedInputFunction
syntax keyword cppSTLtype FormattedInputFunction
syntax keyword cppSTLtype UnformattedOutputFunction
syntax keyword cppSTLtype FormattedOutputFunction
syntax keyword cppSTLtype SeedSequence
syntax keyword cppSTLtype UniformRandomBitGenerator
syntax keyword cppSTLtype RandomNumberEngine
syntax keyword cppSTLtype RandomNumberEngineAdaptor
syntax keyword cppSTLtype RandomNumberDistribution
syntax keyword cppSTLtype BasicLockable
syntax keyword cppSTLtype Lockable
syntax keyword cppSTLtype TimedLockable
syntax keyword cppSTLtype Mutex
syntax keyword cppSTLtype TimedMutex
syntax keyword cppSTLtype SharedMutex
syntax keyword cppSTLtype SharedTimedMutex
syntax keyword cppSTLtype UnaryTypeTrait
syntax keyword cppSTLtype BinaryTypeTrait
syntax keyword cppSTLtype TransformationTrait
syntax keyword cppSTLtype Clock
syntax keyword cppSTLtype TrivialClock
syntax keyword cppSTLtype CharTraits
syntax keyword cppSTLtype pos_type
syntax keyword cppSTLtype off_type
syntax keyword cppSTLtype BitmaskType
syntax keyword cppSTLtype NumericType
syntax keyword cppSTLtype RegexTraits
syntax keyword cppSTLtype LiteralType
if g:cpp_concepts_highlight == 1
syntax keyword cppSTLconcept DefaultConstructible
syntax keyword cppSTLconcept MoveConstructible
syntax keyword cppSTLconcept CopyConstructible
syntax keyword cppSTLconcept MoveAssignable
syntax keyword cppSTLconcept CopyAssignable
syntax keyword cppSTLconcept Destructible
syntax keyword cppSTLconcept TriviallyCopyable
syntax keyword cppSTLconcept TrivialType
syntax keyword cppSTLconcept StandardLayoutType
syntax keyword cppSTLconcept PODType
syntax keyword cppSTLconcept EqualityComparable
syntax keyword cppSTLconcept LessThanComparable
syntax keyword cppSTLconcept Swappable
syntax keyword cppSTLconcept ValueSwappable
syntax keyword cppSTLconcept NullablePointer
syntax keyword cppSTLconcept Hash
syntax keyword cppSTLconcept Allocator
syntax keyword cppSTLconcept FunctionObject
syntax keyword cppSTLconcept Callable
syntax keyword cppSTLconcept Predicate
syntax keyword cppSTLconcept BinaryPredicate
syntax keyword cppSTLconcept Compare
syntax keyword cppSTLconcept Container
syntax keyword cppSTLconcept ReversibleContainer
syntax keyword cppSTLconcept AllocatorAwareContainer
syntax keyword cppSTLconcept SequenceContainer
syntax keyword cppSTLconcept ContiguousContainer
syntax keyword cppSTLconcept AssociativeContainer
syntax keyword cppSTLconcept UnorderedAssociativeContainer
syntax keyword cppSTLconcept DefaultInsertable
syntax keyword cppSTLconcept CopyInsertable
syntax keyword cppSTLconcept CopyInsertable
syntax keyword cppSTLconcept MoveInsertable
syntax keyword cppSTLconcept EmplaceConstructible
syntax keyword cppSTLconcept Erasable
syntax keyword cppSTLconcept Iterator
syntax keyword cppSTLconcept InputIterator
syntax keyword cppSTLconcept OutputIterator
syntax keyword cppSTLconcept ForwardIterator
syntax keyword cppSTLconcept BidirectionalIterator
syntax keyword cppSTLconcept RandomAccessIterator
syntax keyword cppSTLconcept ContiguousIterator
syntax keyword cppSTLconcept UnformattedInputFunction
syntax keyword cppSTLconcept FormattedInputFunction
syntax keyword cppSTLconcept UnformattedOutputFunction
syntax keyword cppSTLconcept FormattedOutputFunction
syntax keyword cppSTLconcept SeedSequence
syntax keyword cppSTLconcept UniformRandomBitGenerator
syntax keyword cppSTLconcept RandomNumberEngine
syntax keyword cppSTLconcept RandomNumberEngineAdaptor
syntax keyword cppSTLconcept RandomNumberDistribution
syntax keyword cppSTLconcept BasicLockable
syntax keyword cppSTLconcept Lockable
syntax keyword cppSTLconcept TimedLockable
syntax keyword cppSTLconcept Mutex
syntax keyword cppSTLconcept TimedMutex
syntax keyword cppSTLconcept SharedMutex
syntax keyword cppSTLconcept SharedTimedMutex
syntax keyword cppSTLconcept UnaryTypeTrait
syntax keyword cppSTLconcept BinaryTypeTrait
syntax keyword cppSTLconcept TransformationTrait
syntax keyword cppSTLconcept Clock
syntax keyword cppSTLconcept TrivialClock
syntax keyword cppSTLconcept CharTraits
syntax keyword cppSTLconcept pos_type
syntax keyword cppSTLconcept off_type
syntax keyword cppSTLconcept BitmaskType
syntax keyword cppSTLconcept NumericType
syntax keyword cppSTLconcept RegexTraits
syntax keyword cppSTLconcept LiteralType
elseif g:cpp_concepts_highlight == 2
syntax keyword cppSTLconcept same_as
syntax keyword cppSTLconcept derived_from
syntax keyword cppSTLconcept convertible_to
syntax keyword cppSTLconcept common_reference_with
syntax keyword cppSTLconcept common_with
syntax keyword cppSTLconcept integral
syntax keyword cppSTLconcept signed_integral
syntax keyword cppSTLconcept unsigned_integral
syntax keyword cppSTLconcept assignable_from
syntax keyword cppSTLconcept swappable
syntax keyword cppSTLconcept swappable_with
syntax keyword cppSTLconcept destructible
syntax keyword cppSTLconcept constructible_from
syntax keyword cppSTLconcept default_constructible
syntax keyword cppSTLconcept move_constructible
syntax keyword cppSTLconcept copy_constructible
syntax keyword cppSTLconcept boolean
syntax keyword cppSTLconcept equality_comparable
syntax keyword cppSTLconcept equality_comparable_with
syntax keyword cppSTLconcept totally_ordered
syntax keyword cppSTLconcept totally_ordered_with
syntax keyword cppSTLconcept movable
syntax keyword cppSTLconcept copyable
syntax keyword cppSTLconcept semiregular
syntax keyword cppSTLconcept regular
syntax keyword cppSTLconcept invocable
syntax keyword cppSTLconcept regular_invocable
syntax keyword cppSTLconcept predicate
syntax keyword cppSTLconcept relation
syntax keyword cppSTLconcept strict_weak_order
syntax keyword cppSTLconcept readable
syntax keyword cppSTLconcept writable
syntax keyword cppSTLconcept weakly_incrementable
syntax keyword cppSTLconcept incrementable
syntax keyword cppSTLconcept input_or_output_iterator
syntax keyword cppSTLconcept sentinal_for
syntax keyword cppSTLconcept sized_sentinal_for
syntax keyword cppSTLconcept input_iterator
syntax keyword cppSTLconcept output_iterator
syntax keyword cppSTLconcept forward_iterator
syntax keyword cppSTLconcept bidirectional_iterator
syntax keyword cppSTLconcept random_access_iterator
syntax keyword cppSTLconcept input_iterator
syntax keyword cppSTLconcept output_iterator
syntax keyword cppSTLconcept bidirectional_iterator
syntax keyword cppSTLconcept random_access_iterator
syntax keyword cppSTLconcept contiguous_iterator
syntax keyword cppSTLconcept indirectly_unary_invocable
syntax keyword cppSTLconcept indirectly_regular_unary_invocable
syntax keyword cppSTLconcept indirect_unary_predicate
syntax keyword cppSTLconcept indirect_relation
syntax keyword cppSTLconcept indirect_strict_weak_order
syntax keyword cppSTLconcept indirectly_movable
syntax keyword cppSTLconcept indirectly_movable_storable
syntax keyword cppSTLconcept indirectly_copyable
syntax keyword cppSTLconcept indirectly_copyable_storable
syntax keyword cppSTLconcept indirectly_swappable
syntax keyword cppSTLconcept indirectly_comparable
syntax keyword cppSTLconcept permutable
syntax keyword cppSTLconcept mergeable
syntax keyword cppSTLconcept sortable
syntax keyword cppSTLconcept range
syntax keyword cppSTLconcept sized_range
syntax keyword cppSTLconcept output_range
syntax keyword cppSTLconcept input_range
syntax keyword cppSTLconcept bidirectional_range
syntax keyword cppSTLconcept random_access_range
syntax keyword cppSTLconcept contiguous_range
syntax keyword cppSTLconcept common_range
syntax keyword cppSTLconcept viewable_range
syntax keyword cppSTLconcept uniform_random_bit_generator
endif
endif " C++ concepts
@@ -2095,6 +2286,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
HiLink cppSTLiterator Typedef
HiLink cppSTLiterator_tag Typedef
HiLink cppSTLenum Typedef
HiLink cppSTLconcept Typedef
HiLink cppSTLios Function
HiLink cppSTLcast Statement " be consistent with official syntax
HiLink cppRawString String

View File

@@ -22,34 +22,31 @@ if exists('s:current_syntax')
let b:current_syntax = s:current_syntax
endif
if hlexists("jsNoise") " pangloss/vim-javascript
if hlexists("jsDebugger") || hlexists("jsNoise") " yuezk/vim-js or pangloss/vim-javascript
syntax cluster jsExpression add=jsxRegion
elseif hlexists("javascriptOpSymbols") " othree/yajs.vim
" refine the javascript line comment
syntax region javascriptLineComment start=+//+ end=/$/ contains=@Spell,javascriptCommentTodo extend keepend
syntax cluster javascriptValue add=jsxRegion
syntax cluster javascriptNoReserved add=jsxElement,jsxTag
" add support to arrow function which returns a tagged template string, e.g.
" () => html`<div></div>`
syntax cluster afterArrowFunc add=javascriptTagRef
else " build-in javascript syntax
" refine the javascript line comment
syntax region javaScriptLineComment start=+//+ end=/$/ contains=@Spell,javascriptCommentTodo extend keepend
" refine the template string syntax
syntax region javaScriptEmbed matchgroup=javaScriptEmbedBraces start=+\${+ end=+}+ contained contains=@javaScriptEmbededExpr
" add a javaScriptBlock group for build-in syntax
syntax region javaScriptBlockBuildIn
\ contained
syntax region javaScriptBlock
\ matchgroup=javaScriptBraces
\ start="{"
\ end="}"
\ contained
\ extend
\ contains=javaScriptBlockBuildIn,@javaScriptEmbededExpr,javaScript.*
\ contains=javaScriptBlock,@javaScriptEmbededExpr,javaScript.*
\ fold
syntax cluster javaScriptEmbededExpr add=jsxRegion
" refine the template string syntax
syntax region javaScriptStringT start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=javaScriptSpecial,javaScriptEmbed,@htmlPreproc extend
syntax region javaScriptEmbed matchgroup=javaScriptEmbedBraces start=+\${+ end=+}+ contained contains=@javaScriptEmbededExpr,javaScript.*
syntax cluster javaScriptEmbededExpr add=jsxRegion,javaScript.*
endif
runtime syntax/jsx_pretty.vim

View File

@@ -2,6 +2,12 @@ if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript')
let s:highlight_close_tag = get(g:, 'vim_jsx_pretty_highlight_close_tag', 0)
" detect jsx region
syntax region jsxRegion
\ start=+\%(\%(\_[([,?:=+\-*/>{}]\|<\s\+\|&&\|||\|=>\|\<return\|\<default\|\<await\|\<yield\)\_s*\)\@<=<\_s*\%(>\|\z(\%(script\|T\s*>\s*(\)\@!\<[_$A-Za-z][-:._$A-Za-z0-9]*\>\)\%(\_s*\%([-+*)\]}&|?,]\|/\%([/*]\|\_s*>\)\@!\)\)\@!\)+
\ end=++
\ contains=jsxElement
" <tag id="sample">
" ~~~~~~~~~~~~~~~~~
" and self close tag
@@ -12,11 +18,14 @@ syntax region jsxTag
\ matchgroup=jsxOpenPunct
\ end=+>+
\ matchgroup=NONE
\ end=+\(/\_s*>\)\@=+
\ end=+\%(/\_s*>\)\@=+
\ contained
\ contains=jsxOpenTag,jsxEscapeJs,jsxAttrib,jsComment,@javascriptComments,javaScriptLineComment,javaScriptComment,typescriptLineComment,typescriptComment,jsxSpreadOperator
\ contains=jsxOpenTag,jsxAttrib,jsxEscapeJs,jsxSpreadOperator,jsComment,@javascriptComments,javaScriptLineComment,javaScriptComment,typescriptLineComment,typescriptComment
\ keepend
\ extend
\ skipwhite
\ skipempty
\ nextgroup=jsxCloseString
" <tag></tag>
" ~~~~~~~~~~~
@@ -27,30 +36,15 @@ syntax region jsxTag
" <tag />
" ~~~~~~~
syntax region jsxElement
\ start=+<\_s*\(>\|\${\|\z(\<[-:_\.\$0-9A-Za-z]\+\>\)\)+
\ start=+<\_s*\%(>\|\${\|\z(\<[-:._$A-Za-z0-9]\+\>\)\)+
\ end=+/\_s*>+
\ end=+<\_s*/\_s*\z1\_s*>+
\ contains=jsxElement,jsxEscapeJs,jsxTag,jsxComment,jsxCloseString,jsxCloseTag,@Spell
\ contains=jsxElement,jsxTag,jsxEscapeJs,jsxComment,jsxCloseTag,@Spell
\ keepend
\ extend
\ contained
\ fold
" detect jsx region
syntax region jsxRegion
\ start=+\(\(\_[([,?:=+\-*/<>{}]\|&&\|||\|=>\|\<return\|\<default\|\<await\|\<yield\)\_s*\)\@<=<\_s*\(>\|\z(\(script\)\@!\<[_\$A-Za-z][-:_\.\$0-9A-Za-z]*\>\)\(\_s*\([-+*)\]}&|?,]\|/\([/*]\|\_s*>\)\@!\)\)\@!\)+
\ end=++
\ contains=jsxElement
" <tag key={this.props.key}>
" ~~~~~~~~~~~~~~~~
syntax region jsxEscapeJs
\ start=+{+
\ end=++
\ extend
\ contained
\ contains=jsBlock,javascriptBlock,javaScriptBlockBuildIn,typescriptBlock
" <tag key={this.props.key}>
" ~~~~
" and fragment start tag
@@ -66,19 +60,31 @@ exe 'syntax region jsxOpenTag
\ contains=jsxTagName
\ nextgroup=jsxAttrib
\ skipwhite
\ skipempty ' .(s:highlight_close_tag ? 'transparent' : '')
\ skipempty
\ ' .(s:highlight_close_tag ? 'transparent' : '')
" <tag key={this.props.key}>
" ~~~~~~~~~~~~~~~~
syntax region jsxEscapeJs
\ matchgroup=jsxBraces
\ start=+{+
\ end=+}+
\ contained
\ extend
\ contains=@jsExpression,jsSpreadExpression,@javascriptExpression,javascriptSpreadOp,@javaScriptEmbededExpr,@typescriptExpression,typescriptObjectSpread
" <foo.bar>
" ~
syntax match jsxDot +\.+ contained display
syntax match jsxDot +\.+ contained
" <foo:bar>
" ~
syntax match jsxNamespace +:+ contained display
syntax match jsxNamespace +:+ contained
" <tag id="sample">
" ~
syntax match jsxEqual +=+ contained display nextgroup=jsxString,jsxEscapeJs,jsxRegion skipwhite
syntax match jsxEqual +=+ contained skipwhite skipempty nextgroup=jsxString,jsxEscapeJs,jsxRegion
" <tag />
" ~~
@@ -99,13 +105,12 @@ syntax region jsxCloseTag
" <tag key={this.props.key}>
" ~~~
syntax match jsxAttrib
\ +\<[-A-Za-z_][-:_\$0-9A-Za-z]*\>+
\ +\<[_$A-Za-z][-:_$A-Za-z0-9]*\>+
\ contained
\ nextgroup=jsxEqual
\ skipwhite
\ skipempty
\ contains=jsxAttribKeyword
\ display
\ contains=jsxAttribKeyword,jsxNamespace
" <MyComponent ...>
" ~~~~~~~~~~~
@@ -113,67 +118,71 @@ syntax match jsxAttrib
" <someCamel ...>
" ~~~~~
exe 'syntax match jsxComponentName
\ +\<[A-Z][\$0-9A-Za-z]\+\>+
\ +\<[_$]\?[A-Z][-_$A-Za-z0-9]*\>+
\ contained
\ display ' .(s:highlight_close_tag ? 'transparent' : '')
\ ' .(s:highlight_close_tag ? 'transparent' : '')
" <tag key={this.props.key}>
" ~~~
exe 'syntax match jsxTagName
\ +\<[-:_\.\$0-9A-Za-z]\+\>+
\ +\<[-:._$A-Za-z0-9]\+\>+
\ contained
\ contains=jsxComponentName,jsxDot,jsxNamespace
\ nextgroup=jsxAttrib
\ skipempty
\ skipwhite
\ display ' .(s:highlight_close_tag ? 'transparent' : '')
\ ' .(s:highlight_close_tag ? 'transparent' : '')
" <tag id="sample">
" ~~~~~~~~
" and
" <tag id='sample'>
" ~~~~~~~~
syntax region jsxString start=+\z(["']\)+ skip=+\\\%(\z1\|$\)+ end=+\z1+ contained contains=@Spell display
syntax region jsxString start=+\z(["']\)+ skip=+\\\\\|\\\z1\|\\\n+ end=+\z1+ contained contains=@Spell
let s:tags = get(g:, 'vim_jsx_pretty_template_tags', ['html', 'raw'])
let s:tags = get(g:, 'vim_jsx_pretty_template_tags', ['html', 'jsx'])
let s:enable_tagged_jsx = !empty(s:tags)
" add support to JSX inside the tagged template string
" https://github.com/developit/htm
if s:enable_tagged_jsx
exe 'syntax region jsxTaggedRegion
\ start=+\%('. join(s:tags, '\|') .'\)\@<=`+ms=s+1
\ end=+`+me=e-1
exe 'syntax match jsxRegion +\%(' . join(s:tags, '\|') . '\)\%(\_s*`\)\@=+ contains=jsTemplateStringTag,jsTaggedTemplate,javascriptTagRef skipwhite skipempty nextgroup=jsxTaggedRegion'
syntax region jsxTaggedRegion
\ matchgroup=jsxBackticks
\ start=+`+
\ end=+`+
\ extend
\ contained
\ containedin=jsTemplateString,javascriptTemplate,javaScriptStringT,typescriptStringB
\ contains=jsxElement'
\ contains=jsxElement,jsxEscapeJs
\ transparent
syntax region jsxEscapeJs
\ matchgroup=jsxBraces
\ start=+\${+
\ end=++
\ end=+}+
\ extend
\ contained
\ contains=jsTemplateExpression,javascriptTemplateSubstitution,javaScriptEmbed,typescriptInterpolation
\ contains=@jsExpression,jsSpreadExpression,@javascriptExpression,javascriptSpreadOp,@javaScriptEmbededExpr,@typescriptExpression,typescriptObjectSpread
syntax region jsxOpenTag
\ matchgroup=jsxOpenPunct
\ start=+<\%(\${\)\@=+
\ matchgroup=NONE
\ end=++
\ end=+}\@1<=+
\ contained
\ contains=jsxEscapeJs
\ nextgroup=jsxAttrib,jsxSpreadOperator
\ skipwhite
\ skipempty
\ nextgroup=jsxAttrib,jsxSpreadOperator
syntax keyword jsxAttribKeyword class contained display
syntax keyword jsxAttribKeyword class contained
syntax match jsxSpreadOperator +\.\.\.+ contained display nextgroup=jsxEscapeJs skipwhite
syntax match jsxSpreadOperator +\.\.\.+ contained nextgroup=jsxEscapeJs skipwhite
syntax match jsxCloseTag +<//>+ display
syntax match jsxCloseTag +<//>+ contained
syntax match jsxComment +<!--\_.\{-}-->+ display
syntax match jsxComment +<!--\_.\{-}-->+
endif
" Highlight the tag name
@@ -183,10 +192,14 @@ highlight def link jsxComponentName Function
highlight def link jsxAttrib Type
highlight def link jsxAttribKeyword jsxAttrib
highlight def link jsxEqual Operator
highlight def link jsxString String
highlight def link jsxComment Comment
highlight def link jsxDot Operator
highlight def link jsxNamespace Operator
highlight def link jsxEqual Operator
highlight def link jsxSpreadOperator Operator
highlight def link jsxBraces Special
if s:highlight_close_tag
highlight def link jsxCloseString Identifier
@@ -201,9 +214,6 @@ highlight def link jsxPunct jsxCloseString
highlight def link jsxClosePunct jsxPunct
highlight def link jsxCloseTag jsxCloseString
highlight def link jsxComment Comment
highlight def link jsxSpreadOperator Operator
let s:vim_jsx_pretty_colorful_config = get(g:, 'vim_jsx_pretty_colorful_config', 0)
if s:vim_jsx_pretty_colorful_config == 1
@@ -212,5 +222,4 @@ if s:vim_jsx_pretty_colorful_config == 1
highlight def link jsFuncArgs Type
endif
endif

View File

@@ -9,6 +9,10 @@ if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript')
"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
if get(g:, 'vim_jsx_pretty_disable_tsx', 0)
finish
endif
let s:jsx_cpo = &cpo
set cpo&vim

View File

@@ -368,6 +368,11 @@ function! go#config#PlayOpenBrowser() abort
return get(g:, "go_play_open_browser", 1)
endfunction
function! go#config#GorenameCommand() abort
" delegate to go#config#GorenameBin for backwards compatability.
return get(g:, "go_gorename_command", go#config#GorenameBin())
endfunction
function! go#config#GorenameBin() abort
return get(g:, "go_gorename_bin", "gorename")
endfunction
@@ -463,6 +468,14 @@ function! go#config#HighlightVariableDeclarations() abort
return get(g:, 'go_highlight_variable_declarations', 0)
endfunction
function! go#config#HighlightDiagnosticErrors() abort
return get(g:, 'go_highlight_diagnostic_errors', 1)
endfunction
function! go#config#HighlightDiagnosticWarnings() abort
return get(g:, 'go_highlight_diagnostic_warnings', 1)
endfunction
function! go#config#HighlightDebug() abort
return get(g:, 'go_highlight_debug', 1)
endfunction
@@ -482,6 +495,31 @@ function! go#config#CodeCompletionEnabled() abort
return get(g:, "go_code_completion_enabled", 1)
endfunction
function! go#config#Updatetime() abort
let go_updatetime = get(g:, 'go_updatetime', 800)
return go_updatetime == 0 ? &updatetime : go_updatetime
endfunction
function! go#config#ReferrersMode() abort
return get(g:, 'go_referrers_mode', 'gopls')
endfunction
function! go#config#GoplsCompleteUnimported() abort
return get(g:, 'go_gopls_complete_unimported', 0)
endfunction
function! go#config#GoplsDeepCompletion() abort
return get(g:, 'go_gopls_deep_completion', 1)
endfunction
function! go#config#GoplsFuzzyMatching() abort
return get(g:, 'go_gopls_fuzzy_matching', 1)
endfunction
function! go#config#GoplsUsePlaceholders() abort
return get(g:, 'go_gopls_use_placeholders', 0)
endfunction
" Set the default value. A value of "1" is a shortcut for this, for
" compatibility reasons.
if exists("g:go_gorename_prefill") && g:go_gorename_prefill == 1

View File

@@ -10,209 +10,297 @@ else
endfunction
endif
" Get the syntax group of start of line
function! s:syn_sol(lnum)
let line = getline(a:lnum)
let sol = matchstr(line, '^\s*')
return map(synstack(a:lnum, len(sol) + 1), 'synIDattr(v:val, "name")')
" Regexp for the start tag
let s:start_tag = '<\_s*\%(>\|\${\|\%(\<[-:._$A-Za-z0-9]\+\>\)\)'
" Regexp for the end tag
let s:end_tag = '\%(<\_s*/\_s*\%(\<[-:._$A-Za-z0-9]\+\>\)\_s*>\|/\_s*>\)'
function s:trim(line)
return substitute(a:line, '^\s*\|\s*$', '', 'g')
endfunction
" Get the syntax group of end of line
function! s:syn_eol(lnum)
let lnum = prevnonblank(a:lnum)
let col = strlen(getline(lnum))
return map(synstack(lnum, col), 'synIDattr(v:val, "name")')
" Get the syntax stack at the given position
function s:syntax_stack_at(lnum, col)
return map(synstack(a:lnum, a:col), 'synIDattr(v:val, "name")')
endfunction
function! s:prev_indent(lnum)
let lnum = prevnonblank(a:lnum - 1)
return indent(lnum)
" Get the syntax at the given position
function s:syntax_at(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name')
endfunction
function! s:prev_line(lnum)
let lnum = prevnonblank(a:lnum - 1)
return substitute(getline(lnum), '^\s*\|\s*$', '', 'g')
" Get the start col of the non-space charactor
function s:start_col(lnum)
return len(matchstr(getline(a:lnum), '^\s*')) + 1
endfunction
function! s:syn_attr_jsx(synattr)
return a:synattr =~? "^jsx"
" Get the start syntax of a given line number
function s:start_syntax(lnum)
return s:syntax_at(a:lnum, s:start_col(a:lnum))
endfunction
function! s:syn_xmlish(syns)
return s:syn_attr_jsx(get(a:syns, -1))
" The skip function for searchpair
function s:skip_if_not(current_lnum, ...)
" Skip the match in current line
if line('.') == a:current_lnum
return 1
endif
let syntax = s:syntax_at(line('.'), col('.'))
return syntax !~? join(a:000, '\|')
endfunction
function! s:syn_jsx_element(syns)
return get(a:syns, -1) =~? 'jsxElement'
" Whether the specified stytax group is the opening tag
function s:is_opening_tag(syntax)
return a:syntax =~? 'jsxOpenPunct'
endfunction
function! s:syn_js_comment(syns)
return get(a:syns, -1) =~? 'Comment$'
" Whether the specified stytax group is the closing tag
function s:is_closing_tag(syntax)
return a:syntax =~? 'jsxClose'
endfunction
function! s:syn_jsx_escapejs(syns)
return get(a:syns, -1) =~? '\(\(js\(Template\)\?\|javaScript\(Embed\)\?\|typescript\)Braces\|javascriptTemplateSB\|typescriptInterpolationDelimiter\)' &&
\ (get(a:syns, -2) =~? 'jsxEscapeJs' ||
\ get(a:syns, -3) =~? 'jsxEscapeJs')
" Whether the specified syntax group is the jsxRegion
function s:is_jsx_region(syntax)
return a:syntax =~? 'jsxRegion'
endfunction
function! s:syn_jsx_attrib(syns)
return len(filter(copy(a:syns), 'v:val =~? "jsxAttrib"'))
" Whether the specified syntax group is the jsxElement
function s:is_jsx_element(syntax)
return a:syntax =~? 'jsxElement'
endfunction
" Whether the specified syntax group is the jsxEscapeJs
function s:is_jsx_escape(syntax)
return a:syntax =~? 'jsxEscapeJs'
endfunction
" Whether the specified syntax group is the jsxBraces
function s:is_jsx_brace(syntax)
return a:syntax =~? 'jsxBraces'
endfunction
" Whether the specified syntax group is the jsxComment
function s:is_jsx_comment(syntax)
return a:syntax =~? 'jsxComment'
endfunction
" Whether the specified line is comment related syntax
function s:is_comment(syntax)
return a:syntax =~? 'comment'
endfunction
" Whether the specified syntax group is the jsxComment
function s:is_jsx_backticks(syntax)
return a:syntax =~? 'jsxBackticks'
endfunction
" Get the prvious line number
function s:prev_lnum(lnum)
return prevnonblank(a:lnum - 1)
endfunction
" Whether the given pos is the parent of the given element who has
" element_count jsxElement syntax
function s:is_parent_element(pos, element_count)
let syntax_stack = s:syntax_stack_at(a:pos[0], a:pos[1])
return s:is_opening_tag(syntax_stack[-1]) &&
\ count(syntax_stack, 'jsxElement') <= a:element_count
endfunction
" Compute the indention of the trail punct
function s:jsx_indent_trail_punct(lnum)
let pair_line = searchpair('<', '', '>', 'bW', 's:skip_if_not(a:lnum, "jsxOpenPunct", "jsxClose")')
return indent(pair_line)
endfunction
" Compute the indention of the closing tag
function s:jsx_indent_closing_tag(lnum)
let pair_line = searchpair(s:start_tag, '', s:end_tag, 'bW', 's:skip_if_not(a:lnum, "jsxOpenPunct", "jsxClose")')
return pair_line ? indent(pair_line) : indent(a:lnum)
endfunction
" Compute the indentation of the jsxElement
function s:jsx_indent_element(lnum)
let syntax_stack = s:syntax_stack_at(a:lnum, s:start_col(a:lnum))
let syntax_name = syntax_stack[-1]
let element_count = count(syntax_stack, 'jsxElement')
if s:trim(getline(a:lnum)) =~ '^>'
return s:jsx_indent_trail_punct(a:lnum)
endif
" If current tag is closing tag
if s:is_closing_tag(syntax_name)
return s:jsx_indent_closing_tag(a:lnum)
endif
" Normalize the jsxElement count for opening tag
if s:is_opening_tag(syntax_name)
" <div>
" <div></div> <-- jsxRegion->jsxElement->jsxElement->jsxTag->jsxOpenTag->jsxOpenPunct
" </div>
if s:is_jsx_element(syntax_stack[-4]) && s:is_jsx_element(syntax_stack[-5])
let element_count = element_count - 1
endif
endif
let start_time = localtime()
let pos = searchpos(s:start_tag, 'bW')
while !s:is_parent_element(pos, element_count)
if localtime() - start_time >= 0.5
return -1
endif
let pos = searchpos(s:start_tag, 'bW')
endwhile
return indent(pos[0]) + s:sw()
endfunction
" Compute the indentation of the comment
function s:jsx_indent_comment(lnum)
let line = s:trim(getline(a:lnum))
if s:is_jsx_comment(s:start_syntax(a:lnum))
if line =~ '^<!--' || line =~ '^-->'
return s:jsx_indent_element(a:lnum)
else
return s:jsx_indent_element(a:lnum) + s:sw()
endif
else
if line =~ '^/\*' || line =~ '^//'
return s:jsx_indent_element(a:lnum)
else
return s:jsx_indent_element(a:lnum) + 1
endif
endif
endfunction
" Compute the indentation of jsxBackticks
function s:jsx_indent_backticks(lnum)
let tags = get(g:, 'vim_jsx_pretty_template_tags', ['html', 'jsx'])
let start_tag = '\%(' . join(tags, '\|') . '\)`'
let end_tag = '\%(' . join(tags, '\|') . '\)\@<!`'
let pair_line = searchpair(start_tag, '', end_tag, 'bW', 's:skip_if_not(a:lnum)')
return indent(pair_line)
endfunction
" Syntax context types:
" - jsxRegion
" - jsxTaggedRegion
" - jsxElement
" - jsxEscapeJs
" - Other
function s:syntax_context(lnum)
let start_col = s:start_col(a:lnum)
let syntax_stack = s:syntax_stack_at(a:lnum, start_col)
let start_syntax = syntax_stack[-1]
let reversed = reverse(syntax_stack)
let i = 0
for syntax_name in reversed
" If the current line is jsxEscapeJs and not starts with jsxBraces
if s:is_jsx_escape(syntax_name)
return 'jsxEscapeJs'
endif
if s:is_jsx_region(syntax_name)
return 'jsxRegion'
endif
if s:is_jsx_element(syntax_name)
" If current line starts with the opening tag
if s:is_opening_tag(start_syntax) || s:is_closing_tag(start_syntax)
" And the next syntax is jsxRegion
if s:is_jsx_region(reversed[i+1])
return 'jsxRegion'
elseif reversed[i+1] =~ 'jsxTaggedRegion'
return 'jsxTaggedRegion'
else
return 'jsxElement'
endif
elseif reversed[i+1] =~ 'jsxTaggedRegion'
return 'jsxTaggedRegion'
else
return 'jsxElement'
endif
endif
let i = i + 1
endfor
return 'Other'
endfunction
let s:start_tag = '<\s*\([-:_\.\$0-9A-Za-z]\+\|>\)'
" match `/end_tag>` and `//>`
let s:end_tag = '/\%(\s*[-:_\.\$0-9A-Za-z]*\s*\|/\)>'
let s:opfirst = '^' . get(g:,'javascript_opfirst',
\ '\C\%([<>=,.?^%|/&]\|\([-:+]\)\1\@!\|\*\+\|!=\|in\%(stanceof\)\=\>\)')
function! jsx_pretty#indent#get(js_indent)
let lnum = v:lnum
let line = substitute(getline(lnum), '^\s*\|\s*$', '', 'g')
let current_syn = s:syn_sol(lnum)
let current_syn_eol = s:syn_eol(lnum)
let prev_line_num = prevnonblank(lnum - 1)
let prev_syn_sol = s:syn_sol(prev_line_num)
let prev_syn_eol = s:syn_eol(prev_line_num)
let prev_line = s:prev_line(lnum)
let prev_ind = s:prev_indent(lnum)
let line = s:trim(getline(v:lnum))
let start_syntax = s:start_syntax(v:lnum)
if s:syn_xmlish(current_syn)
if s:is_jsx_backticks(start_syntax)
return s:jsx_indent_backticks(v:lnum)
endif
if !s:syn_xmlish(prev_syn_sol)
\ && !s:syn_jsx_escapejs(prev_syn_sol)
\ && !s:syn_jsx_escapejs(prev_syn_eol)
\ && !s:syn_js_comment(prev_syn_sol)
if line =~ '^/\s*>' || line =~ '^<\s*' . s:end_tag
return prev_ind
else
return prev_ind + s:sw()
endif
elseif !s:syn_xmlish(prev_syn_sol) && !s:syn_js_comment(prev_syn_sol) && s:syn_jsx_attrib(current_syn)
" For #79
return prev_ind + s:sw()
" {
" <div></div>
" ##} <--
elseif s:syn_jsx_element(current_syn) && line =~ '}$'
let pair_line = searchpair('{', '', '}', 'b')
return indent(pair_line)
elseif line =~ '^-->$'
if prev_line =~ '^<!--'
return prev_ind
else
return prev_ind - s:sw()
endif
elseif prev_line =~ '-->$'
return prev_ind
" close tag </tag> or /> including </>
elseif prev_line =~ s:end_tag . '$'
if line =~ '^<\s*' . s:end_tag
return prev_ind - s:sw()
elseif s:syn_jsx_attrib(prev_syn_sol)
return prev_ind - s:sw()
else
return prev_ind
endif
elseif line =~ '^\(>\|/\s*>\)'
if prev_line =~ '^<'
return prev_ind
else
return prev_ind - s:sw()
endif
elseif prev_line =~ '^\(<\|>\)' &&
\ (s:syn_xmlish(prev_syn_eol) || s:syn_js_comment(prev_syn_eol))
if line =~ '^<\s*' . s:end_tag
return prev_ind
else
return prev_ind + s:sw()
endif
elseif line =~ '^<\s*' . s:end_tag
if !s:syn_xmlish(prev_syn_sol)
if s:syn_jsx_escapejs(prev_syn_eol)
\ || s:syn_jsx_escapejs(prev_syn_sol)
return prev_ind - s:sw()
else
return prev_ind
endif
elseif prev_line =~ '^\<return'
return prev_ind
else
return prev_ind - s:sw()
endif
elseif !s:syn_xmlish(prev_syn_eol)
if prev_line =~ '\(&&\|||\|=>\|[([{]\|`\)$'
" <div>
" {
" }
" </div>
if line =~ '^[)\]}]'
return prev_ind
else
return prev_ind + s:sw()
endif
else
return prev_ind
endif
if s:is_jsx_brace(start_syntax)
return s:jsx_indent_element(v:lnum)
endif
if s:is_opening_tag(start_syntax) && line =~ '^>'
return s:jsx_indent_trail_punct(v:lnum)
endif
let syntax_context = s:syntax_context(v:lnum)
if syntax_context == 'jsxRegion'
if s:is_closing_tag(start_syntax)
return s:jsx_indent_closing_tag(v:lnum)
endif
let prev_lnum = s:prev_lnum(v:lnum)
let prev_line = s:trim(getline(prev_lnum))
if prev_line =~ '[([{=?]$'
return indent(prev_lnum) + s:sw()
elseif prev_line =~ '[:|&<>]$' &&
\ s:trim(getline(s:prev_lnum(prev_lnum))) !~ '[?:|&<>]$'
return indent(prev_lnum) + s:sw()
else
return prev_ind
return indent(prev_lnum)
endif
elseif s:syn_jsx_escapejs(current_syn)
if line =~ '^}'
let char = getline('.')[col('.') - 1]
" When pressing enter after the }, keep the indent
if char != '}' && search('}', 'b', lnum)
return indent(lnum)
else
let pair_line = searchpair('{', '', '}', 'bW')
return indent(pair_line)
endif
elseif line =~ '^{' || line =~ '^\${'
if s:syn_jsx_escapejs(prev_syn_eol)
\ || s:syn_jsx_attrib(prev_syn_sol)
return prev_ind
elseif s:syn_xmlish(prev_syn_eol) && (prev_line =~ s:end_tag || prev_line =~ '-->$')
return prev_ind
else
return prev_ind + s:sw()
endif
elseif syntax_context == 'jsxTaggedRegion'
if s:is_closing_tag(start_syntax)
return s:jsx_indent_closing_tag(v:lnum)
elseif s:is_jsx_comment(start_syntax)
return s:jsx_indent_comment(v:lnum)
else
return indent(s:prev_lnum(v:lnum)) + s:sw()
endif
elseif line =~ '^`' && s:syn_jsx_escapejs(current_syn_eol)
" For `} of template syntax
let pair_line = searchpair('{', '', '}', 'bW')
return indent(pair_line)
elseif line =~ '^/[/*]' " js comment in jsx tag
if get(prev_syn_sol, -1) =~ 'Punct'
return prev_ind + s:sw()
elseif synIDattr(synID(lnum - 1, 1, 1), 'name') =~ 'jsxTag'
return prev_ind
elseif syntax_context == 'jsxElement'
if s:is_jsx_comment(start_syntax)
return s:jsx_indent_comment(v:lnum)
endif
if s:is_comment(start_syntax)
return s:jsx_indent_comment(v:lnum)
endif
return s:jsx_indent_element(v:lnum)
elseif syntax_context == 'jsxEscapeJs'
let prev_lnum = s:prev_lnum(v:lnum)
let prev_line = s:trim(getline(prev_lnum))
if line =~ '^?'
return indent(prev_lnum) + s:sw()
elseif line =~ '^:'
return indent(prev_lnum)
else
return a:js_indent()
endif
else
let ind = a:js_indent()
" Issue #68
" return (<div>
" |<div>)
if (line =~ '^/\s*>' || line =~ '^<\s*' . s:end_tag)
\ && !s:syn_xmlish(prev_syn_sol)
return prev_ind
endif
" If current syntax is not a jsx syntax group
if s:syn_xmlish(prev_syn_eol) && line !~ '^[)\]}]'
let sol = matchstr(line, s:opfirst)
if sol is ''
" Fix javascript continue indent
return ind - s:sw()
else
return ind
endif
endif
return ind
endif
return a:js_indent()
endfunction
endif

View File

@@ -516,8 +516,10 @@ function! rust#Test(all, options) abort
return rust#Run(1, '--test ' . a:options)
endif
if has('terminal') || has('nvim')
if has('terminal')
let cmd = 'terminal '
elseif has('nvim')
let cmd = 'noautocmd new | terminal '
else
let cmd = '!'
let manifest = shellescape(manifest)

View File

@@ -632,6 +632,13 @@ autocmd BufNewFile,BufRead *Spec.js,*_spec.js set filetype=jasmine.javascript sy
augroup end
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1
augroup filetypedetect
" javascript, from flow.vim in pangloss/vim-javascript:_JAVASCRIPT
autocmd BufNewFile,BufRead *.flow setfiletype flow
augroup end
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1
augroup filetypedetect
" javascript, from javascript.vim in pangloss/vim-javascript:_JAVASCRIPT
@@ -905,7 +912,7 @@ endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1
augroup filetypedetect
" ocaml, from opam.vim in rgrinberg/vim-ocaml
au BufNewFile,BufRead opam,*.opam set filetype=opam
au BufNewFile,BufRead opam,*.opam,*.opam.template set filetype=opam
augroup end
endif
@@ -1105,7 +1112,24 @@ endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'racket') == -1
augroup filetypedetect
" racket, from racket.vim in wlangstroth/vim-racket
au BufRead,BufNewFile *.rkt,*.rktl set filetype=racket
"
let g:racket_hash_lang_regexp = '^#lang\s\+\([^][)(}{[:space:]]\+\)'
" Tries to detect filetype from #lang line; defaults to ft=racket.
function! RacketDetectHashLang()
let old_ft = &filetype
let matches = matchlist(getline(1), g:racket_hash_lang_regexp)
if ! empty(matches)
let &l:filetype = matches[1]
endif
if &filetype == old_ft
set filetype=racket
endif
endfunction
au BufRead,BufNewFile *.rkt,*.rktl call RacketDetectHashLang()
augroup end
endif
@@ -1437,15 +1461,15 @@ endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
augroup filetypedetect
" typescript, from tsx.vim in HerringtonDarkholme/yats.vim
autocmd BufNewFile,BufRead *.tsx setlocal filetype=typescript.tsx
" typescript, from typescript.vim in HerringtonDarkholme/yats.vim
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
augroup end
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
augroup filetypedetect
" typescript, from typescript.vim in HerringtonDarkholme/yats.vim
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
" typescript, from typescriptreact.vim in HerringtonDarkholme/yats.vim
autocmd BufNewFile,BufRead *.tsx setlocal filetype=typescriptreact
augroup end
endif

View File

@@ -2,6 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'meson') == -1
" Vim filetype plugin file
" Language: meson
" License: VIM License
" Original Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
" Last Change: 2018 Nov 27

View File

@@ -393,9 +393,9 @@ endfunction
endif
endfun
" This variable contain a dictionnary of list. Each element of the dictionnary
" represent an annotation system. An annotation system is a list with :
" - annotation file name as it's key
" This variable contains a dictionary of lists. Each element of the dictionary
" represents an annotation system. An annotation system is a list with:
" - annotation file name as its key
" - annotation file path as first element of the contained list
" - build path as second element of the contained list
" - annot_file_last_mod (contain the date of .annot file) as third element

View File

@@ -374,7 +374,6 @@ function! RubyCursorFile() abort
endtry
let pre = matchstr(strpart(getline('.'), 0, col('.')-1), '.*\f\@<!')
let post = matchstr(strpart(getline('.'), col('.')), '\f\@!.*')
let ext = getline('.') =~# '^\s*\%(require\%(_relative\)\=\|autoload\)\>' && cfile !~# '\.rb$' ? '.rb' : ''
if s:synid() ==# hlID('rubyConstant')
let cfile = substitute(cfile,'\.\w\+[?!=]\=$','','')
let cfile = substitute(cfile,'^::','','')
@@ -383,12 +382,15 @@ function! RubyCursorFile() abort
let cfile = substitute(cfile,'\(\l\|\d\)\(\u\)','\1_\2', 'g')
return tolower(cfile) . '.rb'
elseif getline('.') =~# '^\s*require_relative\s*\(["'']\).*\1\s*$'
let cfile = expand('%:p:h') . '/' . matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') . ext
let cfile = expand('%:p:h') . '/' . matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1')
let cfile .= cfile !~# '\.rb$' ? '.rb' : ''
elseif getline('.') =~# '^\s*\%(require[( ]\|load[( ]\|autoload[( ]:\w\+,\)\s*\%(::\)\=File\.expand_path(\(["'']\)\.\./.*\1,\s*__FILE__)\s*$'
let target = matchstr(getline('.'),'\(["'']\)\.\.\zs/.\{-\}\ze\1')
let cfile = expand('%:p:h') . target . ext
let cfile = expand('%:p:h') . target
let cfile .= cfile !~# '\.rb$' ? '.rb' : ''
elseif getline('.') =~# '^\s*\%(require \|load \|autoload :\w\+,\)\s*\(["'']\).*\1\s*$'
let cfile = matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1') . ext
let cfile = matchstr(getline('.'),'\(["'']\)\zs.\{-\}\ze\1')
let cfile .= cfile !~# '\.rb$' ? '.rb' : ''
elseif pre.post =~# '\<File.expand_path[( ].*[''"]\{2\}, *__FILE__\>' && cfile =~# '^\.\.'
let cfile = expand('%:p:h') . strpart(cfile, 2)
else

View File

@@ -2,6 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'meson') == -1
" Vim indent file
" Language: Meson
" License: VIM License
" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
" Original Authors: David Bustos <bustos@caltech.edu>
" Bram Moolenaar <Bram@vim.org>

View File

@@ -1,11 +1,11 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'octave') == -1
" Vim indent file
" Language: Octave
" Maintainer: Nguyễn Gia Phong <vn.mcsinyx@gmail.com>
" Language: Octave
" Maintainer: Nguyễn Gia Phong <vn.mcsinyx@gmail.com>
" Original Maintainer: Marcus Aurelius Farias <marcus.cf@bol.com.br>
" First Author: Max Ischenko <mfi@ukr.net>
" Last Change: 2019-10-11
" Last Change: 2019-10-16
" Only load this indent file when no other was loaded.
if exists("b:did_indent")

63
indent/rst.vim Normal file
View File

@@ -0,0 +1,63 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1
" Vim indent file
" Language: reStructuredText Documentation Format
" Previous Maintainer: Nikolai Weibull <now@bitwi.se>
" Latest Revision: 2011-08-03
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
setlocal indentexpr=GetRSTIndent()
setlocal indentkeys=!^F,o,O
setlocal nosmartindent
if exists("*GetRSTIndent")
finish
endif
let s:itemization_pattern = '^\s*[-*+]\s'
let s:enumeration_pattern = '^\s*\%(\d\+\|#\)\.\s\+'
function GetRSTIndent()
let lnum = prevnonblank(v:lnum - 1)
if lnum == 0
return 0
endif
let ind = indent(lnum)
let line = getline(lnum)
if line =~ s:itemization_pattern
let ind += 2
elseif line =~ s:enumeration_pattern
let ind += matchend(line, s:enumeration_pattern)
endif
let line = getline(v:lnum - 1)
" Indent :FIELD: lines. Dont match if there is no text after the field or
" if the text ends with a sent-ender.
if line =~ '^:.\+:\s\{-1,\}\S.\+[^.!?:]$'
return matchend(line, '^:.\{-1,}:\s\+')
endif
if line =~ '^\s*$'
execute lnum
call search('^\s*\%([-*+]\s\|\%(\d\+\|#\)\.\s\|\.\.\|$\)', 'bW')
let line = getline('.')
if line =~ s:itemization_pattern
let ind -= 2
elseif line =~ s:enumeration_pattern
let ind -= matchend(line, s:enumeration_pattern)
elseif line =~ '^\s*\.\.'
let ind -= 3
endif
endif
return ind
endfunction
endif

View File

@@ -67,8 +67,8 @@ let s:var_stmt = '^\s*var'
let s:comma_first = '^\s*,'
let s:comma_last = ',\s*$'
let s:ternary = '^\s\+[?|:]'
let s:ternary_q = '^\s\+?'
let s:ternary = '^\s\+[?:]'
let s:ternary_q = '^\s\+?[.?]\@!'
" 2. Auxiliary Functions {{{1
" ======================

View File

@@ -1,5 +1,6 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
exe 'runtime! indent/typescript.vim'
" Save the current JavaScript indentexpr.
let b:tsx_ts_indentexpr = &indentexpr
@@ -110,5 +111,4 @@ fu! GetTsxIndent()
return ind
endfu
endif

View File

@@ -22,7 +22,7 @@ syntax match typescriptProp contained /\K\k*!\?/
syntax region typescriptIndexExpr contained matchgroup=typescriptProperty start=/\[/rs=s+1 end=/]/he=e-1 contains=@typescriptValue nextgroup=@typescriptSymbols,typescriptDotNotation,typescriptFuncCallArg skipwhite skipempty
syntax match typescriptDotNotation /\./ nextgroup=typescriptProp skipnl
syntax match typescriptDotNotation /\.\|?\.\|!\./ nextgroup=typescriptProp skipnl
syntax match typescriptDotStyleNotation /\.style\./ nextgroup=typescriptDOMStyle transparent
" syntax match typescriptFuncCall contained /[a-zA-Z]\k*\ze(/ nextgroup=typescriptFuncCallArg
syntax region typescriptParenExp matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptComments,@typescriptValue,typescriptCastKeyword nextgroup=@typescriptSymbols skipwhite skipempty

View File

@@ -5,7 +5,7 @@ syntax match typescriptUnaryOp /[+\-~!]/
\ nextgroup=@typescriptValue
\ skipwhite
syntax region typescriptTernary matchgroup=typescriptTernaryOp start=/?/ end=/:/ contained contains=@typescriptValue,@typescriptComments nextgroup=@typescriptValue skipwhite skipempty
syntax region typescriptTernary matchgroup=typescriptTernaryOp start=/?[.?]\@!/ end=/:/ contained contains=@typescriptValue,@typescriptComments nextgroup=@typescriptValue skipwhite skipempty
syntax match typescriptAssign /=/ nextgroup=@typescriptValue
\ skipwhite skipempty

View File

@@ -52,7 +52,8 @@ syntax cluster typescriptPrimaryType contains=
\ typescriptTupleType,
\ typescriptTypeQuery,
\ typescriptStringLiteralType,
\ typescriptReadonlyArrayKeyword
\ typescriptReadonlyArrayKeyword,
\ typescriptAssertType
syntax region typescriptStringLiteralType contained
\ start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/
@@ -91,8 +92,8 @@ syntax cluster typescriptTypeMember contains=
syntax region typescriptTupleType matchgroup=typescriptBraces
\ start=/\[/ end=/\]/
\ contains=@typescriptType
\ contained skipwhite oneline
\ contains=@typescriptType,@typescriptComments
\ contained skipwhite
syntax cluster typescriptTypeOperator
\ contains=typescriptUnion,typescriptTypeBracket
@@ -130,6 +131,10 @@ syntax keyword typescriptTypeQuery typeof keyof
\ nextgroup=typescriptTypeReference
\ contained skipwhite skipnl
syntax keyword typescriptAssertType asserts
\ nextgroup=typescriptTypeReference
\ contained skipwhite skipnl
syntax cluster typescriptCallSignature contains=typescriptGenericCall,typescriptCall
syntax region typescriptGenericCall matchgroup=typescriptTypeBrackets
\ start=/</ end=/>/

View File

@@ -33,9 +33,7 @@ syn keyword carpSyntax relative-include not-on-windows load-and-use
syn keyword carpSyntax deftest
syn match carpSyntax "\vc(a|d){1,4}r"
syn keyword carpFunc Int Float Double Bool String Char Array Fn Ref Long λ
syn keyword carpFunc Maybe Map Result Set Pair
syn keyword carpFunc Pattern
syn keyword carpFunc λ
syn keyword carpFunc not or and + - * / = /= >= <= > < inc dec
syn keyword carpFunc println print get-line from-string mod random
syn keyword carpFunc random-between str mask delete append length duplicate
@@ -76,6 +74,8 @@ syn keyword carpFunc assert-op assert-equal assert-not-equal assert-true
syn keyword carpFunc assert-false assert-exit print-test-results with-test
syn keyword carpFunc dir-from-path file-from-path
syn match carpFunc "[A-Z]\w\+"
syn match carpSymbol ,\k+, contained
syn match carpTodo /\v<(FIXME|NOTE|TODO|OPTIMIZE)/ containedin=carpComment,carpString
@@ -105,8 +105,8 @@ syn region carpPattern start=/\%(\\\)\@<!\#"/ skip=/\\[\\"]/ end=/"/
syn cluster carpNormal add=carpError,carpStruc,carpString,carpPattern
syn cluster carpQuotedOrNormal add=carpString
syn match carpNumber "\<[-+]\?\(\d\+\|\d\+#*\.\|\d*\.\d\+\)#*\(/\d\+#*\)\?[lf]\?\>" contains=carpContainedNumberError
syn match carpNumber "\<[-+]\?\d\+/\d\+[lf]\?\>" contains=carpContainedNumberError
syn match carpNumber "\<[-+]\?\(\d\+\|\d\+#*\.\|\d*\.\d\+\)#*\(/\d\+#*\)\?[lfb]\?\>" contains=carpContainedNumberError
syn match carpNumber "\<[-+]\?\d\+/\d\+[lfb]\?\>" contains=carpContainedNumberError
syn keyword carpBoolean true false

View File

@@ -2,14 +2,14 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cmake') == -1
" Vim syntax file
" Program: CMake - Cross-Platform Makefile Generator
" Version: cmake version 3.14.20190529-g067a4f
" Version: cmake version 3.16.20191028-g0e4190b
" Language: CMake
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>,
" Nicholas Hutchinson <nshutchinson@gmail.com>,
" Patrick Boettcher <patrick.boettcher@posteo.de>
" Maintainer: Dimitri Merejkowsky <d.merej@gmail.com>
" Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.com>
" Last Change: 2019 May 29
" Last Change: 2019 oct. 29
"
" Licence: The CMake license applies to this file. See
" https://cmake.org/licensing
@@ -81,6 +81,7 @@ syn keyword cmakeProperty contained
\ AUTOMOC_EXECUTABLE
\ AUTOMOC_MACRO_NAMES
\ AUTOMOC_MOC_OPTIONS
\ AUTOMOC_PATH_PREFIX
\ AUTOMOC_SOURCE_GROUP
\ AUTOMOC_TARGETS_FOLDER
\ AUTORCC
@@ -145,6 +146,7 @@ syn keyword cmakeProperty contained
\ DEPLOYMENT_REMOTE_DIRECTORY
\ DISABLED
\ DISABLED_FEATURES
\ DISABLE_PRECOMPILE_HEADERS
\ DOTNET_TARGET_FRAMEWORK_VERSION
\ ECLIPSE_EXTRA_CPROJECT_CONTENTS
\ ECLIPSE_EXTRA_NATURES
@@ -202,6 +204,7 @@ syn keyword cmakeProperty contained
\ INCLUDE_DIRECTORIES
\ INCLUDE_REGULAR_EXPRESSION
\ INSTALL_NAME_DIR
\ INSTALL_REMOVE_ENVIRONMENT_RPATH
\ INSTALL_RPATH
\ INSTALL_RPATH_USE_LINK_PATH
\ INTERFACE_AUTOUIC_OPTIONS
@@ -214,6 +217,7 @@ syn keyword cmakeProperty contained
\ INTERFACE_LINK_LIBRARIES
\ INTERFACE_LINK_OPTIONS
\ INTERFACE_POSITION_INDEPENDENT_CODE
\ INTERFACE_PRECOMPILE_HEADERS
\ INTERFACE_SOURCES
\ INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
\ INTERPROCEDURAL_OPTIMIZATION
@@ -266,10 +270,13 @@ syn keyword cmakeProperty contained
\ PDB_OUTPUT_DIRECTORY
\ POSITION_INDEPENDENT_CODE
\ POST_INSTALL_SCRIPT
\ PRECOMPILE_HEADERS
\ PRECOMPILE_HEADERS_REUSE_FROM
\ PREDEFINED_TARGETS_FOLDER
\ PREFIX
\ PRE_INSTALL_SCRIPT
\ PRIVATE_HEADER
\ PROCESSES
\ PROCESSORS
\ PROCESSOR_AFFINITY
\ PROJECT_LABEL
@@ -290,7 +297,10 @@ syn keyword cmakeProperty contained
\ SKIP_AUTORCC
\ SKIP_AUTOUIC
\ SKIP_BUILD_RPATH
\ SKIP_PRECOMPILE_HEADERS
\ SKIP_REGULAR_EXPRESSION
\ SKIP_RETURN_CODE
\ SKIP_UNITY_BUILD_INCLUSION
\ SOURCES
\ SOURCE_DIR
\ SOVERSION
@@ -302,6 +312,7 @@ syn keyword cmakeProperty contained
\ SYMBOLIC
\ Swift_DEPENDENCIES_FILE
\ Swift_DIAGNOSTICS_FILE
\ Swift_LANGUAGE_VERSION
\ Swift_MODULE_DIRECTORY
\ Swift_MODULE_NAME
\ TARGET_ARCHIVES_MAY_BE_SHARED_LIBS
@@ -313,6 +324,10 @@ syn keyword cmakeProperty contained
\ TIMEOUT
\ TIMEOUT_AFTER_MATCH
\ TYPE
\ UNITY_BUILD
\ UNITY_BUILD_BATCH_SIZE
\ UNITY_BUILD_CODE_AFTER_INCLUDE
\ UNITY_BUILD_CODE_BEFORE_INCLUDE
\ USE_FOLDERS
\ VALUE
\ VARIABLES
@@ -327,9 +342,11 @@ syn keyword cmakeProperty contained
\ VS_DEPLOYMENT_CONTENT
\ VS_DEPLOYMENT_LOCATION
\ VS_DESKTOP_EXTENSIONS_VERSION
\ VS_DOTNET_DOCUMENTATION_FILE
\ VS_DOTNET_REFERENCES
\ VS_DOTNET_REFERENCES_COPY_LOCAL
\ VS_DOTNET_TARGET_FRAMEWORK_VERSION
\ VS_DPI_AWARE
\ VS_GLOBAL_KEYWORD
\ VS_GLOBAL_PROJECT_TYPES
\ VS_GLOBAL_ROOTNAMESPACE
@@ -340,6 +357,7 @@ syn keyword cmakeProperty contained
\ VS_KEYWORD
\ VS_MOBILE_EXTENSIONS_VERSION
\ VS_NO_SOLUTION_DEPLOY
\ VS_PACKAGE_REFERENCES
\ VS_PROJECT_IMPORT
\ VS_RESOURCE_GENERATOR
\ VS_SCC_AUXPATH
@@ -379,6 +397,7 @@ syn keyword cmakeProperty contained
\ XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
\ XCODE_SCHEME_ARGUMENTS
\ XCODE_SCHEME_DEBUG_AS_ROOT
\ XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
\ XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
\ XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
\ XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
@@ -483,6 +502,9 @@ syn keyword cmakeVariable contained
\ CMAKE_ASM_LINKER_WRAPPER_FLAG
\ CMAKE_ASM_LINKER_WRAPPER_FLAG_SEP
\ CMAKE_ASM_LINK_EXECUTABLE
\ CMAKE_ASM_LINK_LIBRARY_FILE_FLAG
\ CMAKE_ASM_LINK_LIBRARY_FLAG
\ CMAKE_ASM_LINK_LIBRARY_SUFFIX
\ CMAKE_ASM_MASM
\ CMAKE_ASM_MASM_ANDROID_TOOLCHAIN_MACHINE
\ CMAKE_ASM_MASM_ANDROID_TOOLCHAIN_PREFIX
@@ -533,6 +555,9 @@ syn keyword cmakeVariable contained
\ CMAKE_ASM_MASM_LINKER_WRAPPER_FLAG
\ CMAKE_ASM_MASM_LINKER_WRAPPER_FLAG_SEP
\ CMAKE_ASM_MASM_LINK_EXECUTABLE
\ CMAKE_ASM_MASM_LINK_LIBRARY_FILE_FLAG
\ CMAKE_ASM_MASM_LINK_LIBRARY_FLAG
\ CMAKE_ASM_MASM_LINK_LIBRARY_SUFFIX
\ CMAKE_ASM_MASM_OUTPUT_EXTENSION
\ CMAKE_ASM_MASM_PLATFORM_ID
\ CMAKE_ASM_MASM_SIMULATE_ID
@@ -592,6 +617,9 @@ syn keyword cmakeVariable contained
\ CMAKE_ASM_NASM_LINKER_WRAPPER_FLAG
\ CMAKE_ASM_NASM_LINKER_WRAPPER_FLAG_SEP
\ CMAKE_ASM_NASM_LINK_EXECUTABLE
\ CMAKE_ASM_NASM_LINK_LIBRARY_FILE_FLAG
\ CMAKE_ASM_NASM_LINK_LIBRARY_FLAG
\ CMAKE_ASM_NASM_LINK_LIBRARY_SUFFIX
\ CMAKE_ASM_NASM_OUTPUT_EXTENSION
\ CMAKE_ASM_NASM_PLATFORM_ID
\ CMAKE_ASM_NASM_SIMULATE_ID
@@ -618,6 +646,7 @@ syn keyword cmakeVariable contained
\ CMAKE_AUTOMOC_DEPEND_FILTERS
\ CMAKE_AUTOMOC_MACRO_NAMES
\ CMAKE_AUTOMOC_MOC_OPTIONS
\ CMAKE_AUTOMOC_PATH_PREFIX
\ CMAKE_AUTOMOC_RELAXED_MODE
\ CMAKE_AUTORCC
\ CMAKE_AUTORCC_OPTIONS
@@ -703,6 +732,9 @@ syn keyword cmakeVariable contained
\ CMAKE_CSharp_LINKER_WRAPPER_FLAG
\ CMAKE_CSharp_LINKER_WRAPPER_FLAG_SEP
\ CMAKE_CSharp_LINK_EXECUTABLE
\ CMAKE_CSharp_LINK_LIBRARY_FILE_FLAG
\ CMAKE_CSharp_LINK_LIBRARY_FLAG
\ CMAKE_CSharp_LINK_LIBRARY_SUFFIX
\ CMAKE_CSharp_OUTPUT_EXTENSION
\ CMAKE_CSharp_PLATFORM_ID
\ CMAKE_CSharp_SIMULATE_ID
@@ -765,8 +797,12 @@ syn keyword cmakeVariable contained
\ CMAKE_CUDA_LINKER_WRAPPER_FLAG
\ CMAKE_CUDA_LINKER_WRAPPER_FLAG_SEP
\ CMAKE_CUDA_LINK_EXECUTABLE
\ CMAKE_CUDA_LINK_LIBRARY_FILE_FLAG
\ CMAKE_CUDA_LINK_LIBRARY_FLAG
\ CMAKE_CUDA_LINK_LIBRARY_SUFFIX
\ CMAKE_CUDA_OUTPUT_EXTENSION
\ CMAKE_CUDA_PLATFORM_ID
\ CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS
\ CMAKE_CUDA_SEPARABLE_COMPILATION
\ CMAKE_CUDA_SIMULATE_ID
\ CMAKE_CUDA_SIMULATE_VERSION
@@ -835,6 +871,9 @@ syn keyword cmakeVariable contained
\ CMAKE_CXX_LINKER_WRAPPER_FLAG
\ CMAKE_CXX_LINKER_WRAPPER_FLAG_SEP
\ CMAKE_CXX_LINK_EXECUTABLE
\ CMAKE_CXX_LINK_LIBRARY_FILE_FLAG
\ CMAKE_CXX_LINK_LIBRARY_FLAG
\ CMAKE_CXX_LINK_LIBRARY_SUFFIX
\ CMAKE_CXX_OUTPUT_EXTENSION
\ CMAKE_CXX_PLATFORM_ID
\ CMAKE_CXX_SIMULATE_ID
@@ -897,6 +936,9 @@ syn keyword cmakeVariable contained
\ CMAKE_C_LINKER_WRAPPER_FLAG
\ CMAKE_C_LINKER_WRAPPER_FLAG_SEP
\ CMAKE_C_LINK_EXECUTABLE
\ CMAKE_C_LINK_LIBRARY_FILE_FLAG
\ CMAKE_C_LINK_LIBRARY_FLAG
\ CMAKE_C_LINK_LIBRARY_SUFFIX
\ CMAKE_C_OUTPUT_EXTENSION
\ CMAKE_C_PLATFORM_ID
\ CMAKE_C_SIMULATE_ID
@@ -912,11 +954,13 @@ syn keyword cmakeVariable contained
\ CMAKE_DEBUG_TARGET_PROPERTIES
\ CMAKE_DEPENDS_IN_PROJECT_ONLY
\ CMAKE_DIRECTORY_LABELS
\ CMAKE_DISABLE_PRECOMPILE_HEADERS
\ CMAKE_DL_LIBS
\ CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
\ CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES
\ CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
\ CMAKE_ECLIPSE_MAKE_ARGUMENTS
\ CMAKE_ECLIPSE_RESOURCE_ENCODING
\ CMAKE_ECLIPSE_VERSION
\ CMAKE_EDIT_COMMAND
\ CMAKE_ENABLE_EXPORTS
@@ -950,6 +994,12 @@ syn keyword cmakeVariable contained
\ CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
\ CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
\ CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
\ CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH
\ CMAKE_FIND_USE_CMAKE_PATH
\ CMAKE_FIND_USE_CMAKE_SYSTEM_PATH
\ CMAKE_FIND_USE_PACKAGE_REGISTRY
\ CMAKE_FIND_USE_PACKAGE_ROOT_PATH
\ CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH
\ CMAKE_FOLDER
\ CMAKE_FRAMEWORK
\ CMAKE_FRAMEWORK_PATH
@@ -1004,6 +1054,9 @@ syn keyword cmakeVariable contained
\ CMAKE_Fortran_LINKER_WRAPPER_FLAG
\ CMAKE_Fortran_LINKER_WRAPPER_FLAG_SEP
\ CMAKE_Fortran_LINK_EXECUTABLE
\ CMAKE_Fortran_LINK_LIBRARY_FILE_FLAG
\ CMAKE_Fortran_LINK_LIBRARY_FLAG
\ CMAKE_Fortran_LINK_LIBRARY_SUFFIX
\ CMAKE_Fortran_MODDIR_DEFAULT
\ CMAKE_Fortran_MODDIR_FLAG
\ CMAKE_Fortran_MODOUT_FLAG
@@ -1050,6 +1103,7 @@ syn keyword cmakeVariable contained
\ CMAKE_INSTALL_NAME_DIR
\ CMAKE_INSTALL_PREFIX
\ CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
\ CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH
\ CMAKE_INSTALL_RPATH
\ CMAKE_INSTALL_RPATH_USE_LINK_PATH
\ CMAKE_INTERNAL_PLATFORM_ABI
@@ -1108,6 +1162,9 @@ syn keyword cmakeVariable contained
\ CMAKE_Java_LINKER_WRAPPER_FLAG
\ CMAKE_Java_LINKER_WRAPPER_FLAG_SEP
\ CMAKE_Java_LINK_EXECUTABLE
\ CMAKE_Java_LINK_LIBRARY_FILE_FLAG
\ CMAKE_Java_LINK_LIBRARY_FLAG
\ CMAKE_Java_LINK_LIBRARY_SUFFIX
\ CMAKE_Java_OUTPUT_EXTENSION
\ CMAKE_Java_PLATFORM_ID
\ CMAKE_Java_SIMULATE_ID
@@ -1138,6 +1195,10 @@ syn keyword cmakeVariable contained
\ CMAKE_MAKE_PROGRAM
\ CMAKE_MATCH_COUNT
\ CMAKE_MAXIMUM_RECURSION_DEPTH
\ CMAKE_MESSAGE_CONTEXT
\ CMAKE_MESSAGE_CONTEXT_SHOW
\ CMAKE_MESSAGE_INDENT
\ CMAKE_MESSAGE_LOG_LEVEL
\ CMAKE_MFC_FLAG
\ CMAKE_MINIMUM_REQUIRED_VERSION
\ CMAKE_MINOR_VERSION
@@ -1223,6 +1284,9 @@ syn keyword cmakeVariable contained
\ CMAKE_RC_LINKER_WRAPPER_FLAG
\ CMAKE_RC_LINKER_WRAPPER_FLAG_SEP
\ CMAKE_RC_LINK_EXECUTABLE
\ CMAKE_RC_LINK_LIBRARY_FILE_FLAG
\ CMAKE_RC_LINK_LIBRARY_FLAG
\ CMAKE_RC_LINK_LIBRARY_SUFFIX
\ CMAKE_RC_OUTPUT_EXTENSION
\ CMAKE_RC_PLATFORM_ID
\ CMAKE_RC_SIMULATE_ID
@@ -1322,7 +1386,11 @@ syn keyword cmakeVariable contained
\ CMAKE_Swift_LINKER_WRAPPER_FLAG
\ CMAKE_Swift_LINKER_WRAPPER_FLAG_SEP
\ CMAKE_Swift_LINK_EXECUTABLE
\ CMAKE_Swift_LINK_LIBRARY_FILE_FLAG
\ CMAKE_Swift_LINK_LIBRARY_FLAG
\ CMAKE_Swift_LINK_LIBRARY_SUFFIX
\ CMAKE_Swift_MODULE_DIRECTORY
\ CMAKE_Swift_NUM_THREADS
\ CMAKE_Swift_OUTPUT_EXTENSION
\ CMAKE_Swift_PLATFORM_ID
\ CMAKE_Swift_SIMULATE_ID
@@ -1337,6 +1405,8 @@ syn keyword cmakeVariable contained
\ CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
\ CMAKE_TRY_COMPILE_TARGET_TYPE
\ CMAKE_TWEAK_VERSION
\ CMAKE_UNITY_BUILD
\ CMAKE_UNITY_BUILD_BATCH_SIZE
\ CMAKE_USER_MAKE_RULES_OVERRIDE
\ CMAKE_USER_MAKE_RULES_OVERRIDE_ASM
\ CMAKE_USER_MAKE_RULES_OVERRIDE_ASM_MASM
@@ -1365,6 +1435,7 @@ syn keyword cmakeVariable contained
\ CMAKE_VS_PLATFORM_NAME_DEFAULT
\ CMAKE_VS_PLATFORM_TOOLSET
\ CMAKE_VS_PLATFORM_TOOLSET_CUDA
\ CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR
\ CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE
\ CMAKE_VS_PLATFORM_TOOLSET_VERSION
\ CMAKE_VS_SDK_EXCLUDE_DIRECTORIES
@@ -1385,9 +1456,11 @@ syn keyword cmakeVariable contained
\ CMAKE_XCODE_PLATFORM_TOOLSET
\ CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER
\ CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
\ CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
\ CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
\ CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
\ CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
\ CMAKE_XCODE_SCHEME_ENVIRONMENT
\ CMAKE_XCODE_SCHEME_GUARD_MALLOC
\ CMAKE_XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP
\ CMAKE_XCODE_SCHEME_MALLOC_GUARD_EDGES
@@ -1403,7 +1476,6 @@ syn keyword cmakeVariable contained
\ CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
\ CPACK_INCLUDE_TOPLEVEL_DIRECTORY
\ CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
\ CPACK_INSTALL_SCRIPT
\ CPACK_PACKAGING_INSTALL_PREFIX
\ CPACK_SET_DESTDIR
\ CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
@@ -1480,6 +1552,283 @@ syn keyword cmakeVariable contained
\ CTEST_UPDATE_VERSION_OVERRIDE
\ CTEST_USE_LAUNCHERS
\ CYGWIN
\ DOXYGEN_ABBREVIATE_BRIEF
\ DOXYGEN_ALIASES
\ DOXYGEN_ALLEXTERNALS
\ DOXYGEN_ALLOW_UNICODE_NAMES
\ DOXYGEN_ALPHABETICAL_INDEX
\ DOXYGEN_ALWAYS_DETAILED_SEC
\ DOXYGEN_AUTOLINK_SUPPORT
\ DOXYGEN_BINARY_TOC
\ DOXYGEN_BRIEF_MEMBER_DESC
\ DOXYGEN_BUILTIN_STL_SUPPORT
\ DOXYGEN_CALLER_GRAPH
\ DOXYGEN_CALL_GRAPH
\ DOXYGEN_CASE_SENSE_NAMES
\ DOXYGEN_CHM_FILE
\ DOXYGEN_CHM_INDEX_ENCODING
\ DOXYGEN_CITE_BIB_FILES
\ DOXYGEN_CLANG_ASSISTED_PARSING
\ DOXYGEN_CLANG_DATABASE_PATH
\ DOXYGEN_CLANG_OPTIONS
\ DOXYGEN_CLASS_DIAGRAMS
\ DOXYGEN_CLASS_GRAPH
\ DOXYGEN_COLLABORATION_GRAPH
\ DOXYGEN_COLS_IN_ALPHA_INDEX
\ DOXYGEN_COMPACT_LATEX
\ DOXYGEN_COMPACT_RTF
\ DOXYGEN_CPP_CLI_SUPPORT
\ DOXYGEN_CREATE_SUBDIRS
\ DOXYGEN_DIAFILE_DIRS
\ DOXYGEN_DIA_PATH
\ DOXYGEN_DIRECTORY_GRAPH
\ DOXYGEN_DISABLE_INDEX
\ DOXYGEN_DISTRIBUTE_GROUP_DOC
\ DOXYGEN_DOCBOOK_OUTPUT
\ DOXYGEN_DOCBOOK_PROGRAMLISTING
\ DOXYGEN_DOCSET_BUNDLE_ID
\ DOXYGEN_DOCSET_FEEDNAME
\ DOXYGEN_DOCSET_PUBLISHER_ID
\ DOXYGEN_DOCSET_PUBLISHER_NAME
\ DOXYGEN_DOTFILE_DIRS
\ DOXYGEN_DOT_CLEANUP
\ DOXYGEN_DOT_FONTNAME
\ DOXYGEN_DOT_FONTPATH
\ DOXYGEN_DOT_FONTSIZE
\ DOXYGEN_DOT_GRAPH_MAX_NODES
\ DOXYGEN_DOT_IMAGE_FORMAT
\ DOXYGEN_DOT_MULTI_TARGETS
\ DOXYGEN_DOT_NUM_THREADS
\ DOXYGEN_DOT_PATH
\ DOXYGEN_DOT_TRANSPARENT
\ DOXYGEN_DOXYFILE_ENCODING
\ DOXYGEN_ECLIPSE_DOC_ID
\ DOXYGEN_ENABLED_SECTIONS
\ DOXYGEN_ENABLE_PREPROCESSING
\ DOXYGEN_ENUM_VALUES_PER_LINE
\ DOXYGEN_EXAMPLE_PATH
\ DOXYGEN_EXAMPLE_PATTERNS
\ DOXYGEN_EXAMPLE_RECURSIVE
\ DOXYGEN_EXCLUDE
\ DOXYGEN_EXCLUDE_PATTERNS
\ DOXYGEN_EXCLUDE_SYMBOLS
\ DOXYGEN_EXCLUDE_SYMLINKS
\ DOXYGEN_EXPAND_AS_DEFINED
\ DOXYGEN_EXPAND_ONLY_PREDEF
\ DOXYGEN_EXTENSION_MAPPING
\ DOXYGEN_EXTERNAL_GROUPS
\ DOXYGEN_EXTERNAL_PAGES
\ DOXYGEN_EXTERNAL_SEARCH
\ DOXYGEN_EXTERNAL_SEARCH_ID
\ DOXYGEN_EXTRACT_ALL
\ DOXYGEN_EXTRACT_ANON_NSPACES
\ DOXYGEN_EXTRACT_LOCAL_CLASSES
\ DOXYGEN_EXTRACT_LOCAL_METHODS
\ DOXYGEN_EXTRACT_PACKAGE
\ DOXYGEN_EXTRACT_PRIVATE
\ DOXYGEN_EXTRACT_PRIV_VIRTUAL
\ DOXYGEN_EXTRACT_STATIC
\ DOXYGEN_EXTRA_PACKAGES
\ DOXYGEN_EXTRA_SEARCH_MAPPINGS
\ DOXYGEN_EXT_LINKS_IN_WINDOW
\ DOXYGEN_FILE_PATTERNS
\ DOXYGEN_FILE_VERSION_FILTER
\ DOXYGEN_FILTER_PATTERNS
\ DOXYGEN_FILTER_SOURCE_FILES
\ DOXYGEN_FILTER_SOURCE_PATTERNS
\ DOXYGEN_FORCE_LOCAL_INCLUDES
\ DOXYGEN_FORMULA_FONTSIZE
\ DOXYGEN_FORMULA_TRANSPARENT
\ DOXYGEN_FULL_PATH_NAMES
\ DOXYGEN_GENERATE_AUTOGEN_DEF
\ DOXYGEN_GENERATE_BUGLIST
\ DOXYGEN_GENERATE_CHI
\ DOXYGEN_GENERATE_DEPRECATEDLIST
\ DOXYGEN_GENERATE_DOCBOOK
\ DOXYGEN_GENERATE_DOCSET
\ DOXYGEN_GENERATE_ECLIPSEHELP
\ DOXYGEN_GENERATE_HTML
\ DOXYGEN_GENERATE_HTMLHELP
\ DOXYGEN_GENERATE_LATEX
\ DOXYGEN_GENERATE_LEGEND
\ DOXYGEN_GENERATE_MAN
\ DOXYGEN_GENERATE_PERLMOD
\ DOXYGEN_GENERATE_QHP
\ DOXYGEN_GENERATE_RTF
\ DOXYGEN_GENERATE_TAGFILE
\ DOXYGEN_GENERATE_TESTLIST
\ DOXYGEN_GENERATE_TODOLIST
\ DOXYGEN_GENERATE_TREEVIEW
\ DOXYGEN_GENERATE_XML
\ DOXYGEN_GRAPHICAL_HIERARCHY
\ DOXYGEN_GROUP_GRAPHS
\ DOXYGEN_GROUP_NESTED_COMPOUNDS
\ DOXYGEN_HAVE_DOT
\ DOXYGEN_HHC_LOCATION
\ DOXYGEN_HIDE_COMPOUND_REFERENCE
\ DOXYGEN_HIDE_FRIEND_COMPOUNDS
\ DOXYGEN_HIDE_IN_BODY_DOCS
\ DOXYGEN_HIDE_SCOPE_NAMES
\ DOXYGEN_HIDE_UNDOC_CLASSES
\ DOXYGEN_HIDE_UNDOC_MEMBERS
\ DOXYGEN_HIDE_UNDOC_RELATIONS
\ DOXYGEN_HTML_COLORSTYLE_GAMMA
\ DOXYGEN_HTML_COLORSTYLE_HUE
\ DOXYGEN_HTML_COLORSTYLE_SAT
\ DOXYGEN_HTML_DYNAMIC_MENUS
\ DOXYGEN_HTML_DYNAMIC_SECTIONS
\ DOXYGEN_HTML_EXTRA_FILES
\ DOXYGEN_HTML_EXTRA_STYLESHEET
\ DOXYGEN_HTML_FILE_EXTENSION
\ DOXYGEN_HTML_FOOTER
\ DOXYGEN_HTML_HEADER
\ DOXYGEN_HTML_INDEX_NUM_ENTRIES
\ DOXYGEN_HTML_OUTPUT
\ DOXYGEN_HTML_STYLESHEET
\ DOXYGEN_HTML_TIMESTAMP
\ DOXYGEN_IDL_PROPERTY_SUPPORT
\ DOXYGEN_IGNORE_PREFIX
\ DOXYGEN_IMAGE_PATH
\ DOXYGEN_INCLUDED_BY_GRAPH
\ DOXYGEN_INCLUDE_FILE_PATTERNS
\ DOXYGEN_INCLUDE_GRAPH
\ DOXYGEN_INCLUDE_PATH
\ DOXYGEN_INHERIT_DOCS
\ DOXYGEN_INLINE_GROUPED_CLASSES
\ DOXYGEN_INLINE_INFO
\ DOXYGEN_INLINE_INHERITED_MEMB
\ DOXYGEN_INLINE_SIMPLE_STRUCTS
\ DOXYGEN_INLINE_SOURCES
\ DOXYGEN_INPUT
\ DOXYGEN_INPUT_ENCODING
\ DOXYGEN_INPUT_FILTER
\ DOXYGEN_INTERACTIVE_SVG
\ DOXYGEN_INTERNAL_DOCS
\ DOXYGEN_JAVADOC_AUTOBRIEF
\ DOXYGEN_JAVADOC_BANNER
\ DOXYGEN_LATEX_BATCHMODE
\ DOXYGEN_LATEX_BIB_STYLE
\ DOXYGEN_LATEX_CMD_NAME
\ DOXYGEN_LATEX_EMOJI_DIRECTORY
\ DOXYGEN_LATEX_EXTRA_FILES
\ DOXYGEN_LATEX_EXTRA_STYLESHEET
\ DOXYGEN_LATEX_FOOTER
\ DOXYGEN_LATEX_HEADER
\ DOXYGEN_LATEX_HIDE_INDICES
\ DOXYGEN_LATEX_MAKEINDEX_CMD
\ DOXYGEN_LATEX_OUTPUT
\ DOXYGEN_LATEX_SOURCE_CODE
\ DOXYGEN_LATEX_TIMESTAMP
\ DOXYGEN_LAYOUT_FILE
\ DOXYGEN_LOOKUP_CACHE_SIZE
\ DOXYGEN_MACRO_EXPANSION
\ DOXYGEN_MAKEINDEX_CMD_NAME
\ DOXYGEN_MAN_EXTENSION
\ DOXYGEN_MAN_LINKS
\ DOXYGEN_MAN_OUTPUT
\ DOXYGEN_MAN_SUBDIR
\ DOXYGEN_MARKDOWN_SUPPORT
\ DOXYGEN_MATHJAX_CODEFILE
\ DOXYGEN_MATHJAX_EXTENSIONS
\ DOXYGEN_MATHJAX_FORMAT
\ DOXYGEN_MATHJAX_RELPATH
\ DOXYGEN_MAX_DOT_GRAPH_DEPTH
\ DOXYGEN_MAX_INITIALIZER_LINES
\ DOXYGEN_MSCFILE_DIRS
\ DOXYGEN_MULTILINE_CPP_IS_BRIEF
\ DOXYGEN_OPTIMIZE_FOR_FORTRAN
\ DOXYGEN_OPTIMIZE_OUTPUT_FOR_C
\ DOXYGEN_OPTIMIZE_OUTPUT_JAVA
\ DOXYGEN_OPTIMIZE_OUTPUT_SLICE
\ DOXYGEN_OPTIMIZE_OUTPUT_VHDL
\ DOXYGEN_OUTPUT_DIRECTORY
\ DOXYGEN_OUTPUT_LANGUAGE
\ DOXYGEN_OUTPUT_TEXT_DIRECTION
\ DOXYGEN_PAPER_TYPE
\ DOXYGEN_PDF_HYPERLINKS
\ DOXYGEN_PERLMOD_LATEX
\ DOXYGEN_PERLMOD_MAKEVAR_PREFIX
\ DOXYGEN_PERLMOD_PRETTY
\ DOXYGEN_PLANTUML_CFG_FILE
\ DOXYGEN_PLANTUML_INCLUDE_PATH
\ DOXYGEN_PLANTUML_JAR_PATH
\ DOXYGEN_PREDEFINED
\ DOXYGEN_PROJECT_BRIEF
\ DOXYGEN_PROJECT_LOGO
\ DOXYGEN_PROJECT_NAME
\ DOXYGEN_PROJECT_NUMBER
\ DOXYGEN_QCH_FILE
\ DOXYGEN_QHG_LOCATION
\ DOXYGEN_QHP_CUST_FILTER_ATTRS
\ DOXYGEN_QHP_CUST_FILTER_NAME
\ DOXYGEN_QHP_NAMESPACE
\ DOXYGEN_QHP_SECT_FILTER_ATTRS
\ DOXYGEN_QHP_VIRTUAL_FOLDER
\ DOXYGEN_QT_AUTOBRIEF
\ DOXYGEN_QUIET
\ DOXYGEN_RECURSIVE
\ DOXYGEN_REFERENCED_BY_RELATION
\ DOXYGEN_REFERENCES_LINK_SOURCE
\ DOXYGEN_REFERENCES_RELATION
\ DOXYGEN_REPEAT_BRIEF
\ DOXYGEN_RTF_EXTENSIONS_FILE
\ DOXYGEN_RTF_HYPERLINKS
\ DOXYGEN_RTF_OUTPUT
\ DOXYGEN_RTF_SOURCE_CODE
\ DOXYGEN_RTF_STYLESHEET_FILE
\ DOXYGEN_SEARCHDATA_FILE
\ DOXYGEN_SEARCHENGINE
\ DOXYGEN_SEARCHENGINE_URL
\ DOXYGEN_SEARCH_INCLUDES
\ DOXYGEN_SEPARATE_MEMBER_PAGES
\ DOXYGEN_SERVER_BASED_SEARCH
\ DOXYGEN_SHORT_NAMES
\ DOXYGEN_SHOW_FILES
\ DOXYGEN_SHOW_GROUPED_MEMB_INC
\ DOXYGEN_SHOW_INCLUDE_FILES
\ DOXYGEN_SHOW_NAMESPACES
\ DOXYGEN_SHOW_USED_FILES
\ DOXYGEN_SIP_SUPPORT
\ DOXYGEN_SKIP_FUNCTION_MACROS
\ DOXYGEN_SORT_BRIEF_DOCS
\ DOXYGEN_SORT_BY_SCOPE_NAME
\ DOXYGEN_SORT_GROUP_NAMES
\ DOXYGEN_SORT_MEMBERS_CTORS_1ST
\ DOXYGEN_SORT_MEMBER_DOCS
\ DOXYGEN_SOURCE_BROWSER
\ DOXYGEN_SOURCE_TOOLTIPS
\ DOXYGEN_STRICT_PROTO_MATCHING
\ DOXYGEN_STRIP_CODE_COMMENTS
\ DOXYGEN_STRIP_FROM_INC_PATH
\ DOXYGEN_STRIP_FROM_PATH
\ DOXYGEN_SUBGROUPING
\ DOXYGEN_TAB_SIZE
\ DOXYGEN_TAGFILES
\ DOXYGEN_TCL_SUBST
\ DOXYGEN_TEMPLATE_RELATIONS
\ DOXYGEN_TOC_EXPAND
\ DOXYGEN_TOC_INCLUDE_HEADINGS
\ DOXYGEN_TREEVIEW_WIDTH
\ DOXYGEN_TYPEDEF_HIDES_STRUCT
\ DOXYGEN_UML_LIMIT_NUM_FIELDS
\ DOXYGEN_UML_LOOK
\ DOXYGEN_USE_HTAGS
\ DOXYGEN_USE_MATHJAX
\ DOXYGEN_USE_MDFILE_AS_MAINPAGE
\ DOXYGEN_USE_PDFLATEX
\ DOXYGEN_VERBATIM_HEADERS
\ DOXYGEN_VERBATIM_VARS
\ DOXYGEN_VERSION
\ DOXYGEN_WARNINGS
\ DOXYGEN_WARN_AS_ERROR
\ DOXYGEN_WARN_FORMAT
\ DOXYGEN_WARN_IF_DOC_ERROR
\ DOXYGEN_WARN_IF_UNDOCUMENTED
\ DOXYGEN_WARN_LOGFILE
\ DOXYGEN_WARN_NO_PARAMDOC
\ DOXYGEN_XML_NS_MEMB_FILE_SCOPE
\ DOXYGEN_XML_OUTPUT
\ DOXYGEN_XML_PROGRAMLISTING
\ ENV
\ EXECUTABLE_OUTPUT_PATH
\ GHS-MULTI
@@ -1658,6 +2007,7 @@ syn keyword cmakeKWadd_custom_command contained
\ MAIN_DEPENDENCY
\ NOT
\ OUTPUT
\ PATH
\ POST_BUILD
\ PRE_BUILD
\ PRE_LINK
@@ -1682,7 +2032,9 @@ syn keyword cmakeKWadd_custom_target contained
\ JOB_POOL
\ JOB_POOLS
\ JOIN
\ PATH
\ SOURCES
\ TARGET_FILE
\ TARGET_PROPERTY
\ USES_TERMINAL
\ VERBATIM
@@ -1762,11 +2114,13 @@ syn keyword cmakeKWadd_subdirectory contained
syn keyword cmakeKWadd_test contained
\ BUILD_TESTING
\ COMMAND
\ COMMAND_EXPAND_LISTS
\ CONFIGURATIONS
\ FAIL_REGULAR_EXPRESSION
\ NAME
\ OFF
\ PASS_REGULAR_EXPRESSION
\ SKIP_REGULAR_EXPRESSION
\ TARGET_FILE
\ WILL_FAIL
\ WORKING_DIRECTORY
@@ -1921,6 +2275,7 @@ syn keyword cmakeKWctest_run_script contained
syn keyword cmakeKWctest_start contained
\ APPEND
\ GROUP
\ QUIET
\ TAG
\ TRACK
@@ -1952,6 +2307,7 @@ syn keyword cmakeKWctest_test contained
\ EXCLUDE_FIXTURE_CLEANUP
\ EXCLUDE_FIXTURE_SETUP
\ EXCLUDE_LABEL
\ HARDWARE_SPEC_FILE
\ INCLUDE
\ INCLUDE_LABEL
\ OFF
@@ -1991,9 +2347,17 @@ syn keyword cmakeKWdefine_property contained
\ TEST
\ VARIABLE
syn keyword cmakeKWdoxygen_add_docs contained
\ ALL
\ COMMENT
\ USE_STAMP_FILE
\ WORKING_DIRECTORY
syn keyword cmakeKWenable_language contained
\ ASM
\ CUDA
\ OBJC
\ OBJCXX
\ OPTIONAL
syn keyword cmakeKWenable_testing contained
@@ -2057,20 +2421,30 @@ syn keyword cmakeKWfile contained
\ ALGO
\ APPEND
\ ASCII
\ BUNDLE_EXECTUBLE
\ BUNDLE_EXECUTABLE
\ CMAKE_GET_RUNTIME_DEPENDENCIES_COMMAND
\ CMAKE_GET_RUNTIME_DEPENDENCIES_PLATFORM
\ CMAKE_GET_RUNTIME_DEPENDENCIES_TOOL
\ CMAKE_TLS_CAINFO
\ CMAKE_TLS_VERIFY
\ CODE
\ CONDITION
\ CONFIG
\ CONFIGURE_DEPENDS
\ CONFLICTING_DEPENDENCIES_PREFIX
\ CONFLICTING_DEPENDENICES_PREFIX
\ CONTENT
\ COPY
\ COPY_ON_ERROR
\ CREATE_LINK
\ DESTINATION
\ DIRECTORIES
\ DIRECTORY_PERMISSIONS
\ DLL
\ DOWNLOAD
\ ENCODING
\ EXCLUDE
\ EXECUTABLES
\ EXPECTED_HASH
\ FILES_MATCHING
\ FILE_PERMISSIONS
@@ -2078,6 +2452,7 @@ syn keyword cmakeKWfile contained
\ FOLLOW_SYMLINK_CHAIN
\ FUNCTION
\ GENERATE
\ GET_RUNTIME_DEPENDENCIES
\ GLOB
\ GLOB_RECURSE
\ GUARD
@@ -2091,6 +2466,7 @@ syn keyword cmakeKWfile contained
\ LENGTH_MAXIMUM
\ LENGTH_MINIMUM
\ LF
\ LIBRARIES
\ LIMIT
\ LIMIT_COUNT
\ LIMIT_INPUT
@@ -2099,6 +2475,8 @@ syn keyword cmakeKWfile contained
\ LOCK
\ LOG
\ MAKE_DIRECTORY
\ MODULES
\ MYLIBRARY
\ NETRC
\ NETRC_FILE
\ NEWLINE_CONSUME
@@ -2110,6 +2488,10 @@ syn keyword cmakeKWfile contained
\ OPTIONAL
\ OUTPUT
\ PATTERN
\ POST_EXCLUDE_REGEXES
\ POST_INCLUDE_REGEXES
\ PRE_EXCLUDE_REGEXES
\ PRE_INCLUDE_REGEXES
\ PROCESS
\ READ
\ READ_SYMLINK
@@ -2120,11 +2502,17 @@ syn keyword cmakeKWfile contained
\ REMOVE_RECURSE
\ RENAME
\ REQUIRED
\ RESOLVED_DEPENDENCIES_VAR
\ RESULT
\ RESULT_VARIABLE
\ RPATH
\ RUNPATH
\ SCRIPT
\ SHARED
\ SHOW_PROGRESS
\ SIZE
\ SSL
\ STATIC
\ STATUS
\ STRINGS
\ SYMBOLIC
@@ -2135,6 +2523,7 @@ syn keyword cmakeKWfile contained
\ TOUCH_NOCREATE
\ TO_CMAKE_PATH
\ TO_NATIVE_PATH
\ UNRESOLVED_DEPENDENCIES_VAR
\ UPLOAD
\ URL
\ USERPWD
@@ -2142,11 +2531,13 @@ syn keyword cmakeKWfile contained
\ UTC
\ UTF
\ WRITE
\ _FILENAMES
syn keyword cmakeKWfind_file contained
\ CMAKE_FIND_ROOT_PATH_BOTH
\ DOC
\ DVAR
\ FALSE
\ HINTS
\ INCLUDE
\ NAMES
@@ -2166,8 +2557,9 @@ syn keyword cmakeKWfind_library contained
\ CMAKE_FIND_ROOT_PATH_BOTH
\ DOC
\ DVAR
\ FALSE
\ HINTS
\ LIB
\ INCLUDE
\ NAMES
\ NAMES_PER_DIR
\ NO_CMAKE_ENVIRONMENT_PATH
@@ -2193,6 +2585,7 @@ syn keyword cmakeKWfind_package contained
\ DEC
\ DVAR
\ EXACT
\ FALSE
\ FRAMEWORK
\ HINTS
\ MODULE
@@ -2244,6 +2637,7 @@ syn keyword cmakeKWfind_path contained
\ CMAKE_FIND_ROOT_PATH_BOTH
\ DOC
\ DVAR
\ FALSE
\ HINTS
\ INCLUDE
\ NAMES
@@ -2263,6 +2657,7 @@ syn keyword cmakeKWfind_program contained
\ CMAKE_FIND_ROOT_PATH_BOTH
\ DOC
\ DVAR
\ FALSE
\ HINTS
\ NAMES
\ NAMES_PER_DIR
@@ -2413,6 +2808,7 @@ syn keyword cmakeKWinclude_guard contained
syn keyword cmakeKWinstall contained
\ AFTER
\ AIX
\ APT
\ ARCHIVE
\ BEFORE
@@ -2446,6 +2842,7 @@ syn keyword cmakeKWinstall contained
\ DIRECTORY_PERMISSIONS
\ DLL
\ DOC
\ ENABLE_EXPORTS
\ EXCLUDE_FROM_ALL
\ EXPORT
\ EXPORT_ANDROID_MK
@@ -2627,12 +3024,14 @@ syn keyword cmakeKWproject contained
\ LANGUAGES
\ NAME
\ NONE
\ OBJC
\ OBJCXX
\ PROJECT
\ VERSION
\ _BINARY_DIR
\ _DESCRIPTION
\ _HOMEPAGE_URL
\ _INCLUDE
\ _INCLUDE_BEFORE
\ _SOURCE_DIR
\ _VERSION
\ _VERSION_MAJOR
@@ -2855,6 +3254,22 @@ syn keyword cmakeKWtarget_link_options contained
\ _LINKER_WRAPPER_FLAG
\ _LINKER_WRAPPER_FLAG_SEP
syn keyword cmakeKWtarget_precompile_headers contained
\ ALIAS
\ COMPILE_LANGUAGE
\ DISABLE_PRECOMPILE_HEADERS
\ FI
\ GCC
\ IMPORTED
\ INTERFACE
\ INTERFACE_PRECOMPILE_HEADERS
\ PRECOMPILE_HEADERS
\ PRECOMPILE_HEADERS_REUSE_FROM
\ PRIVATE
\ PUBLIC
\ REUSE_FROM
\ SKIP_PRECOMPILE_HEADERS
syn keyword cmakeKWtarget_sources contained
\ ALIAS
\ IMPORTED
@@ -3007,6 +3422,10 @@ syn keyword cmakeGeneratorExpressions contained
\ MAP_IMPORTED_CONFIG_
\ NO
\ NOT
\ OBJCXX_COMPILER_ID
\ OBJCXX_COMPILER_VERSION
\ OBJC_COMPILER_ID
\ OBJC_COMPILER_VERSION
\ OFF
\ OLD_COMPILER
\ OUTPUT_NAME
@@ -3157,6 +3576,7 @@ syn keyword cmakeCommand
\ target_link_directories
\ target_link_libraries
\ target_link_options
\ target_precompile_headers
\ target_sources
\ try_compile
\ try_run
@@ -3252,6 +3672,7 @@ hi def link cmakeKWctest_test ModeMsg
hi def link cmakeKWctest_update ModeMsg
hi def link cmakeKWctest_upload ModeMsg
hi def link cmakeKWdefine_property ModeMsg
hi def link cmakeKWdoxygen_add_docs ModeMsg
hi def link cmakeKWenable_language ModeMsg
hi def link cmakeKWenable_testing ModeMsg
hi def link cmakeKWexec_program ModeMsg
@@ -3313,6 +3734,7 @@ hi def link cmakeKWtarget_include_directories ModeMsg
hi def link cmakeKWtarget_link_directories ModeMsg
hi def link cmakeKWtarget_link_libraries ModeMsg
hi def link cmakeKWtarget_link_options ModeMsg
hi def link cmakeKWtarget_precompile_headers ModeMsg
hi def link cmakeKWtarget_sources ModeMsg
hi def link cmakeKWtry_compile ModeMsg
hi def link cmakeKWtry_run ModeMsg

View File

@@ -9,7 +9,7 @@ command -nargs=+ HiLink hi def link <args>
"Dollar sign is permitted anywhere in an identifier
setlocal iskeyword-=$
if main_syntax == 'typescript' || main_syntax == 'typescript.tsx'
if main_syntax == 'typescript' || main_syntax == 'typescriptreact'
setlocal iskeyword+=$
" syntax cluster htmlJavaScript contains=TOP
endif
@@ -155,6 +155,7 @@ if exists("did_typescript_hilink")
HiLink typescriptTypeReference Identifier
HiLink typescriptConstructor Keyword
HiLink typescriptDecorator Special
HiLink typescriptAssertType Keyword
highlight link typeScript NONE

View File

@@ -52,7 +52,7 @@ syn keyword elixirBoolean true false nil
syn match elixirVariable '@[a-z]\w*'
syn match elixirVariable '&\d\+'
syn keyword elixirPseudoVariable __FILE__ __DIR__ __MODULE__ __ENV__ __CALLER__
syn keyword elixirPseudoVariable __FILE__ __DIR__ __MODULE__ __ENV__ __CALLER__ __STACKTRACE__
syn match elixirNumber '\<-\?\d\(_\?\d\)*\(\.[^[:space:][:digit:]]\@!\(_\?\d\)*\)\?\([eE][-+]\?\d\(_\?\d\)*\)\?\>'
syn match elixirNumber '\<-\?0[xX][0-9A-Fa-f]\+\>'

6
syntax/flow.vim Normal file
View File

@@ -0,0 +1,6 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1
runtime syntax/javascript.vim
runtime extras/flow.vim
endif

View File

@@ -34,7 +34,7 @@ syn match gitDiffRemoved "\[-.*-\]" contained containedin=gitDiff
syn match gitKeyword /^\%(object\|type\|tag\|commit\|tree\|parent\|encoding\)\>/ contained containedin=gitHead nextgroup=gitHash,gitType skipwhite
syn match gitKeyword /^\%(tag\>\|ref:\)/ contained containedin=gitHead nextgroup=gitReference skipwhite
syn match gitKeyword /^Merge:/ contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite
syn match gitMode /^\d\{6\}/ contained containedin=gitHead nextgroup=gitType,gitHash skipwhite
syn match gitMode /^\d\{6\}\>/ contained containedin=gitHead nextgroup=gitType,gitHash skipwhite
syn match gitIdentityKeyword /^\%(author\|committer\|tagger\)\>/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
syn match gitIdentityHeader /^\%(Author\|Commit\|Tagger\):/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
syn match gitDateHeader /^\%(AuthorDate\|CommitDate\|Date\):/ contained containedin=gitHead nextgroup=gitDate skipwhite

View File

@@ -164,15 +164,21 @@ endif
syn match goSingleDecl /\%(import\|var\|const\) [^(]\@=/ contains=goImport,goVar,goConst
" Integers
syn match goDecimalInt "\<-\=\d\+\%([Ee][-+]\=\d\+\)\=\>"
syn match goDecimalInt "\<-\=\(0\|[1-9]\d*\)\%([Ee][-+]\=\d\+\)\=\>"
syn match goHexadecimalInt "\<-\=0[xX]\x\+\>"
syn match goHexadecimalError "\<-\=0[xX]\x*[^ \t0-9A-Fa-f]\S*\>"
syn match goOctalInt "\<-\=0\o\+\>"
syn match goOctalError "\<-\=0\o*[89]\d*\>"
syn match goOctalError "\<-\=0[XxBb\]]\@!\o*[^ \t0-7]\S*\>"
syn match goBinaryInt "\<-\=0[bB][01]\+\>"
syn match goBinaryError "\<-\=0[bB][01]*[^ \t01]\S*\>"
hi def link goDecimalInt Integer
hi def link goHexadecimalInt Integer
hi def link goHexadecimalError Error
hi def link goOctalInt Integer
hi def link goOctalError Error
hi def link goBinaryInt Integer
hi def link goBinaryError Error
hi def link Integer Number
" Floating point
@@ -384,6 +390,13 @@ hi def link goCoverageNormalText Comment
function! s:hi()
hi def link goSameId Search
hi def link goDiagnosticError SpellBad
hi def link goDiagnosticWarning SpellRare
hi def link goDeclsFzfKeyword Keyword
hi def link goDeclsFzfFunction Function
hi def link goDeclsFzfSpecialComment SpecialComment
hi def link goDeclsFzfComment Comment
" :GoCoverage commands
hi def goCoverageCovered ctermfg=green guifg=#A6E22E

View File

@@ -112,7 +112,7 @@ syntax keyword jsAsyncKeyword async await
syntax match jsSwitchColon contained /::\@!/ skipwhite skipempty nextgroup=jsSwitchBlock
" Keywords
syntax keyword jsGlobalObjects Array Boolean Date Function Iterator Number Object Symbol Map WeakMap Set WeakSet RegExp String Proxy Promise Buffer ParallelArray ArrayBuffer DataView Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray JSON Math console document window Intl Collator DateTimeFormat NumberFormat fetch
syntax keyword jsGlobalObjects ArrayBuffer Array BigInt64Array BigUint64Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray Boolean Buffer Collator DataView Date DateTimeFormat Function Intl Iterator JSON Map Set WeakMap WeakSet Math Number NumberFormat Object ParallelArray Promise Proxy Reflect RegExp String Symbol Uint8ClampedArray WebAssembly console document fetch window
syntax keyword jsGlobalNodeObjects module exports global process __dirname __filename
syntax match jsGlobalNodeObjects /\<require\>/ containedin=jsFuncCall
syntax keyword jsExceptions Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError
@@ -152,7 +152,7 @@ syntax region jsSwitchBlock contained matchgroup=jsSwitchBraces s
syntax region jsRepeatBlock contained matchgroup=jsRepeatBraces start=/{/ end=/}/ contains=@jsAll,jsBlock extend fold
syntax region jsDestructuringBlock contained matchgroup=jsDestructuringBraces start=/{/ end=/}/ contains=jsDestructuringProperty,jsDestructuringAssignment,jsDestructuringNoise,jsDestructuringPropertyComputed,jsSpreadExpression,jsComment nextgroup=jsFlowDefinition extend fold
syntax region jsDestructuringArray contained matchgroup=jsDestructuringBraces start=/\[/ end=/\]/ contains=jsDestructuringPropertyValue,jsDestructuringNoise,jsDestructuringProperty,jsSpreadExpression,jsDestructuringBlock,jsDestructuringArray,jsComment nextgroup=jsFlowDefinition extend fold
syntax region jsObject contained matchgroup=jsObjectBraces start=/{/ end=/}/ contains=jsObjectKey,jsObjectKeyString,jsObjectKeyComputed,jsObjectShorthandProp,jsObjectSeparator,jsObjectFuncName,jsObjectMethodType,jsGenerator,jsComment,jsObjectStringKey,jsSpreadExpression,jsDecorator,jsAsyncKeyword extend fold
syntax region jsObject contained matchgroup=jsObjectBraces start=/{/ end=/}/ contains=jsObjectKey,jsObjectKeyString,jsObjectKeyComputed,jsObjectShorthandProp,jsObjectSeparator,jsObjectFuncName,jsObjectMethodType,jsGenerator,jsComment,jsObjectStringKey,jsSpreadExpression,jsDecorator,jsAsyncKeyword,jsTemplateString extend fold
syntax region jsBlock matchgroup=jsBraces start=/{/ end=/}/ contains=@jsAll,jsSpreadExpression extend fold
syntax region jsModuleGroup contained matchgroup=jsModuleBraces start=/{/ end=/}/ contains=jsModuleKeyword,jsModuleComma,jsModuleAs,jsComment,jsFlowTypeKeyword skipwhite skipempty nextgroup=jsFrom fold
syntax region jsSpreadExpression contained matchgroup=jsSpreadOperator start=/\.\.\./ end=/[,}\]]\@=/ contains=@jsExpression

View File

@@ -2,6 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'meson') == -1
" Vim syntax file
" Language: Meson
" License: VIM License
" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
" Last Change: 2016 Dec 7
" Credits: Zvezdan Petkovic <zpetkovic@acm.org>
@@ -29,7 +30,7 @@ endif
" We need nocompatible mode in order to continue lines with backslashes.
" Original setting will be restored.
let s:cpo_save = &cpo
setlocal cpo&vim
set cpo&vim
" http://mesonbuild.com/Syntax.html
syn keyword mesonConditional elif else if endif

View File

@@ -20,11 +20,8 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1
" can be distinguished from begin/end, which is used for indentation,
" and folding. (David Baelde)
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version < 600
syntax clear
elseif exists("b:current_syntax") && b:current_syntax == "ocaml"
" Quit when a syntax file was already loaded
if exists("b:current_syntax") && b:current_syntax == "ocaml"
finish
endif
@@ -131,7 +128,7 @@ syn region ocamlSig matchgroup=ocamlSigEncl start="\<sig\>" matchgroup=ocamlSi
syn region ocamlModSpec matchgroup=ocamlKeyword start="\<module\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contained contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlModTRWith,ocamlMPRestr
" "open"
syn region ocamlNone matchgroup=ocamlKeyword start="\<open\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\( *\. *\u\(\w\|'\)*\)*\>" contains=@ocamlAllErrs,ocamlComment
syn match ocamlKeyword "\<open\>" skipwhite skipempty nextgroup=ocamlFullMod
" "include"
syn match ocamlKeyword "\<include\>" skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod
@@ -192,7 +189,7 @@ endif
syn keyword ocamlType array bool char exn float format format4
syn keyword ocamlType int int32 int64 lazy_t list nativeint option
syn keyword ocamlType string unit
syn keyword ocamlType bytes string unit
syn match ocamlConstructor "(\s*)"
syn match ocamlConstructor "\[\s*\]"
@@ -233,7 +230,18 @@ syn match ocamlStar "*"
syn match ocamlAngle "<"
syn match ocamlAngle ">"
" Custom indexing operators:
syn match ocamlIndexingOp "\.[~?!:|&$%=>@^/*+-][~?!.:|&$%<=>@^*/+-]*\(()\|\[]\|{}\)\(<-\)\?"
syn region ocamlIndexing matchgroup=ocamlIndexingOp
\ start="\.[~?!:|&$%=>@^/*+-][~?!.:|&$%<=>@^*/+-]*\_s*("
\ end=")\(\_s*<-\)\?"
\ contains=ALLBUT,@ocamlContained,ocamlParenErr
syn region ocamlIndexing matchgroup=ocamlIndexingOp
\ start="\.[~?!:|&$%=>@^/*+-][~?!.:|&$%<=>@^*/+-]*\_s*\["
\ end="]\(\_s*<-\)\?"
\ contains=ALLBUT,@ocamlContained,ocamlBrackErr
syn region ocamlIndexing matchgroup=ocamlIndexingOp
\ start="\.[~?!:|&$%=>@^/*+-][~?!.:|&$%<=>@^*/+-]*\_s*{"
\ end="}\(\_s*<-\)\?"
\ contains=ALLBUT,@ocamlContained,ocamlBraceErr
" Extension operators (has to be declared before regular infix operators):
syn match ocamlExtensionOp "#[#~?!.:|&$%<=>@^*/+-]\+"
" Infix and prefix operators:
@@ -291,103 +299,91 @@ syn sync match ocamlSigSync grouphere ocamlSig "\<sig\>"
syn sync match ocamlSigSync groupthere ocamlSig "\<end\>"
" Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= 508 || !exists("did_ocaml_syntax_inits")
if version < 508
let did_ocaml_syntax_inits = 1
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif
HiLink ocamlBraceErr Error
HiLink ocamlBrackErr Error
HiLink ocamlParenErr Error
HiLink ocamlArrErr Error
hi def link ocamlBraceErr Error
hi def link ocamlBrackErr Error
hi def link ocamlParenErr Error
hi def link ocamlArrErr Error
HiLink ocamlCommentErr Error
hi def link ocamlCommentErr Error
HiLink ocamlCountErr Error
HiLink ocamlDoErr Error
HiLink ocamlDoneErr Error
HiLink ocamlEndErr Error
HiLink ocamlThenErr Error
hi def link ocamlCountErr Error
hi def link ocamlDoErr Error
hi def link ocamlDoneErr Error
hi def link ocamlEndErr Error
hi def link ocamlThenErr Error
HiLink ocamlCharErr Error
hi def link ocamlCharErr Error
HiLink ocamlErr Error
hi def link ocamlErr Error
HiLink ocamlComment Comment
hi def link ocamlComment Comment
HiLink ocamlModPath Include
HiLink ocamlObject Include
HiLink ocamlModule Include
HiLink ocamlModParam1 Include
HiLink ocamlGenMod Include
HiLink ocamlModType Include
HiLink ocamlMPRestr3 Include
HiLink ocamlFullMod Include
HiLink ocamlFuncWith Include
HiLink ocamlModParam Include
HiLink ocamlModTypeRestr Include
HiLink ocamlWith Include
HiLink ocamlMTDef Include
HiLink ocamlSigEncl ocamlModule
HiLink ocamlStructEncl ocamlModule
hi def link ocamlModPath Include
hi def link ocamlObject Include
hi def link ocamlModule Include
hi def link ocamlModParam1 Include
hi def link ocamlGenMod Include
hi def link ocamlModType Include
hi def link ocamlMPRestr3 Include
hi def link ocamlFullMod Include
hi def link ocamlFuncWith Include
hi def link ocamlModParam Include
hi def link ocamlModTypeRestr Include
hi def link ocamlWith Include
hi def link ocamlMTDef Include
hi def link ocamlSigEncl ocamlModule
hi def link ocamlStructEncl ocamlModule
HiLink ocamlScript Include
hi def link ocamlScript Include
HiLink ocamlConstructor Constant
hi def link ocamlConstructor Constant
HiLink ocamlVal Keyword
HiLink ocamlModPreRHS Keyword
HiLink ocamlMPRestr2 Keyword
HiLink ocamlKeyword Keyword
HiLink ocamlMethod Include
HiLink ocamlArrow Keyword
HiLink ocamlKeyChar Keyword
HiLink ocamlAnyVar Keyword
HiLink ocamlTopStop Keyword
hi def link ocamlVal Keyword
hi def link ocamlModPreRHS Keyword
hi def link ocamlMPRestr2 Keyword
hi def link ocamlKeyword Keyword
hi def link ocamlMethod Include
hi def link ocamlArrow Keyword
hi def link ocamlKeyChar Keyword
hi def link ocamlAnyVar Keyword
hi def link ocamlTopStop Keyword
HiLink ocamlRefAssign ocamlKeyChar
HiLink ocamlEqual ocamlKeyChar
HiLink ocamlStar ocamlInfixOp
HiLink ocamlAngle ocamlInfixOp
HiLink ocamlCons ocamlInfixOp
hi def link ocamlRefAssign ocamlKeyChar
hi def link ocamlEqual ocamlKeyChar
hi def link ocamlStar ocamlInfixOp
hi def link ocamlAngle ocamlInfixOp
hi def link ocamlCons ocamlInfixOp
HiLink ocamlPrefixOp ocamlOperator
HiLink ocamlInfixOp ocamlOperator
HiLink ocamlExtensionOp ocamlOperator
HiLink ocamlIndexingOp ocamlOperator
hi def link ocamlPrefixOp ocamlOperator
hi def link ocamlInfixOp ocamlOperator
hi def link ocamlExtensionOp ocamlOperator
hi def link ocamlIndexingOp ocamlOperator
if exists("ocaml_highlight_operators")
HiLink ocamlInfixOpKeyword ocamlOperator
HiLink ocamlOperator Operator
else
HiLink ocamlInfixOpKeyword Keyword
endif
HiLink ocamlBoolean Boolean
HiLink ocamlCharacter Character
HiLink ocamlNumber Number
HiLink ocamlFloat Float
HiLink ocamlString String
HiLink ocamlQuotedStringDelim Identifier
HiLink ocamlLabel Identifier
HiLink ocamlType Type
HiLink ocamlTodo Todo
HiLink ocamlEncl Keyword
HiLink ocamlPpxEncl ocamlEncl
delcommand HiLink
if exists("ocaml_highlight_operators")
hi def link ocamlInfixOpKeyword ocamlOperator
hi def link ocamlOperator Operator
else
hi def link ocamlInfixOpKeyword Keyword
endif
hi def link ocamlBoolean Boolean
hi def link ocamlCharacter Character
hi def link ocamlNumber Number
hi def link ocamlFloat Float
hi def link ocamlString String
hi def link ocamlQuotedStringDelim Identifier
hi def link ocamlLabel Identifier
hi def link ocamlType Type
hi def link ocamlTodo Todo
hi def link ocamlEncl Keyword
hi def link ocamlPpxEncl ocamlEncl
let b:current_syntax = "ocaml"
" vim: ts=8

View File

@@ -6,7 +6,7 @@ endif
" need %{vars}%
" env: [[CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"]]
syn keyword opamKeyword1 remove depends depopts conflicts env packages patches version maintainer tags license homepage authors doc install author available name depexts substs synopsis description
syn keyword opamKeyword1 remove depends pin-depends depopts conflicts env packages patches version maintainer tags license homepage authors doc install author available name depexts substs synopsis description
syn match opamKeyword2 "\v(bug-reports|post-messages|ocaml-version|opam-version|dev-repo|build-test|build-doc|build)"
syn keyword opamTodo FIXME NOTE NOTES TODO XXX contained

View File

@@ -6,7 +6,7 @@ scriptencoding utf-8
" Maintainer: Anders Thøgersen <first name at bladre dot dk>
" License: VIM LICENSE
if exists('b:current_syntax')
finish
" finish
endif
if v:version < 600
@@ -24,22 +24,28 @@ syntax match plantumlPreProc /\%(\%(^@start\|^@end\)\%(dot\|mindmap\|uml\|salt\|
syntax region plantumlDir start=/\s\+/ms=s+1 end=/$/ contained
" type
" From 'java - jar plantuml.jar - language' results {{{
syntax keyword plantumlTypeKeyword abstract actor agent archimate artifact boundary card cloud component control
syntax keyword plantumlTypeKeyword database diamond entity enum file folder frame node object package participant
syntax keyword plantumlTypeKeyword queue rectangle stack state storage usecase
syntax keyword plantumlTypeKeyword database detach diamond entity enum file folder frame node object package
syntax keyword plantumlTypeKeyword participant queue rectangle stack state storage usecase
" class and interface are defined as plantumlClassKeyword
syntax keyword plantumlClassKeyword class interface
"}}}
" Not in 'java - jar plantuml.jar - language' results
syntax keyword plantumlTypeKeyword concise robust
" keyword
" Exclude 'top to bottom direction'
" From 'java - jar plantuml.jar - language' results {{{
" Since "syntax keyword" can handle only words, "top to bottom direction" is excluded.
syntax keyword plantumlKeyword accross activate again allow_mixing allowmixing also alt as autonumber bottom
syntax keyword plantumlKeyword box break caption center create critical deactivate destroy down else elseif end
syntax keyword plantumlKeyword endif endwhile footbox footer fork group header hide hnote if is kill left in at are to the and
syntax keyword plantumlKeyword legend link loop mainframe namespace newpage note of on opt order over package
syntax keyword plantumlKeyword page par partition ref repeat return right rnote rotate show skin skinparam
syntax keyword plantumlKeyword start stop title top up while
" Not in 'java - jar plantuml.jar - language' output
syntax keyword plantumlKeyword then detach split sprite
"}}}
" Not in 'java - jar plantuml.jar - language' results
syntax keyword plantumlKeyword endlegend split sprite then
" gantt
syntax keyword plantumlTypeKeyword project monday tuesday wednesday thursday friday saturday sunday
syntax keyword plantumlKeyword starts ends start end closed day after colored lasts happens
@@ -84,9 +90,9 @@ syntax region plantumlText oneline start=/\[/ms=s+1 end=/\]/me=s-1 contained
syntax match plantumlArrowDirectedLine /\([-.]\)\%(l\%[eft]\|r\%[ight]\|up\?\|d\%[own]\)\1/ contained
" Note
syntax region plantumlNoteMultiLine start=/\%(^\s*[rh]\?note\)\@<=\s\%([^:"]\+$\)\@=/ end=/^\%(\s*end \?[rh]\?note$\)\@=/ contains=plantumlSpecialString,plantumlNoteMultiLineStart,plantumlTag
syntax match plantumlNoteMultiLineStart /\%(^\s*[rh]\?note\)\@<=\s\%([^:]\+$\)/ contained contains=plantumlKeyword,plantumlColor,plantumlString,plantumlTag
" Note and legend
syntax region plantumlNoteMultiLine start=/\%(^\s*[rh]\?\%(note\|legend\)\)\@<=\s\%([^:"]\+$\)\@=/ end=/^\%(\s*end\s*[rh]\?\%(note\|legend\)$\)\|endlegend\@=/ contains=plantumlSpecialString,plantumlNoteMultiLineStart,plantumlTag
syntax match plantumlNoteMultiLineStart /\%(^\s*[rh]\?\%(note\|legend\)\)\@<=\s\%([^:]\+$\)/ contained contains=plantumlKeyword,plantumlColor,plantumlString,plantumlTag
" Class
syntax region plantumlClass

View File

@@ -20,7 +20,7 @@ syn match sdErr contained /\s*\S\+/ nextgroup=sdErr
" environment args and format strings
syn match sdEnvArg contained /\$\i\+\|\${\i\+}/
syn match sdFormatStr contained /%[inpINPfcrRt]/ containedin=ALLBUT,sdComment,sdErr
syn match sdFormatStr contained /%[bCEfhHiIjJLmnNpPsStTgGuUvV%]/ containedin=ALLBUT,sdComment,sdErr
" common data types
syn match sdUInt contained nextgroup=sdErr /\d\+/

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tmux') == -1
" Language: tmux(1) configuration file
" Version: 2.9a (git-0d64531f)
" Version: 3.0 (git-48cbbb87)
" URL: https://github.com/ericpruitt/tmux.vim/
" Maintainer: Eric Pruitt <eric.pruitt@gmail.com>
" License: 2-Clause BSD (http://opensource.org/licenses/BSD-2-Clause)
@@ -30,6 +30,7 @@ syn match tmuxNumber /\<\d\+\>/ display
syn match tmuxFlags /\s-\a\+/ display
syn match tmuxVariable /\w\+=/ display
syn match tmuxVariableExpansion /\${\=\w\+}\=/ display
syn match tmuxControl /%\(if\|elif\|else\|endif\)/
syn region tmuxComment start=/#/ skip=/\\\@<!\\$/ end=/$/ contains=tmuxTodo
@@ -45,6 +46,7 @@ hi def link tmuxFormatString Identifier
hi def link tmuxAction Boolean
hi def link tmuxBoolean Boolean
hi def link tmuxCommands Keyword
hi def link tmuxControl Keyword
hi def link tmuxComment Comment
hi def link tmuxKey Special
hi def link tmuxNumber Number
@@ -64,29 +66,29 @@ for s:i in range(0, 255)
endfor
syn keyword tmuxOptions
\ buffer-limit command-alias default-terminal escape-time exit-empty
\ activity-action assume-paste-time base-index bell-action default-command
\ default-shell default-size destroy-unattached detach-on-destroy
\ display-panes-active-colour display-panes-colour display-panes-time
\ display-time exit-unattached focus-events history-file history-limit
\ key-table lock-after-time lock-command message-command-style message-limit
\ message-style mouse aggressive-resize allow-rename alternate-screen
\ automatic-rename automatic-rename-format clock-mode-colour
\ clock-mode-style main-pane-height main-pane-width mode-keys mode-style
\ monitor-activity monitor-bell monitor-silence other-pane-height
\ other-pane-width pane-active-border-style pane-base-index
\ pane-border-format pane-border-status pane-border-style prefix prefix2
\ remain-on-exit renumber-windows repeat-time set-clipboard set-titles
\ set-titles-string silence-action status status-bg status-fg status-format
\ status-interval status-justify status-keys status-left status-left-length
\ status-left-style status-position status-right status-right-length
\ status-right-style status-style synchronize-panes terminal-overrides
\ update-environment user-keys visual-activity visual-bell visual-silence
\ window-active-style window-size window-status-activity-style
\ window-status-bell-style window-status-current-format
\ window-status-current-style window-status-format window-status-last-style
\ window-status-separator window-status-style window-style word-separators
\ wrap-search xterm-keys
\ backspace buffer-limit command-alias default-terminal escape-time
\ exit-empty activity-action assume-paste-time base-index bell-action
\ default-command default-shell default-size destroy-unattached
\ detach-on-destroy display-panes-active-colour display-panes-colour
\ display-panes-time display-time exit-unattached focus-events history-file
\ history-limit key-table lock-after-time lock-command message-command-style
\ message-limit message-style aggressive-resize allow-rename
\ alternate-screen automatic-rename automatic-rename-format
\ clock-mode-colour clock-mode-style main-pane-height main-pane-width
\ mode-keys mode-style monitor-activity monitor-bell monitor-silence mouse
\ other-pane-height other-pane-width pane-active-border-style
\ pane-base-index pane-border-format pane-border-status pane-border-style
\ prefix prefix2 remain-on-exit renumber-windows repeat-time set-clipboard
\ set-titles set-titles-string silence-action status status-bg status-fg
\ status-format status-interval status-justify status-keys status-left
\ status-left-length status-left-style status-position status-right
\ status-right-length status-right-style status-style synchronize-panes
\ terminal-overrides update-environment user-keys visual-activity
\ visual-bell visual-silence window-active-style window-size
\ window-status-activity-style window-status-bell-style
\ window-status-current-format window-status-current-style
\ window-status-format window-status-last-style window-status-separator
\ window-status-style window-style word-separators wrap-search xterm-keys
syn keyword tmuxCommands
\ attach attach-session bind bind-key break-pane breakp capture-pane

View File

@@ -1,10 +1,10 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
if !exists("main_syntax")
if exists("b:current_syntax") && b:current_syntax != 'typescript'
if exists("b:current_syntax")
finish
endif
let main_syntax = 'typescript.tsx'
let main_syntax = 'typescriptreact'
endif
syntax region tsxTag
@@ -121,6 +121,8 @@ syntax region tsxEscJs
\ end=+}+
\ extend
runtime syntax/common.vim
syntax cluster typescriptExpression add=tsxRegion,tsxFragment
highlight def link tsxTag htmlTag
@@ -136,9 +138,8 @@ highlight def link tsxEscJs tsxEscapeJs
highlight def link tsxCloseTag htmlTag
highlight def link tsxCloseString Identifier
let b:current_syntax = "typescript.tsx"
if main_syntax == 'typescript.tsx'
let b:current_syntax = "typescriptreact"
if main_syntax == 'typescriptreact'
unlet main_syntax
endif
endif

View File

@@ -36,7 +36,7 @@ syn match zigBuiltinFn "\v\@(compileLog|ctz|popCount|divExact|divFloor|divTrunc)
syn match zigBuiltinFn "\v\@(embedFile|export|tagName|TagType|errorName)>"
syn match zigBuiltinFn "\v\@(errorReturnTrace|fence|fieldParentPtr|field|unionInit)>"
syn match zigBuiltinFn "\v\@(frameAddress|import|inlineCall|newStackCall|asyncCall|intToPtr|IntType)>"
syn match zigBuiltinFn "\v\@(maxValue|memberCount|memberName|memberType)>"
syn match zigBuiltinFn "\v\@(maxValue|memberCount|memberName|memberType|as)>"
syn match zigBuiltinFn "\v\@(memcpy|memset|minValue|mod|mulWithOverflow|splat)>"
syn match zigBuiltinFn "\v\@(noInlineCall|bitOffsetOf|byteOffsetOf|OpaqueType|panic|ptrCast)>"
syn match zigBuiltinFn "\v\@(ptrToInt|rem|returnAddress|setCold|Type|shuffle)>"
@@ -58,6 +58,8 @@ syn match zigCharacterInvalidUnicode display contained /b'\zs[^[:cntrl:][:graph:
syn match zigCharacter /b'\([^\\]\|\\\(.\|x\x\{2}\)\)'/ contains=zigEscape,zigEscapeError,zigCharacterInvalid,zigCharacterInvalidUnicode
syn match zigCharacter /'\([^\\]\|\\\(.\|x\x\{2}\|u\x\{4}\|U\x\{6}\)\)'/ contains=zigEscape,zigEscapeUnicode,zigEscapeError,zigCharacterInvalid
syn region zigBlock start="{" end="}" transparent fold
syn region zigCommentLine start="//" end="$" contains=zigTodo,@Spell
syn region zigCommentLineDoc start="////\@!" end="$" contains=zigTodo,@Spell