mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-09 12:03:53 -05:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35ea4d2b90 | ||
|
|
967486dd71 | ||
|
|
e8454d66ab | ||
|
|
a60e299a3c | ||
|
|
b8a5504021 | ||
|
|
cea0d08a06 | ||
|
|
43085dc02f | ||
|
|
4d8423c962 | ||
|
|
e204a7223b | ||
|
|
7a0f2d974f | ||
|
|
15aeea662e | ||
|
|
d15651463a | ||
|
|
0c79dd3e73 | ||
|
|
4e95df7c7e |
11
README.md
11
README.md
@@ -10,7 +10,7 @@ A collection of language packs for Vim.
|
|||||||
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
|
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
|
||||||
|
|
||||||
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
|
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
|
||||||
- It **installs and updates 120+ times faster** than the <!--Package Count-->146<!--/Package Count--> packages it consists of.
|
- It **installs and updates 120+ times faster** than the <!--Package Count-->147<!--/Package Count--> packages it consists of.
|
||||||
- Solid syntax and indentation support (other features skipped). Only the best language packs.
|
- Solid syntax and indentation support (other features skipped). Only the best language packs.
|
||||||
- All unnecessary files are ignored (like enormous documentation from php support).
|
- All unnecessary files are ignored (like enormous documentation from php support).
|
||||||
- No support for esoteric languages, only most popular ones (modern too, like `slim`).
|
- No support for esoteric languages, only most popular ones (modern too, like `slim`).
|
||||||
@@ -119,7 +119,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
|||||||
- [log](https://github.com/MTDL9/vim-log-highlighting) (syntax)
|
- [log](https://github.com/MTDL9/vim-log-highlighting) (syntax)
|
||||||
- [lua](https://github.com/tbastos/vim-lua) (syntax, indent)
|
- [lua](https://github.com/tbastos/vim-lua) (syntax, indent)
|
||||||
- [mako](https://github.com/sophacles/vim-bundle-mako) (syntax, indent, ftplugin)
|
- [mako](https://github.com/sophacles/vim-bundle-mako) (syntax, indent, ftplugin)
|
||||||
- [markdown](https://github.com/plasticboy/vim-markdown) (syntax, indent)
|
- [markdown](https://github.com/plasticboy/vim-markdown) (syntax, indent, ftplugin)
|
||||||
- [mathematica](https://github.com/voldikss/vim-mma) (syntax, ftplugin)
|
- [mathematica](https://github.com/voldikss/vim-mma) (syntax, ftplugin)
|
||||||
- [mdx](https://github.com/jxnblk/vim-mdx-js) (syntax)
|
- [mdx](https://github.com/jxnblk/vim-mdx-js) (syntax)
|
||||||
- [meson](https://github.com/mesonbuild/meson) (syntax, indent, ftplugin)
|
- [meson](https://github.com/mesonbuild/meson) (syntax, indent, ftplugin)
|
||||||
@@ -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)
|
- [raml](https://github.com/IN3D/vim-raml) (syntax, ftplugin)
|
||||||
- [reason](https://github.com/reasonml-editor/vim-reason-plus) (syntax, indent)
|
- [reason](https://github.com/reasonml-editor/vim-reason-plus) (syntax, indent)
|
||||||
- [rspec](https://github.com/sheerun/rspec.vim) (syntax)
|
- [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)
|
- [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)
|
- [rust](https://github.com/rust-lang/rust.vim) (syntax, indent, compiler, autoload, ftplugin)
|
||||||
- [sbt](https://github.com/derekwyatt/vim-sbt) (syntax)
|
- [sbt](https://github.com/derekwyatt/vim-sbt) (syntax)
|
||||||
@@ -178,7 +178,8 @@ If you need full functionality of any plugin, please use it directly with your p
|
|||||||
- [tptp](https://github.com/c-cube/vim-tptp) (syntax)
|
- [tptp](https://github.com/c-cube/vim-tptp) (syntax)
|
||||||
- [twig](https://github.com/lumiliet/vim-twig) (syntax, indent, ftplugin)
|
- [twig](https://github.com/lumiliet/vim-twig) (syntax, indent, ftplugin)
|
||||||
- [typescript](https://github.com/HerringtonDarkholme/yats.vim) (syntax, indent, compiler, ftplugin)
|
- [typescript](https://github.com/HerringtonDarkholme/yats.vim) (syntax, indent, compiler, ftplugin)
|
||||||
- [vala](https://github.com/arrufat/vala.vim) (syntax, indent)
|
- [v](https://github.com/ollykel/v-vim) (syntax, indent, ftplugin)
|
||||||
|
- [vala](https://github.com/arrufat/vala.vim) (syntax, indent, ftplugin)
|
||||||
- [vbnet](https://github.com/vim-scripts/vbnet.vim) (syntax)
|
- [vbnet](https://github.com/vim-scripts/vbnet.vim) (syntax)
|
||||||
- [vcl](https://github.com/smerrill/vcl-vim-plugin) (syntax)
|
- [vcl](https://github.com/smerrill/vcl-vim-plugin) (syntax)
|
||||||
- [vifm](https://github.com/vifm/vifm.vim) (syntax, autoload, ftplugin)
|
- [vifm](https://github.com/vifm/vifm.vim) (syntax, autoload, ftplugin)
|
||||||
@@ -204,7 +205,7 @@ Please make sure you have `syntax on` in your `.vimrc`, otherwise syntax files a
|
|||||||
Individual language packs can be disabled by setting `g:polyglot_disabled` as follows:
|
Individual language packs can be disabled by setting `g:polyglot_disabled` as follows:
|
||||||
|
|
||||||
```viml
|
```viml
|
||||||
" ~/.vimrc
|
" ~/.vimrc, declare this variable before polyglot is loaded
|
||||||
let g:polyglot_disabled = ['css']
|
let g:polyglot_disabled = ['css']
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
5
after/ftplugin/javascriptreact.vim
Normal file
5
after/ftplugin/javascriptreact.vim
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||||
|
|
||||||
|
source <sfile>:h/javascript.vim
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -2,6 +2,11 @@ if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript')
|
|||||||
|
|
||||||
" modified from html.vim
|
" modified from html.vim
|
||||||
" For matchit plugin
|
" For matchit plugin
|
||||||
|
|
||||||
|
if get(g:, 'vim_jsx_pretty_disable_tsx', 0)
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
if exists("loaded_matchit")
|
if exists("loaded_matchit")
|
||||||
let b:match_ignorecase = 0
|
let b:match_ignorecase = 0
|
||||||
let b:match_words = '(:),\[:\],{:},<:>,' .
|
let b:match_words = '(:),\[:\],{:},<:>,' .
|
||||||
5
after/ftplugin/typescriptreact.vim
Normal file
5
after/ftplugin/typescriptreact.vim
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||||
|
|
||||||
|
source <sfile>:h/tsx.vim
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -21,7 +21,7 @@ if exists('s:did_indent')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
setlocal indentexpr=GetJsxIndent()
|
setlocal indentexpr=GetJsxIndent()
|
||||||
setlocal indentkeys=0{,0},0),0],0\,,!^F,o,O,e,*<Return>,<>>,<<>,/
|
setlocal indentkeys=0.,0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/
|
||||||
|
|
||||||
function! GetJsxIndent()
|
function! GetJsxIndent()
|
||||||
return jsx_pretty#indent#get(function('GetJavascriptIndent'))
|
return jsx_pretty#indent#get(function('GetJavascriptIndent'))
|
||||||
|
|||||||
5
after/indent/javascriptreact.vim
Normal file
5
after/indent/javascriptreact.vim
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||||
|
|
||||||
|
source <sfile>:h/javascript.vim
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -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')
|
if exists('b:did_indent')
|
||||||
let s:did_indent = b:did_indent
|
let s:did_indent = b:did_indent
|
||||||
unlet b:did_indent
|
unlet b:did_indent
|
||||||
@@ -22,7 +26,7 @@ if exists('s:did_indent')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
setlocal indentexpr=GetJsxIndent()
|
setlocal indentexpr=GetJsxIndent()
|
||||||
setlocal indentkeys=0{,0},0),0],0\,,!^F,o,O,e,*<Return>,<>>,<<>,/
|
setlocal indentkeys=0.,0{,0},0),0],0?,0\*,0\,,!^F,:,<:>,o,O,e,<>>,=*/
|
||||||
|
|
||||||
function! GetJsxIndent()
|
function! GetJsxIndent()
|
||||||
return jsx_pretty#indent#get(function('GetTypescriptIndent'))
|
return jsx_pretty#indent#get(function('GetTypescriptIndent'))
|
||||||
5
after/indent/typescriptreact.vim
Normal file
5
after/indent/typescriptreact.vim
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||||
|
|
||||||
|
source <sfile>:h/tsx.vim
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -36,6 +36,19 @@ if exists('g:cpp_member_variable_highlight') && g:cpp_member_variable_highlight
|
|||||||
hi def link cCustomMemVar Function
|
hi def link cCustomMemVar Function
|
||||||
endif
|
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
|
" Source: aftersyntaxc.vim
|
||||||
" -----------------------------------------------------------------------------
|
" -----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -633,21 +633,19 @@ syntax keyword cppSTLios unitbuf
|
|||||||
syntax keyword cppSTLios uppercase
|
syntax keyword cppSTLios uppercase
|
||||||
"syntax keyword cppSTLios ws
|
"syntax keyword cppSTLios ws
|
||||||
syntax keyword cppSTLiterator back_insert_iterator
|
syntax keyword cppSTLiterator back_insert_iterator
|
||||||
syntax keyword cppSTLiterator bidirectional_iterator
|
|
||||||
syntax keyword cppSTLiterator const_iterator
|
syntax keyword cppSTLiterator const_iterator
|
||||||
syntax keyword cppSTLiterator const_reverse_iterator
|
syntax keyword cppSTLiterator const_reverse_iterator
|
||||||
syntax keyword cppSTLiterator forward_iterator
|
|
||||||
syntax keyword cppSTLiterator front_insert_iterator
|
syntax keyword cppSTLiterator front_insert_iterator
|
||||||
syntax keyword cppSTLiterator input_iterator
|
|
||||||
syntax keyword cppSTLiterator insert_iterator
|
syntax keyword cppSTLiterator insert_iterator
|
||||||
syntax keyword cppSTLiterator istreambuf_iterator
|
syntax keyword cppSTLiterator istreambuf_iterator
|
||||||
syntax keyword cppSTLiterator istream_iterator
|
syntax keyword cppSTLiterator istream_iterator
|
||||||
|
syntax keyword cppSTLiterator ostreambuf_iterator
|
||||||
|
syntax keyword cppSTLiterator ostream_iterator
|
||||||
syntax keyword cppSTLiterator iterator
|
syntax keyword cppSTLiterator iterator
|
||||||
syntax keyword cppSTLiterator ostream_iterator
|
syntax keyword cppSTLiterator ostream_iterator
|
||||||
syntax keyword cppSTLiterator output_iterator
|
syntax keyword cppSTLiterator output_iterator
|
||||||
syntax keyword cppSTLiterator random_access_iterator
|
|
||||||
syntax keyword cppSTLiterator raw_storage_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 reverse_iterator
|
||||||
syntax keyword cppSTLiterator_tag bidirectional_iterator_tag
|
syntax keyword cppSTLiterator_tag bidirectional_iterator_tag
|
||||||
syntax keyword cppSTLiterator_tag forward_iterator_tag
|
syntax keyword cppSTLiterator_tag forward_iterator_tag
|
||||||
@@ -1593,6 +1591,8 @@ endif " C++14
|
|||||||
|
|
||||||
|
|
||||||
if !exists("cpp_no_cpp17")
|
if !exists("cpp_no_cpp17")
|
||||||
|
syntax keyword cppSTLnamespace pmr
|
||||||
|
|
||||||
" algorithm
|
" algorithm
|
||||||
syntax keyword cppSTLfunction clamp
|
syntax keyword cppSTLfunction clamp
|
||||||
syntax keyword cppSTLfunction for_each_n
|
syntax keyword cppSTLfunction for_each_n
|
||||||
@@ -1985,87 +1985,278 @@ endif " C++17
|
|||||||
|
|
||||||
|
|
||||||
if !exists("cpp_no_cpp20")
|
if !exists("cpp_no_cpp20")
|
||||||
" type_traits
|
|
||||||
syntax keyword cppSTLtype remove_cvref remove_cvref_t
|
|
||||||
syntax keyword cppType char8_t
|
syntax keyword cppType char8_t
|
||||||
syntax keyword cppStatement co_yield co_return co_await
|
syntax keyword cppStatement co_yield co_return co_await
|
||||||
syntax keyword cppStorageClass consteval
|
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
|
endif
|
||||||
|
|
||||||
|
|
||||||
if exists('g:cpp_concepts_highlight') && g:cpp_concepts_highlight
|
if exists('g:cpp_concepts_highlight')
|
||||||
syntax keyword cppStatement concept
|
syntax keyword cppStatement concept
|
||||||
syntax keyword cppStorageClass requires
|
syntax keyword cppStorageClass requires
|
||||||
syntax keyword cppSTLtype DefaultConstructible
|
|
||||||
syntax keyword cppSTLtype MoveConstructible
|
if g:cpp_concepts_highlight == 1
|
||||||
syntax keyword cppSTLtype CopyConstructible
|
syntax keyword cppSTLconcept DefaultConstructible
|
||||||
syntax keyword cppSTLtype MoveAssignable
|
syntax keyword cppSTLconcept MoveConstructible
|
||||||
syntax keyword cppSTLtype CopyAssignable
|
syntax keyword cppSTLconcept CopyConstructible
|
||||||
syntax keyword cppSTLtype Destructible
|
syntax keyword cppSTLconcept MoveAssignable
|
||||||
syntax keyword cppSTLtype TriviallyCopyable
|
syntax keyword cppSTLconcept CopyAssignable
|
||||||
syntax keyword cppSTLtype TrivialType
|
syntax keyword cppSTLconcept Destructible
|
||||||
syntax keyword cppSTLtype StandardLayoutType
|
syntax keyword cppSTLconcept TriviallyCopyable
|
||||||
syntax keyword cppSTLtype PODType
|
syntax keyword cppSTLconcept TrivialType
|
||||||
syntax keyword cppSTLtype EqualityComparable
|
syntax keyword cppSTLconcept StandardLayoutType
|
||||||
syntax keyword cppSTLtype LessThanComparable
|
syntax keyword cppSTLconcept PODType
|
||||||
syntax keyword cppSTLtype Swappable
|
syntax keyword cppSTLconcept EqualityComparable
|
||||||
syntax keyword cppSTLtype ValueSwappable
|
syntax keyword cppSTLconcept LessThanComparable
|
||||||
syntax keyword cppSTLtype NullablePointer
|
syntax keyword cppSTLconcept Swappable
|
||||||
syntax keyword cppSTLtype Hash
|
syntax keyword cppSTLconcept ValueSwappable
|
||||||
syntax keyword cppSTLtype Allocator
|
syntax keyword cppSTLconcept NullablePointer
|
||||||
syntax keyword cppSTLtype FunctionObject
|
syntax keyword cppSTLconcept Hash
|
||||||
syntax keyword cppSTLtype Callable
|
syntax keyword cppSTLconcept Allocator
|
||||||
syntax keyword cppSTLtype Predicate
|
syntax keyword cppSTLconcept FunctionObject
|
||||||
syntax keyword cppSTLtype BinaryPredicate
|
syntax keyword cppSTLconcept Callable
|
||||||
syntax keyword cppSTLtype Compare
|
syntax keyword cppSTLconcept Predicate
|
||||||
syntax keyword cppSTLtype Container
|
syntax keyword cppSTLconcept BinaryPredicate
|
||||||
syntax keyword cppSTLtype ReversibleContainer
|
syntax keyword cppSTLconcept Compare
|
||||||
syntax keyword cppSTLtype AllocatorAwareContainer
|
syntax keyword cppSTLconcept Container
|
||||||
syntax keyword cppSTLtype SequenceContainer
|
syntax keyword cppSTLconcept ReversibleContainer
|
||||||
syntax keyword cppSTLtype ContiguousContainer
|
syntax keyword cppSTLconcept AllocatorAwareContainer
|
||||||
syntax keyword cppSTLtype AssociativeContainer
|
syntax keyword cppSTLconcept SequenceContainer
|
||||||
syntax keyword cppSTLtype UnorderedAssociativeContainer
|
syntax keyword cppSTLconcept ContiguousContainer
|
||||||
syntax keyword cppSTLtype DefaultInsertable
|
syntax keyword cppSTLconcept AssociativeContainer
|
||||||
syntax keyword cppSTLtype CopyInsertable
|
syntax keyword cppSTLconcept UnorderedAssociativeContainer
|
||||||
syntax keyword cppSTLtype CopyInsertable
|
syntax keyword cppSTLconcept DefaultInsertable
|
||||||
syntax keyword cppSTLtype MoveInsertable
|
syntax keyword cppSTLconcept CopyInsertable
|
||||||
syntax keyword cppSTLtype EmplaceConstructible
|
syntax keyword cppSTLconcept CopyInsertable
|
||||||
syntax keyword cppSTLtype Erasable
|
syntax keyword cppSTLconcept MoveInsertable
|
||||||
syntax keyword cppSTLtype Iterator
|
syntax keyword cppSTLconcept EmplaceConstructible
|
||||||
syntax keyword cppSTLtype InputIterator
|
syntax keyword cppSTLconcept Erasable
|
||||||
syntax keyword cppSTLtype OutputIterator
|
syntax keyword cppSTLconcept Iterator
|
||||||
syntax keyword cppSTLtype ForwardIterator
|
syntax keyword cppSTLconcept InputIterator
|
||||||
syntax keyword cppSTLtype BidirectionalIterator
|
syntax keyword cppSTLconcept OutputIterator
|
||||||
syntax keyword cppSTLtype RandomAccessIterator
|
syntax keyword cppSTLconcept ForwardIterator
|
||||||
syntax keyword cppSTLtype ContiguousIterator
|
syntax keyword cppSTLconcept BidirectionalIterator
|
||||||
syntax keyword cppSTLtype UnformattedInputFunction
|
syntax keyword cppSTLconcept RandomAccessIterator
|
||||||
syntax keyword cppSTLtype FormattedInputFunction
|
syntax keyword cppSTLconcept ContiguousIterator
|
||||||
syntax keyword cppSTLtype UnformattedOutputFunction
|
syntax keyword cppSTLconcept UnformattedInputFunction
|
||||||
syntax keyword cppSTLtype FormattedOutputFunction
|
syntax keyword cppSTLconcept FormattedInputFunction
|
||||||
syntax keyword cppSTLtype SeedSequence
|
syntax keyword cppSTLconcept UnformattedOutputFunction
|
||||||
syntax keyword cppSTLtype UniformRandomBitGenerator
|
syntax keyword cppSTLconcept FormattedOutputFunction
|
||||||
syntax keyword cppSTLtype RandomNumberEngine
|
syntax keyword cppSTLconcept SeedSequence
|
||||||
syntax keyword cppSTLtype RandomNumberEngineAdaptor
|
syntax keyword cppSTLconcept UniformRandomBitGenerator
|
||||||
syntax keyword cppSTLtype RandomNumberDistribution
|
syntax keyword cppSTLconcept RandomNumberEngine
|
||||||
syntax keyword cppSTLtype BasicLockable
|
syntax keyword cppSTLconcept RandomNumberEngineAdaptor
|
||||||
syntax keyword cppSTLtype Lockable
|
syntax keyword cppSTLconcept RandomNumberDistribution
|
||||||
syntax keyword cppSTLtype TimedLockable
|
syntax keyword cppSTLconcept BasicLockable
|
||||||
syntax keyword cppSTLtype Mutex
|
syntax keyword cppSTLconcept Lockable
|
||||||
syntax keyword cppSTLtype TimedMutex
|
syntax keyword cppSTLconcept TimedLockable
|
||||||
syntax keyword cppSTLtype SharedMutex
|
syntax keyword cppSTLconcept Mutex
|
||||||
syntax keyword cppSTLtype SharedTimedMutex
|
syntax keyword cppSTLconcept TimedMutex
|
||||||
syntax keyword cppSTLtype UnaryTypeTrait
|
syntax keyword cppSTLconcept SharedMutex
|
||||||
syntax keyword cppSTLtype BinaryTypeTrait
|
syntax keyword cppSTLconcept SharedTimedMutex
|
||||||
syntax keyword cppSTLtype TransformationTrait
|
syntax keyword cppSTLconcept UnaryTypeTrait
|
||||||
syntax keyword cppSTLtype Clock
|
syntax keyword cppSTLconcept BinaryTypeTrait
|
||||||
syntax keyword cppSTLtype TrivialClock
|
syntax keyword cppSTLconcept TransformationTrait
|
||||||
syntax keyword cppSTLtype CharTraits
|
syntax keyword cppSTLconcept Clock
|
||||||
syntax keyword cppSTLtype pos_type
|
syntax keyword cppSTLconcept TrivialClock
|
||||||
syntax keyword cppSTLtype off_type
|
syntax keyword cppSTLconcept CharTraits
|
||||||
syntax keyword cppSTLtype BitmaskType
|
syntax keyword cppSTLconcept pos_type
|
||||||
syntax keyword cppSTLtype NumericType
|
syntax keyword cppSTLconcept off_type
|
||||||
syntax keyword cppSTLtype RegexTraits
|
syntax keyword cppSTLconcept BitmaskType
|
||||||
syntax keyword cppSTLtype LiteralType
|
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
|
endif " C++ concepts
|
||||||
|
|
||||||
|
|
||||||
@@ -2095,6 +2286,7 @@ if version >= 508 || !exists("did_cpp_syntax_inits")
|
|||||||
HiLink cppSTLiterator Typedef
|
HiLink cppSTLiterator Typedef
|
||||||
HiLink cppSTLiterator_tag Typedef
|
HiLink cppSTLiterator_tag Typedef
|
||||||
HiLink cppSTLenum Typedef
|
HiLink cppSTLenum Typedef
|
||||||
|
HiLink cppSTLconcept Typedef
|
||||||
HiLink cppSTLios Function
|
HiLink cppSTLios Function
|
||||||
HiLink cppSTLcast Statement " be consistent with official syntax
|
HiLink cppSTLcast Statement " be consistent with official syntax
|
||||||
HiLink cppRawString String
|
HiLink cppRawString String
|
||||||
|
|||||||
@@ -22,34 +22,31 @@ if exists('s:current_syntax')
|
|||||||
let b:current_syntax = s:current_syntax
|
let b:current_syntax = s:current_syntax
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if hlexists("jsNoise") " pangloss/vim-javascript
|
if hlexists("jsDebugger") || hlexists("jsNoise") " yuezk/vim-js or pangloss/vim-javascript
|
||||||
syntax cluster jsExpression add=jsxRegion
|
syntax cluster jsExpression add=jsxRegion
|
||||||
elseif hlexists("javascriptOpSymbols") " othree/yajs.vim
|
elseif hlexists("javascriptOpSymbols") " othree/yajs.vim
|
||||||
" refine the javascript line comment
|
" refine the javascript line comment
|
||||||
syntax region javascriptLineComment start=+//+ end=/$/ contains=@Spell,javascriptCommentTodo extend keepend
|
syntax region javascriptLineComment start=+//+ end=/$/ contains=@Spell,javascriptCommentTodo extend keepend
|
||||||
syntax cluster javascriptValue add=jsxRegion
|
syntax cluster javascriptValue add=jsxRegion
|
||||||
syntax cluster javascriptNoReserved add=jsxElement,jsxTag
|
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
|
else " build-in javascript syntax
|
||||||
" refine the javascript line comment
|
" refine the javascript line comment
|
||||||
syntax region javaScriptLineComment start=+//+ end=/$/ contains=@Spell,javascriptCommentTodo extend keepend
|
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
|
" add a javaScriptBlock group for build-in syntax
|
||||||
syntax region javaScriptBlockBuildIn
|
syntax region javaScriptBlock
|
||||||
\ contained
|
|
||||||
\ matchgroup=javaScriptBraces
|
\ matchgroup=javaScriptBraces
|
||||||
\ start="{"
|
\ start="{"
|
||||||
\ end="}"
|
\ end="}"
|
||||||
|
\ contained
|
||||||
\ extend
|
\ extend
|
||||||
\ contains=javaScriptBlockBuildIn,@javaScriptEmbededExpr,javaScript.*
|
\ contains=javaScriptBlock,@javaScriptEmbededExpr,javaScript.*
|
||||||
\ fold
|
\ fold
|
||||||
syntax cluster javaScriptEmbededExpr add=jsxRegion
|
|
||||||
|
|
||||||
" refine the template string syntax
|
syntax cluster javaScriptEmbededExpr add=jsxRegion,javaScript.*
|
||||||
syntax region javaScriptStringT start=+`+ skip=+\\\\\|\\`+ end=+`+ contains=javaScriptSpecial,javaScriptEmbed,@htmlPreproc extend
|
|
||||||
syntax region javaScriptEmbed matchgroup=javaScriptEmbedBraces start=+\${+ end=+}+ contained contains=@javaScriptEmbededExpr,javaScript.*
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
runtime syntax/jsx_pretty.vim
|
runtime syntax/jsx_pretty.vim
|
||||||
|
|||||||
@@ -1,5 +1,28 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||||
|
|
||||||
|
" Copyright (c) 2016-2019 Jon Parise <jon@indelible.org>
|
||||||
|
"
|
||||||
|
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
" of this software and associated documentation files (the "Software"), to
|
||||||
|
" deal in the Software without restriction, including without limitation the
|
||||||
|
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
" sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
" furnished to do so, subject to the following conditions:
|
||||||
|
"
|
||||||
|
" The above copyright notice and this permission notice shall be included in
|
||||||
|
" all copies or substantial portions of the Software.
|
||||||
|
"
|
||||||
|
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
" IN THE SOFTWARE.
|
||||||
|
"
|
||||||
|
" Language: GraphQL
|
||||||
|
" Maintainer: Jon Parise <jon@indelible.org>
|
||||||
|
|
||||||
if exists('b:current_syntax')
|
if exists('b:current_syntax')
|
||||||
let s:current_syntax = b:current_syntax
|
let s:current_syntax = b:current_syntax
|
||||||
unlet b:current_syntax
|
unlet b:current_syntax
|
||||||
@@ -11,10 +34,10 @@ endif
|
|||||||
|
|
||||||
let s:tags = '\%(' . join(graphql#javascript_tags(), '\|') . '\)'
|
let s:tags = '\%(' . join(graphql#javascript_tags(), '\|') . '\)'
|
||||||
|
|
||||||
exec 'syntax region graphqlTemplateString start=+' . s:tags . '\@20<=`+ skip=+\\`+ end=+`+ contains=@GraphQLSyntax,jsTemplateExpression,jsSpecial extend'
|
if graphql#has_syntax_group('jsTemplateExpression')
|
||||||
|
" pangloss/vim-javascript
|
||||||
|
exec 'syntax region graphqlTemplateString start=+' . s:tags . '\@20<=`+ skip=+\\\\\|\\`+ end=+`+ contains=@GraphQLSyntax,jsTemplateExpression,jsSpecial extend'
|
||||||
exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString'
|
exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString'
|
||||||
|
|
||||||
" Support expression interpolation ((${...})) inside template strings.
|
|
||||||
syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=jsTemplateExpression containedin=graphqlFold keepend
|
syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=jsTemplateExpression containedin=graphqlFold keepend
|
||||||
|
|
||||||
hi def link graphqlTemplateString jsTemplateString
|
hi def link graphqlTemplateString jsTemplateString
|
||||||
@@ -23,5 +46,19 @@ hi def link graphqlTemplateExpression jsTemplateExpression
|
|||||||
|
|
||||||
syn cluster jsExpression add=graphqlTaggedTemplate
|
syn cluster jsExpression add=graphqlTaggedTemplate
|
||||||
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
|
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
|
||||||
|
elseif graphql#has_syntax_group('javaScriptStringT')
|
||||||
|
" runtime/syntax/javascript.vim
|
||||||
|
exec 'syntax region graphqlTemplateString start=+' . s:tags . '\@20<=`+ skip=+\\\\\|\\`+ end=+`+ contains=@GraphQLSyntax,javaScriptSpecial,javaScriptEmbed,@htmlPreproc extend'
|
||||||
|
exec 'syntax match graphqlTaggedTemplate +' . s:tags . '\ze`+ nextgroup=graphqlTemplateString'
|
||||||
|
syntax region graphqlTemplateExpression start=+${+ end=+}+ contained contains=@javaScriptEmbededExpr containedin=graphqlFold keepend
|
||||||
|
|
||||||
|
hi def link graphqlTemplateString javaScriptStringT
|
||||||
|
hi def link graphqlTaggedTemplate javaScriptEmbed
|
||||||
|
hi def link graphqlTemplateExpression javaScriptEmbed
|
||||||
|
|
||||||
|
syn cluster htmlJavaScript add=graphqlTaggedTemplate
|
||||||
|
syn cluster javaScriptEmbededExpr add=graphqlTaggedTemplate
|
||||||
|
syn cluster graphqlTaggedTemplate add=graphqlTemplateString
|
||||||
|
endif
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
5
after/syntax/javascriptreact.vim
Normal file
5
after/syntax/javascriptreact.vim
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||||
|
|
||||||
|
source <sfile>:h/javascript.vim
|
||||||
|
|
||||||
|
endif
|
||||||
5
after/syntax/javascriptreact/graphql.vim
Normal file
5
after/syntax/javascriptreact/graphql.vim
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||||
|
|
||||||
|
runtime! after/syntax/javascript/graphql.vim
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -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)
|
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">
|
" <tag id="sample">
|
||||||
" ~~~~~~~~~~~~~~~~~
|
" ~~~~~~~~~~~~~~~~~
|
||||||
" and self close tag
|
" and self close tag
|
||||||
@@ -12,11 +18,14 @@ syntax region jsxTag
|
|||||||
\ matchgroup=jsxOpenPunct
|
\ matchgroup=jsxOpenPunct
|
||||||
\ end=+>+
|
\ end=+>+
|
||||||
\ matchgroup=NONE
|
\ matchgroup=NONE
|
||||||
\ end=+\(/\_s*>\)\@=+
|
\ end=+\%(/\_s*>\)\@=+
|
||||||
\ contained
|
\ contained
|
||||||
\ contains=jsxOpenTag,jsxEscapeJs,jsxAttrib,jsComment,@javascriptComments,javaScriptLineComment,javaScriptComment,typescriptLineComment,typescriptComment,jsxSpreadOperator
|
\ contains=jsxOpenTag,jsxAttrib,jsxExpressionBlock,jsxSpreadOperator,jsComment,@javascriptComments,javaScriptLineComment,javaScriptComment,typescriptLineComment,typescriptComment
|
||||||
\ keepend
|
\ keepend
|
||||||
\ extend
|
\ extend
|
||||||
|
\ skipwhite
|
||||||
|
\ skipempty
|
||||||
|
\ nextgroup=jsxCloseString
|
||||||
|
|
||||||
" <tag></tag>
|
" <tag></tag>
|
||||||
" ~~~~~~~~~~~
|
" ~~~~~~~~~~~
|
||||||
@@ -27,30 +36,15 @@ syntax region jsxTag
|
|||||||
" <tag />
|
" <tag />
|
||||||
" ~~~~~~~
|
" ~~~~~~~
|
||||||
syntax region jsxElement
|
syntax region jsxElement
|
||||||
\ start=+<\_s*\(>\|\${\|\z(\<[-:_\.\$0-9A-Za-z]\+\>\)\)+
|
\ start=+<\_s*\%(>\|\${\|\z(\<[-:._$A-Za-z0-9]\+\>\)\)+
|
||||||
\ end=+/\_s*>+
|
\ end=+/\_s*>+
|
||||||
\ end=+<\_s*/\_s*\z1\_s*>+
|
\ end=+<\_s*/\_s*\z1\_s*>+
|
||||||
\ contains=jsxElement,jsxEscapeJs,jsxTag,jsxComment,jsxCloseString,jsxCloseTag,@Spell
|
\ contains=jsxElement,jsxTag,jsxExpressionBlock,jsxComment,jsxCloseTag,@Spell
|
||||||
\ keepend
|
\ keepend
|
||||||
\ extend
|
\ extend
|
||||||
\ contained
|
\ contained
|
||||||
\ fold
|
\ 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}>
|
" <tag key={this.props.key}>
|
||||||
" ~~~~
|
" ~~~~
|
||||||
" and fragment start tag
|
" and fragment start tag
|
||||||
@@ -66,19 +60,31 @@ exe 'syntax region jsxOpenTag
|
|||||||
\ contains=jsxTagName
|
\ contains=jsxTagName
|
||||||
\ nextgroup=jsxAttrib
|
\ nextgroup=jsxAttrib
|
||||||
\ skipwhite
|
\ skipwhite
|
||||||
\ skipempty ' .(s:highlight_close_tag ? 'transparent' : '')
|
\ skipempty
|
||||||
|
\ ' .(s:highlight_close_tag ? 'transparent' : '')
|
||||||
|
|
||||||
|
|
||||||
|
" <tag key={this.props.key}>
|
||||||
|
" ~~~~~~~~~~~~~~~~
|
||||||
|
syntax region jsxExpressionBlock
|
||||||
|
\ matchgroup=jsxBraces
|
||||||
|
\ start=+{+
|
||||||
|
\ end=+}+
|
||||||
|
\ contained
|
||||||
|
\ extend
|
||||||
|
\ contains=@jsExpression,jsSpreadExpression,@javascriptExpression,javascriptSpreadOp,@javaScriptEmbededExpr,@typescriptExpression,typescriptObjectSpread,jsComment,@javascriptComments,javaScriptLineComment,javaScriptComment,typescriptLineComment,typescriptComment
|
||||||
|
|
||||||
" <foo.bar>
|
" <foo.bar>
|
||||||
" ~
|
" ~
|
||||||
syntax match jsxDot +\.+ contained display
|
syntax match jsxDot +\.+ contained
|
||||||
|
|
||||||
" <foo:bar>
|
" <foo:bar>
|
||||||
" ~
|
" ~
|
||||||
syntax match jsxNamespace +:+ contained display
|
syntax match jsxNamespace +:+ contained
|
||||||
|
|
||||||
" <tag id="sample">
|
" <tag id="sample">
|
||||||
" ~
|
" ~
|
||||||
syntax match jsxEqual +=+ contained display nextgroup=jsxString,jsxEscapeJs,jsxRegion skipwhite
|
syntax match jsxEqual +=+ contained skipwhite skipempty nextgroup=jsxString,jsxExpressionBlock,jsxRegion
|
||||||
|
|
||||||
" <tag />
|
" <tag />
|
||||||
" ~~
|
" ~~
|
||||||
@@ -99,13 +105,12 @@ syntax region jsxCloseTag
|
|||||||
" <tag key={this.props.key}>
|
" <tag key={this.props.key}>
|
||||||
" ~~~
|
" ~~~
|
||||||
syntax match jsxAttrib
|
syntax match jsxAttrib
|
||||||
\ +\<[-A-Za-z_][-:_\$0-9A-Za-z]*\>+
|
\ +\<[_$A-Za-z][-:_$A-Za-z0-9]*\>+
|
||||||
\ contained
|
\ contained
|
||||||
\ nextgroup=jsxEqual
|
\ nextgroup=jsxEqual
|
||||||
\ skipwhite
|
\ skipwhite
|
||||||
\ skipempty
|
\ skipempty
|
||||||
\ contains=jsxAttribKeyword
|
\ contains=jsxAttribKeyword,jsxNamespace
|
||||||
\ display
|
|
||||||
|
|
||||||
" <MyComponent ...>
|
" <MyComponent ...>
|
||||||
" ~~~~~~~~~~~
|
" ~~~~~~~~~~~
|
||||||
@@ -113,67 +118,71 @@ syntax match jsxAttrib
|
|||||||
" <someCamel ...>
|
" <someCamel ...>
|
||||||
" ~~~~~
|
" ~~~~~
|
||||||
exe 'syntax match jsxComponentName
|
exe 'syntax match jsxComponentName
|
||||||
\ +\<[A-Z][\$0-9A-Za-z]\+\>+
|
\ +\<[_$]\?[A-Z][-_$A-Za-z0-9]*\>+
|
||||||
\ contained
|
\ contained
|
||||||
\ display ' .(s:highlight_close_tag ? 'transparent' : '')
|
\ ' .(s:highlight_close_tag ? 'transparent' : '')
|
||||||
|
|
||||||
" <tag key={this.props.key}>
|
" <tag key={this.props.key}>
|
||||||
" ~~~
|
" ~~~
|
||||||
exe 'syntax match jsxTagName
|
exe 'syntax match jsxTagName
|
||||||
\ +\<[-:_\.\$0-9A-Za-z]\+\>+
|
\ +\<[-:._$A-Za-z0-9]\+\>+
|
||||||
\ contained
|
\ contained
|
||||||
\ contains=jsxComponentName,jsxDot,jsxNamespace
|
\ contains=jsxComponentName,jsxDot,jsxNamespace
|
||||||
\ nextgroup=jsxAttrib
|
\ nextgroup=jsxAttrib
|
||||||
\ skipempty
|
\ skipempty
|
||||||
\ skipwhite
|
\ skipwhite
|
||||||
\ display ' .(s:highlight_close_tag ? 'transparent' : '')
|
\ ' .(s:highlight_close_tag ? 'transparent' : '')
|
||||||
|
|
||||||
" <tag id="sample">
|
" <tag id="sample">
|
||||||
" ~~~~~~~~
|
" ~~~~~~~~
|
||||||
" and
|
" and
|
||||||
" <tag id='sample'>
|
" <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)
|
let s:enable_tagged_jsx = !empty(s:tags)
|
||||||
|
|
||||||
" add support to JSX inside the tagged template string
|
" add support to JSX inside the tagged template string
|
||||||
" https://github.com/developit/htm
|
" https://github.com/developit/htm
|
||||||
if s:enable_tagged_jsx
|
if s:enable_tagged_jsx
|
||||||
exe 'syntax region jsxTaggedRegion
|
exe 'syntax match jsxRegion +\%(' . join(s:tags, '\|') . '\)\%(\_s*`\)\@=+ contains=jsTemplateStringTag,jsTaggedTemplate,javascriptTagRef skipwhite skipempty nextgroup=jsxTaggedRegion'
|
||||||
\ start=+\%('. join(s:tags, '\|') .'\)\@<=`+ms=s+1
|
|
||||||
\ end=+`+me=e-1
|
|
||||||
\ extend
|
|
||||||
\ contained
|
|
||||||
\ containedin=jsTemplateString,javascriptTemplate,javaScriptStringT,typescriptStringB
|
|
||||||
\ contains=jsxElement'
|
|
||||||
|
|
||||||
syntax region jsxEscapeJs
|
syntax region jsxTaggedRegion
|
||||||
\ start=+\${+
|
\ matchgroup=jsxBackticks
|
||||||
\ end=++
|
\ start=+`+
|
||||||
|
\ end=+`+
|
||||||
\ extend
|
\ extend
|
||||||
\ contained
|
\ contained
|
||||||
\ contains=jsTemplateExpression,javascriptTemplateSubstitution,javaScriptEmbed,typescriptInterpolation
|
\ contains=jsxElement,jsxExpressionBlock
|
||||||
|
\ transparent
|
||||||
|
|
||||||
|
syntax region jsxExpressionBlock
|
||||||
|
\ matchgroup=jsxBraces
|
||||||
|
\ start=+\${+
|
||||||
|
\ end=+}+
|
||||||
|
\ extend
|
||||||
|
\ contained
|
||||||
|
\ contains=@jsExpression,jsSpreadExpression,@javascriptExpression,javascriptSpreadOp,@javaScriptEmbededExpr,@typescriptExpression,typescriptObjectSpread
|
||||||
|
|
||||||
syntax region jsxOpenTag
|
syntax region jsxOpenTag
|
||||||
\ matchgroup=jsxOpenPunct
|
\ matchgroup=jsxOpenPunct
|
||||||
\ start=+<\%(\${\)\@=+
|
\ start=+<\%(\${\)\@=+
|
||||||
\ matchgroup=NONE
|
\ matchgroup=NONE
|
||||||
\ end=++
|
\ end=+}\@1<=+
|
||||||
\ contained
|
\ contained
|
||||||
\ contains=jsxEscapeJs
|
\ contains=jsxExpressionBlock
|
||||||
\ nextgroup=jsxAttrib,jsxSpreadOperator
|
|
||||||
\ skipwhite
|
\ skipwhite
|
||||||
\ skipempty
|
\ 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=jsxExpressionBlock skipwhite
|
||||||
|
|
||||||
syntax match jsxCloseTag +<//>+ display
|
syntax match jsxCloseTag +<//>+ contained
|
||||||
|
|
||||||
syntax match jsxComment +<!--\_.\{-}-->+ display
|
syntax match jsxComment +<!--\_.\{-}-->+
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Highlight the tag name
|
" Highlight the tag name
|
||||||
@@ -183,10 +192,14 @@ highlight def link jsxComponentName Function
|
|||||||
|
|
||||||
highlight def link jsxAttrib Type
|
highlight def link jsxAttrib Type
|
||||||
highlight def link jsxAttribKeyword jsxAttrib
|
highlight def link jsxAttribKeyword jsxAttrib
|
||||||
highlight def link jsxEqual Operator
|
|
||||||
highlight def link jsxString String
|
highlight def link jsxString String
|
||||||
|
highlight def link jsxComment Comment
|
||||||
|
|
||||||
highlight def link jsxDot Operator
|
highlight def link jsxDot Operator
|
||||||
highlight def link jsxNamespace 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
|
if s:highlight_close_tag
|
||||||
highlight def link jsxCloseString Identifier
|
highlight def link jsxCloseString Identifier
|
||||||
@@ -201,9 +214,6 @@ highlight def link jsxPunct jsxCloseString
|
|||||||
highlight def link jsxClosePunct jsxPunct
|
highlight def link jsxClosePunct jsxPunct
|
||||||
highlight def link jsxCloseTag jsxCloseString
|
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)
|
let s:vim_jsx_pretty_colorful_config = get(g:, 'vim_jsx_pretty_colorful_config', 0)
|
||||||
|
|
||||||
if s:vim_jsx_pretty_colorful_config == 1
|
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
|
highlight def link jsFuncArgs Type
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -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
|
let s:jsx_cpo = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
@@ -26,6 +30,12 @@ endif
|
|||||||
" refine the typescript line comment
|
" refine the typescript line comment
|
||||||
syntax region typescriptLineComment start=+//+ end=/$/ contains=@Spell,typescriptCommentTodo,typescriptRef extend keepend
|
syntax region typescriptLineComment start=+//+ end=/$/ contains=@Spell,typescriptCommentTodo,typescriptRef extend keepend
|
||||||
|
|
||||||
|
for syntax_name in ['tsxRegion', 'tsxFragment']
|
||||||
|
if hlexists(syntax_name)
|
||||||
|
exe 'syntax clear ' . syntax_name
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
if !hlexists('typescriptTypeCast')
|
if !hlexists('typescriptTypeCast')
|
||||||
" add a typescriptBlock group for typescript
|
" add a typescriptBlock group for typescript
|
||||||
syntax region typescriptBlock
|
syntax region typescriptBlock
|
||||||
@@ -36,11 +46,14 @@ if !hlexists('typescriptTypeCast')
|
|||||||
\ extend
|
\ extend
|
||||||
\ contains=@typescriptExpression,typescriptBlock
|
\ contains=@typescriptExpression,typescriptBlock
|
||||||
\ fold
|
\ fold
|
||||||
|
hi def link typescriptTypeBrackets typescriptOpSymbols
|
||||||
endif
|
endif
|
||||||
|
|
||||||
syntax cluster typescriptExpression add=jsxRegion,typescriptParens
|
|
||||||
|
|
||||||
runtime syntax/jsx_pretty.vim
|
runtime syntax/jsx_pretty.vim
|
||||||
|
syntax cluster typescriptExpression add=jsxRegion,typescriptParens
|
||||||
|
" Fix type casting ambiguity with JSX syntax
|
||||||
|
syntax match typescriptTypeBrackets +[<>]+ contained
|
||||||
|
syntax match typescriptTypeCast +<\([_$A-Za-z0-9]\+\)>\%(\s*\%([_$A-Za-z0-9]\+\s*;\?\|(\)\%(\_[^<]*</\1>\)\@!\)\@=+ contains=typescriptTypeBrackets,@typescriptType,typescriptType nextgroup=@typescriptExpression
|
||||||
|
|
||||||
let b:current_syntax = 'typescript.tsx'
|
let b:current_syntax = 'typescript.tsx'
|
||||||
|
|
||||||
@@ -1,5 +1,28 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||||
|
|
||||||
|
" Copyright (c) 2016-2019 Jon Parise <jon@indelible.org>
|
||||||
|
"
|
||||||
|
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
" of this software and associated documentation files (the "Software"), to
|
||||||
|
" deal in the Software without restriction, including without limitation the
|
||||||
|
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
" sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
" furnished to do so, subject to the following conditions:
|
||||||
|
"
|
||||||
|
" The above copyright notice and this permission notice shall be included in
|
||||||
|
" all copies or substantial portions of the Software.
|
||||||
|
"
|
||||||
|
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
" IN THE SOFTWARE.
|
||||||
|
"
|
||||||
|
" Language: GraphQL
|
||||||
|
" Maintainer: Jon Parise <jon@indelible.org>
|
||||||
|
|
||||||
if exists('b:current_syntax')
|
if exists('b:current_syntax')
|
||||||
let s:current_syntax = b:current_syntax
|
let s:current_syntax = b:current_syntax
|
||||||
unlet b:current_syntax
|
unlet b:current_syntax
|
||||||
|
|||||||
5
after/syntax/typescriptreact.vim
Normal file
5
after/syntax/typescriptreact.vim
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || !(index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'typescript') != -1 || index(g:polyglot_disabled, 'jsx') != -1)
|
||||||
|
|
||||||
|
source <sfile>:h/tsx.vim
|
||||||
|
|
||||||
|
endif
|
||||||
5
after/syntax/typescriptreact/graphql.vim
Normal file
5
after/syntax/typescriptreact/graphql.vim
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||||
|
|
||||||
|
runtime! after/syntax/typescript/graphql.vim
|
||||||
|
|
||||||
|
endif
|
||||||
5
after/syntax/vue/graphql.vim
Normal file
5
after/syntax/vue/graphql.vim
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||||
|
|
||||||
|
runtime! after/syntax/javascript/graphql.vim
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -5,7 +5,17 @@ function! cargo#Load()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! cargo#cmd(args)
|
function! cargo#cmd(args)
|
||||||
execute "! cargo" a:args
|
" Trim trailing spaces. This is necessary since :terminal command parses
|
||||||
|
" trailing spaces as an empty argument.
|
||||||
|
let args = substitute(a:args, '\s\+$', '', '')
|
||||||
|
if has('terminal')
|
||||||
|
let cmd = 'terminal'
|
||||||
|
elseif has('nvim')
|
||||||
|
let cmd = 'noautocmd new | terminal'
|
||||||
|
else
|
||||||
|
let cmd = '!'
|
||||||
|
endif
|
||||||
|
execute cmd 'cargo' args
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:nearest_cargo(...) abort
|
function! s:nearest_cargo(...) abort
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ fu! csv#Init(start, end, ...) "{{{3
|
|||||||
" Enable vartabs for tab delimited files
|
" Enable vartabs for tab delimited files
|
||||||
if b:delimiter=="\t" && has("vartabs")&& !exists("b:csv_fixed_width_cols")
|
if b:delimiter=="\t" && has("vartabs")&& !exists("b:csv_fixed_width_cols")
|
||||||
if get(b:, 'col_width', []) ==# []
|
if get(b:, 'col_width', []) ==# []
|
||||||
call csv#CalculateColumnWidth('')
|
call csv#CalculateColumnWidth(line('$'), 1)
|
||||||
endif
|
endif
|
||||||
let &l:vts=join(b:col_width, ',')
|
let &l:vts=join(b:col_width, ',')
|
||||||
let g:csv_no_conceal=1
|
let g:csv_no_conceal=1
|
||||||
@@ -574,7 +574,7 @@ fu! csv#MaxColumns(...) "{{{3
|
|||||||
return len(b:csv_fixed_width_cols)
|
return len(b:csv_fixed_width_cols)
|
||||||
endif
|
endif
|
||||||
endfu
|
endfu
|
||||||
fu! csv#ColWidth(colnr, ...) "{{{3
|
fu! csv#ColWidth(colnr, row, silent) "{{{3
|
||||||
" if a:1 is given, specifies the row, for which to calculate the width
|
" if a:1 is given, specifies the row, for which to calculate the width
|
||||||
"
|
"
|
||||||
" Return the width of a column
|
" Return the width of a column
|
||||||
@@ -586,16 +586,15 @@ fu! csv#ColWidth(colnr, ...) "{{{3
|
|||||||
if !exists("b:csv_fixed_width_cols")
|
if !exists("b:csv_fixed_width_cols")
|
||||||
if !exists("b:csv_list")
|
if !exists("b:csv_list")
|
||||||
" only check first 10000 lines, to be faster
|
" only check first 10000 lines, to be faster
|
||||||
let last = line('$')
|
let last = a:row
|
||||||
if exists("a:1") && !empty(a:1)
|
|
||||||
let last = a:1
|
|
||||||
endif
|
|
||||||
if !get(b:, 'csv_arrange_use_all_rows', 0)
|
if !get(b:, 'csv_arrange_use_all_rows', 0)
|
||||||
if last > 10000
|
if last > 10000
|
||||||
let last = 10000
|
let last = 10000
|
||||||
|
if !a:silent
|
||||||
call csv#Warn('File too large, only checking the first 10000 rows for the width')
|
call csv#Warn('File too large, only checking the first 10000 rows for the width')
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
let b:csv_list=getline(skipfirst+1,last)
|
let b:csv_list=getline(skipfirst+1,last)
|
||||||
let pat = '^\s*\V'. escape(b:csv_cmt[0], '\\')
|
let pat = '^\s*\V'. escape(b:csv_cmt[0], '\\')
|
||||||
call filter(b:csv_list, 'v:val !~ pat')
|
call filter(b:csv_list, 'v:val !~ pat')
|
||||||
@@ -637,7 +636,7 @@ fu! csv#ArrangeCol(first, last, bang, limit, ...) range "{{{3
|
|||||||
endif
|
endif
|
||||||
let cur=winsaveview()
|
let cur=winsaveview()
|
||||||
" Force recalculation of Column width
|
" Force recalculation of Column width
|
||||||
let row = exists("a:1") ? a:1 : ''
|
let row = exists("a:1") ? a:1 : line('$')
|
||||||
if a:bang || !empty(row)
|
if a:bang || !empty(row)
|
||||||
if a:bang && exists("b:col_width")
|
if a:bang && exists("b:col_width")
|
||||||
" Unarrange, so that if csv_arrange_align has changed
|
" Unarrange, so that if csv_arrange_align has changed
|
||||||
@@ -671,7 +670,7 @@ fu! csv#ArrangeCol(first, last, bang, limit, ...) range "{{{3
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists("b:col_width")
|
if !exists("b:col_width")
|
||||||
call csv#CalculateColumnWidth(row)
|
call csv#CalculateColumnWidth(row, 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" abort on empty file
|
" abort on empty file
|
||||||
@@ -750,7 +749,7 @@ fu! csv#UnArrangeCol(match) "{{{3
|
|||||||
" Strip leading white space, also trims empty recordcsv#
|
" Strip leading white space, also trims empty recordcsv#
|
||||||
return substitute(a:match, '\%(^ \+\)\|\%( \+\ze'.b:delimiter. '\?$\)', '', 'g')
|
return substitute(a:match, '\%(^ \+\)\|\%( \+\ze'.b:delimiter. '\?$\)', '', 'g')
|
||||||
endfu
|
endfu
|
||||||
fu! csv#CalculateColumnWidth(row) "{{{3
|
fu! csv#CalculateColumnWidth(row, silent) "{{{3
|
||||||
" Internal function, not called from external,
|
" Internal function, not called from external,
|
||||||
" does not work with fixed width columns
|
" does not work with fixed width columns
|
||||||
" row for the row for which to calculate the width
|
" row for the row for which to calculate the width
|
||||||
@@ -763,7 +762,7 @@ fu! csv#CalculateColumnWidth(row) "{{{3
|
|||||||
endif
|
endif
|
||||||
let s:max_cols=csv#MaxColumns(line('.'))
|
let s:max_cols=csv#MaxColumns(line('.'))
|
||||||
for i in range(1,s:max_cols)
|
for i in range(1,s:max_cols)
|
||||||
call add(b:col_width, csv#ColWidth(i, a:row))
|
call add(b:col_width, csv#ColWidth(i, a:row, a:silent))
|
||||||
endfor
|
endfor
|
||||||
catch /csv:no_col/
|
catch /csv:no_col/
|
||||||
call csv#Warn("Error: getting Column numbers, aborting!")
|
call csv#Warn("Error: getting Column numbers, aborting!")
|
||||||
@@ -1053,7 +1052,7 @@ fu! csv#MoveCol(forward, line, ...) "{{{3
|
|||||||
let maxcol=csv#MaxColumns(line('.'))
|
let maxcol=csv#MaxColumns(line('.'))
|
||||||
let cpos=getpos('.')[2]
|
let cpos=getpos('.')[2]
|
||||||
if !exists("b:csv_fixed_width_cols")
|
if !exists("b:csv_fixed_width_cols")
|
||||||
let curwidth=CSVWidth()
|
let curwidth=CSVWidth(1)
|
||||||
call search(b:col, 'bc', line('.'))
|
call search(b:col, 'bc', line('.'))
|
||||||
endif
|
endif
|
||||||
let spos=getpos('.')[2]
|
let spos=getpos('.')[2]
|
||||||
@@ -1146,7 +1145,7 @@ fu! csv#MoveCol(forward, line, ...) "{{{3
|
|||||||
" leave the column (if the next column is shorter)
|
" leave the column (if the next column is shorter)
|
||||||
if !exists("b:csv_fixed_width_cols")
|
if !exists("b:csv_fixed_width_cols")
|
||||||
let a = getpos('.')
|
let a = getpos('.')
|
||||||
if CSVWidth() == curwidth
|
if CSVWidth(1) == curwidth
|
||||||
let a[2]+= cpos-spos
|
let a[2]+= cpos-spos
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
@@ -1159,7 +1158,7 @@ fu! csv#MoveCol(forward, line, ...) "{{{3
|
|||||||
" Move to the correct screen column
|
" Move to the correct screen column
|
||||||
if !exists("b:csv_fixed_width_cols")
|
if !exists("b:csv_fixed_width_cols")
|
||||||
let a = getpos('.')
|
let a = getpos('.')
|
||||||
if CSVWidth() == curwidth
|
if CSVWidth(1) == curwidth
|
||||||
let a[2]+= cpos-spos
|
let a[2]+= cpos-spos
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
@@ -1835,7 +1834,7 @@ fu! csv#ProcessFieldValue(field) "{{{3
|
|||||||
|
|
||||||
if a == b:delimiter
|
if a == b:delimiter
|
||||||
try
|
try
|
||||||
let a=repeat(' ', csv#ColWidth(col))
|
let a=repeat(' ', csv#ColWidth(col, line('$'), 1))
|
||||||
catch
|
catch
|
||||||
" no-op
|
" no-op
|
||||||
endtry
|
endtry
|
||||||
@@ -2134,7 +2133,7 @@ fu! csv#NewRecord(line1, line2, count) "{{{3
|
|||||||
if !exists("b:col_width")
|
if !exists("b:col_width")
|
||||||
" Best guess width
|
" Best guess width
|
||||||
if exists("b:csv_fixed_width_cols")
|
if exists("b:csv_fixed_width_cols")
|
||||||
let record .= printf("%*s", csv#ColWidth(item),
|
let record .= printf("%*s", csv#ColWidth(item, line('$'), 1),
|
||||||
\ b:delimiter)
|
\ b:delimiter)
|
||||||
else
|
else
|
||||||
let record .= printf("%20s", b:delimiter)
|
let record .= printf("%20s", b:delimiter)
|
||||||
@@ -3145,7 +3144,9 @@ fu! CSVCount(col, fmt, first, last, ...) "{{{3
|
|||||||
unlet! s:additional['distinct']
|
unlet! s:additional['distinct']
|
||||||
return (empty(result) ? 0 : result)
|
return (empty(result) ? 0 : result)
|
||||||
endfu
|
endfu
|
||||||
fu! CSVWidth() "{{{3
|
fu! CSVWidth(...) "{{{3
|
||||||
|
" do not output any warning
|
||||||
|
let silent = get(a:000, 0, 1)
|
||||||
" does not work with fixed width columns
|
" does not work with fixed width columns
|
||||||
if exists("b:csv_fixed_width_cols")
|
if exists("b:csv_fixed_width_cols")
|
||||||
let c = getline(1,'$')
|
let c = getline(1,'$')
|
||||||
@@ -3164,7 +3165,7 @@ fu! CSVWidth() "{{{3
|
|||||||
" Add width for last column
|
" Add width for last column
|
||||||
call add(width, max-y+1)
|
call add(width, max-y+1)
|
||||||
else
|
else
|
||||||
call csv#CalculateColumnWidth('')
|
call csv#CalculateColumnWidth(line('$'), silent)
|
||||||
let width=map(copy(b:col_width), 'v:val-1')
|
let width=map(copy(b:col_width), 'v:val-1')
|
||||||
endif
|
endif
|
||||||
return width
|
return width
|
||||||
|
|||||||
@@ -84,7 +84,18 @@ function! go#config#StatuslineDuration() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! go#config#SnippetEngine() abort
|
function! go#config#SnippetEngine() abort
|
||||||
return get(g:, 'go_snippet_engine', 'automatic')
|
let l:engine = get(g:, 'go_snippet_engine', 'automatic')
|
||||||
|
if l:engine is? "automatic"
|
||||||
|
if get(g:, 'did_plugin_ultisnips') is 1
|
||||||
|
let l:engine = 'ultisnips'
|
||||||
|
elseif get(g:, 'loaded_neosnippet') is 1
|
||||||
|
let l:engine = 'neosnippet'
|
||||||
|
elseif get(g:, 'loaded_minisnip') is 1
|
||||||
|
let l:engine = 'minisnip'
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
return l:engine
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! go#config#PlayBrowserCommand() abort
|
function! go#config#PlayBrowserCommand() abort
|
||||||
@@ -353,7 +364,7 @@ function! go#config#FmtCommand() abort
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! go#config#FmtOptions() abort
|
function! go#config#FmtOptions() abort
|
||||||
return get(g:, "go_fmt_options", {})
|
return get(b:, "go_fmt_options", get(g:, "go_fmt_options", {}))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! go#config#FmtFailSilently() abort
|
function! go#config#FmtFailSilently() abort
|
||||||
@@ -368,6 +379,11 @@ function! go#config#PlayOpenBrowser() abort
|
|||||||
return get(g:, "go_play_open_browser", 1)
|
return get(g:, "go_play_open_browser", 1)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! go#config#RenameCommand() abort
|
||||||
|
" delegate to go#config#GorenameBin for backwards compatability.
|
||||||
|
return get(g:, "go_rename_command", go#config#GorenameBin())
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! go#config#GorenameBin() abort
|
function! go#config#GorenameBin() abort
|
||||||
return get(g:, "go_gorename_bin", "gorename")
|
return get(g:, "go_gorename_bin", "gorename")
|
||||||
endfunction
|
endfunction
|
||||||
@@ -463,6 +479,14 @@ function! go#config#HighlightVariableDeclarations() abort
|
|||||||
return get(g:, 'go_highlight_variable_declarations', 0)
|
return get(g:, 'go_highlight_variable_declarations', 0)
|
||||||
endfunction
|
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
|
function! go#config#HighlightDebug() abort
|
||||||
return get(g:, 'go_highlight_debug', 1)
|
return get(g:, 'go_highlight_debug', 1)
|
||||||
endfunction
|
endfunction
|
||||||
@@ -482,6 +506,43 @@ function! go#config#CodeCompletionEnabled() abort
|
|||||||
return get(g:, "go_code_completion_enabled", 1)
|
return get(g:, "go_code_completion_enabled", 1)
|
||||||
endfunction
|
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#GoplsStaticCheck() abort
|
||||||
|
return get(g:, 'go_gopls_staticcheck', 0)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! go#config#GoplsUsePlaceholders() abort
|
||||||
|
return get(g:, 'go_gopls_use_placeholders', 0)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! go#config#GoplsEnabled() abort
|
||||||
|
return get(g:, 'go_gopls_enabled', 1)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! go#config#DiagnosticsEnabled() abort
|
||||||
|
return get(g:, 'go_diagnostics_enabled', 0)
|
||||||
|
endfunction
|
||||||
|
|
||||||
" Set the default value. A value of "1" is a shortcut for this, for
|
" Set the default value. A value of "1" is a shortcut for this, for
|
||||||
" compatibility reasons.
|
" compatibility reasons.
|
||||||
if exists("g:go_gorename_prefill") && g:go_gorename_prefill == 1
|
if exists("g:go_gorename_prefill") && g:go_gorename_prefill == 1
|
||||||
|
|||||||
@@ -1,13 +1,36 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||||
|
|
||||||
" Vim plugin
|
" Copyright (c) 2016-2019 Jon Parise <jon@indelible.org>
|
||||||
|
"
|
||||||
|
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
" of this software and associated documentation files (the "Software"), to
|
||||||
|
" deal in the Software without restriction, including without limitation the
|
||||||
|
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
" sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
" furnished to do so, subject to the following conditions:
|
||||||
|
"
|
||||||
|
" The above copyright notice and this permission notice shall be included in
|
||||||
|
" all copies or substantial portions of the Software.
|
||||||
|
"
|
||||||
|
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
" IN THE SOFTWARE.
|
||||||
|
"
|
||||||
" Language: GraphQL
|
" Language: GraphQL
|
||||||
" Maintainer: Jon Parise <jon@indelible.org>
|
" Maintainer: Jon Parise <jon@indelible.org>
|
||||||
|
|
||||||
if exists('g:autoloaded_graphql')
|
function! graphql#has_syntax_group(group) abort
|
||||||
finish
|
try
|
||||||
endif
|
silent execute 'silent highlight ' . a:group
|
||||||
let g:autoloaded_graphql = 1
|
catch
|
||||||
|
return v:false
|
||||||
|
endtry
|
||||||
|
return v:true
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! graphql#javascript_tags() abort
|
function! graphql#javascript_tags() abort
|
||||||
return get(g:, 'graphql_javascript_tags', ['gql', 'graphql', 'Relay.QL'])
|
return get(g:, 'graphql_javascript_tags', ['gql', 'graphql', 'Relay.QL'])
|
||||||
|
|||||||
@@ -10,209 +10,297 @@ else
|
|||||||
endfunction
|
endfunction
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Get the syntax group of start of line
|
" Regexp for the start tag
|
||||||
function! s:syn_sol(lnum)
|
let s:start_tag = '<\_s*\%(>\|\${\|\%(\<[-:._$A-Za-z0-9]\+\>\)\)'
|
||||||
let line = getline(a:lnum)
|
" Regexp for the end tag
|
||||||
let sol = matchstr(line, '^\s*')
|
let s:end_tag = '\%(<\_s*/\_s*\%(\<[-:._$A-Za-z0-9]\+\>\)\_s*>\|/\_s*>\)'
|
||||||
return map(synstack(a:lnum, len(sol) + 1), 'synIDattr(v:val, "name")')
|
|
||||||
|
function s:trim(line)
|
||||||
|
return substitute(a:line, '^\s*\|\s*$', '', 'g')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Get the syntax group of end of line
|
" Get the syntax stack at the given position
|
||||||
function! s:syn_eol(lnum)
|
function s:syntax_stack_at(lnum, col)
|
||||||
let lnum = prevnonblank(a:lnum)
|
return map(synstack(a:lnum, a:col), 'synIDattr(v:val, "name")')
|
||||||
let col = strlen(getline(lnum))
|
|
||||||
return map(synstack(lnum, col), 'synIDattr(v:val, "name")')
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:prev_indent(lnum)
|
" Get the syntax at the given position
|
||||||
let lnum = prevnonblank(a:lnum - 1)
|
function s:syntax_at(lnum, col)
|
||||||
return indent(lnum)
|
return synIDattr(synID(a:lnum, a:col, 1), 'name')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:prev_line(lnum)
|
" Get the start col of the non-space charactor
|
||||||
let lnum = prevnonblank(a:lnum - 1)
|
function s:start_col(lnum)
|
||||||
return substitute(getline(lnum), '^\s*\|\s*$', '', 'g')
|
return len(matchstr(getline(a:lnum), '^\s*')) + 1
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:syn_attr_jsx(synattr)
|
" Get the start syntax of a given line number
|
||||||
return a:synattr =~? "^jsx"
|
function s:start_syntax(lnum)
|
||||||
|
return s:syntax_at(a:lnum, s:start_col(a:lnum))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:syn_xmlish(syns)
|
" The skip function for searchpair
|
||||||
return s:syn_attr_jsx(get(a:syns, -1))
|
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
|
endfunction
|
||||||
|
|
||||||
function! s:syn_jsx_element(syns)
|
" Whether the specified stytax group is the opening tag
|
||||||
return get(a:syns, -1) =~? 'jsxElement'
|
function s:is_opening_tag(syntax)
|
||||||
|
return a:syntax =~? 'jsxOpenPunct'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:syn_js_comment(syns)
|
" Whether the specified stytax group is the closing tag
|
||||||
return get(a:syns, -1) =~? 'Comment$'
|
function s:is_closing_tag(syntax)
|
||||||
|
return a:syntax =~? 'jsxClose'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:syn_jsx_escapejs(syns)
|
" Whether the specified syntax group is the jsxRegion
|
||||||
return get(a:syns, -1) =~? '\(\(js\(Template\)\?\|javaScript\(Embed\)\?\|typescript\)Braces\|javascriptTemplateSB\|typescriptInterpolationDelimiter\)' &&
|
function s:is_jsx_region(syntax)
|
||||||
\ (get(a:syns, -2) =~? 'jsxEscapeJs' ||
|
return a:syntax =~? 'jsxRegion'
|
||||||
\ get(a:syns, -3) =~? 'jsxEscapeJs')
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:syn_jsx_attrib(syns)
|
" Whether the specified syntax group is the jsxElement
|
||||||
return len(filter(copy(a:syns), 'v:val =~? "jsxAttrib"'))
|
function s:is_jsx_element(syntax)
|
||||||
|
return a:syntax =~? 'jsxElement'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Whether the specified syntax group is the jsxExpressionBlock
|
||||||
|
function s:is_jsx_expression(syntax)
|
||||||
|
return a:syntax =~? 'jsxExpressionBlock'
|
||||||
|
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
|
||||||
|
" - jsxExpressionBlock
|
||||||
|
" - 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 jsxExpressionBlock and not starts with jsxBraces
|
||||||
|
if s:is_jsx_expression(syntax_name)
|
||||||
|
return 'jsxExpressionBlock'
|
||||||
|
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
|
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)
|
function! jsx_pretty#indent#get(js_indent)
|
||||||
let lnum = v:lnum
|
let line = s:trim(getline(v:lnum))
|
||||||
let line = substitute(getline(lnum), '^\s*\|\s*$', '', 'g')
|
let start_syntax = s:start_syntax(v:lnum)
|
||||||
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)
|
|
||||||
|
|
||||||
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)
|
if s:is_jsx_brace(start_syntax)
|
||||||
\ && !s:syn_jsx_escapejs(prev_syn_sol)
|
return s:jsx_indent_element(v:lnum)
|
||||||
\ && !s:syn_jsx_escapejs(prev_syn_eol)
|
endif
|
||||||
\ && !s:syn_js_comment(prev_syn_sol)
|
|
||||||
if line =~ '^/\s*>' || line =~ '^<\s*' . s:end_tag
|
if s:is_opening_tag(start_syntax) && line =~ '^>'
|
||||||
return prev_ind
|
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
|
else
|
||||||
return prev_ind + s:sw()
|
return indent(prev_lnum)
|
||||||
endif
|
endif
|
||||||
elseif !s:syn_xmlish(prev_syn_sol) && !s:syn_js_comment(prev_syn_sol) && s:syn_jsx_attrib(current_syn)
|
elseif syntax_context == 'jsxTaggedRegion'
|
||||||
" For #79
|
if s:is_closing_tag(start_syntax)
|
||||||
return prev_ind + s:sw()
|
return s:jsx_indent_closing_tag(v:lnum)
|
||||||
" {
|
elseif s:is_jsx_comment(start_syntax)
|
||||||
" <div></div>
|
return s:jsx_indent_comment(v:lnum)
|
||||||
" ##} <--
|
|
||||||
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
|
else
|
||||||
return prev_ind - s:sw()
|
return indent(s:prev_lnum(v:lnum)) + s:sw()
|
||||||
endif
|
endif
|
||||||
elseif prev_line =~ '-->$'
|
elseif syntax_context == 'jsxElement'
|
||||||
return prev_ind
|
if s:is_jsx_comment(start_syntax)
|
||||||
" close tag </tag> or /> including </>
|
return s:jsx_indent_comment(v:lnum)
|
||||||
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
|
endif
|
||||||
elseif line =~ '^\(>\|/\s*>\)'
|
|
||||||
if prev_line =~ '^<'
|
if s:is_comment(start_syntax)
|
||||||
return prev_ind
|
return s:jsx_indent_comment(v:lnum)
|
||||||
else
|
|
||||||
return prev_ind - s:sw()
|
|
||||||
endif
|
endif
|
||||||
elseif prev_line =~ '^\(<\|>\)' &&
|
|
||||||
\ (s:syn_xmlish(prev_syn_eol) || s:syn_js_comment(prev_syn_eol))
|
return s:jsx_indent_element(v:lnum)
|
||||||
if line =~ '^<\s*' . s:end_tag
|
elseif syntax_context == 'jsxExpressionBlock'
|
||||||
return prev_ind
|
let prev_lnum = s:prev_lnum(v:lnum)
|
||||||
else
|
let prev_line = s:trim(getline(prev_lnum))
|
||||||
return prev_ind + s:sw()
|
|
||||||
endif
|
if line =~ '^?'
|
||||||
elseif line =~ '^<\s*' . s:end_tag
|
return indent(prev_lnum) + s:sw()
|
||||||
if !s:syn_xmlish(prev_syn_sol)
|
elseif line =~ '^:'
|
||||||
if s:syn_jsx_escapejs(prev_syn_eol)
|
return indent(prev_lnum)
|
||||||
\ || 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
|
|
||||||
else
|
|
||||||
return prev_ind
|
|
||||||
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
|
|
||||||
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
|
|
||||||
else
|
else
|
||||||
return a:js_indent()
|
return a:js_indent()
|
||||||
endif
|
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
|
endif
|
||||||
|
|
||||||
|
return a:js_indent()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
|
||||||
|
|
||||||
" Author: Kevin Ballard
|
|
||||||
" Description: Helper functions for Rust commands/mappings
|
" Description: Helper functions for Rust commands/mappings
|
||||||
" Last Modified: May 27, 2014
|
" Last Modified: May 27, 2014
|
||||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||||
@@ -510,14 +509,23 @@ function! s:SearchTestFunctionNameUnderCursor() abort
|
|||||||
return matchstr(getline(test_func_line), '\m\C^\s*fn\s\+\zs\h\w*')
|
return matchstr(getline(test_func_line), '\m\C^\s*fn\s\+\zs\h\w*')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! rust#Test(all, options) abort
|
function! rust#Test(mods, winsize, all, options) abort
|
||||||
let manifest = findfile('Cargo.toml', expand('%:p:h') . ';')
|
let manifest = findfile('Cargo.toml', expand('%:p:h') . ';')
|
||||||
if manifest ==# ''
|
if manifest ==# ''
|
||||||
return rust#Run(1, '--test ' . a:options)
|
return rust#Run(1, '--test ' . a:options)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if has('terminal') || has('nvim')
|
" <count> defaults to 0, but we prefer an empty string
|
||||||
let cmd = 'terminal '
|
let winsize = a:winsize ? a:winsize : ''
|
||||||
|
|
||||||
|
if has('terminal')
|
||||||
|
if has('patch-8.0.910')
|
||||||
|
let cmd = printf('%s noautocmd %snew | terminal ++curwin ', a:mods, winsize)
|
||||||
|
else
|
||||||
|
let cmd = printf('%s terminal ', a:mods)
|
||||||
|
endif
|
||||||
|
elseif has('nvim')
|
||||||
|
let cmd = printf('%s noautocmd %snew | terminal ', a:mods, winsize)
|
||||||
else
|
else
|
||||||
let cmd = '!'
|
let cmd = '!'
|
||||||
let manifest = shellescape(manifest)
|
let manifest = shellescape(manifest)
|
||||||
|
|||||||
@@ -62,18 +62,19 @@ function! s:RustfmtWriteMode()
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:RustfmtConfig()
|
function! s:RustfmtConfigOptions()
|
||||||
let l:rustfmt_toml = findfile('rustfmt.toml', expand('%:p:h') . ';')
|
let l:rustfmt_toml = findfile('rustfmt.toml', expand('%:p:h') . ';')
|
||||||
if l:rustfmt_toml !=# ''
|
if l:rustfmt_toml !=# ''
|
||||||
return '--config-path '.l:rustfmt_toml
|
return '--config-path '.fnamemodify(l:rustfmt_toml, ":p")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let l:_rustfmt_toml = findfile('.rustfmt.toml', expand('%:p:h') . ';')
|
let l:_rustfmt_toml = findfile('.rustfmt.toml', expand('%:p:h') . ';')
|
||||||
if l:_rustfmt_toml !=# ''
|
if l:_rustfmt_toml !=# ''
|
||||||
return '--config-path '.l:_rustfmt_toml
|
return '--config-path '.fnamemodify(l:_rustfmt_toml, ":p")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
return ''
|
" Default to edition 2018 in case no rustfmt.toml was found.
|
||||||
|
return '--edition 2018'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:RustfmtCommandRange(filename, line1, line2)
|
function! s:RustfmtCommandRange(filename, line1, line2)
|
||||||
@@ -84,7 +85,7 @@ function! s:RustfmtCommandRange(filename, line1, line2)
|
|||||||
|
|
||||||
let l:arg = {"file": shellescape(a:filename), "range": [a:line1, a:line2]}
|
let l:arg = {"file": shellescape(a:filename), "range": [a:line1, a:line2]}
|
||||||
let l:write_mode = s:RustfmtWriteMode()
|
let l:write_mode = s:RustfmtWriteMode()
|
||||||
let l:rustfmt_config = s:RustfmtConfig()
|
let l:rustfmt_config = s:RustfmtConfigOptions()
|
||||||
|
|
||||||
" FIXME: When --file-lines gets to be stable, add version range checking
|
" FIXME: When --file-lines gets to be stable, add version range checking
|
||||||
" accordingly.
|
" accordingly.
|
||||||
@@ -98,14 +99,9 @@ function! s:RustfmtCommandRange(filename, line1, line2)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:RustfmtCommand()
|
function! s:RustfmtCommand()
|
||||||
if g:rustfmt_emit_files
|
let write_mode = g:rustfmt_emit_files ? '--emit=stdout' : '--write-mode=display'
|
||||||
let l:write_mode = "--emit=stdout"
|
let config = s:RustfmtConfigOptions()
|
||||||
else
|
return join([g:rustfmt_command, write_mode, config, g:rustfmt_options])
|
||||||
let l:write_mode = "--write-mode=display"
|
|
||||||
endif
|
|
||||||
" rustfmt will pick on the right config on its own due to the
|
|
||||||
" current directory change.
|
|
||||||
return g:rustfmt_command . " ". l:write_mode . " " . g:rustfmt_options
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:DeleteLines(start, end) abort
|
function! s:DeleteLines(start, end) abort
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') == -1
|
||||||
|
|
||||||
|
let s:cpo_save = &cpoptions
|
||||||
|
set cpoptions&vim
|
||||||
|
|
||||||
" Ensure no conflict with arguments from the environment
|
" Ensure no conflict with arguments from the environment
|
||||||
let $TF_CLI_ARGS_fmt=''
|
let $TF_CLI_ARGS_fmt=''
|
||||||
|
|
||||||
@@ -61,4 +64,7 @@ function! terraform#commands(ArgLead, CmdLine, CursorPos)
|
|||||||
return join(l:commands, "\n")
|
return join(l:commands, "\n")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
let &cpoptions = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -746,6 +746,10 @@ let g:xmldata_html5 = {
|
|||||||
\ [],
|
\ [],
|
||||||
\ global_attributes
|
\ global_attributes
|
||||||
\ ],
|
\ ],
|
||||||
|
\ 'slot': [
|
||||||
|
\ [],
|
||||||
|
\ extend(copy(global_attributes), {'name': []})
|
||||||
|
\ ],
|
||||||
\ 'small': [
|
\ 'small': [
|
||||||
\ phrasing_elements,
|
\ phrasing_elements,
|
||||||
\ global_attributes
|
\ global_attributes
|
||||||
|
|||||||
9
build
9
build
@@ -72,7 +72,10 @@ extract() {
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -d "${dir}${subtree:-/}ftdetect" ] && for f in "${dir}${subtree:-/}ftdetect/"*; do
|
ftdetect=("${dir}${subtree:-/}ftdetect"/*)
|
||||||
|
if [ "$ftdetect" ] && [ "$ftdetect" != "${dir}${subtree:-/}ftdetect/*" ]; then
|
||||||
|
IFS=$'\n' ftdetect=($(sort -V <<< "${ftdetect[*]}")); unset IFS
|
||||||
|
for f in "${ftdetect[@]}"; do
|
||||||
cat <<EOF >> tmp/polyglot.vim
|
cat <<EOF >> tmp/polyglot.vim
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '${pack%%:*}') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '${pack%%:*}') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
@@ -83,6 +86,7 @@ endif
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -233,7 +237,7 @@ PACKS="
|
|||||||
log:MTDL9/vim-log-highlighting
|
log:MTDL9/vim-log-highlighting
|
||||||
lua:tbastos/vim-lua
|
lua:tbastos/vim-lua
|
||||||
mako:sophacles/vim-bundle-mako
|
mako:sophacles/vim-bundle-mako
|
||||||
markdown:plasticboy/vim-markdown:_SYNTAX
|
markdown:plasticboy/vim-markdown:_NOAFTER
|
||||||
mathematica:voldikss/vim-mma
|
mathematica:voldikss/vim-mma
|
||||||
mdx:jxnblk/vim-mdx-js
|
mdx:jxnblk/vim-mdx-js
|
||||||
meson:mesonbuild/meson:_ALL:/data/syntax-highlighting/vim/
|
meson:mesonbuild/meson:_ALL:/data/syntax-highlighting/vim/
|
||||||
@@ -292,6 +296,7 @@ PACKS="
|
|||||||
tptp:c-cube/vim-tptp
|
tptp:c-cube/vim-tptp
|
||||||
twig:lumiliet/vim-twig
|
twig:lumiliet/vim-twig
|
||||||
typescript:HerringtonDarkholme/yats.vim
|
typescript:HerringtonDarkholme/yats.vim
|
||||||
|
v:ollykel/v-vim
|
||||||
vala:arrufat/vala.vim
|
vala:arrufat/vala.vim
|
||||||
vbnet:vim-scripts/vbnet.vim
|
vbnet:vim-scripts/vbnet.vim
|
||||||
vcl:smerrill/vcl-vim-plugin
|
vcl:smerrill/vcl-vim-plugin
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -
|
|||||||
" Vim compiler file
|
" Vim compiler file
|
||||||
" Compiler: Cucumber
|
" Compiler: Cucumber
|
||||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||||
" Last Change: 2010 Aug 09
|
" Last Change: 2016 Aug 29
|
||||||
|
|
||||||
if exists("current_compiler")
|
if exists("current_compiler")
|
||||||
finish
|
finish
|
||||||
|
|||||||
12
config.vim
12
config.vim
@@ -1,3 +1,15 @@
|
|||||||
|
if !exists('g:markdown_enable_spell_checking')
|
||||||
|
let g:markdown_enable_spell_checking = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if !exists('g:markdown_enable_input_abbreviations')
|
||||||
|
let g:markdown_enable_input_abbreviations = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if !exists('g:markdown_enable_mappings')
|
||||||
|
let g:markdown_enable_mappings = 0
|
||||||
|
end
|
||||||
|
|
||||||
" Enable jsx syntax by default
|
" Enable jsx syntax by default
|
||||||
if !exists('g:jsx_ext_required')
|
if !exists('g:jsx_ext_required')
|
||||||
let g:jsx_ext_required = 0
|
let g:jsx_ext_required = 0
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
if !exists('g:markdown_enable_spell_checking')
|
||||||
|
let g:markdown_enable_spell_checking = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if !exists('g:markdown_enable_input_abbreviations')
|
||||||
|
let g:markdown_enable_input_abbreviations = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if !exists('g:markdown_enable_mappings')
|
||||||
|
let g:markdown_enable_mappings = 0
|
||||||
|
end
|
||||||
|
|
||||||
" Enable jsx syntax by default
|
" Enable jsx syntax by default
|
||||||
if !exists('g:jsx_ext_required')
|
if !exists('g:jsx_ext_required')
|
||||||
let g:jsx_ext_required = 0
|
let g:jsx_ext_required = 0
|
||||||
@@ -507,6 +519,29 @@ endif
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" graphql, from graphql.vim in jparise/vim-graphql:_ALL
|
" graphql, from graphql.vim in jparise/vim-graphql:_ALL
|
||||||
|
" Copyright (c) 2016-2019 Jon Parise <jon@indelible.org>
|
||||||
|
"
|
||||||
|
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
" of this software and associated documentation files (the "Software"), to
|
||||||
|
" deal in the Software without restriction, including without limitation the
|
||||||
|
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
" sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
" furnished to do so, subject to the following conditions:
|
||||||
|
"
|
||||||
|
" The above copyright notice and this permission notice shall be included in
|
||||||
|
" all copies or substantial portions of the Software.
|
||||||
|
"
|
||||||
|
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
" IN THE SOFTWARE.
|
||||||
|
"
|
||||||
|
" Language: GraphQL
|
||||||
|
" Maintainer: Jon Parise <jon@indelible.org>
|
||||||
|
|
||||||
" vint: -ProhibitAutocmdWithNoGroup
|
" vint: -ProhibitAutocmdWithNoGroup
|
||||||
au BufRead,BufNewFile *.graphql,*.graphqls,*.gql setfiletype graphql
|
au BufRead,BufNewFile *.graphql,*.graphqls,*.gql setfiletype graphql
|
||||||
augroup end
|
augroup end
|
||||||
@@ -632,6 +667,13 @@ autocmd BufNewFile,BufRead *Spec.js,*_spec.js set filetype=jasmine.javascript sy
|
|||||||
augroup end
|
augroup end
|
||||||
endif
|
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
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" javascript, from javascript.vim in pangloss/vim-javascript:_JAVASCRIPT
|
" javascript, from javascript.vim in pangloss/vim-javascript:_JAVASCRIPT
|
||||||
@@ -650,11 +692,11 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jenkins') == -1
|
|||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" jenkins, from Jenkinsfile.vim in martinda/Jenkinsfile-vim-syntax
|
" jenkins, from Jenkinsfile.vim in martinda/Jenkinsfile-vim-syntax
|
||||||
" Jenkinsfile
|
" Jenkinsfile
|
||||||
|
autocmd BufRead,BufNewFile Jenkinsfile set ft=Jenkinsfile
|
||||||
augroup JenkinsAUGroup
|
autocmd BufRead,BufNewFile Jenkinsfile* setf Jenkinsfile
|
||||||
autocmd BufRead,BufNewFile *Jenkins* set ft=Jenkinsfile
|
autocmd BufRead,BufNewFile *.jenkinsfile set ft=Jenkinsfile
|
||||||
autocmd BufRead,BufNewFile *jenkins* set ft=Jenkinsfile
|
autocmd BufRead,BufNewFile *.jenkinsfile setf Jenkinsfile
|
||||||
augroup END
|
autocmd BufRead,BufNewFile *.Jenkinsfile setf Jenkinsfile
|
||||||
augroup end
|
augroup end
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -727,15 +769,15 @@ endif
|
|||||||
|
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" llvm, from llvm-lit.vim in rhysd/vim-llvm
|
" llvm, from llvm.vim in rhysd/vim-llvm
|
||||||
au BufRead,BufNewFile lit.*cfg set filetype=python
|
au BufRead,BufNewFile *.ll set filetype=llvm
|
||||||
augroup end
|
augroup end
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" llvm, from llvm.vim in rhysd/vim-llvm
|
" llvm, from llvm-lit.vim in rhysd/vim-llvm
|
||||||
au BufRead,BufNewFile *.ll set filetype=llvm
|
au BufRead,BufNewFile lit.*cfg set filetype=python
|
||||||
augroup end
|
augroup end
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -774,7 +816,7 @@ endif
|
|||||||
|
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'markdown') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'markdown') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" markdown, from markdown.vim in plasticboy/vim-markdown:_SYNTAX
|
" markdown, from markdown.vim in plasticboy/vim-markdown:_NOAFTER
|
||||||
if !has('patch-7.4.480')
|
if !has('patch-7.4.480')
|
||||||
" Before this patch, vim used modula2 for .md.
|
" Before this patch, vim used modula2 for .md.
|
||||||
au! filetypedetect BufRead,BufNewFile *.md
|
au! filetypedetect BufRead,BufNewFile *.md
|
||||||
@@ -812,6 +854,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'meson') == -1
|
|||||||
" meson, from meson.vim in mesonbuild/meson:_ALL:/data/syntax-highlighting/vim/
|
" meson, from meson.vim in mesonbuild/meson:_ALL:/data/syntax-highlighting/vim/
|
||||||
au BufNewFile,BufRead meson.build set filetype=meson
|
au BufNewFile,BufRead meson.build set filetype=meson
|
||||||
au BufNewFile,BufRead meson_options.txt set filetype=meson
|
au BufNewFile,BufRead meson_options.txt set filetype=meson
|
||||||
|
au BufNewFile,BufRead *.wrap set filetype=dosini
|
||||||
augroup end
|
augroup end
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -905,7 +948,7 @@ endif
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" ocaml, from opam.vim in rgrinberg/vim-ocaml
|
" 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
|
augroup end
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -1105,7 +1148,24 @@ endif
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'racket') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'racket') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" racket, from racket.vim in wlangstroth/vim-racket
|
" 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
|
augroup end
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -1237,6 +1297,9 @@ au BufNewFile,BufRead [rR]outefile call s:setf('ruby')
|
|||||||
" SimpleCov
|
" SimpleCov
|
||||||
au BufNewFile,BufRead .simplecov call s:setf('ruby')
|
au BufNewFile,BufRead .simplecov call s:setf('ruby')
|
||||||
|
|
||||||
|
" Sorbet RBI files
|
||||||
|
au BufNewFile,BufRead *.rbi call s:setf('ruby')
|
||||||
|
|
||||||
" Thor
|
" Thor
|
||||||
au BufNewFile,BufRead [tT]horfile,*.thor call s:setf('ruby')
|
au BufNewFile,BufRead [tT]horfile,*.thor call s:setf('ruby')
|
||||||
|
|
||||||
@@ -1361,7 +1424,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') ==
|
|||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" terraform, from terraform.vim in hashivim/vim-terraform
|
" terraform, from terraform.vim in hashivim/vim-terraform
|
||||||
" By default, Vim associates .tf files with TinyFugue - tell it not to.
|
" By default, Vim associates .tf files with TinyFugue - tell it not to.
|
||||||
autocmd! filetypedetect BufRead,BufNewFile *.tf
|
silent! autocmd! filetypedetect BufRead,BufNewFile *.tf
|
||||||
autocmd BufRead,BufNewFile *.tf set filetype=terraform
|
autocmd BufRead,BufNewFile *.tf set filetype=terraform
|
||||||
autocmd BufRead,BufNewFile *.tfvars set filetype=terraform
|
autocmd BufRead,BufNewFile *.tfvars set filetype=terraform
|
||||||
autocmd BufRead,BufNewFile *.tfstate set filetype=json
|
autocmd BufRead,BufNewFile *.tfstate set filetype=json
|
||||||
@@ -1437,22 +1500,29 @@ endif
|
|||||||
|
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" typescript, from tsx.vim in HerringtonDarkholme/yats.vim
|
" typescript, from typescript.vim in HerringtonDarkholme/yats.vim
|
||||||
autocmd BufNewFile,BufRead *.tsx setlocal filetype=typescript.tsx
|
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
|
||||||
augroup end
|
augroup end
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" typescript, from typescript.vim in HerringtonDarkholme/yats.vim
|
" typescript, from typescriptreact.vim in HerringtonDarkholme/yats.vim
|
||||||
autocmd BufNewFile,BufRead *.ts setlocal filetype=typescript
|
autocmd BufNewFile,BufRead *.tsx setlocal filetype=typescriptreact
|
||||||
|
augroup end
|
||||||
|
endif
|
||||||
|
|
||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'v') == -1
|
||||||
|
augroup filetypedetect
|
||||||
|
" v, from vlang.vim in ollykel/v-vim
|
||||||
|
au BufNewFile,BufRead *.v set filetype=vlang
|
||||||
|
au BufNewFile,BufRead *.v set syntax=vlang
|
||||||
augroup end
|
augroup end
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vala') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vala') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" vala, from vala.vim in arrufat/vala.vim
|
" vala, from vala.vim in arrufat/vala.vim
|
||||||
autocmd BufRead *.vala,*.vapi set efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
|
|
||||||
au BufRead,BufNewFile *.vala,*.vapi,*.valadoc setfiletype vala
|
au BufRead,BufNewFile *.vala,*.vapi,*.valadoc setfiletype vala
|
||||||
augroup end
|
augroup end
|
||||||
endif
|
endif
|
||||||
@@ -1466,17 +1536,17 @@ endif
|
|||||||
|
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" vifm, from vifm-rename.vim in vifm/vifm.vim
|
" vifm, from vifm.vim in vifm/vifm.vim
|
||||||
autocmd BufRead,BufNewFile vifm.rename* :set filetype=vifm-rename
|
autocmd BufRead,BufNewFile vifmrc :set filetype=vifm
|
||||||
|
autocmd BufRead,BufNewFile *vifm/colors/* :set filetype=vifm
|
||||||
|
autocmd BufRead,BufNewFile *.vifm :set filetype=vifm
|
||||||
augroup end
|
augroup end
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vifm') == -1
|
||||||
augroup filetypedetect
|
augroup filetypedetect
|
||||||
" vifm, from vifm.vim in vifm/vifm.vim
|
" vifm, from vifm-rename.vim in vifm/vifm.vim
|
||||||
autocmd BufRead,BufNewFile vifmrc :set filetype=vifm
|
autocmd BufRead,BufNewFile vifm.rename* :set filetype=vifm-rename
|
||||||
autocmd BufRead,BufNewFile *vifm/colors/* :set filetype=vifm
|
|
||||||
autocmd BufRead,BufNewFile *.vifm :set filetype=vifm
|
|
||||||
augroup end
|
augroup end
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1
|
||||||
|
|
||||||
" Slow yaml highlighting workaround
|
|
||||||
if exists('+regexpengine') && ('®expengine' == 0)
|
|
||||||
setlocal regexpengine=1
|
|
||||||
endif
|
|
||||||
set isfname+=@-@
|
set isfname+=@-@
|
||||||
set path+=./../templates,./../files,templates,files
|
set path+=./../templates,./../files,templates,files
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -
|
|||||||
" Vim filetype plugin
|
" Vim filetype plugin
|
||||||
" Language: Cucumber
|
" Language: Cucumber
|
||||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||||
" Last Change: 2013 Jun 01
|
" Last Change: 2016 Aug 29
|
||||||
|
|
||||||
" Only do this when not done yet for this buffer
|
" Only do this when not done yet for this buffer
|
||||||
if (exists("b:did_ftplugin"))
|
if (exists("b:did_ftplugin"))
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ let &l:errorformat =
|
|||||||
|
|
||||||
setlocal includeexpr=dart#resolveUri(v:fname)
|
setlocal includeexpr=dart#resolveUri(v:fname)
|
||||||
setlocal isfname+=:
|
setlocal isfname+=:
|
||||||
|
setlocal iskeyword+=$
|
||||||
|
|
||||||
let b:undo_ftplugin = 'setl et< fo< sw< sts< com< cms< inex< isf<'
|
let b:undo_ftplugin = 'setl et< fo< sw< sts< com< cms< inex< isf<'
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,22 @@ if exists('g:dhall_strip_whitespace')
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
function! DhallFormat()
|
||||||
|
let cursor = getpos('.')
|
||||||
|
exec 'normal! gg'
|
||||||
|
exec 'silent !dhall format --inplace ' . expand('%')
|
||||||
|
exec 'e'
|
||||||
|
call setpos('.', cursor)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
if exists('g:dhall_format')
|
||||||
|
if g:dhall_format == 1
|
||||||
|
augroup dhall
|
||||||
|
au BufWritePost *.dhall call DhallFormat()
|
||||||
|
augroup END
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
augroup dhall
|
augroup dhall
|
||||||
au BufNewFile,BufRead *.dhall setl shiftwidth=2
|
au BufNewFile,BufRead *.dhall setl shiftwidth=2
|
||||||
augroup END
|
augroup END
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
|||||||
" Vim filetype plugin
|
" Vim filetype plugin
|
||||||
" Language: generic git output
|
" Language: generic git output
|
||||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||||
" Last Change: 2013 May 30
|
" Last Change: 2016 Aug 29
|
||||||
|
|
||||||
" Only do this when not done yet for this buffer
|
" Only do this when not done yet for this buffer
|
||||||
if (exists("b:did_ftplugin"))
|
if (exists("b:did_ftplugin"))
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
|||||||
" Vim filetype plugin
|
" Vim filetype plugin
|
||||||
" Language: git commit file
|
" Language: git commit file
|
||||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||||
" Last Change: 2013 May 30
|
" Last Change: 2016 Aug 29
|
||||||
|
|
||||||
" Only do this when not done yet for this buffer
|
" Only do this when not done yet for this buffer
|
||||||
if (exists("b:did_ftplugin"))
|
if (exists("b:did_ftplugin"))
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
|||||||
" Vim filetype plugin
|
" Vim filetype plugin
|
||||||
" Language: git rebase --interactive
|
" Language: git rebase --interactive
|
||||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||||
" Last Change: 2010 May 21
|
" Last Change: 2016 Aug 29
|
||||||
|
|
||||||
" Only do this when not done yet for this buffer
|
" Only do this when not done yet for this buffer
|
||||||
if (exists("b:did_ftplugin"))
|
if (exists("b:did_ftplugin"))
|
||||||
@@ -20,12 +20,15 @@ if !exists("b:undo_ftplugin")
|
|||||||
endif
|
endif
|
||||||
let b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo< ml<"
|
let b:undo_ftplugin = b:undo_ftplugin."|setl com< cms< fo< ml<"
|
||||||
|
|
||||||
function! s:choose(word)
|
function! s:choose(word) abort
|
||||||
s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e
|
s/^\(\w\+\>\)\=\(\s*\)\ze\x\{4,40\}\>/\=(strlen(submatch(1)) == 1 ? a:word[0] : a:word) . substitute(submatch(2),'^$',' ','')/e
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:cycle()
|
function! s:cycle(count) abort
|
||||||
call s:choose(get({'s':'edit','p':'squash','e':'reword','r':'fixup'},getline('.')[0],'pick'))
|
let words = ['pick', 'edit', 'fixup', 'squash', 'reword', 'drop']
|
||||||
|
let index = index(map(copy(words), 'v:val[0]'), getline('.')[0])
|
||||||
|
let index = ((index < 0 ? 0 : index) + 10000 * len(words) + a:count) % len(words)
|
||||||
|
call s:choose(words[index])
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
command! -buffer -bar -range Pick :<line1>,<line2>call s:choose('pick')
|
command! -buffer -bar -range Pick :<line1>,<line2>call s:choose('pick')
|
||||||
@@ -34,16 +37,16 @@ command! -buffer -bar -range Edit :<line1>,<line2>call s:choose('edit')
|
|||||||
command! -buffer -bar -range Reword :<line1>,<line2>call s:choose('reword')
|
command! -buffer -bar -range Reword :<line1>,<line2>call s:choose('reword')
|
||||||
command! -buffer -bar -range Fixup :<line1>,<line2>call s:choose('fixup')
|
command! -buffer -bar -range Fixup :<line1>,<line2>call s:choose('fixup')
|
||||||
command! -buffer -bar -range Drop :<line1>,<line2>call s:choose('drop')
|
command! -buffer -bar -range Drop :<line1>,<line2>call s:choose('drop')
|
||||||
command! -buffer -bar Cycle :call s:cycle()
|
command! -buffer -count=1 -bar -bang Cycle call s:cycle(<bang>0 ? -<count> : <count>)
|
||||||
" The above are more useful when they are mapped; for example:
|
|
||||||
"nnoremap <buffer> <silent> S :Cycle<CR>
|
|
||||||
|
|
||||||
if exists("g:no_plugin_maps") || exists("g:no_gitrebase_maps")
|
if exists("g:no_plugin_maps") || exists("g:no_gitrebase_maps")
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
nnoremap <buffer> <expr> K col('.') < 7 && expand('<Lt>cword>') =~ '\X' && getline('.') =~ '^\w\+\s\+\x\+\>' ? 'wK' : 'K'
|
nnoremap <buffer> <expr> K col('.') < 7 && expand('<Lt>cword>') =~ '\X' && getline('.') =~ '^\w\+\s\+\x\+\>' ? 'wK' : 'K'
|
||||||
|
nnoremap <buffer> <silent> <C-A> :<C-U><C-R>=v:count1<CR>Cycle<CR>
|
||||||
|
nnoremap <buffer> <silent> <C-X> :<C-U><C-R>=v:count1<CR>Cycle!<CR>
|
||||||
|
|
||||||
let b:undo_ftplugin = b:undo_ftplugin . "|nunmap <buffer> K"
|
let b:undo_ftplugin = b:undo_ftplugin . "|exe 'nunmap <buffer> K'|exe 'nunmap <buffer> <C-A>'|exe 'nunmap <buffer> <C-X>'"
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -1,6 +1,25 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||||
|
|
||||||
" Vim filetype plugin
|
" Copyright (c) 2016-2019 Jon Parise <jon@indelible.org>
|
||||||
|
"
|
||||||
|
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
" of this software and associated documentation files (the "Software"), to
|
||||||
|
" deal in the Software without restriction, including without limitation the
|
||||||
|
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
" sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
" furnished to do so, subject to the following conditions:
|
||||||
|
"
|
||||||
|
" The above copyright notice and this permission notice shall be included in
|
||||||
|
" all copies or substantial portions of the Software.
|
||||||
|
"
|
||||||
|
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
" IN THE SOFTWARE.
|
||||||
|
"
|
||||||
" Language: GraphQL
|
" Language: GraphQL
|
||||||
" Maintainer: Jon Parise <jon@indelible.org>
|
" Maintainer: Jon Parise <jon@indelible.org>
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ function! s:HandleRunResults(exitcode, listf)
|
|||||||
|
|
||||||
if filereadable(a:listf) && l:insert_pos != 0
|
if filereadable(a:listf) && l:insert_pos != 0
|
||||||
for line in readfile(a:listf)
|
for line in readfile(a:listf)
|
||||||
call append(l:insert_pos, 'Attach: '.line)
|
call append(l:insert_pos, 'Attach: '.escape(line, " "))
|
||||||
let l:insert_pos += 1
|
let l:insert_pos += 1
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
|
|||||||
795
ftplugin/markdown.vim
Normal file
795
ftplugin/markdown.vim
Normal file
@@ -0,0 +1,795 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'markdown') == -1
|
||||||
|
|
||||||
|
"TODO print messages when on visual mode. I only see VISUAL, not the messages.
|
||||||
|
|
||||||
|
" Function interface phylosophy:
|
||||||
|
"
|
||||||
|
" - functions take arbitrary line numbers as parameters.
|
||||||
|
" Current cursor line is only a suitable default parameter.
|
||||||
|
"
|
||||||
|
" - only functions that bind directly to user actions:
|
||||||
|
"
|
||||||
|
" - print error messages.
|
||||||
|
" All intermediate functions limit themselves return `0` to indicate an error.
|
||||||
|
"
|
||||||
|
" - move the cursor. All other functions do not move the cursor.
|
||||||
|
"
|
||||||
|
" This is how you should view headers for the header mappings:
|
||||||
|
"
|
||||||
|
" |BUFFER
|
||||||
|
" |
|
||||||
|
" |Outside any header
|
||||||
|
" |
|
||||||
|
" a-+# a
|
||||||
|
" |
|
||||||
|
" |Inside a
|
||||||
|
" |
|
||||||
|
" a-+
|
||||||
|
" b-+## b
|
||||||
|
" |
|
||||||
|
" |inside b
|
||||||
|
" |
|
||||||
|
" b-+
|
||||||
|
" c-+### c
|
||||||
|
" |
|
||||||
|
" |Inside c
|
||||||
|
" |
|
||||||
|
" c-+
|
||||||
|
" d-|# d
|
||||||
|
" |
|
||||||
|
" |Inside d
|
||||||
|
" |
|
||||||
|
" d-+
|
||||||
|
" e-|e
|
||||||
|
" |====
|
||||||
|
" |
|
||||||
|
" |Inside e
|
||||||
|
" |
|
||||||
|
" e-+
|
||||||
|
|
||||||
|
" For each level, contains the regexp that matches at that level only.
|
||||||
|
"
|
||||||
|
let s:levelRegexpDict = {
|
||||||
|
\ 1: '\v^(#[^#]@=|.+\n\=+$)',
|
||||||
|
\ 2: '\v^(##[^#]@=|.+\n-+$)',
|
||||||
|
\ 3: '\v^###[^#]@=',
|
||||||
|
\ 4: '\v^####[^#]@=',
|
||||||
|
\ 5: '\v^#####[^#]@=',
|
||||||
|
\ 6: '\v^######[^#]@='
|
||||||
|
\ }
|
||||||
|
|
||||||
|
" Maches any header level of any type.
|
||||||
|
"
|
||||||
|
" This could be deduced from `s:levelRegexpDict`, but it is more
|
||||||
|
" efficient to have a single regexp for this.
|
||||||
|
"
|
||||||
|
let s:headersRegexp = '\v^(#|.+\n(\=+|-+)$)'
|
||||||
|
|
||||||
|
" Returns the line number of the first header before `line`, called the
|
||||||
|
" current header.
|
||||||
|
"
|
||||||
|
" If there is no current header, return `0`.
|
||||||
|
"
|
||||||
|
" @param a:1 The line to look the header of. Default value: `getpos('.')`.
|
||||||
|
"
|
||||||
|
function! s:GetHeaderLineNum(...)
|
||||||
|
if a:0 == 0
|
||||||
|
let l:l = line('.')
|
||||||
|
else
|
||||||
|
let l:l = a:1
|
||||||
|
endif
|
||||||
|
while(l:l > 0)
|
||||||
|
if join(getline(l:l, l:l + 1), "\n") =~ s:headersRegexp
|
||||||
|
return l:l
|
||||||
|
endif
|
||||||
|
let l:l -= 1
|
||||||
|
endwhile
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" - if inside a header goes to it.
|
||||||
|
" Return its line number.
|
||||||
|
"
|
||||||
|
" - if on top level outside any headers,
|
||||||
|
" print a warning
|
||||||
|
" Return `0`.
|
||||||
|
"
|
||||||
|
function! s:MoveToCurHeader()
|
||||||
|
let l:lineNum = s:GetHeaderLineNum()
|
||||||
|
if l:lineNum != 0
|
||||||
|
call cursor(l:lineNum, 1)
|
||||||
|
else
|
||||||
|
echo 'outside any header'
|
||||||
|
"normal! gg
|
||||||
|
endif
|
||||||
|
return l:lineNum
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Move cursor to next header of any level.
|
||||||
|
"
|
||||||
|
" If there are no more headers, print a warning.
|
||||||
|
"
|
||||||
|
function! s:MoveToNextHeader()
|
||||||
|
if search(s:headersRegexp, 'W') == 0
|
||||||
|
"normal! G
|
||||||
|
echo 'no next header'
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Move cursor to previous header (before current) of any level.
|
||||||
|
"
|
||||||
|
" If it does not exist, print a warning.
|
||||||
|
"
|
||||||
|
function! s:MoveToPreviousHeader()
|
||||||
|
let l:curHeaderLineNumber = s:GetHeaderLineNum()
|
||||||
|
let l:noPreviousHeader = 0
|
||||||
|
if l:curHeaderLineNumber <= 1
|
||||||
|
let l:noPreviousHeader = 1
|
||||||
|
else
|
||||||
|
let l:previousHeaderLineNumber = s:GetHeaderLineNum(l:curHeaderLineNumber - 1)
|
||||||
|
if l:previousHeaderLineNumber == 0
|
||||||
|
let l:noPreviousHeader = 1
|
||||||
|
else
|
||||||
|
call cursor(l:previousHeaderLineNumber, 1)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
if l:noPreviousHeader
|
||||||
|
echo 'no previous header'
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" - if line is inside a header, return the header level (h1 -> 1, h2 -> 2, etc.).
|
||||||
|
"
|
||||||
|
" - if line is at top level outside any headers, return `0`.
|
||||||
|
"
|
||||||
|
function! s:GetHeaderLevel(...)
|
||||||
|
if a:0 == 0
|
||||||
|
let l:line = line('.')
|
||||||
|
else
|
||||||
|
let l:line = a:1
|
||||||
|
endif
|
||||||
|
let l:linenum = s:GetHeaderLineNum(l:line)
|
||||||
|
if l:linenum != 0
|
||||||
|
return s:GetLevelOfHeaderAtLine(l:linenum)
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Returns the level of the header at the given line.
|
||||||
|
"
|
||||||
|
" If there is no header at the given line, returns `0`.
|
||||||
|
"
|
||||||
|
function! s:GetLevelOfHeaderAtLine(linenum)
|
||||||
|
let l:lines = join(getline(a:linenum, a:linenum + 1), "\n")
|
||||||
|
for l:key in keys(s:levelRegexpDict)
|
||||||
|
if l:lines =~ get(s:levelRegexpDict, l:key)
|
||||||
|
return l:key
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Move cursor to parent header of the current header.
|
||||||
|
"
|
||||||
|
" If it does not exit, print a warning and do nothing.
|
||||||
|
"
|
||||||
|
function! s:MoveToParentHeader()
|
||||||
|
let l:linenum = s:GetParentHeaderLineNumber()
|
||||||
|
if l:linenum != 0
|
||||||
|
call cursor(l:linenum, 1)
|
||||||
|
else
|
||||||
|
echo 'no parent header'
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Return the line number of the parent header of line `line`.
|
||||||
|
"
|
||||||
|
" If it has no parent, return `0`.
|
||||||
|
"
|
||||||
|
function! s:GetParentHeaderLineNumber(...)
|
||||||
|
if a:0 == 0
|
||||||
|
let l:line = line('.')
|
||||||
|
else
|
||||||
|
let l:line = a:1
|
||||||
|
endif
|
||||||
|
let l:level = s:GetHeaderLevel(l:line)
|
||||||
|
if l:level > 1
|
||||||
|
let l:linenum = s:GetPreviousHeaderLineNumberAtLevel(l:level - 1, l:line)
|
||||||
|
return l:linenum
|
||||||
|
endif
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Return the line number of the previous header of given level.
|
||||||
|
" in relation to line `a:1`. If not given, `a:1 = getline()`
|
||||||
|
"
|
||||||
|
" `a:1` line is included, and this may return the current header.
|
||||||
|
"
|
||||||
|
" If none return 0.
|
||||||
|
"
|
||||||
|
function! s:GetNextHeaderLineNumberAtLevel(level, ...)
|
||||||
|
if a:0 < 1
|
||||||
|
let l:line = line('.')
|
||||||
|
else
|
||||||
|
let l:line = a:1
|
||||||
|
endif
|
||||||
|
let l:l = l:line
|
||||||
|
while(l:l <= line('$'))
|
||||||
|
if join(getline(l:l, l:l + 1), "\n") =~ get(s:levelRegexpDict, a:level)
|
||||||
|
return l:l
|
||||||
|
endif
|
||||||
|
let l:l += 1
|
||||||
|
endwhile
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Return the line number of the previous header of given level.
|
||||||
|
" in relation to line `a:1`. If not given, `a:1 = getline()`
|
||||||
|
"
|
||||||
|
" `a:1` line is included, and this may return the current header.
|
||||||
|
"
|
||||||
|
" If none return 0.
|
||||||
|
"
|
||||||
|
function! s:GetPreviousHeaderLineNumberAtLevel(level, ...)
|
||||||
|
if a:0 == 0
|
||||||
|
let l:line = line('.')
|
||||||
|
else
|
||||||
|
let l:line = a:1
|
||||||
|
endif
|
||||||
|
let l:l = l:line
|
||||||
|
while(l:l > 0)
|
||||||
|
if join(getline(l:l, l:l + 1), "\n") =~ get(s:levelRegexpDict, a:level)
|
||||||
|
return l:l
|
||||||
|
endif
|
||||||
|
let l:l -= 1
|
||||||
|
endwhile
|
||||||
|
return 0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Move cursor to next sibling header.
|
||||||
|
"
|
||||||
|
" If there is no next siblings, print a warning and don't move.
|
||||||
|
"
|
||||||
|
function! s:MoveToNextSiblingHeader()
|
||||||
|
let l:curHeaderLineNumber = s:GetHeaderLineNum()
|
||||||
|
let l:curHeaderLevel = s:GetLevelOfHeaderAtLine(l:curHeaderLineNumber)
|
||||||
|
let l:curHeaderParentLineNumber = s:GetParentHeaderLineNumber()
|
||||||
|
let l:nextHeaderSameLevelLineNumber = s:GetNextHeaderLineNumberAtLevel(l:curHeaderLevel, l:curHeaderLineNumber + 1)
|
||||||
|
let l:noNextSibling = 0
|
||||||
|
if l:nextHeaderSameLevelLineNumber == 0
|
||||||
|
let l:noNextSibling = 1
|
||||||
|
else
|
||||||
|
let l:nextHeaderSameLevelParentLineNumber = s:GetParentHeaderLineNumber(l:nextHeaderSameLevelLineNumber)
|
||||||
|
if l:curHeaderParentLineNumber == l:nextHeaderSameLevelParentLineNumber
|
||||||
|
call cursor(l:nextHeaderSameLevelLineNumber, 1)
|
||||||
|
else
|
||||||
|
let l:noNextSibling = 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
if l:noNextSibling
|
||||||
|
echo 'no next sibling header'
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Move cursor to previous sibling header.
|
||||||
|
"
|
||||||
|
" If there is no previous siblings, print a warning and do nothing.
|
||||||
|
"
|
||||||
|
function! s:MoveToPreviousSiblingHeader()
|
||||||
|
let l:curHeaderLineNumber = s:GetHeaderLineNum()
|
||||||
|
let l:curHeaderLevel = s:GetLevelOfHeaderAtLine(l:curHeaderLineNumber)
|
||||||
|
let l:curHeaderParentLineNumber = s:GetParentHeaderLineNumber()
|
||||||
|
let l:previousHeaderSameLevelLineNumber = s:GetPreviousHeaderLineNumberAtLevel(l:curHeaderLevel, l:curHeaderLineNumber - 1)
|
||||||
|
let l:noPreviousSibling = 0
|
||||||
|
if l:previousHeaderSameLevelLineNumber == 0
|
||||||
|
let l:noPreviousSibling = 1
|
||||||
|
else
|
||||||
|
let l:previousHeaderSameLevelParentLineNumber = s:GetParentHeaderLineNumber(l:previousHeaderSameLevelLineNumber)
|
||||||
|
if l:curHeaderParentLineNumber == l:previousHeaderSameLevelParentLineNumber
|
||||||
|
call cursor(l:previousHeaderSameLevelLineNumber, 1)
|
||||||
|
else
|
||||||
|
let l:noPreviousSibling = 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
if l:noPreviousSibling
|
||||||
|
echo 'no previous sibling header'
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:Toc(...)
|
||||||
|
if a:0 > 0
|
||||||
|
let l:window_type = a:1
|
||||||
|
else
|
||||||
|
let l:window_type = 'vertical'
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
let l:bufnr = bufnr('%')
|
||||||
|
let l:cursor_line = line('.')
|
||||||
|
let l:cursor_header = 0
|
||||||
|
let l:fenced_block = 0
|
||||||
|
let l:front_matter = 0
|
||||||
|
let l:header_list = []
|
||||||
|
let l:header_max_len = 0
|
||||||
|
let l:vim_markdown_toc_autofit = get(g:, "vim_markdown_toc_autofit", 0)
|
||||||
|
let l:vim_markdown_frontmatter = get(g:, "vim_markdown_frontmatter", 0)
|
||||||
|
for i in range(1, line('$'))
|
||||||
|
let l:lineraw = getline(i)
|
||||||
|
let l:l1 = getline(i+1)
|
||||||
|
let l:line = substitute(l:lineraw, "#", "\\\#", "g")
|
||||||
|
if l:line =~ '````*' || l:line =~ '\~\~\~\~*'
|
||||||
|
if l:fenced_block == 0
|
||||||
|
let l:fenced_block = 1
|
||||||
|
elseif l:fenced_block == 1
|
||||||
|
let l:fenced_block = 0
|
||||||
|
endif
|
||||||
|
elseif l:vim_markdown_frontmatter == 1
|
||||||
|
if l:front_matter == 1
|
||||||
|
if l:line == '---'
|
||||||
|
let l:front_matter = 0
|
||||||
|
endif
|
||||||
|
elseif i == 1
|
||||||
|
if l:line == '---'
|
||||||
|
let l:front_matter = 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
if l:line =~ '^#\+' || (l:l1 =~ '^=\+\s*$' || l:l1 =~ '^-\+\s*$') && l:line =~ '^\S'
|
||||||
|
let l:is_header = 1
|
||||||
|
else
|
||||||
|
let l:is_header = 0
|
||||||
|
endif
|
||||||
|
if l:is_header == 1 && l:fenced_block == 0 && l:front_matter == 0
|
||||||
|
" append line to location list
|
||||||
|
let l:item = {'lnum': i, 'text': l:line, 'valid': 1, 'bufnr': l:bufnr, 'col': 1}
|
||||||
|
let l:header_list = l:header_list + [l:item]
|
||||||
|
" set header number of the cursor position
|
||||||
|
if l:cursor_header == 0
|
||||||
|
if i == l:cursor_line
|
||||||
|
let l:cursor_header = len(l:header_list)
|
||||||
|
elseif i > l:cursor_line
|
||||||
|
let l:cursor_header = len(l:header_list) - 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
" keep track of the longest header size (heading level + title)
|
||||||
|
let l:total_len = stridx(l:line, ' ') + strdisplaywidth(l:line)
|
||||||
|
if l:total_len > l:header_max_len
|
||||||
|
let l:header_max_len = l:total_len
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
call setloclist(0, l:header_list)
|
||||||
|
if len(l:header_list) == 0
|
||||||
|
echom "Toc: No headers."
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
if l:window_type ==# 'horizontal'
|
||||||
|
lopen
|
||||||
|
elseif l:window_type ==# 'vertical'
|
||||||
|
vertical lopen
|
||||||
|
" auto-fit toc window when possible to shrink it
|
||||||
|
if (&columns/2) > l:header_max_len && l:vim_markdown_toc_autofit == 1
|
||||||
|
execute 'vertical resize ' . (l:header_max_len + 1)
|
||||||
|
else
|
||||||
|
execute 'vertical resize ' . (&columns/2)
|
||||||
|
endif
|
||||||
|
elseif l:window_type ==# 'tab'
|
||||||
|
tab lopen
|
||||||
|
else
|
||||||
|
lopen
|
||||||
|
endif
|
||||||
|
setlocal modifiable
|
||||||
|
for i in range(1, line('$'))
|
||||||
|
" this is the location-list data for the current item
|
||||||
|
let d = getloclist(0)[i-1]
|
||||||
|
" atx headers
|
||||||
|
if match(d.text, "^#") > -1
|
||||||
|
let l:level = len(matchstr(d.text, '#*', 'g'))-1
|
||||||
|
let d.text = substitute(d.text, '\v^#*[ ]*', '', '')
|
||||||
|
let d.text = substitute(d.text, '\v[ ]*#*$', '', '')
|
||||||
|
" setex headers
|
||||||
|
else
|
||||||
|
let l:next_line = getbufline(d.bufnr, d.lnum+1)
|
||||||
|
if match(l:next_line, "=") > -1
|
||||||
|
let l:level = 0
|
||||||
|
elseif match(l:next_line, "-") > -1
|
||||||
|
let l:level = 1
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
call setline(i, repeat(' ', l:level). d.text)
|
||||||
|
endfor
|
||||||
|
setlocal nomodified
|
||||||
|
setlocal nomodifiable
|
||||||
|
execute 'normal! ' . l:cursor_header . 'G'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Convert Setex headers in range `line1 .. line2` to Atx.
|
||||||
|
"
|
||||||
|
" Return the number of conversions.
|
||||||
|
"
|
||||||
|
function! s:SetexToAtx(line1, line2)
|
||||||
|
let l:originalNumLines = line('$')
|
||||||
|
execute 'silent! ' . a:line1 . ',' . a:line2 . 'substitute/\v(.*\S.*)\n\=+$/# \1/'
|
||||||
|
execute 'silent! ' . a:line1 . ',' . a:line2 . 'substitute/\v(.*\S.*)\n-+$/## \1/'
|
||||||
|
return l:originalNumLines - line('$')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" If `a:1` is 0, decrease the level of all headers in range `line1 .. line2`.
|
||||||
|
"
|
||||||
|
" Otherwise, increase the level. `a:1` defaults to `0`.
|
||||||
|
"
|
||||||
|
function! s:HeaderDecrease(line1, line2, ...)
|
||||||
|
if a:0 > 0
|
||||||
|
let l:increase = a:1
|
||||||
|
else
|
||||||
|
let l:increase = 0
|
||||||
|
endif
|
||||||
|
if l:increase
|
||||||
|
let l:forbiddenLevel = 6
|
||||||
|
let l:replaceLevels = [5, 1]
|
||||||
|
let l:levelDelta = 1
|
||||||
|
else
|
||||||
|
let l:forbiddenLevel = 1
|
||||||
|
let l:replaceLevels = [2, 6]
|
||||||
|
let l:levelDelta = -1
|
||||||
|
endif
|
||||||
|
for l:line in range(a:line1, a:line2)
|
||||||
|
if join(getline(l:line, l:line + 1), "\n") =~ s:levelRegexpDict[l:forbiddenLevel]
|
||||||
|
echomsg 'There is an h' . l:forbiddenLevel . ' at line ' . l:line . '. Aborting.'
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
let l:numSubstitutions = s:SetexToAtx(a:line1, a:line2)
|
||||||
|
let l:flags = (&gdefault ? '' : 'g')
|
||||||
|
for l:level in range(replaceLevels[0], replaceLevels[1], -l:levelDelta)
|
||||||
|
execute 'silent! ' . a:line1 . ',' . (a:line2 - l:numSubstitutions) . 'substitute/' . s:levelRegexpDict[l:level] . '/' . repeat('#', l:level + l:levelDelta) . '/' . l:flags
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Format table under cursor.
|
||||||
|
"
|
||||||
|
" Depends on Tabularize.
|
||||||
|
"
|
||||||
|
function! s:TableFormat()
|
||||||
|
let l:pos = getpos('.')
|
||||||
|
normal! {
|
||||||
|
" Search instead of `normal! j` because of the table at beginning of file edge case.
|
||||||
|
call search('|')
|
||||||
|
normal! j
|
||||||
|
" Remove everything that is not a pipe, colon or hyphen next to a colon othewise
|
||||||
|
" well formated tables would grow because of addition of 2 spaces on the separator
|
||||||
|
" line by Tabularize /|.
|
||||||
|
let l:flags = (&gdefault ? '' : 'g')
|
||||||
|
execute 's/\(:\@<!-:\@!\|[^|:-]\)//e' . l:flags
|
||||||
|
execute 's/--/-/e' . l:flags
|
||||||
|
Tabularize /|
|
||||||
|
" Move colons for alignment to left or right side of the cell.
|
||||||
|
execute 's/:\( \+\)|/\1:|/e' . l:flags
|
||||||
|
execute 's/|\( \+\):/|:\1/e' . l:flags
|
||||||
|
execute 's/ /-/' . l:flags
|
||||||
|
call setpos('.', l:pos)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Wrapper to do move commands in visual mode.
|
||||||
|
"
|
||||||
|
function! s:VisMove(f)
|
||||||
|
norm! gv
|
||||||
|
call function(a:f)()
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Map in both normal and visual modes.
|
||||||
|
"
|
||||||
|
function! s:MapNormVis(rhs,lhs)
|
||||||
|
execute 'nn <buffer><silent> ' . a:rhs . ' :call ' . a:lhs . '()<cr>'
|
||||||
|
execute 'vn <buffer><silent> ' . a:rhs . ' <esc>:call <sid>VisMove(''' . a:lhs . ''')<cr>'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Parameters:
|
||||||
|
"
|
||||||
|
" - step +1 for right, -1 for left
|
||||||
|
"
|
||||||
|
" TODO: multiple lines.
|
||||||
|
"
|
||||||
|
function! s:FindCornerOfSyntax(lnum, col, step)
|
||||||
|
let l:col = a:col
|
||||||
|
let l:syn = synIDattr(synID(a:lnum, l:col, 1), 'name')
|
||||||
|
while synIDattr(synID(a:lnum, l:col, 1), 'name') ==# l:syn
|
||||||
|
let l:col += a:step
|
||||||
|
endwhile
|
||||||
|
return l:col - a:step
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Return the next position of the given syntax name,
|
||||||
|
" inclusive on the given position.
|
||||||
|
"
|
||||||
|
" TODO: multiple lines
|
||||||
|
"
|
||||||
|
function! s:FindNextSyntax(lnum, col, name)
|
||||||
|
let l:col = a:col
|
||||||
|
let l:step = 1
|
||||||
|
while synIDattr(synID(a:lnum, l:col, 1), 'name') !=# a:name
|
||||||
|
let l:col += l:step
|
||||||
|
endwhile
|
||||||
|
return [a:lnum, l:col]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:FindCornersOfSyntax(lnum, col)
|
||||||
|
return [<sid>FindLeftOfSyntax(a:lnum, a:col), <sid>FindRightOfSyntax(a:lnum, a:col)]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:FindRightOfSyntax(lnum, col)
|
||||||
|
return <sid>FindCornerOfSyntax(a:lnum, a:col, 1)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:FindLeftOfSyntax(lnum, col)
|
||||||
|
return <sid>FindCornerOfSyntax(a:lnum, a:col, -1)
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Returns:
|
||||||
|
"
|
||||||
|
" - a string with the the URL for the link under the cursor
|
||||||
|
" - an empty string if the cursor is not on a link
|
||||||
|
"
|
||||||
|
" TODO
|
||||||
|
"
|
||||||
|
" - multiline support
|
||||||
|
" - give an error if the separator does is not on a link
|
||||||
|
"
|
||||||
|
function! s:Markdown_GetUrlForPosition(lnum, col)
|
||||||
|
let l:lnum = a:lnum
|
||||||
|
let l:col = a:col
|
||||||
|
let l:syn = synIDattr(synID(l:lnum, l:col, 1), 'name')
|
||||||
|
|
||||||
|
if l:syn ==# 'mkdInlineURL' || l:syn ==# 'mkdURL' || l:syn ==# 'mkdLinkDefTarget'
|
||||||
|
" Do nothing.
|
||||||
|
elseif l:syn ==# 'mkdLink'
|
||||||
|
let [l:lnum, l:col] = <sid>FindNextSyntax(l:lnum, l:col, 'mkdURL')
|
||||||
|
let l:syn = 'mkdURL'
|
||||||
|
elseif l:syn ==# 'mkdDelimiter'
|
||||||
|
let l:line = getline(l:lnum)
|
||||||
|
let l:char = l:line[col - 1]
|
||||||
|
if l:char ==# '<'
|
||||||
|
let l:col += 1
|
||||||
|
elseif l:char ==# '>' || l:char ==# ')'
|
||||||
|
let l:col -= 1
|
||||||
|
elseif l:char ==# '[' || l:char ==# ']' || l:char ==# '('
|
||||||
|
let [l:lnum, l:col] = <sid>FindNextSyntax(l:lnum, l:col, 'mkdURL')
|
||||||
|
else
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
return ''
|
||||||
|
endif
|
||||||
|
|
||||||
|
let [l:left, l:right] = <sid>FindCornersOfSyntax(l:lnum, l:col)
|
||||||
|
return getline(l:lnum)[l:left - 1 : l:right - 1]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Front end for GetUrlForPosition.
|
||||||
|
"
|
||||||
|
function! s:OpenUrlUnderCursor()
|
||||||
|
let l:url = s:Markdown_GetUrlForPosition(line('.'), col('.'))
|
||||||
|
if l:url != ''
|
||||||
|
call s:VersionAwareNetrwBrowseX(l:url)
|
||||||
|
else
|
||||||
|
echomsg 'The cursor is not on a link.'
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" We need a definition guard because we invoke 'edit' which will reload this
|
||||||
|
" script while this function is running. We must not replace it.
|
||||||
|
if !exists('*s:EditUrlUnderCursor')
|
||||||
|
function s:EditUrlUnderCursor()
|
||||||
|
let l:url = s:Markdown_GetUrlForPosition(line('.'), col('.'))
|
||||||
|
if l:url != ''
|
||||||
|
if get(g:, 'vim_markdown_autowrite', 0)
|
||||||
|
write
|
||||||
|
endif
|
||||||
|
let l:anchor = ''
|
||||||
|
if get(g:, 'vim_markdown_follow_anchor', 0)
|
||||||
|
let l:parts = split(l:url, '#', 1)
|
||||||
|
if len(l:parts) == 2
|
||||||
|
let [l:url, l:anchor] = parts
|
||||||
|
let l:anchorexpr = get(g:, 'vim_markdown_anchorexpr', '')
|
||||||
|
if l:anchorexpr != ''
|
||||||
|
let l:anchor = eval(substitute(
|
||||||
|
\ l:anchorexpr, 'v:anchor',
|
||||||
|
\ escape('"'.l:anchor.'"', '"'), ''))
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
if l:url != ''
|
||||||
|
let l:ext = ''
|
||||||
|
if get(g:, 'vim_markdown_no_extensions_in_markdown', 0)
|
||||||
|
" use another file extension if preferred
|
||||||
|
if exists('g:vim_markdown_auto_extension_ext')
|
||||||
|
let l:ext = '.'.g:vim_markdown_auto_extension_ext
|
||||||
|
else
|
||||||
|
let l:ext = '.md'
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
let l:url = fnameescape(fnamemodify(expand('%:h').'/'.l:url.l:ext, ':.'))
|
||||||
|
let l:editmethod = ''
|
||||||
|
" determine how to open the linked file (split, tab, etc)
|
||||||
|
if exists('g:vim_markdown_edit_url_in')
|
||||||
|
if g:vim_markdown_edit_url_in == 'tab'
|
||||||
|
let l:editmethod = 'tabnew'
|
||||||
|
elseif g:vim_markdown_edit_url_in == 'vsplit'
|
||||||
|
let l:editmethod = 'vsp'
|
||||||
|
elseif g:vim_markdown_edit_url_in == 'hsplit'
|
||||||
|
let l:editmethod = 'sp'
|
||||||
|
else
|
||||||
|
let l:editmethod = 'edit'
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
" default to current buffer
|
||||||
|
let l:editmethod = 'edit'
|
||||||
|
endif
|
||||||
|
execute l:editmethod l:url
|
||||||
|
endif
|
||||||
|
if l:anchor != ''
|
||||||
|
silent! execute '/'.l:anchor
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
echomsg 'The cursor is not on a link.'
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
endif
|
||||||
|
|
||||||
|
function! s:VersionAwareNetrwBrowseX(url)
|
||||||
|
if has('patch-7.4.567')
|
||||||
|
call netrw#BrowseX(a:url, 0)
|
||||||
|
else
|
||||||
|
call netrw#NetrwBrowseX(a:url, 0)
|
||||||
|
endif
|
||||||
|
endf
|
||||||
|
|
||||||
|
function! s:MapNotHasmapto(lhs, rhs)
|
||||||
|
if !hasmapto('<Plug>' . a:rhs)
|
||||||
|
execute 'nmap <buffer>' . a:lhs . ' <Plug>' . a:rhs
|
||||||
|
execute 'vmap <buffer>' . a:lhs . ' <Plug>' . a:rhs
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
call <sid>MapNormVis('<Plug>Markdown_MoveToNextHeader', '<sid>MoveToNextHeader')
|
||||||
|
call <sid>MapNormVis('<Plug>Markdown_MoveToPreviousHeader', '<sid>MoveToPreviousHeader')
|
||||||
|
call <sid>MapNormVis('<Plug>Markdown_MoveToNextSiblingHeader', '<sid>MoveToNextSiblingHeader')
|
||||||
|
call <sid>MapNormVis('<Plug>Markdown_MoveToPreviousSiblingHeader', '<sid>MoveToPreviousSiblingHeader')
|
||||||
|
call <sid>MapNormVis('<Plug>Markdown_MoveToParentHeader', '<sid>MoveToParentHeader')
|
||||||
|
call <sid>MapNormVis('<Plug>Markdown_MoveToCurHeader', '<sid>MoveToCurHeader')
|
||||||
|
nnoremap <Plug>Markdown_OpenUrlUnderCursor :call <sid>OpenUrlUnderCursor()<cr>
|
||||||
|
nnoremap <Plug>Markdown_EditUrlUnderCursor :call <sid>EditUrlUnderCursor()<cr>
|
||||||
|
|
||||||
|
if !get(g:, 'vim_markdown_no_default_key_mappings', 0)
|
||||||
|
call <sid>MapNotHasmapto(']]', 'Markdown_MoveToNextHeader')
|
||||||
|
call <sid>MapNotHasmapto('[[', 'Markdown_MoveToPreviousHeader')
|
||||||
|
call <sid>MapNotHasmapto('][', 'Markdown_MoveToNextSiblingHeader')
|
||||||
|
call <sid>MapNotHasmapto('[]', 'Markdown_MoveToPreviousSiblingHeader')
|
||||||
|
call <sid>MapNotHasmapto(']u', 'Markdown_MoveToParentHeader')
|
||||||
|
call <sid>MapNotHasmapto(']c', 'Markdown_MoveToCurHeader')
|
||||||
|
call <sid>MapNotHasmapto('gx', 'Markdown_OpenUrlUnderCursor')
|
||||||
|
call <sid>MapNotHasmapto('ge', 'Markdown_EditUrlUnderCursor')
|
||||||
|
endif
|
||||||
|
|
||||||
|
command! -buffer -range=% HeaderDecrease call s:HeaderDecrease(<line1>, <line2>)
|
||||||
|
command! -buffer -range=% HeaderIncrease call s:HeaderDecrease(<line1>, <line2>, 1)
|
||||||
|
command! -buffer -range=% SetexToAtx call s:SetexToAtx(<line1>, <line2>)
|
||||||
|
command! -buffer TableFormat call s:TableFormat()
|
||||||
|
command! -buffer Toc call s:Toc()
|
||||||
|
command! -buffer Toch call s:Toc('horizontal')
|
||||||
|
command! -buffer Tocv call s:Toc('vertical')
|
||||||
|
command! -buffer Toct call s:Toc('tab')
|
||||||
|
|
||||||
|
" Heavily based on vim-notes - http://peterodding.com/code/vim/notes/
|
||||||
|
if exists('g:vim_markdown_fenced_languages')
|
||||||
|
let s:filetype_dict = {}
|
||||||
|
for s:filetype in g:vim_markdown_fenced_languages
|
||||||
|
let key = matchstr(s:filetype, "[^=]*")
|
||||||
|
let val = matchstr(s:filetype, "[^=]*$")
|
||||||
|
let s:filetype_dict[key] = val
|
||||||
|
endfor
|
||||||
|
else
|
||||||
|
let s:filetype_dict = {
|
||||||
|
\ 'c++': 'cpp',
|
||||||
|
\ 'viml': 'vim',
|
||||||
|
\ 'bash': 'sh',
|
||||||
|
\ 'ini': 'dosini'
|
||||||
|
\ }
|
||||||
|
endif
|
||||||
|
|
||||||
|
function! s:MarkdownHighlightSources(force)
|
||||||
|
" Syntax highlight source code embedded in notes.
|
||||||
|
" Look for code blocks in the current file
|
||||||
|
let filetypes = {}
|
||||||
|
for line in getline(1, '$')
|
||||||
|
let ft = matchstr(line, '```\s*\zs[0-9A-Za-z_+-]*')
|
||||||
|
if !empty(ft) && ft !~ '^\d*$' | let filetypes[ft] = 1 | endif
|
||||||
|
endfor
|
||||||
|
if !exists('b:mkd_known_filetypes')
|
||||||
|
let b:mkd_known_filetypes = {}
|
||||||
|
endif
|
||||||
|
if !exists('b:mkd_included_filetypes')
|
||||||
|
" set syntax file name included
|
||||||
|
let b:mkd_included_filetypes = {}
|
||||||
|
endif
|
||||||
|
if !a:force && (b:mkd_known_filetypes == filetypes || empty(filetypes))
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Now we're ready to actually highlight the code blocks.
|
||||||
|
let startgroup = 'mkdCodeStart'
|
||||||
|
let endgroup = 'mkdCodeEnd'
|
||||||
|
for ft in keys(filetypes)
|
||||||
|
if a:force || !has_key(b:mkd_known_filetypes, ft)
|
||||||
|
if has_key(s:filetype_dict, ft)
|
||||||
|
let filetype = s:filetype_dict[ft]
|
||||||
|
else
|
||||||
|
let filetype = ft
|
||||||
|
endif
|
||||||
|
let group = 'mkdSnippet' . toupper(substitute(filetype, "[+-]", "_", "g"))
|
||||||
|
if !has_key(b:mkd_included_filetypes, filetype)
|
||||||
|
let include = s:SyntaxInclude(filetype)
|
||||||
|
let b:mkd_included_filetypes[filetype] = 1
|
||||||
|
else
|
||||||
|
let include = '@' . toupper(filetype)
|
||||||
|
endif
|
||||||
|
let command = 'syntax region %s matchgroup=%s start="^\s*```\s*%s$" matchgroup=%s end="\s*```$" keepend contains=%s%s'
|
||||||
|
execute printf(command, group, startgroup, ft, endgroup, include, has('conceal') && get(g:, 'vim_markdown_conceal', 1) && get(g:, 'vim_markdown_conceal_code_blocks', 1) ? ' concealends' : '')
|
||||||
|
execute printf('syntax cluster mkdNonListItem add=%s', group)
|
||||||
|
|
||||||
|
let b:mkd_known_filetypes[ft] = 1
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:SyntaxInclude(filetype)
|
||||||
|
" Include the syntax highlighting of another {filetype}.
|
||||||
|
let grouplistname = '@' . toupper(a:filetype)
|
||||||
|
" Unset the name of the current syntax while including the other syntax
|
||||||
|
" because some syntax scripts do nothing when "b:current_syntax" is set
|
||||||
|
if exists('b:current_syntax')
|
||||||
|
let syntax_save = b:current_syntax
|
||||||
|
unlet b:current_syntax
|
||||||
|
endif
|
||||||
|
try
|
||||||
|
execute 'syntax include' grouplistname 'syntax/' . a:filetype . '.vim'
|
||||||
|
execute 'syntax include' grouplistname 'after/syntax/' . a:filetype . '.vim'
|
||||||
|
catch /E484/
|
||||||
|
" Ignore missing scripts
|
||||||
|
endtry
|
||||||
|
" Restore the name of the current syntax
|
||||||
|
if exists('syntax_save')
|
||||||
|
let b:current_syntax = syntax_save
|
||||||
|
elseif exists('b:current_syntax')
|
||||||
|
unlet b:current_syntax
|
||||||
|
endif
|
||||||
|
return grouplistname
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function! s:MarkdownRefreshSyntax(force)
|
||||||
|
if &filetype =~ 'markdown' && line('$') > 1
|
||||||
|
call s:MarkdownHighlightSources(a:force)
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:MarkdownClearSyntaxVariables()
|
||||||
|
if &filetype =~ 'markdown'
|
||||||
|
unlet! b:mkd_included_filetypes
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
augroup Mkd
|
||||||
|
" These autocmd calling s:MarkdownRefreshSyntax need to be kept in sync with
|
||||||
|
" the autocmds calling s:MarkdownSetupFolding in after/ftplugin/markdown.vim.
|
||||||
|
autocmd! * <buffer>
|
||||||
|
autocmd BufWinEnter <buffer> call s:MarkdownRefreshSyntax(1)
|
||||||
|
autocmd BufUnload <buffer> call s:MarkdownClearSyntaxVariables()
|
||||||
|
autocmd BufWritePost <buffer> call s:MarkdownRefreshSyntax(0)
|
||||||
|
autocmd InsertEnter,InsertLeave <buffer> call s:MarkdownRefreshSyntax(0)
|
||||||
|
autocmd CursorHold,CursorHoldI <buffer> call s:MarkdownRefreshSyntax(0)
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -2,6 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'meson') == -1
|
|||||||
|
|
||||||
" Vim filetype plugin file
|
" Vim filetype plugin file
|
||||||
" Language: meson
|
" Language: meson
|
||||||
|
" License: VIM License
|
||||||
" Original Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
" Original Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
||||||
" Last Change: 2018 Nov 27
|
" Last Change: 2018 Nov 27
|
||||||
|
|
||||||
|
|||||||
@@ -393,9 +393,9 @@ endfunction
|
|||||||
endif
|
endif
|
||||||
endfun
|
endfun
|
||||||
|
|
||||||
" This variable contain a dictionnary of list. Each element of the dictionnary
|
" This variable contains a dictionary of lists. Each element of the dictionary
|
||||||
" represent an annotation system. An annotation system is a list with :
|
" represents an annotation system. An annotation system is a list with:
|
||||||
" - annotation file name as it's key
|
" - annotation file name as its key
|
||||||
" - annotation file path as first element of the contained list
|
" - annotation file path as first element of the contained list
|
||||||
" - build path as second 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
|
" - annot_file_last_mod (contain the date of .annot file) as third element
|
||||||
|
|||||||
@@ -374,7 +374,6 @@ function! RubyCursorFile() abort
|
|||||||
endtry
|
endtry
|
||||||
let pre = matchstr(strpart(getline('.'), 0, col('.')-1), '.*\f\@<!')
|
let pre = matchstr(strpart(getline('.'), 0, col('.')-1), '.*\f\@<!')
|
||||||
let post = matchstr(strpart(getline('.'), col('.')), '\f\@!.*')
|
let post = matchstr(strpart(getline('.'), col('.')), '\f\@!.*')
|
||||||
let ext = getline('.') =~# '^\s*\%(require\%(_relative\)\=\|autoload\)\>' && cfile !~# '\.rb$' ? '.rb' : ''
|
|
||||||
if s:synid() ==# hlID('rubyConstant')
|
if s:synid() ==# hlID('rubyConstant')
|
||||||
let cfile = substitute(cfile,'\.\w\+[?!=]\=$','','')
|
let cfile = substitute(cfile,'\.\w\+[?!=]\=$','','')
|
||||||
let cfile = substitute(cfile,'^::','','')
|
let cfile = substitute(cfile,'^::','','')
|
||||||
@@ -383,12 +382,15 @@ function! RubyCursorFile() abort
|
|||||||
let cfile = substitute(cfile,'\(\l\|\d\)\(\u\)','\1_\2', 'g')
|
let cfile = substitute(cfile,'\(\l\|\d\)\(\u\)','\1_\2', 'g')
|
||||||
return tolower(cfile) . '.rb'
|
return tolower(cfile) . '.rb'
|
||||||
elseif getline('.') =~# '^\s*require_relative\s*\(["'']\).*\1\s*$'
|
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*$'
|
elseif getline('.') =~# '^\s*\%(require[( ]\|load[( ]\|autoload[( ]:\w\+,\)\s*\%(::\)\=File\.expand_path(\(["'']\)\.\./.*\1,\s*__FILE__)\s*$'
|
||||||
let target = matchstr(getline('.'),'\(["'']\)\.\.\zs/.\{-\}\ze\1')
|
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*$'
|
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 =~# '^\.\.'
|
elseif pre.post =~# '\<File.expand_path[( ].*[''"]\{2\}, *__FILE__\>' && cfile =~# '^\.\.'
|
||||||
let cfile = expand('%:p:h') . strpart(cfile, 2)
|
let cfile = expand('%:p:h') . strpart(cfile, 2)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1
|
|||||||
" Language: Rust
|
" Language: Rust
|
||||||
" Description: Vim ftplugin for Rust
|
" Description: Vim ftplugin for Rust
|
||||||
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
" Maintainer: Chris Morgan <me@chrismorgan.info>
|
||||||
" Maintainer: Kevin Ballard <kevin@sb.org>
|
|
||||||
" Last Change: June 08, 2016
|
" Last Change: June 08, 2016
|
||||||
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
|
||||||
|
|
||||||
@@ -139,7 +138,7 @@ command! -bar RustInfoToClipboard call rust#debugging#InfoToClipboard()
|
|||||||
command! -bar -nargs=1 RustInfoToFile call rust#debugging#InfoToFile(<f-args>)
|
command! -bar -nargs=1 RustInfoToFile call rust#debugging#InfoToFile(<f-args>)
|
||||||
|
|
||||||
" See |:RustTest| for docs
|
" See |:RustTest| for docs
|
||||||
command! -buffer -nargs=* -bang RustTest call rust#Test(<bang>0, <q-args>)
|
command! -buffer -nargs=* -count -bang RustTest call rust#Test(<q-mods>, <count>, <bang>0, <q-args>)
|
||||||
|
|
||||||
if !exists("b:rust_last_rustc_args") || !exists("b:rust_last_args")
|
if !exists("b:rust_last_rustc_args") || !exists("b:rust_last_args")
|
||||||
let b:rust_last_rustc_args = []
|
let b:rust_last_rustc_args = []
|
||||||
|
|||||||
29
ftplugin/vala.vim
Normal file
29
ftplugin/vala.vim
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vala') == -1
|
||||||
|
|
||||||
|
if exists('b:did_ftplugin')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
setlocal efm=%f:%l.%c-%[%^:]%#:\ %t%[%^:]%#:\ %m
|
||||||
|
|
||||||
|
" Insert a CCode attribute for the symbol below the cursor
|
||||||
|
" https://wiki.gnome.org/Projects/Vala/LegacyBindings
|
||||||
|
function! CCode() abort
|
||||||
|
normal yiwO[CCode (cname = "pa")]
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" Set Vala Coding Style
|
||||||
|
" https://wiki.gnome.org/Projects/Vala/Hacking#Coding_Style
|
||||||
|
function! ValaCodingStyle() abort
|
||||||
|
set ts=4 sts=4 sw=4 tw=0 wm=0
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
command! -buffer -bar CCode call CCode()
|
||||||
|
command! -buffer -bar ValaCodingStyle call ValaCodingStyle()
|
||||||
|
|
||||||
|
if get(g:, 'vala_syntax_folding_enabled', 1)
|
||||||
|
setlocal foldmethod=syntax
|
||||||
|
endif
|
||||||
|
|
||||||
|
endif
|
||||||
6
ftplugin/vlang.vim
Normal file
6
ftplugin/vlang.vim
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'v') == -1
|
||||||
|
|
||||||
|
setlocal commentstring=//\ %s
|
||||||
|
setlocal makeprg=v\ %
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -
|
|||||||
" Vim indent file
|
" Vim indent file
|
||||||
" Language: Cucumber
|
" Language: Cucumber
|
||||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||||
" Last Change: 2013 May 30
|
" Last Change: 2017 Jun 13
|
||||||
|
|
||||||
if exists("b:did_indent")
|
if exists("b:did_indent")
|
||||||
finish
|
finish
|
||||||
@@ -29,7 +29,7 @@ function! GetCucumberIndent()
|
|||||||
let line = getline(prevnonblank(v:lnum-1))
|
let line = getline(prevnonblank(v:lnum-1))
|
||||||
let cline = getline(v:lnum)
|
let cline = getline(v:lnum)
|
||||||
let nline = getline(nextnonblank(v:lnum+1))
|
let nline = getline(nextnonblank(v:lnum+1))
|
||||||
let sw = exists('*shiftwidth') ? shiftwidth() : &sw
|
let sw = exists('*shiftwidth') ? shiftwidth() : shiftwidth()
|
||||||
let syn = s:syn(prevnonblank(v:lnum-1))
|
let syn = s:syn(prevnonblank(v:lnum-1))
|
||||||
let csyn = s:syn(v:lnum)
|
let csyn = s:syn(v:lnum)
|
||||||
let nsyn = s:syn(nextnonblank(v:lnum+1))
|
let nsyn = s:syn(nextnonblank(v:lnum+1))
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
|||||||
" Vim indent file
|
" Vim indent file
|
||||||
" Language: git config file
|
" Language: git config file
|
||||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||||
" Last Change: 2013 May 30
|
" Last Change: 2017 Jun 13
|
||||||
|
|
||||||
if exists("b:did_indent")
|
if exists("b:did_indent")
|
||||||
finish
|
finish
|
||||||
@@ -22,7 +22,7 @@ if exists("*GetGitconfigIndent")
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
function! GetGitconfigIndent()
|
function! GetGitconfigIndent()
|
||||||
let sw = exists('*shiftwidth') ? shiftwidth() : &sw
|
let sw = shiftwidth()
|
||||||
let line = getline(prevnonblank(v:lnum-1))
|
let line = getline(prevnonblank(v:lnum-1))
|
||||||
let cline = getline(v:lnum)
|
let cline = getline(v:lnum)
|
||||||
if line =~ '\\\@<!\%(\\\\\)*\\$'
|
if line =~ '\\\@<!\%(\\\\\)*\\$'
|
||||||
|
|||||||
@@ -1,6 +1,25 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||||
|
|
||||||
" Vim indent file
|
" Copyright (c) 2016-2019 Jon Parise <jon@indelible.org>
|
||||||
|
"
|
||||||
|
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
" of this software and associated documentation files (the "Software"), to
|
||||||
|
" deal in the Software without restriction, including without limitation the
|
||||||
|
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
" sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
" furnished to do so, subject to the following conditions:
|
||||||
|
"
|
||||||
|
" The above copyright notice and this permission notice shall be included in
|
||||||
|
" all copies or substantial portions of the Software.
|
||||||
|
"
|
||||||
|
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
" IN THE SOFTWARE.
|
||||||
|
"
|
||||||
" Language: GraphQL
|
" Language: GraphQL
|
||||||
" Maintainer: Jon Parise <jon@indelible.org>
|
" Maintainer: Jon Parise <jon@indelible.org>
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'meson') == -1
|
|||||||
|
|
||||||
" Vim indent file
|
" Vim indent file
|
||||||
" Language: Meson
|
" Language: Meson
|
||||||
|
" License: VIM License
|
||||||
" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
|
" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
|
||||||
" Original Authors: David Bustos <bustos@caltech.edu>
|
" Original Authors: David Bustos <bustos@caltech.edu>
|
||||||
" Bram Moolenaar <Bram@vim.org>
|
" Bram Moolenaar <Bram@vim.org>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'octave') == -1
|
|||||||
" Maintainer: Nguyễn Gia Phong <vn.mcsinyx@gmail.com>
|
" Maintainer: Nguyễn Gia Phong <vn.mcsinyx@gmail.com>
|
||||||
" Original Maintainer: Marcus Aurelius Farias <marcus.cf@bol.com.br>
|
" Original Maintainer: Marcus Aurelius Farias <marcus.cf@bol.com.br>
|
||||||
" First Author: Max Ischenko <mfi@ukr.net>
|
" 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.
|
" Only load this indent file when no other was loaded.
|
||||||
if exists("b:did_indent")
|
if exists("b:did_indent")
|
||||||
|
|||||||
77
indent/rst.vim
Normal file
77
indent/rst.vim
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
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\+'
|
||||||
|
let s:note_pattern = '^\.\. '
|
||||||
|
|
||||||
|
function! s:get_paragraph_start()
|
||||||
|
let paragraph_mark_start = getpos("'{")[1]
|
||||||
|
return getline(paragraph_mark_start) =~
|
||||||
|
\ '\S' ? paragraph_mark_start : paragraph_mark_start + 1
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function GetRSTIndent()
|
||||||
|
let lnum = prevnonblank(v:lnum - 1)
|
||||||
|
if lnum == 0
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
let ind = indent(lnum)
|
||||||
|
let line = getline(lnum)
|
||||||
|
|
||||||
|
let psnum = s:get_paragraph_start()
|
||||||
|
if psnum != 0
|
||||||
|
if getline(psnum) =~ s:note_pattern
|
||||||
|
let ind = 3
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
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. Don’t 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
|
||||||
@@ -66,6 +66,7 @@ let s:syng_strcom = s:syng_stringdoc + [
|
|||||||
\ 'PercentStringDelimiter',
|
\ 'PercentStringDelimiter',
|
||||||
\ 'PercentSymbolDelimiter',
|
\ 'PercentSymbolDelimiter',
|
||||||
\ 'Regexp',
|
\ 'Regexp',
|
||||||
|
\ 'RegexpCharClass',
|
||||||
\ 'RegexpDelimiter',
|
\ 'RegexpDelimiter',
|
||||||
\ 'RegexpEscape',
|
\ 'RegexpEscape',
|
||||||
\ 'StringDelimiter',
|
\ 'StringDelimiter',
|
||||||
|
|||||||
@@ -193,7 +193,12 @@ function GetRustIndent(lnum)
|
|||||||
" A line that ends with '.<expr>;' is probably an end of a long list
|
" A line that ends with '.<expr>;' is probably an end of a long list
|
||||||
" of method operations.
|
" of method operations.
|
||||||
if prevline =~# '\V\^\s\*.' && l:last_prevline_character ==# ';'
|
if prevline =~# '\V\^\s\*.' && l:last_prevline_character ==# ';'
|
||||||
return indent(prevlinenum) - s:shiftwidth()
|
call cursor(a:lnum - 1, 1)
|
||||||
|
let l:scope_start = searchpair('{\|(', '', '}\|)', 'nbW',
|
||||||
|
\ 's:is_string_comment(line("."), col("."))')
|
||||||
|
if l:scope_start != 0 && l:scope_start < a:lnum
|
||||||
|
return indent(l:scope_start) + 4
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if l:last_prevline_character ==# ","
|
if l:last_prevline_character ==# ","
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ let s:var_stmt = '^\s*var'
|
|||||||
let s:comma_first = '^\s*,'
|
let s:comma_first = '^\s*,'
|
||||||
let s:comma_last = ',\s*$'
|
let s:comma_last = ',\s*$'
|
||||||
|
|
||||||
let s:ternary = '^\s\+[?|:]'
|
let s:ternary = '^\s\+[?:]'
|
||||||
let s:ternary_q = '^\s\+?'
|
let s:ternary_q = '^\s\+?[.?]\@!'
|
||||||
|
|
||||||
" 2. Auxiliary Functions {{{1
|
" 2. Auxiliary Functions {{{1
|
||||||
" ======================
|
" ======================
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||||
|
|
||||||
|
exe 'runtime! indent/typescript.vim'
|
||||||
" Save the current JavaScript indentexpr.
|
" Save the current JavaScript indentexpr.
|
||||||
let b:tsx_ts_indentexpr = &indentexpr
|
let b:tsx_ts_indentexpr = &indentexpr
|
||||||
|
|
||||||
@@ -110,5 +111,4 @@ fu! GetTsxIndent()
|
|||||||
|
|
||||||
return ind
|
return ind
|
||||||
endfu
|
endfu
|
||||||
|
|
||||||
endif
|
endif
|
||||||
69
indent/vlang.vim
Normal file
69
indent/vlang.vim
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'v') == -1
|
||||||
|
|
||||||
|
" Based on the Go identation file.
|
||||||
|
"
|
||||||
|
" Copyright 2011 The Go Authors. All rights reserved.
|
||||||
|
" Use of this source code is governed by a BSD-style
|
||||||
|
" license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
if exists("b:did_indent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_indent = 1
|
||||||
|
|
||||||
|
setlocal nolisp
|
||||||
|
setlocal autoindent
|
||||||
|
setlocal indentexpr=VlangIndent(v:lnum)
|
||||||
|
setlocal indentkeys+=<:>,0=},0=)
|
||||||
|
|
||||||
|
if exists("*VlangIndent")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
let s:cpo_save = &cpo
|
||||||
|
set cpo&vim
|
||||||
|
|
||||||
|
function! VlangIndent(lnum) abort
|
||||||
|
let prevlnum = prevnonblank(a:lnum-1)
|
||||||
|
if prevlnum == 0
|
||||||
|
return 0
|
||||||
|
endif
|
||||||
|
|
||||||
|
let prevl = substitute(getline(prevlnum), '//.*$', '', '')
|
||||||
|
let thisl = substitute(getline(a:lnum), '//.*$', '', '')
|
||||||
|
let previ = indent(prevlnum)
|
||||||
|
|
||||||
|
let ind = previ
|
||||||
|
|
||||||
|
if prevl =~ '[({]\s*$'
|
||||||
|
" previous line opened a block
|
||||||
|
let ind += shiftwidth()
|
||||||
|
endif
|
||||||
|
if prevl =~# '^\s*\(case .*\|default\):$'
|
||||||
|
" previous line is part of a switch statement
|
||||||
|
let ind += shiftwidth()
|
||||||
|
endif
|
||||||
|
|
||||||
|
if thisl =~ '^\s*[)}]'
|
||||||
|
" this line closed a block
|
||||||
|
let ind -= shiftwidth()
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Colons are tricky.
|
||||||
|
" We want to outdent if it's part of a switch ("case foo:" or "default:").
|
||||||
|
" We ignore trying to deal with jump labels because (a) they're rare, and
|
||||||
|
" (b) they're hard to disambiguate from a composite literal key.
|
||||||
|
if thisl =~# '^\s*\(case .*\|default\):$'
|
||||||
|
let ind -= shiftwidth()
|
||||||
|
endif
|
||||||
|
|
||||||
|
return ind
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
" restore Vi compatibility settings
|
||||||
|
let &cpo = s:cpo_save
|
||||||
|
unlet s:cpo_save
|
||||||
|
|
||||||
|
" vim: sw=2 ts=2 et
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -15,7 +15,7 @@ syntax match typescriptClassName contained /\K\k*/
|
|||||||
|
|
||||||
syntax region typescriptClassTypeParameter
|
syntax region typescriptClassTypeParameter
|
||||||
\ start=/</ end=/>/
|
\ start=/</ end=/>/
|
||||||
\ contains=typescriptTypeParameter
|
\ contains=@typescriptTypeParameterCluster
|
||||||
\ nextgroup=typescriptClassBlock,typescriptClassExtends
|
\ nextgroup=typescriptClassBlock,typescriptClassExtends
|
||||||
\ contained skipwhite skipnl
|
\ contained skipwhite skipnl
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ syntax match typescriptInterfaceName contained /\k\+/
|
|||||||
\ skipwhite skipnl
|
\ skipwhite skipnl
|
||||||
syntax region typescriptInterfaceTypeParameter
|
syntax region typescriptInterfaceTypeParameter
|
||||||
\ start=/</ end=/>/
|
\ start=/</ end=/>/
|
||||||
\ contains=typescriptTypeParameter
|
\ contains=@typescriptTypeParameterCluster
|
||||||
\ nextgroup=typescriptObjectType,typescriptInterfaceExtends
|
\ nextgroup=typescriptObjectType,typescriptInterfaceExtends
|
||||||
\ contained
|
\ contained
|
||||||
\ skipwhite skipnl
|
\ skipwhite skipnl
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||||
|
|
||||||
syntax match typescriptDecorator /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/
|
syntax match typescriptDecorator /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/
|
||||||
\ nextgroup=typescriptArgumentList,typescriptTypeArguments
|
\ nextgroup=typescriptFuncCallArg,typescriptTypeArguments
|
||||||
\ contains=@_semantic,typescriptDotNotation
|
\ contains=@_semantic,typescriptDotNotation
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ syntax match typescriptArrowFuncDef contained /\K\k*\s*=>/
|
|||||||
\ skipwhite skipempty
|
\ skipwhite skipempty
|
||||||
|
|
||||||
" TODO: optimize this pattern
|
" TODO: optimize this pattern
|
||||||
syntax region typescriptArrowFuncDef contained start=/(\_[^)]*):/ end=/=>/
|
syntax region typescriptArrowFuncDef contained start=/(\_[^(^)]*):/ end=/=>/
|
||||||
\ contains=typescriptArrowFuncArg,typescriptArrowFunc,typescriptTypeAnnotation
|
\ contains=typescriptArrowFuncArg,typescriptArrowFunc,typescriptTypeAnnotation
|
||||||
\ nextgroup=@typescriptExpression,typescriptBlock
|
\ nextgroup=@typescriptExpression,typescriptBlock
|
||||||
\ skipwhite skipempty keepend
|
\ skipwhite skipempty keepend
|
||||||
|
|||||||
@@ -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 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 typescriptDotStyleNotation /\.style\./ nextgroup=typescriptDOMStyle transparent
|
||||||
" syntax match typescriptFuncCall contained /[a-zA-Z]\k*\ze(/ nextgroup=typescriptFuncCallArg
|
" 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
|
syntax region typescriptParenExp matchgroup=typescriptParens start=/(/ end=/)/ contains=@typescriptComments,@typescriptValue,typescriptCastKeyword nextgroup=@typescriptSymbols skipwhite skipempty
|
||||||
|
|||||||
@@ -1,8 +1,17 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1
|
||||||
|
|
||||||
"Import
|
"Import
|
||||||
syntax keyword typescriptImport from as import
|
syntax keyword typescriptImport from as
|
||||||
|
syntax keyword typescriptImport import
|
||||||
|
\ nextgroup=typescriptImportType
|
||||||
|
\ skipwhite
|
||||||
|
syntax keyword typescriptImportType type
|
||||||
|
\ contained
|
||||||
syntax keyword typescriptExport export
|
syntax keyword typescriptExport export
|
||||||
|
\ nextgroup=typescriptExportType
|
||||||
|
\ skipwhite
|
||||||
|
syntax match typescriptExportType /\<type\s*{\@=/
|
||||||
|
\ contained skipwhite skipempty skipnl
|
||||||
syntax keyword typescriptModule namespace module
|
syntax keyword typescriptModule namespace module
|
||||||
|
|
||||||
"this
|
"this
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ syntax region typescriptString
|
|||||||
\ contains=typescriptSpecial,@Spell
|
\ contains=typescriptSpecial,@Spell
|
||||||
\ extend
|
\ extend
|
||||||
|
|
||||||
syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{4,5}})|c\u|.)"
|
syntax match typescriptSpecial contained "\v\\%(x\x\x|u%(\x{4}|\{\x{1,6}})|c\u|.)"
|
||||||
|
|
||||||
" From vim runtime
|
" From vim runtime
|
||||||
" <https://github.com/vim/vim/blob/master/runtime/syntax/javascript.vim#L48>
|
" <https://github.com/vim/vim/blob/master/runtime/syntax/javascript.vim#L48>
|
||||||
@@ -24,7 +24,7 @@ syntax region typescriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|
|
|||||||
|
|
||||||
syntax region typescriptTemplate
|
syntax region typescriptTemplate
|
||||||
\ start=/`/ skip=/\\\\\|\\`\|\n/ end=/`\|$/
|
\ start=/`/ skip=/\\\\\|\\`\|\n/ end=/`\|$/
|
||||||
\ contains=typescriptTemplateSubstitution
|
\ contains=typescriptTemplateSubstitution,typescriptSpecial,@Spell
|
||||||
\ nextgroup=@typescriptSymbols
|
\ nextgroup=@typescriptSymbols
|
||||||
\ skipwhite skipempty
|
\ skipwhite skipempty
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ syntax keyword typescriptConstructor contained constructor
|
|||||||
|
|
||||||
syntax cluster memberNextGroup contains=typescriptMemberOptionality,typescriptTypeAnnotation,@typescriptCallSignature
|
syntax cluster memberNextGroup contains=typescriptMemberOptionality,typescriptTypeAnnotation,@typescriptCallSignature
|
||||||
|
|
||||||
syntax match typescriptMember /\K\k*/
|
syntax match typescriptMember /#\?\K\k*/
|
||||||
\ nextgroup=@memberNextGroup
|
\ nextgroup=@memberNextGroup
|
||||||
\ contained skipwhite
|
\ contained skipwhite
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,11 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') ==
|
|||||||
|
|
||||||
syntax region typescriptObjectLiteral matchgroup=typescriptBraces
|
syntax region typescriptObjectLiteral matchgroup=typescriptBraces
|
||||||
\ start=/{/ end=/}/
|
\ start=/{/ end=/}/
|
||||||
\ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName
|
\ contains=@typescriptComments,typescriptObjectLabel,typescriptStringProperty,typescriptComputedPropertyName,typescriptObjectAsyncKeyword
|
||||||
\ fold contained
|
\ fold contained
|
||||||
|
|
||||||
|
syntax keyword typescriptObjectAsyncKeyword async contained
|
||||||
|
|
||||||
syntax match typescriptObjectLabel contained /\k\+\_s*/
|
syntax match typescriptObjectLabel contained /\k\+\_s*/
|
||||||
\ nextgroup=typescriptObjectColon,@typescriptCallImpl
|
\ nextgroup=typescriptObjectColon,@typescriptCallImpl
|
||||||
\ skipwhite skipempty
|
\ skipwhite skipempty
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ syntax match typescriptUnaryOp /[+\-~!]/
|
|||||||
\ nextgroup=@typescriptValue
|
\ nextgroup=@typescriptValue
|
||||||
\ skipwhite
|
\ 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
|
syntax match typescriptAssign /=/ nextgroup=@typescriptValue
|
||||||
\ skipwhite skipempty
|
\ skipwhite skipempty
|
||||||
|
|||||||
@@ -3,13 +3,17 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') ==
|
|||||||
" Types
|
" Types
|
||||||
syntax match typescriptOptionalMark /?/ contained
|
syntax match typescriptOptionalMark /?/ contained
|
||||||
|
|
||||||
|
syntax cluster typescriptTypeParameterCluster contains=
|
||||||
|
\ typescriptTypeParameter,
|
||||||
|
\ typescriptGenericDefault
|
||||||
|
|
||||||
syntax region typescriptTypeParameters matchgroup=typescriptTypeBrackets
|
syntax region typescriptTypeParameters matchgroup=typescriptTypeBrackets
|
||||||
\ start=/</ end=/>/
|
\ start=/</ end=/>/
|
||||||
\ contains=typescriptTypeParameter
|
\ contains=@typescriptTypeParameterCluster
|
||||||
\ contained
|
\ contained
|
||||||
|
|
||||||
syntax match typescriptTypeParameter /\K\k*/
|
syntax match typescriptTypeParameter /\K\k*/
|
||||||
\ nextgroup=typescriptConstraint,typescriptGenericDefault
|
\ nextgroup=typescriptConstraint
|
||||||
\ contained skipwhite skipnl
|
\ contained skipwhite skipnl
|
||||||
|
|
||||||
syntax keyword typescriptConstraint extends
|
syntax keyword typescriptConstraint extends
|
||||||
@@ -52,7 +56,8 @@ syntax cluster typescriptPrimaryType contains=
|
|||||||
\ typescriptTupleType,
|
\ typescriptTupleType,
|
||||||
\ typescriptTypeQuery,
|
\ typescriptTypeQuery,
|
||||||
\ typescriptStringLiteralType,
|
\ typescriptStringLiteralType,
|
||||||
\ typescriptReadonlyArrayKeyword
|
\ typescriptReadonlyArrayKeyword,
|
||||||
|
\ typescriptAssertType
|
||||||
|
|
||||||
syntax region typescriptStringLiteralType contained
|
syntax region typescriptStringLiteralType contained
|
||||||
\ start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/
|
\ start=/\z(["']\)/ skip=/\\\\\|\\\z1\|\\\n/ end=/\z1\|$/
|
||||||
@@ -91,8 +96,8 @@ syntax cluster typescriptTypeMember contains=
|
|||||||
|
|
||||||
syntax region typescriptTupleType matchgroup=typescriptBraces
|
syntax region typescriptTupleType matchgroup=typescriptBraces
|
||||||
\ start=/\[/ end=/\]/
|
\ start=/\[/ end=/\]/
|
||||||
\ contains=@typescriptType
|
\ contains=@typescriptType,@typescriptComments
|
||||||
\ contained skipwhite oneline
|
\ contained skipwhite
|
||||||
|
|
||||||
syntax cluster typescriptTypeOperator
|
syntax cluster typescriptTypeOperator
|
||||||
\ contains=typescriptUnion,typescriptTypeBracket
|
\ contains=typescriptUnion,typescriptTypeBracket
|
||||||
@@ -130,6 +135,10 @@ syntax keyword typescriptTypeQuery typeof keyof
|
|||||||
\ nextgroup=typescriptTypeReference
|
\ nextgroup=typescriptTypeReference
|
||||||
\ contained skipwhite skipnl
|
\ contained skipwhite skipnl
|
||||||
|
|
||||||
|
syntax keyword typescriptAssertType asserts
|
||||||
|
\ nextgroup=typescriptTypeReference
|
||||||
|
\ contained skipwhite skipnl
|
||||||
|
|
||||||
syntax cluster typescriptCallSignature contains=typescriptGenericCall,typescriptCall
|
syntax cluster typescriptCallSignature contains=typescriptGenericCall,typescriptCall
|
||||||
syntax region typescriptGenericCall matchgroup=typescriptTypeBrackets
|
syntax region typescriptGenericCall matchgroup=typescriptTypeBrackets
|
||||||
\ start=/</ end=/>/
|
\ start=/</ end=/>/
|
||||||
|
|||||||
109
syntax/c.vim
109
syntax/c.vim
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c/c++') == -1
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: C
|
" Language: C
|
||||||
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
" Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||||
" Last Change: 2016 Nov 18
|
" Last Change: 2019 Nov 29
|
||||||
|
|
||||||
" Quit when a (custom) syntax file was already loaded
|
" Quit when a (custom) syntax file was already loaded
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
@@ -15,6 +15,14 @@ set cpo&vim
|
|||||||
|
|
||||||
let s:ft = matchstr(&ft, '^\([^.]\)\+')
|
let s:ft = matchstr(&ft, '^\([^.]\)\+')
|
||||||
|
|
||||||
|
" Optional embedded Autodoc parsing
|
||||||
|
" To enable it add: let g:c_autodoc = 1
|
||||||
|
" to your .vimrc
|
||||||
|
if exists("c_autodoc")
|
||||||
|
syn include @cAutodoc <sfile>:p:h/autodoc.vim
|
||||||
|
unlet b:current_syntax
|
||||||
|
endif
|
||||||
|
|
||||||
" A bunch of useful C keywords
|
" A bunch of useful C keywords
|
||||||
syn keyword cStatement goto break return continue asm
|
syn keyword cStatement goto break return continue asm
|
||||||
syn keyword cLabel case default
|
syn keyword cLabel case default
|
||||||
@@ -131,7 +139,7 @@ if exists("c_no_curly_error")
|
|||||||
syn match cParenError display ")"
|
syn match cParenError display ")"
|
||||||
syn match cErrInParen display contained "^^<%\|^%>"
|
syn match cErrInParen display contained "^^<%\|^%>"
|
||||||
else
|
else
|
||||||
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell
|
syn region cParen transparent start='(' end=')' contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell
|
||||||
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
" cCppParen: same as cParen but ends at end-of-line; used in cDefine
|
||||||
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell
|
||||||
syn match cParenError display ")"
|
syn match cParenError display ")"
|
||||||
@@ -214,7 +222,7 @@ if exists("c_comment_strings")
|
|||||||
syn match cCommentSkip contained "^\s*\*\($\|\s\+\)"
|
syn match cCommentSkip contained "^\s*\*\($\|\s\+\)"
|
||||||
syn region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip
|
syn region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip
|
||||||
syn region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial
|
syn region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial
|
||||||
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,@Spell
|
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,cWrongComTail,@Spell
|
||||||
if exists("c_no_comment_fold")
|
if exists("c_no_comment_fold")
|
||||||
" Use "extend" here to have preprocessor lines not terminate halfway a
|
" Use "extend" here to have preprocessor lines not terminate halfway a
|
||||||
" comment.
|
" comment.
|
||||||
@@ -233,6 +241,7 @@ endif
|
|||||||
" keep a // comment separately, it terminates a preproc. conditional
|
" keep a // comment separately, it terminates a preproc. conditional
|
||||||
syn match cCommentError display "\*/"
|
syn match cCommentError display "\*/"
|
||||||
syn match cCommentStartError display "/\*"me=e-1 contained
|
syn match cCommentStartError display "/\*"me=e-1 contained
|
||||||
|
syn match cWrongComTail display "\*/"
|
||||||
|
|
||||||
syn keyword cOperator sizeof
|
syn keyword cOperator sizeof
|
||||||
if exists("c_gnu")
|
if exists("c_gnu")
|
||||||
@@ -282,6 +291,22 @@ if !exists("c_no_c11")
|
|||||||
syn keyword cOperator _Static_assert static_assert
|
syn keyword cOperator _Static_assert static_assert
|
||||||
syn keyword cStorageClass _Thread_local thread_local
|
syn keyword cStorageClass _Thread_local thread_local
|
||||||
syn keyword cType char16_t char32_t
|
syn keyword cType char16_t char32_t
|
||||||
|
" C11 atomics (take down the shield wall!)
|
||||||
|
syn keyword cType atomic_bool atomic_char atomic_schar atomic_uchar
|
||||||
|
syn keyword Ctype atomic_short atomic_ushort atomic_int atomic_uint
|
||||||
|
syn keyword cType atomic_long atomic_ulong atomic_llong atomic_ullong
|
||||||
|
syn keyword cType atomic_char16_t atomic_char32_t atomic_wchar_t
|
||||||
|
syn keyword cType atomic_int_least8_t atomic_uint_least8_t
|
||||||
|
syn keyword cType atomic_int_least16_t atomic_uint_least16_t
|
||||||
|
syn keyword cType atomic_int_least32_t atomic_uint_least32_t
|
||||||
|
syn keyword cType atomic_int_least64_t atomic_uint_least64_t
|
||||||
|
syn keyword cType atomic_int_fast8_t atomic_uint_fast8_t
|
||||||
|
syn keyword cType atomic_int_fast16_t atomic_uint_fast16_t
|
||||||
|
syn keyword cType atomic_int_fast32_t atomic_uint_fast32_t
|
||||||
|
syn keyword cType atomic_int_fast64_t atomic_uint_fast64_t
|
||||||
|
syn keyword cType atomic_intptr_t atomic_uintptr_t
|
||||||
|
syn keyword cType atomic_size_t atomic_ptrdiff_t
|
||||||
|
syn keyword cType atomic_intmax_t atomic_uintmax_t
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
|
if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
|
||||||
@@ -313,44 +338,32 @@ if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu")
|
|||||||
syn keyword cConstant PTRDIFF_MIN PTRDIFF_MAX SIG_ATOMIC_MIN SIG_ATOMIC_MAX
|
syn keyword cConstant PTRDIFF_MIN PTRDIFF_MAX SIG_ATOMIC_MIN SIG_ATOMIC_MAX
|
||||||
syn keyword cConstant SIZE_MAX WCHAR_MIN WCHAR_MAX WINT_MIN WINT_MAX
|
syn keyword cConstant SIZE_MAX WCHAR_MIN WCHAR_MAX WINT_MIN WINT_MAX
|
||||||
endif
|
endif
|
||||||
syn keyword cConstant FLT_RADIX FLT_ROUNDS
|
syn keyword cConstant FLT_RADIX FLT_ROUNDS FLT_DIG FLT_MANT_DIG FLT_EPSILON DBL_DIG DBL_MANT_DIG DBL_EPSILON
|
||||||
syn keyword cConstant FLT_DIG FLT_MANT_DIG FLT_EPSILON
|
syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP FLT_MIN_10_EXP FLT_MAX_10_EXP
|
||||||
syn keyword cConstant DBL_DIG DBL_MANT_DIG DBL_EPSILON
|
syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP DBL_MIN_10_EXP DBL_MAX_10_EXP LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP
|
||||||
syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON
|
syn keyword cConstant LDBL_MIN_10_EXP LDBL_MAX_10_EXP HUGE_VAL CLOCKS_PER_SEC NULL LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY
|
||||||
syn keyword cConstant FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP
|
syn keyword cConstant LC_NUMERIC LC_TIME SIG_DFL SIG_ERR SIG_IGN SIGABRT SIGFPE SIGILL SIGHUP SIGINT SIGSEGV SIGTERM
|
||||||
syn keyword cConstant FLT_MIN_10_EXP FLT_MAX_10_EXP
|
|
||||||
syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP
|
|
||||||
syn keyword cConstant DBL_MIN_10_EXP DBL_MAX_10_EXP
|
|
||||||
syn keyword cConstant LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP
|
|
||||||
syn keyword cConstant LDBL_MIN_10_EXP LDBL_MAX_10_EXP
|
|
||||||
syn keyword cConstant HUGE_VAL CLOCKS_PER_SEC NULL
|
|
||||||
syn keyword cConstant LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY
|
|
||||||
syn keyword cConstant LC_NUMERIC LC_TIME
|
|
||||||
syn keyword cConstant SIG_DFL SIG_ERR SIG_IGN
|
|
||||||
syn keyword cConstant SIGABRT SIGFPE SIGILL SIGHUP SIGINT SIGSEGV SIGTERM
|
|
||||||
" Add POSIX signals as well...
|
" Add POSIX signals as well...
|
||||||
syn keyword cConstant SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP
|
syn keyword cConstant SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV
|
||||||
syn keyword cConstant SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV
|
syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2
|
||||||
syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU
|
syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF FOPEN_MAX FILENAME_MAX L_tmpnam
|
||||||
syn keyword cConstant SIGUSR1 SIGUSR2
|
syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET TMP_MAX stderr stdin stdout EXIT_FAILURE EXIT_SUCCESS RAND_MAX
|
||||||
syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF
|
|
||||||
syn keyword cConstant FOPEN_MAX FILENAME_MAX L_tmpnam
|
|
||||||
syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET
|
|
||||||
syn keyword cConstant TMP_MAX stderr stdin stdout
|
|
||||||
syn keyword cConstant EXIT_FAILURE EXIT_SUCCESS RAND_MAX
|
|
||||||
" POSIX 2001
|
" POSIX 2001
|
||||||
syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG
|
syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG SIGVTALRM SIGXCPU SIGXFSZ
|
||||||
syn keyword cConstant SIGVTALRM SIGXCPU SIGXFSZ
|
|
||||||
" non-POSIX signals
|
" non-POSIX signals
|
||||||
syn keyword cConstant SIGWINCH SIGINFO
|
syn keyword cConstant SIGWINCH SIGINFO
|
||||||
" Add POSIX errors as well
|
" Add POSIX errors as well. List comes from:
|
||||||
syn keyword cConstant E2BIG EACCES EAGAIN EBADF EBADMSG EBUSY
|
" http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html
|
||||||
syn keyword cConstant ECANCELED ECHILD EDEADLK EDOM EEXIST EFAULT
|
syn keyword cConstant E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF
|
||||||
syn keyword cConstant EFBIG EILSEQ EINPROGRESS EINTR EINVAL EIO EISDIR
|
syn keyword cConstant EBADMSG EBUSY ECANCELED ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK
|
||||||
syn keyword cConstant EMFILE EMLINK EMSGSIZE ENAMETOOLONG ENFILE ENODEV
|
syn keyword cConstant EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTUNREACH EIDRM EILSEQ
|
||||||
syn keyword cConstant ENOENT ENOEXEC ENOLCK ENOMEM ENOSPC ENOSYS
|
syn keyword cConstant EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE
|
||||||
syn keyword cConstant ENOTDIR ENOTEMPTY ENOTSUP ENOTTY ENXIO EPERM
|
syn keyword cConstant EMULTIHOP ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODATA
|
||||||
syn keyword cConstant EPIPE ERANGE EROFS ESPIPE ESRCH ETIMEDOUT EXDEV
|
syn keyword cConstant ENODEV ENOENT ENOEXEC ENOLCK ENOLINK ENOMEM ENOMSG ENOPROTOOPT ENOSPC ENOSR
|
||||||
|
syn keyword cConstant ENOSTR ENOSYS ENOTBLK ENOTCONN ENOTDIR ENOTEMPTY ENOTRECOVERABLE ENOTSOCK ENOTSUP
|
||||||
|
syn keyword cConstant ENOTTY ENXIO EOPNOTSUPP EOVERFLOW EOWNERDEAD EPERM EPIPE EPROTO
|
||||||
|
syn keyword cConstant EPROTONOSUPPORT EPROTOTYPE ERANGE EROFS ESPIPE ESRCH ESTALE ETIME ETIMEDOUT
|
||||||
|
syn keyword cConstant ETXTBSY EWOULDBLOCK EXDEV
|
||||||
" math.h
|
" math.h
|
||||||
syn keyword cConstant M_E M_LOG2E M_LOG10E M_LN2 M_LN10 M_PI M_PI_2 M_PI_4
|
syn keyword cConstant M_E M_LOG2E M_LOG10E M_LN2 M_LN10 M_PI M_PI_2 M_PI_4
|
||||||
syn keyword cConstant M_1_PI M_2_PI M_2_SQRTPI M_SQRT2 M_SQRT1_2
|
syn keyword cConstant M_1_PI M_2_PI M_2_SQRTPI M_SQRT2 M_SQRT1_2
|
||||||
@@ -371,17 +384,17 @@ if !exists("c_no_if0")
|
|||||||
else
|
else
|
||||||
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||||
endif
|
endif
|
||||||
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
|
syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit
|
||||||
syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
|
syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold
|
||||||
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
|
syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit
|
||||||
if !exists("c_no_if0_fold")
|
if !exists("c_no_if0_fold")
|
||||||
syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
|
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold
|
||||||
else
|
else
|
||||||
syn region cCppInElse contained start="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
|
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2
|
||||||
endif
|
endif
|
||||||
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\zs\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell
|
||||||
syn region cCppOutSkip contained start="^\s*\zs\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
|
syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip
|
||||||
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\zs\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\zs\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
|
syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc
|
||||||
endif
|
endif
|
||||||
syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
|
syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||||
syn match cIncluded display contained "<[^>]*>"
|
syn match cIncluded display contained "<[^>]*>"
|
||||||
@@ -391,6 +404,13 @@ syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInP
|
|||||||
syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||||
syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell
|
||||||
|
|
||||||
|
" Optional embedded Autodoc parsing
|
||||||
|
if exists("c_autodoc")
|
||||||
|
syn match cAutodocReal display contained "\%(//\|[/ \t\v]\*\|^\*\)\@2<=!.*" contains=@cAutodoc containedin=cComment,cCommentL
|
||||||
|
syn cluster cCommentGroup add=cAutodocReal
|
||||||
|
syn cluster cPreProcGroup add=cAutodocReal
|
||||||
|
endif
|
||||||
|
|
||||||
" Highlight User Labels
|
" Highlight User Labels
|
||||||
syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString
|
syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString
|
||||||
if s:ft ==# 'c' || exists("cpp_no_cpp11")
|
if s:ft ==# 'c' || exists("cpp_no_cpp11")
|
||||||
@@ -452,6 +472,7 @@ hi def link cErrInBracket cError
|
|||||||
hi def link cCommentError cError
|
hi def link cCommentError cError
|
||||||
hi def link cCommentStartError cError
|
hi def link cCommentStartError cError
|
||||||
hi def link cSpaceError cError
|
hi def link cSpaceError cError
|
||||||
|
hi def link cWrongComTail cError
|
||||||
hi def link cSpecialError cError
|
hi def link cSpecialError cError
|
||||||
hi def link cCurlyError cError
|
hi def link cCurlyError cError
|
||||||
hi def link cOperator Operator
|
hi def link cOperator Operator
|
||||||
|
|||||||
@@ -33,9 +33,7 @@ syn keyword carpSyntax relative-include not-on-windows load-and-use
|
|||||||
syn keyword carpSyntax deftest
|
syn keyword carpSyntax deftest
|
||||||
syn match carpSyntax "\vc(a|d){1,4}r"
|
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 λ
|
||||||
syn keyword carpFunc Maybe Map Result Set Pair
|
|
||||||
syn keyword carpFunc Pattern
|
|
||||||
syn keyword carpFunc not or and + - * / = /= >= <= > < inc dec
|
syn keyword carpFunc not or and + - * / = /= >= <= > < inc dec
|
||||||
syn keyword carpFunc println print get-line from-string mod random
|
syn keyword carpFunc println print get-line from-string mod random
|
||||||
syn keyword carpFunc random-between str mask delete append length duplicate
|
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 assert-false assert-exit print-test-results with-test
|
||||||
syn keyword carpFunc dir-from-path file-from-path
|
syn keyword carpFunc dir-from-path file-from-path
|
||||||
|
|
||||||
|
syn match carpFunc "[A-Z]\w\+"
|
||||||
|
|
||||||
syn match carpSymbol ,\k+, contained
|
syn match carpSymbol ,\k+, contained
|
||||||
syn match carpTodo /\v<(FIXME|NOTE|TODO|OPTIMIZE)/ containedin=carpComment,carpString
|
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 carpNormal add=carpError,carpStruc,carpString,carpPattern
|
||||||
syn cluster carpQuotedOrNormal add=carpString
|
syn cluster carpQuotedOrNormal add=carpString
|
||||||
|
|
||||||
syn match carpNumber "\<[-+]\?\(\d\+\|\d\+#*\.\|\d*\.\d\+\)#*\(/\d\+#*\)\?[lf]\?\>" contains=carpContainedNumberError
|
syn match carpNumber "\<[-+]\?\(\d\+\|\d\+#*\.\|\d*\.\d\+\)#*\(/\d\+#*\)\?[lfb]\?\>" contains=carpContainedNumberError
|
||||||
syn match carpNumber "\<[-+]\?\d\+/\d\+[lf]\?\>" contains=carpContainedNumberError
|
syn match carpNumber "\<[-+]\?\d\+/\d\+[lfb]\?\>" contains=carpContainedNumberError
|
||||||
|
|
||||||
|
|
||||||
syn keyword carpBoolean true false
|
syn keyword carpBoolean true false
|
||||||
|
|||||||
434
syntax/cmake.vim
434
syntax/cmake.vim
@@ -2,14 +2,14 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cmake') == -1
|
|||||||
|
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Program: CMake - Cross-Platform Makefile Generator
|
" Program: CMake - Cross-Platform Makefile Generator
|
||||||
" Version: cmake version 3.14.20190529-g067a4f
|
" Version: cmake version 3.16.20191028-g0e4190b
|
||||||
" Language: CMake
|
" Language: CMake
|
||||||
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>,
|
" Author: Andy Cedilnik <andy.cedilnik@kitware.com>,
|
||||||
" Nicholas Hutchinson <nshutchinson@gmail.com>,
|
" Nicholas Hutchinson <nshutchinson@gmail.com>,
|
||||||
" Patrick Boettcher <patrick.boettcher@posteo.de>
|
" Patrick Boettcher <patrick.boettcher@posteo.de>
|
||||||
" Maintainer: Dimitri Merejkowsky <d.merej@gmail.com>
|
" Maintainer: Dimitri Merejkowsky <d.merej@gmail.com>
|
||||||
" Former Maintainer: Karthik Krishnan <karthik.krishnan@kitware.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
|
" Licence: The CMake license applies to this file. See
|
||||||
" https://cmake.org/licensing
|
" https://cmake.org/licensing
|
||||||
@@ -81,6 +81,7 @@ syn keyword cmakeProperty contained
|
|||||||
\ AUTOMOC_EXECUTABLE
|
\ AUTOMOC_EXECUTABLE
|
||||||
\ AUTOMOC_MACRO_NAMES
|
\ AUTOMOC_MACRO_NAMES
|
||||||
\ AUTOMOC_MOC_OPTIONS
|
\ AUTOMOC_MOC_OPTIONS
|
||||||
|
\ AUTOMOC_PATH_PREFIX
|
||||||
\ AUTOMOC_SOURCE_GROUP
|
\ AUTOMOC_SOURCE_GROUP
|
||||||
\ AUTOMOC_TARGETS_FOLDER
|
\ AUTOMOC_TARGETS_FOLDER
|
||||||
\ AUTORCC
|
\ AUTORCC
|
||||||
@@ -145,6 +146,7 @@ syn keyword cmakeProperty contained
|
|||||||
\ DEPLOYMENT_REMOTE_DIRECTORY
|
\ DEPLOYMENT_REMOTE_DIRECTORY
|
||||||
\ DISABLED
|
\ DISABLED
|
||||||
\ DISABLED_FEATURES
|
\ DISABLED_FEATURES
|
||||||
|
\ DISABLE_PRECOMPILE_HEADERS
|
||||||
\ DOTNET_TARGET_FRAMEWORK_VERSION
|
\ DOTNET_TARGET_FRAMEWORK_VERSION
|
||||||
\ ECLIPSE_EXTRA_CPROJECT_CONTENTS
|
\ ECLIPSE_EXTRA_CPROJECT_CONTENTS
|
||||||
\ ECLIPSE_EXTRA_NATURES
|
\ ECLIPSE_EXTRA_NATURES
|
||||||
@@ -202,6 +204,7 @@ syn keyword cmakeProperty contained
|
|||||||
\ INCLUDE_DIRECTORIES
|
\ INCLUDE_DIRECTORIES
|
||||||
\ INCLUDE_REGULAR_EXPRESSION
|
\ INCLUDE_REGULAR_EXPRESSION
|
||||||
\ INSTALL_NAME_DIR
|
\ INSTALL_NAME_DIR
|
||||||
|
\ INSTALL_REMOVE_ENVIRONMENT_RPATH
|
||||||
\ INSTALL_RPATH
|
\ INSTALL_RPATH
|
||||||
\ INSTALL_RPATH_USE_LINK_PATH
|
\ INSTALL_RPATH_USE_LINK_PATH
|
||||||
\ INTERFACE_AUTOUIC_OPTIONS
|
\ INTERFACE_AUTOUIC_OPTIONS
|
||||||
@@ -214,6 +217,7 @@ syn keyword cmakeProperty contained
|
|||||||
\ INTERFACE_LINK_LIBRARIES
|
\ INTERFACE_LINK_LIBRARIES
|
||||||
\ INTERFACE_LINK_OPTIONS
|
\ INTERFACE_LINK_OPTIONS
|
||||||
\ INTERFACE_POSITION_INDEPENDENT_CODE
|
\ INTERFACE_POSITION_INDEPENDENT_CODE
|
||||||
|
\ INTERFACE_PRECOMPILE_HEADERS
|
||||||
\ INTERFACE_SOURCES
|
\ INTERFACE_SOURCES
|
||||||
\ INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
|
\ INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
|
||||||
\ INTERPROCEDURAL_OPTIMIZATION
|
\ INTERPROCEDURAL_OPTIMIZATION
|
||||||
@@ -266,10 +270,13 @@ syn keyword cmakeProperty contained
|
|||||||
\ PDB_OUTPUT_DIRECTORY
|
\ PDB_OUTPUT_DIRECTORY
|
||||||
\ POSITION_INDEPENDENT_CODE
|
\ POSITION_INDEPENDENT_CODE
|
||||||
\ POST_INSTALL_SCRIPT
|
\ POST_INSTALL_SCRIPT
|
||||||
|
\ PRECOMPILE_HEADERS
|
||||||
|
\ PRECOMPILE_HEADERS_REUSE_FROM
|
||||||
\ PREDEFINED_TARGETS_FOLDER
|
\ PREDEFINED_TARGETS_FOLDER
|
||||||
\ PREFIX
|
\ PREFIX
|
||||||
\ PRE_INSTALL_SCRIPT
|
\ PRE_INSTALL_SCRIPT
|
||||||
\ PRIVATE_HEADER
|
\ PRIVATE_HEADER
|
||||||
|
\ PROCESSES
|
||||||
\ PROCESSORS
|
\ PROCESSORS
|
||||||
\ PROCESSOR_AFFINITY
|
\ PROCESSOR_AFFINITY
|
||||||
\ PROJECT_LABEL
|
\ PROJECT_LABEL
|
||||||
@@ -290,7 +297,10 @@ syn keyword cmakeProperty contained
|
|||||||
\ SKIP_AUTORCC
|
\ SKIP_AUTORCC
|
||||||
\ SKIP_AUTOUIC
|
\ SKIP_AUTOUIC
|
||||||
\ SKIP_BUILD_RPATH
|
\ SKIP_BUILD_RPATH
|
||||||
|
\ SKIP_PRECOMPILE_HEADERS
|
||||||
|
\ SKIP_REGULAR_EXPRESSION
|
||||||
\ SKIP_RETURN_CODE
|
\ SKIP_RETURN_CODE
|
||||||
|
\ SKIP_UNITY_BUILD_INCLUSION
|
||||||
\ SOURCES
|
\ SOURCES
|
||||||
\ SOURCE_DIR
|
\ SOURCE_DIR
|
||||||
\ SOVERSION
|
\ SOVERSION
|
||||||
@@ -302,6 +312,7 @@ syn keyword cmakeProperty contained
|
|||||||
\ SYMBOLIC
|
\ SYMBOLIC
|
||||||
\ Swift_DEPENDENCIES_FILE
|
\ Swift_DEPENDENCIES_FILE
|
||||||
\ Swift_DIAGNOSTICS_FILE
|
\ Swift_DIAGNOSTICS_FILE
|
||||||
|
\ Swift_LANGUAGE_VERSION
|
||||||
\ Swift_MODULE_DIRECTORY
|
\ Swift_MODULE_DIRECTORY
|
||||||
\ Swift_MODULE_NAME
|
\ Swift_MODULE_NAME
|
||||||
\ TARGET_ARCHIVES_MAY_BE_SHARED_LIBS
|
\ TARGET_ARCHIVES_MAY_BE_SHARED_LIBS
|
||||||
@@ -313,6 +324,10 @@ syn keyword cmakeProperty contained
|
|||||||
\ TIMEOUT
|
\ TIMEOUT
|
||||||
\ TIMEOUT_AFTER_MATCH
|
\ TIMEOUT_AFTER_MATCH
|
||||||
\ TYPE
|
\ TYPE
|
||||||
|
\ UNITY_BUILD
|
||||||
|
\ UNITY_BUILD_BATCH_SIZE
|
||||||
|
\ UNITY_BUILD_CODE_AFTER_INCLUDE
|
||||||
|
\ UNITY_BUILD_CODE_BEFORE_INCLUDE
|
||||||
\ USE_FOLDERS
|
\ USE_FOLDERS
|
||||||
\ VALUE
|
\ VALUE
|
||||||
\ VARIABLES
|
\ VARIABLES
|
||||||
@@ -327,9 +342,11 @@ syn keyword cmakeProperty contained
|
|||||||
\ VS_DEPLOYMENT_CONTENT
|
\ VS_DEPLOYMENT_CONTENT
|
||||||
\ VS_DEPLOYMENT_LOCATION
|
\ VS_DEPLOYMENT_LOCATION
|
||||||
\ VS_DESKTOP_EXTENSIONS_VERSION
|
\ VS_DESKTOP_EXTENSIONS_VERSION
|
||||||
|
\ VS_DOTNET_DOCUMENTATION_FILE
|
||||||
\ VS_DOTNET_REFERENCES
|
\ VS_DOTNET_REFERENCES
|
||||||
\ VS_DOTNET_REFERENCES_COPY_LOCAL
|
\ VS_DOTNET_REFERENCES_COPY_LOCAL
|
||||||
\ VS_DOTNET_TARGET_FRAMEWORK_VERSION
|
\ VS_DOTNET_TARGET_FRAMEWORK_VERSION
|
||||||
|
\ VS_DPI_AWARE
|
||||||
\ VS_GLOBAL_KEYWORD
|
\ VS_GLOBAL_KEYWORD
|
||||||
\ VS_GLOBAL_PROJECT_TYPES
|
\ VS_GLOBAL_PROJECT_TYPES
|
||||||
\ VS_GLOBAL_ROOTNAMESPACE
|
\ VS_GLOBAL_ROOTNAMESPACE
|
||||||
@@ -340,6 +357,7 @@ syn keyword cmakeProperty contained
|
|||||||
\ VS_KEYWORD
|
\ VS_KEYWORD
|
||||||
\ VS_MOBILE_EXTENSIONS_VERSION
|
\ VS_MOBILE_EXTENSIONS_VERSION
|
||||||
\ VS_NO_SOLUTION_DEPLOY
|
\ VS_NO_SOLUTION_DEPLOY
|
||||||
|
\ VS_PACKAGE_REFERENCES
|
||||||
\ VS_PROJECT_IMPORT
|
\ VS_PROJECT_IMPORT
|
||||||
\ VS_RESOURCE_GENERATOR
|
\ VS_RESOURCE_GENERATOR
|
||||||
\ VS_SCC_AUXPATH
|
\ VS_SCC_AUXPATH
|
||||||
@@ -379,6 +397,7 @@ syn keyword cmakeProperty contained
|
|||||||
\ XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
|
\ XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
|
||||||
\ XCODE_SCHEME_ARGUMENTS
|
\ XCODE_SCHEME_ARGUMENTS
|
||||||
\ XCODE_SCHEME_DEBUG_AS_ROOT
|
\ XCODE_SCHEME_DEBUG_AS_ROOT
|
||||||
|
\ XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
|
||||||
\ XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
|
\ XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
|
||||||
\ XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
|
\ XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
|
||||||
\ XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
|
\ XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
|
||||||
@@ -483,6 +502,9 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_ASM_LINKER_WRAPPER_FLAG
|
\ CMAKE_ASM_LINKER_WRAPPER_FLAG
|
||||||
\ CMAKE_ASM_LINKER_WRAPPER_FLAG_SEP
|
\ CMAKE_ASM_LINKER_WRAPPER_FLAG_SEP
|
||||||
\ CMAKE_ASM_LINK_EXECUTABLE
|
\ 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
|
||||||
\ CMAKE_ASM_MASM_ANDROID_TOOLCHAIN_MACHINE
|
\ CMAKE_ASM_MASM_ANDROID_TOOLCHAIN_MACHINE
|
||||||
\ CMAKE_ASM_MASM_ANDROID_TOOLCHAIN_PREFIX
|
\ 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
|
||||||
\ CMAKE_ASM_MASM_LINKER_WRAPPER_FLAG_SEP
|
\ CMAKE_ASM_MASM_LINKER_WRAPPER_FLAG_SEP
|
||||||
\ CMAKE_ASM_MASM_LINK_EXECUTABLE
|
\ 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_OUTPUT_EXTENSION
|
||||||
\ CMAKE_ASM_MASM_PLATFORM_ID
|
\ CMAKE_ASM_MASM_PLATFORM_ID
|
||||||
\ CMAKE_ASM_MASM_SIMULATE_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
|
||||||
\ CMAKE_ASM_NASM_LINKER_WRAPPER_FLAG_SEP
|
\ CMAKE_ASM_NASM_LINKER_WRAPPER_FLAG_SEP
|
||||||
\ CMAKE_ASM_NASM_LINK_EXECUTABLE
|
\ 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_OUTPUT_EXTENSION
|
||||||
\ CMAKE_ASM_NASM_PLATFORM_ID
|
\ CMAKE_ASM_NASM_PLATFORM_ID
|
||||||
\ CMAKE_ASM_NASM_SIMULATE_ID
|
\ CMAKE_ASM_NASM_SIMULATE_ID
|
||||||
@@ -618,6 +646,7 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_AUTOMOC_DEPEND_FILTERS
|
\ CMAKE_AUTOMOC_DEPEND_FILTERS
|
||||||
\ CMAKE_AUTOMOC_MACRO_NAMES
|
\ CMAKE_AUTOMOC_MACRO_NAMES
|
||||||
\ CMAKE_AUTOMOC_MOC_OPTIONS
|
\ CMAKE_AUTOMOC_MOC_OPTIONS
|
||||||
|
\ CMAKE_AUTOMOC_PATH_PREFIX
|
||||||
\ CMAKE_AUTOMOC_RELAXED_MODE
|
\ CMAKE_AUTOMOC_RELAXED_MODE
|
||||||
\ CMAKE_AUTORCC
|
\ CMAKE_AUTORCC
|
||||||
\ CMAKE_AUTORCC_OPTIONS
|
\ CMAKE_AUTORCC_OPTIONS
|
||||||
@@ -703,6 +732,9 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_CSharp_LINKER_WRAPPER_FLAG
|
\ CMAKE_CSharp_LINKER_WRAPPER_FLAG
|
||||||
\ CMAKE_CSharp_LINKER_WRAPPER_FLAG_SEP
|
\ CMAKE_CSharp_LINKER_WRAPPER_FLAG_SEP
|
||||||
\ CMAKE_CSharp_LINK_EXECUTABLE
|
\ 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_OUTPUT_EXTENSION
|
||||||
\ CMAKE_CSharp_PLATFORM_ID
|
\ CMAKE_CSharp_PLATFORM_ID
|
||||||
\ CMAKE_CSharp_SIMULATE_ID
|
\ CMAKE_CSharp_SIMULATE_ID
|
||||||
@@ -765,8 +797,12 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_CUDA_LINKER_WRAPPER_FLAG
|
\ CMAKE_CUDA_LINKER_WRAPPER_FLAG
|
||||||
\ CMAKE_CUDA_LINKER_WRAPPER_FLAG_SEP
|
\ CMAKE_CUDA_LINKER_WRAPPER_FLAG_SEP
|
||||||
\ CMAKE_CUDA_LINK_EXECUTABLE
|
\ 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_OUTPUT_EXTENSION
|
||||||
\ CMAKE_CUDA_PLATFORM_ID
|
\ CMAKE_CUDA_PLATFORM_ID
|
||||||
|
\ CMAKE_CUDA_RESOLVE_DEVICE_SYMBOLS
|
||||||
\ CMAKE_CUDA_SEPARABLE_COMPILATION
|
\ CMAKE_CUDA_SEPARABLE_COMPILATION
|
||||||
\ CMAKE_CUDA_SIMULATE_ID
|
\ CMAKE_CUDA_SIMULATE_ID
|
||||||
\ CMAKE_CUDA_SIMULATE_VERSION
|
\ CMAKE_CUDA_SIMULATE_VERSION
|
||||||
@@ -835,6 +871,9 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_CXX_LINKER_WRAPPER_FLAG
|
\ CMAKE_CXX_LINKER_WRAPPER_FLAG
|
||||||
\ CMAKE_CXX_LINKER_WRAPPER_FLAG_SEP
|
\ CMAKE_CXX_LINKER_WRAPPER_FLAG_SEP
|
||||||
\ CMAKE_CXX_LINK_EXECUTABLE
|
\ 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_OUTPUT_EXTENSION
|
||||||
\ CMAKE_CXX_PLATFORM_ID
|
\ CMAKE_CXX_PLATFORM_ID
|
||||||
\ CMAKE_CXX_SIMULATE_ID
|
\ CMAKE_CXX_SIMULATE_ID
|
||||||
@@ -897,6 +936,9 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_C_LINKER_WRAPPER_FLAG
|
\ CMAKE_C_LINKER_WRAPPER_FLAG
|
||||||
\ CMAKE_C_LINKER_WRAPPER_FLAG_SEP
|
\ CMAKE_C_LINKER_WRAPPER_FLAG_SEP
|
||||||
\ CMAKE_C_LINK_EXECUTABLE
|
\ 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_OUTPUT_EXTENSION
|
||||||
\ CMAKE_C_PLATFORM_ID
|
\ CMAKE_C_PLATFORM_ID
|
||||||
\ CMAKE_C_SIMULATE_ID
|
\ CMAKE_C_SIMULATE_ID
|
||||||
@@ -912,11 +954,13 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_DEBUG_TARGET_PROPERTIES
|
\ CMAKE_DEBUG_TARGET_PROPERTIES
|
||||||
\ CMAKE_DEPENDS_IN_PROJECT_ONLY
|
\ CMAKE_DEPENDS_IN_PROJECT_ONLY
|
||||||
\ CMAKE_DIRECTORY_LABELS
|
\ CMAKE_DIRECTORY_LABELS
|
||||||
|
\ CMAKE_DISABLE_PRECOMPILE_HEADERS
|
||||||
\ CMAKE_DL_LIBS
|
\ CMAKE_DL_LIBS
|
||||||
\ CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
|
\ CMAKE_DOTNET_TARGET_FRAMEWORK_VERSION
|
||||||
\ CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES
|
\ CMAKE_ECLIPSE_GENERATE_LINKED_RESOURCES
|
||||||
\ CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
|
\ CMAKE_ECLIPSE_GENERATE_SOURCE_PROJECT
|
||||||
\ CMAKE_ECLIPSE_MAKE_ARGUMENTS
|
\ CMAKE_ECLIPSE_MAKE_ARGUMENTS
|
||||||
|
\ CMAKE_ECLIPSE_RESOURCE_ENCODING
|
||||||
\ CMAKE_ECLIPSE_VERSION
|
\ CMAKE_ECLIPSE_VERSION
|
||||||
\ CMAKE_EDIT_COMMAND
|
\ CMAKE_EDIT_COMMAND
|
||||||
\ CMAKE_ENABLE_EXPORTS
|
\ CMAKE_ENABLE_EXPORTS
|
||||||
@@ -950,6 +994,12 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
|
\ CMAKE_FIND_ROOT_PATH_MODE_LIBRARY
|
||||||
\ CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
|
\ CMAKE_FIND_ROOT_PATH_MODE_PACKAGE
|
||||||
\ CMAKE_FIND_ROOT_PATH_MODE_PROGRAM
|
\ 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_FOLDER
|
||||||
\ CMAKE_FRAMEWORK
|
\ CMAKE_FRAMEWORK
|
||||||
\ CMAKE_FRAMEWORK_PATH
|
\ CMAKE_FRAMEWORK_PATH
|
||||||
@@ -1004,6 +1054,9 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_Fortran_LINKER_WRAPPER_FLAG
|
\ CMAKE_Fortran_LINKER_WRAPPER_FLAG
|
||||||
\ CMAKE_Fortran_LINKER_WRAPPER_FLAG_SEP
|
\ CMAKE_Fortran_LINKER_WRAPPER_FLAG_SEP
|
||||||
\ CMAKE_Fortran_LINK_EXECUTABLE
|
\ 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_DEFAULT
|
||||||
\ CMAKE_Fortran_MODDIR_FLAG
|
\ CMAKE_Fortran_MODDIR_FLAG
|
||||||
\ CMAKE_Fortran_MODOUT_FLAG
|
\ CMAKE_Fortran_MODOUT_FLAG
|
||||||
@@ -1050,6 +1103,7 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_INSTALL_NAME_DIR
|
\ CMAKE_INSTALL_NAME_DIR
|
||||||
\ CMAKE_INSTALL_PREFIX
|
\ CMAKE_INSTALL_PREFIX
|
||||||
\ CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
|
\ CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
|
||||||
|
\ CMAKE_INSTALL_REMOVE_ENVIRONMENT_RPATH
|
||||||
\ CMAKE_INSTALL_RPATH
|
\ CMAKE_INSTALL_RPATH
|
||||||
\ CMAKE_INSTALL_RPATH_USE_LINK_PATH
|
\ CMAKE_INSTALL_RPATH_USE_LINK_PATH
|
||||||
\ CMAKE_INTERNAL_PLATFORM_ABI
|
\ CMAKE_INTERNAL_PLATFORM_ABI
|
||||||
@@ -1108,6 +1162,9 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_Java_LINKER_WRAPPER_FLAG
|
\ CMAKE_Java_LINKER_WRAPPER_FLAG
|
||||||
\ CMAKE_Java_LINKER_WRAPPER_FLAG_SEP
|
\ CMAKE_Java_LINKER_WRAPPER_FLAG_SEP
|
||||||
\ CMAKE_Java_LINK_EXECUTABLE
|
\ 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_OUTPUT_EXTENSION
|
||||||
\ CMAKE_Java_PLATFORM_ID
|
\ CMAKE_Java_PLATFORM_ID
|
||||||
\ CMAKE_Java_SIMULATE_ID
|
\ CMAKE_Java_SIMULATE_ID
|
||||||
@@ -1138,6 +1195,10 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_MAKE_PROGRAM
|
\ CMAKE_MAKE_PROGRAM
|
||||||
\ CMAKE_MATCH_COUNT
|
\ CMAKE_MATCH_COUNT
|
||||||
\ CMAKE_MAXIMUM_RECURSION_DEPTH
|
\ CMAKE_MAXIMUM_RECURSION_DEPTH
|
||||||
|
\ CMAKE_MESSAGE_CONTEXT
|
||||||
|
\ CMAKE_MESSAGE_CONTEXT_SHOW
|
||||||
|
\ CMAKE_MESSAGE_INDENT
|
||||||
|
\ CMAKE_MESSAGE_LOG_LEVEL
|
||||||
\ CMAKE_MFC_FLAG
|
\ CMAKE_MFC_FLAG
|
||||||
\ CMAKE_MINIMUM_REQUIRED_VERSION
|
\ CMAKE_MINIMUM_REQUIRED_VERSION
|
||||||
\ CMAKE_MINOR_VERSION
|
\ CMAKE_MINOR_VERSION
|
||||||
@@ -1223,6 +1284,9 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_RC_LINKER_WRAPPER_FLAG
|
\ CMAKE_RC_LINKER_WRAPPER_FLAG
|
||||||
\ CMAKE_RC_LINKER_WRAPPER_FLAG_SEP
|
\ CMAKE_RC_LINKER_WRAPPER_FLAG_SEP
|
||||||
\ CMAKE_RC_LINK_EXECUTABLE
|
\ 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_OUTPUT_EXTENSION
|
||||||
\ CMAKE_RC_PLATFORM_ID
|
\ CMAKE_RC_PLATFORM_ID
|
||||||
\ CMAKE_RC_SIMULATE_ID
|
\ CMAKE_RC_SIMULATE_ID
|
||||||
@@ -1322,7 +1386,11 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_Swift_LINKER_WRAPPER_FLAG
|
\ CMAKE_Swift_LINKER_WRAPPER_FLAG
|
||||||
\ CMAKE_Swift_LINKER_WRAPPER_FLAG_SEP
|
\ CMAKE_Swift_LINKER_WRAPPER_FLAG_SEP
|
||||||
\ CMAKE_Swift_LINK_EXECUTABLE
|
\ 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_MODULE_DIRECTORY
|
||||||
|
\ CMAKE_Swift_NUM_THREADS
|
||||||
\ CMAKE_Swift_OUTPUT_EXTENSION
|
\ CMAKE_Swift_OUTPUT_EXTENSION
|
||||||
\ CMAKE_Swift_PLATFORM_ID
|
\ CMAKE_Swift_PLATFORM_ID
|
||||||
\ CMAKE_Swift_SIMULATE_ID
|
\ CMAKE_Swift_SIMULATE_ID
|
||||||
@@ -1337,6 +1405,8 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
|
\ CMAKE_TRY_COMPILE_PLATFORM_VARIABLES
|
||||||
\ CMAKE_TRY_COMPILE_TARGET_TYPE
|
\ CMAKE_TRY_COMPILE_TARGET_TYPE
|
||||||
\ CMAKE_TWEAK_VERSION
|
\ CMAKE_TWEAK_VERSION
|
||||||
|
\ CMAKE_UNITY_BUILD
|
||||||
|
\ CMAKE_UNITY_BUILD_BATCH_SIZE
|
||||||
\ CMAKE_USER_MAKE_RULES_OVERRIDE
|
\ CMAKE_USER_MAKE_RULES_OVERRIDE
|
||||||
\ CMAKE_USER_MAKE_RULES_OVERRIDE_ASM
|
\ CMAKE_USER_MAKE_RULES_OVERRIDE_ASM
|
||||||
\ CMAKE_USER_MAKE_RULES_OVERRIDE_ASM_MASM
|
\ CMAKE_USER_MAKE_RULES_OVERRIDE_ASM_MASM
|
||||||
@@ -1365,6 +1435,7 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_VS_PLATFORM_NAME_DEFAULT
|
\ CMAKE_VS_PLATFORM_NAME_DEFAULT
|
||||||
\ CMAKE_VS_PLATFORM_TOOLSET
|
\ CMAKE_VS_PLATFORM_TOOLSET
|
||||||
\ CMAKE_VS_PLATFORM_TOOLSET_CUDA
|
\ CMAKE_VS_PLATFORM_TOOLSET_CUDA
|
||||||
|
\ CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR
|
||||||
\ CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE
|
\ CMAKE_VS_PLATFORM_TOOLSET_HOST_ARCHITECTURE
|
||||||
\ CMAKE_VS_PLATFORM_TOOLSET_VERSION
|
\ CMAKE_VS_PLATFORM_TOOLSET_VERSION
|
||||||
\ CMAKE_VS_SDK_EXCLUDE_DIRECTORIES
|
\ CMAKE_VS_SDK_EXCLUDE_DIRECTORIES
|
||||||
@@ -1385,9 +1456,11 @@ syn keyword cmakeVariable contained
|
|||||||
\ CMAKE_XCODE_PLATFORM_TOOLSET
|
\ CMAKE_XCODE_PLATFORM_TOOLSET
|
||||||
\ CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER
|
\ CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER
|
||||||
\ CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
|
\ CMAKE_XCODE_SCHEME_ADDRESS_SANITIZER_USE_AFTER_RETURN
|
||||||
|
\ CMAKE_XCODE_SCHEME_DEBUG_DOCUMENT_VERSIONING
|
||||||
\ CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
|
\ CMAKE_XCODE_SCHEME_DISABLE_MAIN_THREAD_CHECKER
|
||||||
\ CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
|
\ CMAKE_XCODE_SCHEME_DYNAMIC_LIBRARY_LOADS
|
||||||
\ CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
|
\ CMAKE_XCODE_SCHEME_DYNAMIC_LINKER_API_USAGE
|
||||||
|
\ CMAKE_XCODE_SCHEME_ENVIRONMENT
|
||||||
\ CMAKE_XCODE_SCHEME_GUARD_MALLOC
|
\ CMAKE_XCODE_SCHEME_GUARD_MALLOC
|
||||||
\ CMAKE_XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP
|
\ CMAKE_XCODE_SCHEME_MAIN_THREAD_CHECKER_STOP
|
||||||
\ CMAKE_XCODE_SCHEME_MALLOC_GUARD_EDGES
|
\ CMAKE_XCODE_SCHEME_MALLOC_GUARD_EDGES
|
||||||
@@ -1403,7 +1476,6 @@ syn keyword cmakeVariable contained
|
|||||||
\ CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
|
\ CPACK_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION
|
||||||
\ CPACK_INCLUDE_TOPLEVEL_DIRECTORY
|
\ CPACK_INCLUDE_TOPLEVEL_DIRECTORY
|
||||||
\ CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
|
\ CPACK_INSTALL_DEFAULT_DIRECTORY_PERMISSIONS
|
||||||
\ CPACK_INSTALL_SCRIPT
|
|
||||||
\ CPACK_PACKAGING_INSTALL_PREFIX
|
\ CPACK_PACKAGING_INSTALL_PREFIX
|
||||||
\ CPACK_SET_DESTDIR
|
\ CPACK_SET_DESTDIR
|
||||||
\ CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
|
\ CPACK_WARN_ON_ABSOLUTE_INSTALL_DESTINATION
|
||||||
@@ -1480,6 +1552,283 @@ syn keyword cmakeVariable contained
|
|||||||
\ CTEST_UPDATE_VERSION_OVERRIDE
|
\ CTEST_UPDATE_VERSION_OVERRIDE
|
||||||
\ CTEST_USE_LAUNCHERS
|
\ CTEST_USE_LAUNCHERS
|
||||||
\ CYGWIN
|
\ 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
|
\ ENV
|
||||||
\ EXECUTABLE_OUTPUT_PATH
|
\ EXECUTABLE_OUTPUT_PATH
|
||||||
\ GHS-MULTI
|
\ GHS-MULTI
|
||||||
@@ -1658,6 +2007,7 @@ syn keyword cmakeKWadd_custom_command contained
|
|||||||
\ MAIN_DEPENDENCY
|
\ MAIN_DEPENDENCY
|
||||||
\ NOT
|
\ NOT
|
||||||
\ OUTPUT
|
\ OUTPUT
|
||||||
|
\ PATH
|
||||||
\ POST_BUILD
|
\ POST_BUILD
|
||||||
\ PRE_BUILD
|
\ PRE_BUILD
|
||||||
\ PRE_LINK
|
\ PRE_LINK
|
||||||
@@ -1682,7 +2032,9 @@ syn keyword cmakeKWadd_custom_target contained
|
|||||||
\ JOB_POOL
|
\ JOB_POOL
|
||||||
\ JOB_POOLS
|
\ JOB_POOLS
|
||||||
\ JOIN
|
\ JOIN
|
||||||
|
\ PATH
|
||||||
\ SOURCES
|
\ SOURCES
|
||||||
|
\ TARGET_FILE
|
||||||
\ TARGET_PROPERTY
|
\ TARGET_PROPERTY
|
||||||
\ USES_TERMINAL
|
\ USES_TERMINAL
|
||||||
\ VERBATIM
|
\ VERBATIM
|
||||||
@@ -1762,11 +2114,13 @@ syn keyword cmakeKWadd_subdirectory contained
|
|||||||
syn keyword cmakeKWadd_test contained
|
syn keyword cmakeKWadd_test contained
|
||||||
\ BUILD_TESTING
|
\ BUILD_TESTING
|
||||||
\ COMMAND
|
\ COMMAND
|
||||||
|
\ COMMAND_EXPAND_LISTS
|
||||||
\ CONFIGURATIONS
|
\ CONFIGURATIONS
|
||||||
\ FAIL_REGULAR_EXPRESSION
|
\ FAIL_REGULAR_EXPRESSION
|
||||||
\ NAME
|
\ NAME
|
||||||
\ OFF
|
\ OFF
|
||||||
\ PASS_REGULAR_EXPRESSION
|
\ PASS_REGULAR_EXPRESSION
|
||||||
|
\ SKIP_REGULAR_EXPRESSION
|
||||||
\ TARGET_FILE
|
\ TARGET_FILE
|
||||||
\ WILL_FAIL
|
\ WILL_FAIL
|
||||||
\ WORKING_DIRECTORY
|
\ WORKING_DIRECTORY
|
||||||
@@ -1921,6 +2275,7 @@ syn keyword cmakeKWctest_run_script contained
|
|||||||
|
|
||||||
syn keyword cmakeKWctest_start contained
|
syn keyword cmakeKWctest_start contained
|
||||||
\ APPEND
|
\ APPEND
|
||||||
|
\ GROUP
|
||||||
\ QUIET
|
\ QUIET
|
||||||
\ TAG
|
\ TAG
|
||||||
\ TRACK
|
\ TRACK
|
||||||
@@ -1952,6 +2307,7 @@ syn keyword cmakeKWctest_test contained
|
|||||||
\ EXCLUDE_FIXTURE_CLEANUP
|
\ EXCLUDE_FIXTURE_CLEANUP
|
||||||
\ EXCLUDE_FIXTURE_SETUP
|
\ EXCLUDE_FIXTURE_SETUP
|
||||||
\ EXCLUDE_LABEL
|
\ EXCLUDE_LABEL
|
||||||
|
\ HARDWARE_SPEC_FILE
|
||||||
\ INCLUDE
|
\ INCLUDE
|
||||||
\ INCLUDE_LABEL
|
\ INCLUDE_LABEL
|
||||||
\ OFF
|
\ OFF
|
||||||
@@ -1991,9 +2347,17 @@ syn keyword cmakeKWdefine_property contained
|
|||||||
\ TEST
|
\ TEST
|
||||||
\ VARIABLE
|
\ VARIABLE
|
||||||
|
|
||||||
|
syn keyword cmakeKWdoxygen_add_docs contained
|
||||||
|
\ ALL
|
||||||
|
\ COMMENT
|
||||||
|
\ USE_STAMP_FILE
|
||||||
|
\ WORKING_DIRECTORY
|
||||||
|
|
||||||
syn keyword cmakeKWenable_language contained
|
syn keyword cmakeKWenable_language contained
|
||||||
\ ASM
|
\ ASM
|
||||||
\ CUDA
|
\ CUDA
|
||||||
|
\ OBJC
|
||||||
|
\ OBJCXX
|
||||||
\ OPTIONAL
|
\ OPTIONAL
|
||||||
|
|
||||||
syn keyword cmakeKWenable_testing contained
|
syn keyword cmakeKWenable_testing contained
|
||||||
@@ -2057,20 +2421,30 @@ syn keyword cmakeKWfile contained
|
|||||||
\ ALGO
|
\ ALGO
|
||||||
\ APPEND
|
\ APPEND
|
||||||
\ ASCII
|
\ 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_CAINFO
|
||||||
\ CMAKE_TLS_VERIFY
|
\ CMAKE_TLS_VERIFY
|
||||||
|
\ CODE
|
||||||
\ CONDITION
|
\ CONDITION
|
||||||
\ CONFIG
|
\ CONFIG
|
||||||
\ CONFIGURE_DEPENDS
|
\ CONFIGURE_DEPENDS
|
||||||
|
\ CONFLICTING_DEPENDENCIES_PREFIX
|
||||||
|
\ CONFLICTING_DEPENDENICES_PREFIX
|
||||||
\ CONTENT
|
\ CONTENT
|
||||||
\ COPY
|
\ COPY
|
||||||
\ COPY_ON_ERROR
|
\ COPY_ON_ERROR
|
||||||
\ CREATE_LINK
|
\ CREATE_LINK
|
||||||
\ DESTINATION
|
\ DESTINATION
|
||||||
|
\ DIRECTORIES
|
||||||
\ DIRECTORY_PERMISSIONS
|
\ DIRECTORY_PERMISSIONS
|
||||||
|
\ DLL
|
||||||
\ DOWNLOAD
|
\ DOWNLOAD
|
||||||
\ ENCODING
|
\ ENCODING
|
||||||
\ EXCLUDE
|
\ EXECUTABLES
|
||||||
\ EXPECTED_HASH
|
\ EXPECTED_HASH
|
||||||
\ FILES_MATCHING
|
\ FILES_MATCHING
|
||||||
\ FILE_PERMISSIONS
|
\ FILE_PERMISSIONS
|
||||||
@@ -2078,6 +2452,7 @@ syn keyword cmakeKWfile contained
|
|||||||
\ FOLLOW_SYMLINK_CHAIN
|
\ FOLLOW_SYMLINK_CHAIN
|
||||||
\ FUNCTION
|
\ FUNCTION
|
||||||
\ GENERATE
|
\ GENERATE
|
||||||
|
\ GET_RUNTIME_DEPENDENCIES
|
||||||
\ GLOB
|
\ GLOB
|
||||||
\ GLOB_RECURSE
|
\ GLOB_RECURSE
|
||||||
\ GUARD
|
\ GUARD
|
||||||
@@ -2091,6 +2466,7 @@ syn keyword cmakeKWfile contained
|
|||||||
\ LENGTH_MAXIMUM
|
\ LENGTH_MAXIMUM
|
||||||
\ LENGTH_MINIMUM
|
\ LENGTH_MINIMUM
|
||||||
\ LF
|
\ LF
|
||||||
|
\ LIBRARIES
|
||||||
\ LIMIT
|
\ LIMIT
|
||||||
\ LIMIT_COUNT
|
\ LIMIT_COUNT
|
||||||
\ LIMIT_INPUT
|
\ LIMIT_INPUT
|
||||||
@@ -2099,6 +2475,8 @@ syn keyword cmakeKWfile contained
|
|||||||
\ LOCK
|
\ LOCK
|
||||||
\ LOG
|
\ LOG
|
||||||
\ MAKE_DIRECTORY
|
\ MAKE_DIRECTORY
|
||||||
|
\ MODULES
|
||||||
|
\ MYLIBRARY
|
||||||
\ NETRC
|
\ NETRC
|
||||||
\ NETRC_FILE
|
\ NETRC_FILE
|
||||||
\ NEWLINE_CONSUME
|
\ NEWLINE_CONSUME
|
||||||
@@ -2110,6 +2488,10 @@ syn keyword cmakeKWfile contained
|
|||||||
\ OPTIONAL
|
\ OPTIONAL
|
||||||
\ OUTPUT
|
\ OUTPUT
|
||||||
\ PATTERN
|
\ PATTERN
|
||||||
|
\ POST_EXCLUDE_REGEXES
|
||||||
|
\ POST_INCLUDE_REGEXES
|
||||||
|
\ PRE_EXCLUDE_REGEXES
|
||||||
|
\ PRE_INCLUDE_REGEXES
|
||||||
\ PROCESS
|
\ PROCESS
|
||||||
\ READ
|
\ READ
|
||||||
\ READ_SYMLINK
|
\ READ_SYMLINK
|
||||||
@@ -2120,11 +2502,17 @@ syn keyword cmakeKWfile contained
|
|||||||
\ REMOVE_RECURSE
|
\ REMOVE_RECURSE
|
||||||
\ RENAME
|
\ RENAME
|
||||||
\ REQUIRED
|
\ REQUIRED
|
||||||
|
\ RESOLVED_DEPENDENCIES_VAR
|
||||||
\ RESULT
|
\ RESULT
|
||||||
\ RESULT_VARIABLE
|
\ RESULT_VARIABLE
|
||||||
|
\ RPATH
|
||||||
|
\ RUNPATH
|
||||||
|
\ SCRIPT
|
||||||
|
\ SHARED
|
||||||
\ SHOW_PROGRESS
|
\ SHOW_PROGRESS
|
||||||
\ SIZE
|
\ SIZE
|
||||||
\ SSL
|
\ SSL
|
||||||
|
\ STATIC
|
||||||
\ STATUS
|
\ STATUS
|
||||||
\ STRINGS
|
\ STRINGS
|
||||||
\ SYMBOLIC
|
\ SYMBOLIC
|
||||||
@@ -2135,6 +2523,7 @@ syn keyword cmakeKWfile contained
|
|||||||
\ TOUCH_NOCREATE
|
\ TOUCH_NOCREATE
|
||||||
\ TO_CMAKE_PATH
|
\ TO_CMAKE_PATH
|
||||||
\ TO_NATIVE_PATH
|
\ TO_NATIVE_PATH
|
||||||
|
\ UNRESOLVED_DEPENDENCIES_VAR
|
||||||
\ UPLOAD
|
\ UPLOAD
|
||||||
\ URL
|
\ URL
|
||||||
\ USERPWD
|
\ USERPWD
|
||||||
@@ -2142,11 +2531,13 @@ syn keyword cmakeKWfile contained
|
|||||||
\ UTC
|
\ UTC
|
||||||
\ UTF
|
\ UTF
|
||||||
\ WRITE
|
\ WRITE
|
||||||
|
\ _FILENAMES
|
||||||
|
|
||||||
syn keyword cmakeKWfind_file contained
|
syn keyword cmakeKWfind_file contained
|
||||||
\ CMAKE_FIND_ROOT_PATH_BOTH
|
\ CMAKE_FIND_ROOT_PATH_BOTH
|
||||||
\ DOC
|
\ DOC
|
||||||
\ DVAR
|
\ DVAR
|
||||||
|
\ FALSE
|
||||||
\ HINTS
|
\ HINTS
|
||||||
\ INCLUDE
|
\ INCLUDE
|
||||||
\ NAMES
|
\ NAMES
|
||||||
@@ -2166,8 +2557,9 @@ syn keyword cmakeKWfind_library contained
|
|||||||
\ CMAKE_FIND_ROOT_PATH_BOTH
|
\ CMAKE_FIND_ROOT_PATH_BOTH
|
||||||
\ DOC
|
\ DOC
|
||||||
\ DVAR
|
\ DVAR
|
||||||
|
\ FALSE
|
||||||
\ HINTS
|
\ HINTS
|
||||||
\ LIB
|
\ INCLUDE
|
||||||
\ NAMES
|
\ NAMES
|
||||||
\ NAMES_PER_DIR
|
\ NAMES_PER_DIR
|
||||||
\ NO_CMAKE_ENVIRONMENT_PATH
|
\ NO_CMAKE_ENVIRONMENT_PATH
|
||||||
@@ -2193,6 +2585,7 @@ syn keyword cmakeKWfind_package contained
|
|||||||
\ DEC
|
\ DEC
|
||||||
\ DVAR
|
\ DVAR
|
||||||
\ EXACT
|
\ EXACT
|
||||||
|
\ FALSE
|
||||||
\ FRAMEWORK
|
\ FRAMEWORK
|
||||||
\ HINTS
|
\ HINTS
|
||||||
\ MODULE
|
\ MODULE
|
||||||
@@ -2244,6 +2637,7 @@ syn keyword cmakeKWfind_path contained
|
|||||||
\ CMAKE_FIND_ROOT_PATH_BOTH
|
\ CMAKE_FIND_ROOT_PATH_BOTH
|
||||||
\ DOC
|
\ DOC
|
||||||
\ DVAR
|
\ DVAR
|
||||||
|
\ FALSE
|
||||||
\ HINTS
|
\ HINTS
|
||||||
\ INCLUDE
|
\ INCLUDE
|
||||||
\ NAMES
|
\ NAMES
|
||||||
@@ -2263,6 +2657,7 @@ syn keyword cmakeKWfind_program contained
|
|||||||
\ CMAKE_FIND_ROOT_PATH_BOTH
|
\ CMAKE_FIND_ROOT_PATH_BOTH
|
||||||
\ DOC
|
\ DOC
|
||||||
\ DVAR
|
\ DVAR
|
||||||
|
\ FALSE
|
||||||
\ HINTS
|
\ HINTS
|
||||||
\ NAMES
|
\ NAMES
|
||||||
\ NAMES_PER_DIR
|
\ NAMES_PER_DIR
|
||||||
@@ -2413,6 +2808,7 @@ syn keyword cmakeKWinclude_guard contained
|
|||||||
|
|
||||||
syn keyword cmakeKWinstall contained
|
syn keyword cmakeKWinstall contained
|
||||||
\ AFTER
|
\ AFTER
|
||||||
|
\ AIX
|
||||||
\ APT
|
\ APT
|
||||||
\ ARCHIVE
|
\ ARCHIVE
|
||||||
\ BEFORE
|
\ BEFORE
|
||||||
@@ -2446,6 +2842,7 @@ syn keyword cmakeKWinstall contained
|
|||||||
\ DIRECTORY_PERMISSIONS
|
\ DIRECTORY_PERMISSIONS
|
||||||
\ DLL
|
\ DLL
|
||||||
\ DOC
|
\ DOC
|
||||||
|
\ ENABLE_EXPORTS
|
||||||
\ EXCLUDE_FROM_ALL
|
\ EXCLUDE_FROM_ALL
|
||||||
\ EXPORT
|
\ EXPORT
|
||||||
\ EXPORT_ANDROID_MK
|
\ EXPORT_ANDROID_MK
|
||||||
@@ -2627,12 +3024,14 @@ syn keyword cmakeKWproject contained
|
|||||||
\ LANGUAGES
|
\ LANGUAGES
|
||||||
\ NAME
|
\ NAME
|
||||||
\ NONE
|
\ NONE
|
||||||
|
\ OBJC
|
||||||
|
\ OBJCXX
|
||||||
\ PROJECT
|
\ PROJECT
|
||||||
\ VERSION
|
\ VERSION
|
||||||
\ _BINARY_DIR
|
\ _BINARY_DIR
|
||||||
\ _DESCRIPTION
|
\ _DESCRIPTION
|
||||||
\ _HOMEPAGE_URL
|
\ _HOMEPAGE_URL
|
||||||
\ _INCLUDE
|
\ _INCLUDE_BEFORE
|
||||||
\ _SOURCE_DIR
|
\ _SOURCE_DIR
|
||||||
\ _VERSION
|
\ _VERSION
|
||||||
\ _VERSION_MAJOR
|
\ _VERSION_MAJOR
|
||||||
@@ -2855,6 +3254,22 @@ syn keyword cmakeKWtarget_link_options contained
|
|||||||
\ _LINKER_WRAPPER_FLAG
|
\ _LINKER_WRAPPER_FLAG
|
||||||
\ _LINKER_WRAPPER_FLAG_SEP
|
\ _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
|
syn keyword cmakeKWtarget_sources contained
|
||||||
\ ALIAS
|
\ ALIAS
|
||||||
\ IMPORTED
|
\ IMPORTED
|
||||||
@@ -3007,6 +3422,10 @@ syn keyword cmakeGeneratorExpressions contained
|
|||||||
\ MAP_IMPORTED_CONFIG_
|
\ MAP_IMPORTED_CONFIG_
|
||||||
\ NO
|
\ NO
|
||||||
\ NOT
|
\ NOT
|
||||||
|
\ OBJCXX_COMPILER_ID
|
||||||
|
\ OBJCXX_COMPILER_VERSION
|
||||||
|
\ OBJC_COMPILER_ID
|
||||||
|
\ OBJC_COMPILER_VERSION
|
||||||
\ OFF
|
\ OFF
|
||||||
\ OLD_COMPILER
|
\ OLD_COMPILER
|
||||||
\ OUTPUT_NAME
|
\ OUTPUT_NAME
|
||||||
@@ -3157,6 +3576,7 @@ syn keyword cmakeCommand
|
|||||||
\ target_link_directories
|
\ target_link_directories
|
||||||
\ target_link_libraries
|
\ target_link_libraries
|
||||||
\ target_link_options
|
\ target_link_options
|
||||||
|
\ target_precompile_headers
|
||||||
\ target_sources
|
\ target_sources
|
||||||
\ try_compile
|
\ try_compile
|
||||||
\ try_run
|
\ try_run
|
||||||
@@ -3252,6 +3672,7 @@ hi def link cmakeKWctest_test ModeMsg
|
|||||||
hi def link cmakeKWctest_update ModeMsg
|
hi def link cmakeKWctest_update ModeMsg
|
||||||
hi def link cmakeKWctest_upload ModeMsg
|
hi def link cmakeKWctest_upload ModeMsg
|
||||||
hi def link cmakeKWdefine_property ModeMsg
|
hi def link cmakeKWdefine_property ModeMsg
|
||||||
|
hi def link cmakeKWdoxygen_add_docs ModeMsg
|
||||||
hi def link cmakeKWenable_language ModeMsg
|
hi def link cmakeKWenable_language ModeMsg
|
||||||
hi def link cmakeKWenable_testing ModeMsg
|
hi def link cmakeKWenable_testing ModeMsg
|
||||||
hi def link cmakeKWexec_program 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_directories ModeMsg
|
||||||
hi def link cmakeKWtarget_link_libraries ModeMsg
|
hi def link cmakeKWtarget_link_libraries ModeMsg
|
||||||
hi def link cmakeKWtarget_link_options ModeMsg
|
hi def link cmakeKWtarget_link_options ModeMsg
|
||||||
|
hi def link cmakeKWtarget_precompile_headers ModeMsg
|
||||||
hi def link cmakeKWtarget_sources ModeMsg
|
hi def link cmakeKWtarget_sources ModeMsg
|
||||||
hi def link cmakeKWtry_compile ModeMsg
|
hi def link cmakeKWtry_compile ModeMsg
|
||||||
hi def link cmakeKWtry_run ModeMsg
|
hi def link cmakeKWtry_run ModeMsg
|
||||||
|
|||||||
@@ -9,10 +9,12 @@ command -nargs=+ HiLink hi def link <args>
|
|||||||
|
|
||||||
"Dollar sign is permitted anywhere in an identifier
|
"Dollar sign is permitted anywhere in an identifier
|
||||||
setlocal iskeyword-=$
|
setlocal iskeyword-=$
|
||||||
if main_syntax == 'typescript' || main_syntax == 'typescript.tsx'
|
if main_syntax == 'typescript' || main_syntax == 'typescriptreact'
|
||||||
setlocal iskeyword+=$
|
setlocal iskeyword+=$
|
||||||
" syntax cluster htmlJavaScript contains=TOP
|
" syntax cluster htmlJavaScript contains=TOP
|
||||||
endif
|
endif
|
||||||
|
" For private field added from TypeScript 3.8
|
||||||
|
setlocal iskeyword+=#
|
||||||
|
|
||||||
" lowest priority on least used feature
|
" lowest priority on least used feature
|
||||||
syntax match typescriptLabel /[a-zA-Z_$]\k*:/he=e-1 contains=typescriptReserved nextgroup=@typescriptStatement skipwhite skipempty
|
syntax match typescriptLabel /[a-zA-Z_$]\k*:/he=e-1 contains=typescriptReserved nextgroup=@typescriptStatement skipwhite skipempty
|
||||||
@@ -101,8 +103,10 @@ if exists("did_typescript_hilink")
|
|||||||
HiLink typescriptLabel Label
|
HiLink typescriptLabel Label
|
||||||
HiLink typescriptStringProperty String
|
HiLink typescriptStringProperty String
|
||||||
HiLink typescriptImport Special
|
HiLink typescriptImport Special
|
||||||
|
HiLink typescriptImportType Special
|
||||||
HiLink typescriptAmbientDeclaration Special
|
HiLink typescriptAmbientDeclaration Special
|
||||||
HiLink typescriptExport Special
|
HiLink typescriptExport Special
|
||||||
|
HiLink typescriptExportType Special
|
||||||
HiLink typescriptModule Special
|
HiLink typescriptModule Special
|
||||||
HiLink typescriptTry Special
|
HiLink typescriptTry Special
|
||||||
HiLink typescriptExceptions Special
|
HiLink typescriptExceptions Special
|
||||||
@@ -111,6 +115,7 @@ if exists("did_typescript_hilink")
|
|||||||
HiLink typescriptMethodAccessor Operator
|
HiLink typescriptMethodAccessor Operator
|
||||||
|
|
||||||
HiLink typescriptAsyncFuncKeyword Keyword
|
HiLink typescriptAsyncFuncKeyword Keyword
|
||||||
|
HiLink typescriptObjectAsyncKeyword Keyword
|
||||||
HiLink typescriptAsyncFor Keyword
|
HiLink typescriptAsyncFor Keyword
|
||||||
HiLink typescriptFuncKeyword Keyword
|
HiLink typescriptFuncKeyword Keyword
|
||||||
HiLink typescriptAsyncFunc Keyword
|
HiLink typescriptAsyncFunc Keyword
|
||||||
@@ -155,6 +160,7 @@ if exists("did_typescript_hilink")
|
|||||||
HiLink typescriptTypeReference Identifier
|
HiLink typescriptTypeReference Identifier
|
||||||
HiLink typescriptConstructor Keyword
|
HiLink typescriptConstructor Keyword
|
||||||
HiLink typescriptDecorator Special
|
HiLink typescriptDecorator Special
|
||||||
|
HiLink typescriptAssertType Keyword
|
||||||
|
|
||||||
highlight link typeScript NONE
|
highlight link typeScript NONE
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c/c++') == -1
|
|||||||
" Language: C++
|
" Language: C++
|
||||||
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp)
|
||||||
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
" Previous Maintainer: Ken Shan <ccshan@post.harvard.edu>
|
||||||
|
" Last Change: 2017 Jun 05
|
||||||
|
|
||||||
" quit when a syntax file was already loaded
|
" quit when a syntax file was already loaded
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
@@ -43,6 +44,8 @@ if !exists("cpp_no_cpp11")
|
|||||||
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
|
syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE
|
||||||
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
|
syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE
|
||||||
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
|
syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell
|
||||||
|
syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*<"me=e-1
|
||||||
|
syn match cppCast "\<\(const\|static\|dynamic\)_pointer_cast\s*$"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" C++ 14 extensions
|
" C++ 14 extensions
|
||||||
@@ -54,6 +57,21 @@ if !exists("cpp_no_cpp14")
|
|||||||
syn case match
|
syn case match
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" C++ 17 extensions
|
||||||
|
if !exists("cpp_no_cpp17")
|
||||||
|
syn match cppCast "\<reinterpret_pointer_cast\s*<"me=e-1
|
||||||
|
syn match cppCast "\<reinterpret_pointer_cast\s*$"
|
||||||
|
endif
|
||||||
|
|
||||||
|
" C++ 20 extensions
|
||||||
|
if !exists("cpp_no_cpp20")
|
||||||
|
syn keyword cppStatement co_await co_return co_yield requires
|
||||||
|
syn keyword cppStorageClass consteval constinit
|
||||||
|
syn keyword cppStructure concept
|
||||||
|
syn keyword cppType char8_t
|
||||||
|
syn keyword cppModule import module export
|
||||||
|
endif
|
||||||
|
|
||||||
" The minimum and maximum operators in GNU C++
|
" The minimum and maximum operators in GNU C++
|
||||||
syn match cppMinMax "[<>]?"
|
syn match cppMinMax "[<>]?"
|
||||||
|
|
||||||
@@ -72,6 +90,7 @@ hi def link cppConstant Constant
|
|||||||
hi def link cppRawStringDelimiter Delimiter
|
hi def link cppRawStringDelimiter Delimiter
|
||||||
hi def link cppRawString String
|
hi def link cppRawString String
|
||||||
hi def link cppNumber Number
|
hi def link cppNumber Number
|
||||||
|
hi def link cppModule Include
|
||||||
|
|
||||||
let b:current_syntax = "cpp"
|
let b:current_syntax = "cpp"
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ syntax keyword dartConstant null
|
|||||||
syntax keyword dartTypedef this super class typedef enum mixin
|
syntax keyword dartTypedef this super class typedef enum mixin
|
||||||
syntax keyword dartOperator new is as in
|
syntax keyword dartOperator new is as in
|
||||||
syntax match dartOperator "+=\=\|-=\=\|*=\=\|/=\=\|%=\=\|\~/=\=\|<<=\=\|>>=\=\|[<>]=\=\|===\=\|\!==\=\|&=\=\|\^=\=\||=\=\|||\|&&\|\[\]=\=\|=>\|!\|\~\|?\|:"
|
syntax match dartOperator "+=\=\|-=\=\|*=\=\|/=\=\|%=\=\|\~/=\=\|<<=\=\|>>=\=\|[<>]=\=\|===\=\|\!==\=\|&=\=\|\^=\=\||=\=\|||\|&&\|\[\]=\=\|=>\|!\|\~\|?\|:"
|
||||||
syntax keyword dartType void var bool int double num dynamic
|
syntax keyword dartCoreType void var dynamic
|
||||||
syntax keyword dartStatement return
|
syntax keyword dartStatement return
|
||||||
syntax keyword dartStorageClass static abstract final const factory
|
syntax keyword dartStorageClass static abstract final const factory
|
||||||
syntax keyword dartExceptions throw rethrow try on catch finally
|
syntax keyword dartExceptions throw rethrow try on catch finally
|
||||||
@@ -54,24 +54,23 @@ syntax match dartMetadata "@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a
|
|||||||
syntax match dartNumber "\<\d\+\(\.\d\+\)\=\>"
|
syntax match dartNumber "\<\d\+\(\.\d\+\)\=\>"
|
||||||
|
|
||||||
" User Types
|
" User Types
|
||||||
if !exists('dart_highlight_types') || dart_highlight_types
|
syntax match dartUserType "\<_\?\u[[:alnum:]_\$]*\>"
|
||||||
syntax match dartTypeName "\<[A-Z]\w*\>\|\<_[A-Z]\w*\>"
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Core libraries
|
" Function highlighting
|
||||||
if !exists('dart_corelib_highlight') || dart_corelib_highlight
|
syntax match dartFunction "\zs\<\(_\?\l[[:alnum:]_\$]*\)\>*\s*\ze("
|
||||||
syntax keyword dartCoreClasses BidirectionalIterator Comparable DateTime
|
|
||||||
|
" SDK libraries
|
||||||
|
syntax keyword dartSdkClass BidirectionalIterator Comparable DateTime
|
||||||
\ Duration Expando Function Invocation Iterable Iterator List Map Match
|
\ Duration Expando Function Invocation Iterable Iterator List Map Match
|
||||||
\ Object Pattern RegExp RuneIterator Runes Set StackTrace Stopwatch String
|
\ Object Pattern RegExp RuneIterator Runes Set StackTrace Stopwatch String
|
||||||
\ StringBuffer StringSink Symbol Type
|
\ StringBuffer StringSink Symbol Type bool int double num
|
||||||
syntax keyword dartCoreTypedefs Comparator
|
syntax keyword dartSdkTypedef Comparator
|
||||||
syntax keyword dartCoreExceptions AbstractClassInstantiationError
|
syntax keyword dartSdkException AbstractClassInstantiationError
|
||||||
\ ArgumentError AssertionError CastError ConcurrentModificationError
|
\ ArgumentError AssertionError CastError ConcurrentModificationError
|
||||||
\ Error Exception FallThroughError FormatException
|
\ Error Exception FallThroughError FormatException
|
||||||
\ IntegerDivisionByZeroException NoSuchMethodError NullThrownError
|
\ IntegerDivisionByZeroException NoSuchMethodError NullThrownError
|
||||||
\ OutOfMemoryError RangeError RuntimeError StackOverflowError StateError
|
\ OutOfMemoryError RangeError RuntimeError StackOverflowError StateError
|
||||||
\ TypeError UnimplementedError UnsupportedError
|
\ TypeError UnimplementedError UnsupportedError
|
||||||
endif
|
|
||||||
|
|
||||||
" Comments
|
" Comments
|
||||||
syntax keyword dartTodo contained TODO FIXME XXX
|
syntax keyword dartTodo contained TODO FIXME XXX
|
||||||
@@ -119,21 +118,23 @@ highlight default link dartLineComment Comment
|
|||||||
highlight default link dartLineDocComment Comment
|
highlight default link dartLineDocComment Comment
|
||||||
highlight default link dartShebangLine Comment
|
highlight default link dartShebangLine Comment
|
||||||
highlight default link dartConstant Constant
|
highlight default link dartConstant Constant
|
||||||
highlight default link dartTypedef Typedef
|
|
||||||
highlight default link dartTodo Todo
|
highlight default link dartTodo Todo
|
||||||
highlight default link dartKeyword Keyword
|
highlight default link dartKeyword Keyword
|
||||||
highlight default link dartType Type
|
|
||||||
highlight default link dartTypeName Type
|
|
||||||
highlight default link dartInterpolation PreProc
|
highlight default link dartInterpolation PreProc
|
||||||
highlight default link dartDocLink SpecialComment
|
highlight default link dartDocLink SpecialComment
|
||||||
highlight default link dartSpecialChar SpecialChar
|
highlight default link dartSpecialChar SpecialChar
|
||||||
highlight default link dartLibrary Include
|
highlight default link dartLibrary Include
|
||||||
highlight default link dartUri String
|
highlight default link dartUri String
|
||||||
highlight default link dartCombinator Keyword
|
highlight default link dartCombinator Keyword
|
||||||
highlight default link dartCoreClasses Type
|
|
||||||
highlight default link dartCoreTypedefs Typedef
|
|
||||||
highlight default link dartCoreExceptions Exception
|
|
||||||
highlight default link dartMetadata PreProc
|
highlight default link dartMetadata PreProc
|
||||||
|
highlight default link dartSdkTypedef Typedef
|
||||||
|
highlight default link dartTypedef Typedef
|
||||||
|
highlight default link dartSdkException Exception
|
||||||
|
highlight default link dartSdkClass dartType
|
||||||
|
highlight default link dartCoreType dartType
|
||||||
|
highlight default link dartUserType dartType
|
||||||
|
highlight default link dartType Type
|
||||||
|
highlight default link dartFunction Function
|
||||||
|
|
||||||
let b:current_syntax = "dart"
|
let b:current_syntax = "dart"
|
||||||
let b:spell_options = "contained"
|
let b:spell_options = "contained"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ if exists('b:current_syntax')
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
syntax match dhallInterpolation "\v\$\{[^\}]*\}"
|
syntax match dhallInterpolation "\v\$\{([^\}]|\\n)*\}"
|
||||||
syntax keyword dhallTodo TODO FIXME
|
syntax keyword dhallTodo TODO FIXME
|
||||||
syntax match dhallBrackets "[<>|]"
|
syntax match dhallBrackets "[<>|]"
|
||||||
syntax match dhallOperator "+\|*\|#"
|
syntax match dhallOperator "+\|*\|#"
|
||||||
@@ -39,6 +39,7 @@ syntax region dhallString start=+''+ end=+''+ contains=@Spell,dhallInterpolation
|
|||||||
syntax region dhallString start=+"+ end=+"+ contains=dhallInterpolation,dhallEsc
|
syntax region dhallString start=+"+ end=+"+ contains=dhallInterpolation,dhallEsc
|
||||||
syntax region dhallString start=+"/+ end=+"+ contains=dhallInterpolation,dhallEsc
|
syntax region dhallString start=+"/+ end=+"+ contains=dhallInterpolation,dhallEsc
|
||||||
syntax keyword dhallBool True False
|
syntax keyword dhallBool True False
|
||||||
|
syntax match dhallHash "sha256:[a-f0-9]+"
|
||||||
|
|
||||||
highlight link dhallSingleSpecial Special
|
highlight link dhallSingleSpecial Special
|
||||||
highlight link dhallIndex Special
|
highlight link dhallIndex Special
|
||||||
@@ -60,6 +61,7 @@ highlight link dhallType Structure
|
|||||||
highlight link dhallParens Special
|
highlight link dhallParens Special
|
||||||
highlight link dhallComment Comment
|
highlight link dhallComment Comment
|
||||||
highlight link dhallMultilineComment Comment
|
highlight link dhallMultilineComment Comment
|
||||||
|
highlight link dhallHash Keyword
|
||||||
|
|
||||||
let b:current_syntax = 'dhall'
|
let b:current_syntax = 'dhall'
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ syn keyword elixirBoolean true false nil
|
|||||||
syn match elixirVariable '@[a-z]\w*'
|
syn match elixirVariable '@[a-z]\w*'
|
||||||
syn match elixirVariable '&\d\+'
|
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 '\<-\?\d\(_\?\d\)*\(\.[^[:space:][:digit:]]\@!\(_\?\d\)*\)\?\([eE][-+]\?\d\(_\?\d\)*\)\?\>'
|
||||||
syn match elixirNumber '\<-\?0[xX][0-9A-Fa-f]\+\>'
|
syn match elixirNumber '\<-\?0[xX][0-9A-Fa-f]\+\>'
|
||||||
|
|||||||
6
syntax/flow.vim
Normal file
6
syntax/flow.vim
Normal 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
|
||||||
@@ -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 /^\%(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 /^\%(tag\>\|ref:\)/ contained containedin=gitHead nextgroup=gitReference skipwhite
|
||||||
syn match gitKeyword /^Merge:/ contained containedin=gitHead nextgroup=gitHashAbbrev 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 gitIdentityKeyword /^\%(author\|committer\|tagger\)\>/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
|
||||||
syn match gitIdentityHeader /^\%(Author\|Commit\|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
|
syn match gitDateHeader /^\%(AuthorDate\|CommitDate\|Date\):/ contained containedin=gitHead nextgroup=gitDate skipwhite
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
|||||||
" Language: git commit file
|
" Language: git commit file
|
||||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||||
" Filenames: *.git/COMMIT_EDITMSG
|
" Filenames: *.git/COMMIT_EDITMSG
|
||||||
" Last Change: 2013 May 30
|
" Last Change: 2016 Aug 29
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
|||||||
" Language: git config file
|
" Language: git config file
|
||||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||||
" Filenames: gitconfig, .gitconfig, *.git/config
|
" Filenames: gitconfig, .gitconfig, *.git/config
|
||||||
" Last Change: 2010 May 21
|
" Last Change: 2019 Sep 27
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
@@ -13,7 +13,7 @@ endif
|
|||||||
syn case ignore
|
syn case ignore
|
||||||
syn sync minlines=10
|
syn sync minlines=10
|
||||||
|
|
||||||
syn match gitconfigComment "[#;].*"
|
syn match gitconfigComment "[#;].*" contains=@Spell
|
||||||
syn match gitconfigSection "\%(^\s*\)\@<=\[[a-z0-9.-]\+\]"
|
syn match gitconfigSection "\%(^\s*\)\@<=\[[a-z0-9.-]\+\]"
|
||||||
syn match gitconfigSection '\%(^\s*\)\@<=\[[a-z0-9.-]\+ \+\"\%([^\\"]\|\\.\)*"\]'
|
syn match gitconfigSection '\%(^\s*\)\@<=\[[a-z0-9.-]\+ \+\"\%([^\\"]\|\\.\)*"\]'
|
||||||
syn match gitconfigVariable "\%(^\s*\)\@<=\a[a-z0-9-]*\%(\s*\%([=#;]\|$\)\)\@=" nextgroup=gitconfigAssignment skipwhite
|
syn match gitconfigVariable "\%(^\s*\)\@<=\a[a-z0-9-]*\%(\s*\%([=#;]\|$\)\)\@=" nextgroup=gitconfigAssignment skipwhite
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
|||||||
" Language: git rebase --interactive
|
" Language: git rebase --interactive
|
||||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||||
" Filenames: git-rebase-todo
|
" Filenames: git-rebase-todo
|
||||||
" Last Change: 2013 May 30
|
" Last Change: 2016 Aug 29
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
@@ -12,36 +12,49 @@ endif
|
|||||||
|
|
||||||
syn case match
|
syn case match
|
||||||
|
|
||||||
syn match gitrebaseHash "\v<\x{7,40}>" contained
|
syn match gitrebaseHash "\v<\x{7,}>" contained
|
||||||
syn match gitrebaseCommit "\v<\x{7,40}>" nextgroup=gitrebaseSummary skipwhite
|
syn match gitrebaseCommit "\v<\x{7,}>" nextgroup=gitrebaseSummary skipwhite
|
||||||
syn match gitrebasePick "\v^p%(ick)=>" nextgroup=gitrebaseCommit skipwhite
|
syn match gitrebasePick "\v^p%(ick)=>" nextgroup=gitrebaseCommit skipwhite
|
||||||
syn match gitrebaseReword "\v^r%(eword)=>" nextgroup=gitrebaseCommit skipwhite
|
syn match gitrebaseReword "\v^r%(eword)=>" nextgroup=gitrebaseCommit skipwhite
|
||||||
syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite
|
syn match gitrebaseEdit "\v^e%(dit)=>" nextgroup=gitrebaseCommit skipwhite
|
||||||
syn match gitrebaseSquash "\v^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite
|
syn match gitrebaseSquash "\v^s%(quash)=>" nextgroup=gitrebaseCommit skipwhite
|
||||||
syn match gitrebaseFixup "\v^f%(ixup)=>" nextgroup=gitrebaseCommit skipwhite
|
syn match gitrebaseFixup "\v^f%(ixup)=>" nextgroup=gitrebaseCommit skipwhite
|
||||||
syn match gitrebaseExec "\v^%(x|exec)>" nextgroup=gitrebaseCommand skipwhite
|
syn match gitrebaseExec "\v^%(x|exec)>" nextgroup=gitrebaseCommand skipwhite
|
||||||
syn match gitrebaseBreak "\v^b%(reak)=>" nextgroup=gitrebaseCommit skipwhite
|
syn match gitrebaseBreak "\v^b%(reak)=>"
|
||||||
syn match gitrebaseDrop "\v^d%(rop)=>" nextgroup=gitrebaseCommit skipwhite
|
syn match gitrebaseDrop "\v^d%(rop)=>" nextgroup=gitrebaseCommit skipwhite
|
||||||
syn match gitrebaseNoop "\v^noop>"
|
syn match gitrebaseNoop "\v^noop>"
|
||||||
|
syn match gitrebaseMerge "\v^m(erge)=>" nextgroup=gitrebaseMergeOption,gitrebaseName skipwhite
|
||||||
|
syn match gitrebaseLabel "\v^l(abel)=>" nextgroup=gitrebaseName skipwhite
|
||||||
|
syn match gitrebaseReset "\v^r(eset)=>" nextgroup=gitrebaseName skipwhite
|
||||||
syn match gitrebaseSummary ".*" contains=gitrebaseHash contained
|
syn match gitrebaseSummary ".*" contains=gitrebaseHash contained
|
||||||
syn match gitrebaseCommand ".*" contained
|
syn match gitrebaseCommand ".*" contained
|
||||||
syn match gitrebaseComment "^\s*#.*" contains=gitrebaseHash
|
syn match gitrebaseComment "^\s*#.*" contains=gitrebaseHash
|
||||||
syn match gitrebaseSquashError "\v%^%(s%(quash)=>|f%(ixup)=>)" nextgroup=gitrebaseCommit skipwhite
|
syn match gitrebaseSquashError "\v%^%(s%(quash)=>|f%(ixup)=>)" nextgroup=gitrebaseCommit skipwhite
|
||||||
|
syn match gitrebaseMergeOption "\v-[Cc]>" nextgroup=gitrebaseMergeCommit skipwhite contained
|
||||||
|
syn match gitrebaseMergeCommit "\v<\x{7,}>" nextgroup=gitrebaseName skipwhite contained
|
||||||
|
syn match gitrebaseName "\v[^[:space:].*?i:^~/-]\S+" nextgroup=gitrebaseMergeComment skipwhite contained
|
||||||
|
syn match gitrebaseMergeComment "#" nextgroup=gitrebaseSummary skipwhite contained
|
||||||
|
|
||||||
hi def link gitrebaseCommit gitrebaseHash
|
hi def link gitrebaseCommit gitrebaseHash
|
||||||
hi def link gitrebaseHash Identifier
|
hi def link gitrebaseHash Identifier
|
||||||
hi def link gitrebasePick Statement
|
hi def link gitrebasePick Type
|
||||||
hi def link gitrebaseReword Number
|
hi def link gitrebaseReword Conditional
|
||||||
hi def link gitrebaseEdit PreProc
|
hi def link gitrebaseEdit PreProc
|
||||||
hi def link gitrebaseSquash Type
|
hi def link gitrebaseSquash Statement
|
||||||
hi def link gitrebaseFixup Special
|
hi def link gitrebaseFixup Repeat
|
||||||
hi def link gitrebaseExec Function
|
hi def link gitrebaseExec Operator
|
||||||
hi def link gitrebaseBreak Macro
|
hi def link gitrebaseBreak Macro
|
||||||
hi def link gitrebaseDrop Comment
|
hi def link gitrebaseDrop Comment
|
||||||
hi def link gitrebaseNoop Comment
|
hi def link gitrebaseNoop Comment
|
||||||
|
hi def link gitrebaseMerge Exception
|
||||||
|
hi def link gitrebaseLabel Label
|
||||||
|
hi def link gitrebaseReset Keyword
|
||||||
hi def link gitrebaseSummary String
|
hi def link gitrebaseSummary String
|
||||||
hi def link gitrebaseComment Comment
|
hi def link gitrebaseComment Comment
|
||||||
hi def link gitrebaseSquashError Error
|
hi def link gitrebaseSquashError Error
|
||||||
|
hi def link gitrebaseMergeCommit gitrebaseCommit
|
||||||
|
hi def link gitrebaseMergeComment gitrebaseComment
|
||||||
|
hi def link gitrebaseName Tag
|
||||||
|
|
||||||
let b:current_syntax = "gitrebase"
|
let b:current_syntax = "gitrebase"
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
|||||||
" Language: git send-email message
|
" Language: git send-email message
|
||||||
" Maintainer: Tim Pope
|
" Maintainer: Tim Pope
|
||||||
" Filenames: .gitsendemail.*
|
" Filenames: .gitsendemail.*
|
||||||
" Last Change: 2010 May 21
|
" Last Change: 2016 Aug 29
|
||||||
|
|
||||||
if exists("b:current_syntax")
|
if exists("b:current_syntax")
|
||||||
finish
|
finish
|
||||||
|
|||||||
@@ -164,15 +164,23 @@ endif
|
|||||||
syn match goSingleDecl /\%(import\|var\|const\) [^(]\@=/ contains=goImport,goVar,goConst
|
syn match goSingleDecl /\%(import\|var\|const\) [^(]\@=/ contains=goImport,goVar,goConst
|
||||||
|
|
||||||
" Integers
|
" Integers
|
||||||
syn match goDecimalInt "\<-\=\d\+\%([Ee][-+]\=\d\+\)\=\>"
|
syn match goDecimalInt "\<-\=\(0\|[1-9]_\?\(\d\|\d\+_\?\d\+\)*\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||||
syn match goHexadecimalInt "\<-\=0[xX]\x\+\>"
|
syn match goDecimalError "\<-\=\(_\(\d\+_*\)\+\|\([1-9]\d*_*\)\+__\(\d\+_*\)\+\|\([1-9]\d*_*\)\+_\+\)\%([Ee][-+]\=\d\+\)\=\>"
|
||||||
syn match goOctalInt "\<-\=0\o\+\>"
|
syn match goHexadecimalInt "\<-\=0[xX]_\?\(\x\+_\?\)\+\>"
|
||||||
syn match goOctalError "\<-\=0\o*[89]\d*\>"
|
syn match goHexadecimalError "\<-\=0[xX]_\?\(\x\+_\?\)*\(\([^ \t0-9A-Fa-f_]\|__\)\S*\|_\)\>"
|
||||||
|
syn match goOctalInt "\<-\=0[oO]\?_\?\(\o\+_\?\)\+\>"
|
||||||
|
syn match goOctalError "\<-\=0[0-7oO_]*\(\([^ \t0-7oOxX_/)\]\}\:]\|[oO]\{2,\}\|__\)\S*\|_\|[oOxX]\)\>"
|
||||||
|
syn match goBinaryInt "\<-\=0[bB]_\?\([01]\+_\?\)\+\>"
|
||||||
|
syn match goBinaryError "\<-\=0[bB]_\?[01_]*\([^ \t01_]\S*\|__\S*\|_\)\>"
|
||||||
|
|
||||||
hi def link goDecimalInt Integer
|
hi def link goDecimalInt Integer
|
||||||
|
hi def link goDecimalError Error
|
||||||
hi def link goHexadecimalInt Integer
|
hi def link goHexadecimalInt Integer
|
||||||
|
hi def link goHexadecimalError Error
|
||||||
hi def link goOctalInt Integer
|
hi def link goOctalInt Integer
|
||||||
hi def link goOctalError Error
|
hi def link goOctalError Error
|
||||||
|
hi def link goBinaryInt Integer
|
||||||
|
hi def link goBinaryError Error
|
||||||
hi def link Integer Number
|
hi def link Integer Number
|
||||||
|
|
||||||
" Floating point
|
" Floating point
|
||||||
@@ -384,6 +392,31 @@ hi def link goCoverageNormalText Comment
|
|||||||
|
|
||||||
function! s:hi()
|
function! s:hi()
|
||||||
hi def link goSameId Search
|
hi def link goSameId Search
|
||||||
|
hi def link goDiagnosticError SpellBad
|
||||||
|
hi def link goDiagnosticWarning SpellRare
|
||||||
|
|
||||||
|
" TODO(bc): is it appropriate to define text properties in a syntax file?
|
||||||
|
" The highlight groups need to be defined before the text properties types
|
||||||
|
" are added, and when users have syntax enabled in their vimrc after
|
||||||
|
" filetype plugin on, the highlight groups won't be defined when
|
||||||
|
" ftplugin/go.vim is executed when the first go file is opened.
|
||||||
|
" See https://github.com/fatih/vim-go/issues/2658.
|
||||||
|
if exists('*prop_type_add')
|
||||||
|
if empty(prop_type_get('goSameId'))
|
||||||
|
call prop_type_add('goSameId', {'highlight': 'goSameId'})
|
||||||
|
endif
|
||||||
|
if empty(prop_type_get('goDiagnosticError'))
|
||||||
|
call prop_type_add('goDiagnosticError', {'highlight': 'goDiagnosticError'})
|
||||||
|
endif
|
||||||
|
if empty(prop_type_get('goDiagnosticWarning'))
|
||||||
|
call prop_type_add('goDiagnosticWarning', {'highlight': 'goDiagnosticWarning'})
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
hi def link goDeclsFzfKeyword Keyword
|
||||||
|
hi def link goDeclsFzfFunction Function
|
||||||
|
hi def link goDeclsFzfSpecialComment SpecialComment
|
||||||
|
hi def link goDeclsFzfComment Comment
|
||||||
|
|
||||||
" :GoCoverage commands
|
" :GoCoverage commands
|
||||||
hi def goCoverageCovered ctermfg=green guifg=#A6E22E
|
hi def goCoverageCovered ctermfg=green guifg=#A6E22E
|
||||||
|
|||||||
@@ -1,6 +1,25 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||||
|
|
||||||
" Vim syntax file
|
" Copyright (c) 2016-2019 Jon Parise <jon@indelible.org>
|
||||||
|
"
|
||||||
|
" Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
" of this software and associated documentation files (the "Software"), to
|
||||||
|
" deal in the Software without restriction, including without limitation the
|
||||||
|
" rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
" sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
" furnished to do so, subject to the following conditions:
|
||||||
|
"
|
||||||
|
" The above copyright notice and this permission notice shall be included in
|
||||||
|
" all copies or substantial portions of the Software.
|
||||||
|
"
|
||||||
|
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
" AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
" IN THE SOFTWARE.
|
||||||
|
"
|
||||||
" Language: GraphQL
|
" Language: GraphQL
|
||||||
" Maintainer: Jon Parise <jon@indelible.org>
|
" Maintainer: Jon Parise <jon@indelible.org>
|
||||||
|
|
||||||
@@ -8,20 +27,23 @@ if exists('b:current_syntax')
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
syn case match
|
||||||
|
|
||||||
syn match graphqlComment "#.*$" contains=@Spell
|
syn match graphqlComment "#.*$" contains=@Spell
|
||||||
|
|
||||||
syn match graphqlOperator "=" display
|
syn match graphqlOperator "=" display
|
||||||
syn match graphqlOperator "!" display
|
syn match graphqlOperator "!" display
|
||||||
syn match graphqlOperator "|" display
|
syn match graphqlOperator "|" display
|
||||||
|
syn match graphqlOperator "&" display
|
||||||
syn match graphqlOperator "\M..." display
|
syn match graphqlOperator "\M..." display
|
||||||
|
|
||||||
syn keyword graphqlBoolean true false
|
syn keyword graphqlBoolean true false
|
||||||
syn keyword graphqlNull null
|
syn keyword graphqlNull null
|
||||||
syn match graphqlNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>" display
|
syn match graphqlNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>" display
|
||||||
syn region graphqlString start=+"+ skip=+\\\\\|\\"+ end=+"\|$+
|
syn region graphqlString start=+"+ skip=+\\\\\|\\"+ end=+"\|$+
|
||||||
syn region graphqlString start=+"""+ end=+"""+
|
syn region graphqlString start=+"""+ skip=+\\"""+ end=+"""+
|
||||||
|
|
||||||
syn keyword graphqlKeyword on nextgroup=graphqlType skipwhite
|
syn keyword graphqlKeyword on nextgroup=graphqlType,graphqlDirectiveLocation skipwhite
|
||||||
|
|
||||||
syn keyword graphqlStructure enum scalar type union nextgroup=graphqlType skipwhite
|
syn keyword graphqlStructure enum scalar type union nextgroup=graphqlType skipwhite
|
||||||
syn keyword graphqlStructure input interface subscription nextgroup=graphqlType skipwhite
|
syn keyword graphqlStructure input interface subscription nextgroup=graphqlType skipwhite
|
||||||
@@ -35,7 +57,16 @@ syn match graphqlDirective "\<@\h\w*\>" display
|
|||||||
syn match graphqlVariable "\<\$\h\w*\>" display
|
syn match graphqlVariable "\<\$\h\w*\>" display
|
||||||
syn match graphqlName "\<\h\w*\>" display
|
syn match graphqlName "\<\h\w*\>" display
|
||||||
syn match graphqlType "\<_*\u\w*\>" display
|
syn match graphqlType "\<_*\u\w*\>" display
|
||||||
syn match graphqlConstant "\<[A-Z_]\+\>" display
|
|
||||||
|
" https://graphql.github.io/graphql-spec/June2018/#ExecutableDirectiveLocation
|
||||||
|
syn keyword graphqlDirectiveLocation QUERY MUTATION SUBSCRIPTION FIELD
|
||||||
|
syn keyword graphqlDirectiveLocation FRAGMENT_DEFINITION FRAGMENT_SPREAD
|
||||||
|
syn keyword graphqlDirectiveLocation INLINE_FRAGMENT
|
||||||
|
" https://graphql.github.io/graphql-spec/June2018/#TypeSystemDirectiveLocation
|
||||||
|
syn keyword graphqlDirectiveLocation SCHEMA SCALAR OBJECT FIELD_DEFINITION
|
||||||
|
syn keyword graphqlDirectiveLocation ARGUMENT_DEFINITION INTERFACE UNION
|
||||||
|
syn keyword graphqlDirectiveLocation ENUM ENUM_VALUE INPUT_OBJECT
|
||||||
|
syn keyword graphqlDirectiveLocation INPUT_FIELD_DEFINITION
|
||||||
|
|
||||||
syn keyword graphqlMetaFields __schema __type __typename
|
syn keyword graphqlMetaFields __schema __type __typename
|
||||||
|
|
||||||
@@ -52,8 +83,8 @@ hi def link graphqlNull Keyword
|
|||||||
hi def link graphqlNumber Number
|
hi def link graphqlNumber Number
|
||||||
hi def link graphqlString String
|
hi def link graphqlString String
|
||||||
|
|
||||||
hi def link graphqlConstant Constant
|
|
||||||
hi def link graphqlDirective PreProc
|
hi def link graphqlDirective PreProc
|
||||||
|
hi def link graphqlDirectiveLocation Special
|
||||||
hi def link graphqlName Identifier
|
hi def link graphqlName Identifier
|
||||||
hi def link graphqlMetaFields Special
|
hi def link graphqlMetaFields Special
|
||||||
hi def link graphqlKeyword Keyword
|
hi def link graphqlKeyword Keyword
|
||||||
|
|||||||
@@ -81,10 +81,10 @@ hi def link gotplFunctions Function
|
|||||||
hi def link goSprigFunctions Function
|
hi def link goSprigFunctions Function
|
||||||
hi def link goTplVariable Special
|
hi def link goTplVariable Special
|
||||||
|
|
||||||
syn region gotplAction start="{{" end="}}" contains=@gotplLiteral,gotplControl,gotplFunctions,goSprigFunctions,gotplVariable,goTplIdentifier containedin=yamlFlowString display
|
syn region gotplAction start="{{\(-? \)\?" end="\( -?\)\?}}" contains=@gotplLiteral,gotplControl,gotplFunctions,goSprigFunctions,gotplVariable,goTplIdentifier containedin=yamlFlowString display
|
||||||
syn region gotplAction start="\[\[" end="\]\]" contains=@gotplLiteral,gotplControl,gotplFunctions,goSprigFunctions,gotplVariable containedin=yamlFlowString display
|
syn region gotplAction start="\[\[\(-? \)\?" end="\( -?\)\?\]\]" contains=@gotplLiteral,gotplControl,gotplFunctions,goSprigFunctions,gotplVariable containedin=yamlFlowString display
|
||||||
syn region goTplComment start="{{\(- \)\?/\*" end="\*/\( -\)\?}}" display
|
syn region goTplComment start="{{\(-? \)\?/\*" end="\*/\( -?\)\?}}" display
|
||||||
syn region goTplComment start="\[\[\(- \)\?/\*" end="\*/\( -\)\?\]\]" display
|
syn region goTplComment start="\[\[\(-? \)\?/\*" end="\*/\( -?\)\?\]\]" display
|
||||||
|
|
||||||
hi def link gotplAction PreProc
|
hi def link gotplAction PreProc
|
||||||
hi def link goTplComment Comment
|
hi def link goTplComment Comment
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ syn keyword htmlTagName contained article aside audio canvas command
|
|||||||
syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer
|
syn keyword htmlTagName contained datalist details dialog embed figcaption figure footer
|
||||||
syn keyword htmlTagName contained header hgroup keygen main mark meter menu menuitem nav output
|
syn keyword htmlTagName contained header hgroup keygen main mark meter menu menuitem nav output
|
||||||
syn keyword htmlTagName contained progress ruby rt rp rb rtc section source summary time track video data
|
syn keyword htmlTagName contained progress ruby rt rp rb rtc section source summary time track video data
|
||||||
syn keyword htmlTagName contained template content shadow
|
syn keyword htmlTagName contained template content shadow slot
|
||||||
syn keyword htmlTagName contained wbr bdi
|
syn keyword htmlTagName contained wbr bdi
|
||||||
syn keyword htmlTagName contained picture
|
syn keyword htmlTagName contained picture
|
||||||
|
|
||||||
|
|||||||
@@ -41,9 +41,9 @@ syn match i3ConfigFontNamespace /\w\+:/ contained contains=i3ConfigFontSeparator
|
|||||||
syn match i3ConfigFontContent /-\?\w\+\(-\+\|\s\+\|,\)/ contained contains=i3ConfigFontNamespace,i3ConfigFontSeparator,i3ConfigFontKeyword
|
syn match i3ConfigFontContent /-\?\w\+\(-\+\|\s\+\|,\)/ contained contains=i3ConfigFontNamespace,i3ConfigFontSeparator,i3ConfigFontKeyword
|
||||||
syn match i3ConfigFontSize /\s\=\d\+\(px\)\?\s\?$/ contained
|
syn match i3ConfigFontSize /\s\=\d\+\(px\)\?\s\?$/ contained
|
||||||
syn match i3ConfigFont /^\s*font\s\+.*$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
syn match i3ConfigFont /^\s*font\s\+.*$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||||
"syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||||
"syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?[^\\]\+$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?[^\\]\+$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||||
"syn match i3ConfigFont /^\s*font\s\+\(\(.*\\\_.*\)\|\(.*[^\\]\+$\)\)/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
syn match i3ConfigFont /^\s*font\s\+\(\(.*\\\_.*\)\|\(.*[^\\]\+$\)\)/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
|
||||||
|
|
||||||
" variables
|
" variables
|
||||||
syn match i3ConfigString /\(['"]\)\(.\{-}\)\1/ contained
|
syn match i3ConfigString /\(['"]\)\(.\{-}\)\1/ contained
|
||||||
@@ -55,8 +55,8 @@ syn keyword i3ConfigInitializeKeyword set contained
|
|||||||
syn match i3ConfigInitialize /^\s*set\s\+.*$/ contains=i3ConfigVariable,i3ConfigInitializeKeyword,i3ConfigColor,i3ConfigString
|
syn match i3ConfigInitialize /^\s*set\s\+.*$/ contains=i3ConfigVariable,i3ConfigInitializeKeyword,i3ConfigColor,i3ConfigString
|
||||||
|
|
||||||
" Gaps
|
" Gaps
|
||||||
syn keyword i3ConfigGapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle contained
|
syn keyword i3ConfigGapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle up down contained
|
||||||
syn match i3ConfigGapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(-\?\d\+\|\$.*\)\)$/ contains=i3ConfigGapStyleKeyword,number,i3ConfigVariable
|
syn match i3ConfigGapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(-\?\d\+\|\$.*\)\)$/ contains=i3ConfigGapStyleKeyword,i3ConfigNumber,i3ConfigVariable
|
||||||
syn keyword i3ConfigSmartGapKeyword on inverse_outer contained
|
syn keyword i3ConfigSmartGapKeyword on inverse_outer contained
|
||||||
syn match i3ConfigSmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\)\s\?$/ contains=i3ConfigSmartGapKeyword
|
syn match i3ConfigSmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\)\s\?$/ contains=i3ConfigSmartGapKeyword
|
||||||
syn keyword i3ConfigSmartBorderKeyword on no_gaps contained
|
syn keyword i3ConfigSmartBorderKeyword on no_gaps contained
|
||||||
@@ -64,19 +64,21 @@ syn match i3ConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\)\s\?$/ contai
|
|||||||
|
|
||||||
" Keyboard bindings
|
" Keyboard bindings
|
||||||
syn keyword i3ConfigAction toggle fullscreen restart key import kill shrink grow contained
|
syn keyword i3ConfigAction toggle fullscreen restart key import kill shrink grow contained
|
||||||
syn keyword i3ConfigAction focus move split layout resize restore reload mute unmute exit contained
|
syn keyword i3ConfigAction focus move grow height width split layout resize restore reload mute unmute exit mode workspace container to contained
|
||||||
syn match i3ConfigModifier /\w\++\w\+\(\(+\w\+\)\+\)\?/ contained contains=i3ConfigVariableModifier
|
syn match i3ConfigModifier /\w\++\w\+\(\(+\w\+\)\+\)\?/ contained contains=i3ConfigVariableModifier
|
||||||
syn match i3ConfigNumber /\s\d\+/ contained
|
syn match i3ConfigNumber /\s\d\+/ contained
|
||||||
|
syn match i3ConfigUnit /\sp\(pt\|x\)/ contained
|
||||||
|
syn match i3ConfigUnitOr /\sor/ contained
|
||||||
syn keyword i3ConfigBindKeyword bindsym bindcode exec gaps contained
|
syn keyword i3ConfigBindKeyword bindsym bindcode exec gaps contained
|
||||||
syn match i3ConfigBindArgument /--\w\+\(\(-\w\+\)\+\)\?\s/ contained
|
syn match i3ConfigBindArgument /--\w\+\(\(-\w\+\)\+\)\?\s/ contained
|
||||||
syn match i3ConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigBindArgument,i3ConfigNumber,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword
|
syn match i3ConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigNumber,i3ConfigUnit,i3ConfigUnitOr,i3ConfigBindArgument,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword
|
||||||
|
|
||||||
" Floating
|
" Floating
|
||||||
syn keyword i3ConfigSizeSpecial x contained
|
syn keyword i3ConfigSizeSpecial x contained
|
||||||
syn match i3ConfigNegativeSize /-/ contained
|
syn match i3ConfigNegativeSize /-/ contained
|
||||||
syn match i3ConfigSize /-\?\d\+\s\?x\s\?-\?\d\+/ contained contains=i3ConfigSizeSpecial,i3ConfigNumber,i3ConfigNegativeSize
|
syn match i3ConfigSize /-\?\d\+\s\?x\s\?-\?\d\+/ contained contains=i3ConfigSizeSpecial,i3ConfigNumber,i3ConfigNegativeSize
|
||||||
syn match i3ConfigFloating /^\s*floating_modifier\s\+\$\w\+\d\?/ contains=i3ConfigVariable
|
syn match i3ConfigFloating /^\s*floating_modifier\s\+\$\w\+\d\?/ contains=i3ConfigVariable
|
||||||
syn match i3ConfigFloating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=Size
|
syn match i3ConfigFloating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=i3ConfigSize
|
||||||
|
|
||||||
" Orientation
|
" Orientation
|
||||||
syn keyword i3ConfigOrientationKeyword vertical horizontal auto contained
|
syn keyword i3ConfigOrientationKeyword vertical horizontal auto contained
|
||||||
@@ -88,7 +90,7 @@ syn match i3ConfigLayout /^\s*workspace_layout\s\+\(default\|stacking\|tabbed\)\
|
|||||||
|
|
||||||
" Border style
|
" Border style
|
||||||
syn keyword i3ConfigBorderStyleKeyword none normal pixel contained
|
syn keyword i3ConfigBorderStyleKeyword none normal pixel contained
|
||||||
syn match i3ConfigBorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\)\s\?$/ contains=i3ConfigBorderStyleKeyword,number
|
syn match i3ConfigBorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\)\s\?$/ contains=i3ConfigBorderStyleKeyword,i3ConfigNumber
|
||||||
|
|
||||||
" Hide borders and edges
|
" Hide borders and edges
|
||||||
syn keyword i3ConfigEdgeKeyword none vertical horizontal both smart smart_no_gaps contained
|
syn keyword i3ConfigEdgeKeyword none vertical horizontal both smart smart_no_gaps contained
|
||||||
@@ -97,7 +99,7 @@ syn match i3ConfigEdge /^\s*hide_edge_borders\s\+\(none\|vertical\|horizontal\|b
|
|||||||
" Arbitrary commands for specific windows (for_window)
|
" Arbitrary commands for specific windows (for_window)
|
||||||
syn keyword i3ConfigCommandKeyword for_window contained
|
syn keyword i3ConfigCommandKeyword for_window contained
|
||||||
syn region i3ConfigWindowStringSpecial start=+"+ skip=+\\"+ end=+"+ contained contains=i3ConfigString
|
syn region i3ConfigWindowStringSpecial start=+"+ skip=+\\"+ end=+"+ contained contains=i3ConfigString
|
||||||
syn region i3ConfigWindowCommandSpecial start="\[" end="\]" contained contains=WindowStringSpacial,i3ConfigString
|
syn region i3ConfigWindowCommandSpecial start="\[" end="\]" contained contains=i3ConfigWindowStringSpacial,i3ConfigString
|
||||||
syn match i3ConfigArbitraryCommand /^\s*for_window\s\+.*$/ contains=i3ConfigWindowCommandSpecial,i3ConfigCommandKeyword,i3ConfigBorderStyleKeyword,i3ConfigLayoutKeyword,i3ConfigOrientationKeyword,Size,i3ConfigNumber
|
syn match i3ConfigArbitraryCommand /^\s*for_window\s\+.*$/ contains=i3ConfigWindowCommandSpecial,i3ConfigCommandKeyword,i3ConfigBorderStyleKeyword,i3ConfigLayoutKeyword,i3ConfigOrientationKeyword,Size,i3ConfigNumber
|
||||||
|
|
||||||
" Disable focus open opening
|
" Disable focus open opening
|
||||||
@@ -127,6 +129,9 @@ syn match i3ConfigWorkspace /^\s*workspace\s\+.*$/ contains=i3ConfigWorkspaceKey
|
|||||||
syn keyword i3ConfigClientColorKeyword client focused focused_inactive unfocused urgent placeholder background contained
|
syn keyword i3ConfigClientColorKeyword client focused focused_inactive unfocused urgent placeholder background contained
|
||||||
syn match i3ConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=i3ConfigClientColorKeyword,i3ConfigColor,i3ConfigVariable
|
syn match i3ConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=i3ConfigClientColorKeyword,i3ConfigColor,i3ConfigVariable
|
||||||
|
|
||||||
|
syn keyword i3ConfigTitleAlignKeyword left center right contained
|
||||||
|
syn match i3ConfigTitleAlign /^\s*title_align\s\+.*$/ contains=i3ConfigTitleAlignKeyword
|
||||||
|
|
||||||
" Interprocess communication
|
" Interprocess communication
|
||||||
syn match i3ConfigInterprocessKeyword /ipc-socket/ contained
|
syn match i3ConfigInterprocessKeyword /ipc-socket/ contained
|
||||||
syn match i3ConfigInterprocess /^\s*ipc-socket\s\+.*$/ contains=i3ConfigInterprocessKeyword
|
syn match i3ConfigInterprocess /^\s*ipc-socket\s\+.*$/ contains=i3ConfigInterprocessKeyword
|
||||||
@@ -175,10 +180,10 @@ syn match i3ConfigDrawingMarks /^\s*show_marks\s\+\(yes\|no\)\s\?$/ contains=i3C
|
|||||||
|
|
||||||
" Group mode/bar
|
" Group mode/bar
|
||||||
syn keyword i3ConfigBlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained
|
syn keyword i3ConfigBlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained
|
||||||
syn region i3ConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,i3ConfigString,Bind,i3ConfigComment,Font,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
syn region i3ConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
||||||
|
|
||||||
" Line continuation
|
" Line continuation
|
||||||
syn region i3ConfigLineCont start=/^.*\\$/ end=/^.*$/ contains=i3ConfigBlockKeyword,i3ConfigString,Bind,i3ConfigComment,Font,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
syn region i3ConfigLineCont start=/^.*\\$/ end=/^.*$/ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
|
||||||
|
|
||||||
" Define the highlighting.
|
" Define the highlighting.
|
||||||
hi! def link i3ConfigError Error
|
hi! def link i3ConfigError Error
|
||||||
@@ -191,6 +196,7 @@ hi! def link i3ConfigOrientationKeyword Type
|
|||||||
hi! def link i3ConfigMouseWarpingType Type
|
hi! def link i3ConfigMouseWarpingType Type
|
||||||
hi! def link i3ConfigFocusFollowsMouseType Type
|
hi! def link i3ConfigFocusFollowsMouseType Type
|
||||||
hi! def link i3ConfigGapStyleKeyword Type
|
hi! def link i3ConfigGapStyleKeyword Type
|
||||||
|
hi! def link i3ConfigTitleAlignKeyword Type
|
||||||
hi! def link i3ConfigSmartGapKeyword Type
|
hi! def link i3ConfigSmartGapKeyword Type
|
||||||
hi! def link i3ConfigSmartBorderKeyword Type
|
hi! def link i3ConfigSmartBorderKeyword Type
|
||||||
hi! def link i3ConfigLayoutKeyword Type
|
hi! def link i3ConfigLayoutKeyword Type
|
||||||
@@ -201,9 +207,11 @@ hi! def link i3ConfigCommand Type
|
|||||||
hi! def link i3ConfigOutput Type
|
hi! def link i3ConfigOutput Type
|
||||||
hi! def link i3ConfigWindowCommandSpecial Type
|
hi! def link i3ConfigWindowCommandSpecial Type
|
||||||
hi! def link i3ConfigFocusWrappingType Type
|
hi! def link i3ConfigFocusWrappingType Type
|
||||||
|
hi! def link i3ConfigUnitOr Type
|
||||||
hi! def link i3ConfigFontSize Constant
|
hi! def link i3ConfigFontSize Constant
|
||||||
hi! def link i3ConfigColor Constant
|
hi! def link i3ConfigColor Constant
|
||||||
hi! def link i3ConfigNumber Constant
|
hi! def link i3ConfigNumber Constant
|
||||||
|
hi! def link i3ConfigUnit Constant
|
||||||
hi! def link i3ConfigVariableAndModifier Constant
|
hi! def link i3ConfigVariableAndModifier Constant
|
||||||
hi! def link i3ConfigTimeUnit Constant
|
hi! def link i3ConfigTimeUnit Constant
|
||||||
hi! def link i3ConfigModifier Constant
|
hi! def link i3ConfigModifier Constant
|
||||||
@@ -221,6 +229,7 @@ hi! def link i3ConfigFontKeyword Identifier
|
|||||||
hi! def link i3ConfigBindKeyword Identifier
|
hi! def link i3ConfigBindKeyword Identifier
|
||||||
hi! def link i3ConfigOrientation Identifier
|
hi! def link i3ConfigOrientation Identifier
|
||||||
hi! def link i3ConfigGapStyle Identifier
|
hi! def link i3ConfigGapStyle Identifier
|
||||||
|
hi! def link i3ConfigTitleAlign Identifier
|
||||||
hi! def link i3ConfigSmartGap Identifier
|
hi! def link i3ConfigSmartGap Identifier
|
||||||
hi! def link i3ConfigSmartBorder Identifier
|
hi! def link i3ConfigSmartBorder Identifier
|
||||||
hi! def link i3ConfigLayout Identifier
|
hi! def link i3ConfigLayout Identifier
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ syntax keyword jsAsyncKeyword async await
|
|||||||
syntax match jsSwitchColon contained /::\@!/ skipwhite skipempty nextgroup=jsSwitchBlock
|
syntax match jsSwitchColon contained /::\@!/ skipwhite skipempty nextgroup=jsSwitchBlock
|
||||||
|
|
||||||
" Keywords
|
" 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 keyword jsGlobalNodeObjects module exports global process __dirname __filename
|
||||||
syntax match jsGlobalNodeObjects /\<require\>/ containedin=jsFuncCall
|
syntax match jsGlobalNodeObjects /\<require\>/ containedin=jsFuncCall
|
||||||
syntax keyword jsExceptions Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError
|
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 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 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 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 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 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
|
syntax region jsSpreadExpression contained matchgroup=jsSpreadOperator start=/\.\.\./ end=/[,}\]]\@=/ contains=@jsExpression
|
||||||
@@ -201,7 +201,7 @@ syntax match jsDestructuringNoise contained /[,[\]]/
|
|||||||
syntax region jsDestructuringPropertyComputed contained matchgroup=jsDestructuringBraces start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsDestructuringValue,jsDestructuringValueAssignment,jsDestructuringNoise extend fold
|
syntax region jsDestructuringPropertyComputed contained matchgroup=jsDestructuringBraces start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsDestructuringValue,jsDestructuringValueAssignment,jsDestructuringNoise extend fold
|
||||||
|
|
||||||
" Comments
|
" Comments
|
||||||
syntax keyword jsCommentTodo contained TODO FIXME XXX TBD
|
syntax keyword jsCommentTodo contained TODO FIXME XXX TBD NOTE
|
||||||
syntax region jsComment start=+//+ end=/$/ contains=jsCommentTodo,@Spell extend keepend
|
syntax region jsComment start=+//+ end=/$/ contains=jsCommentTodo,@Spell extend keepend
|
||||||
syntax region jsComment start=+/\*+ end=+\*/+ contains=jsCommentTodo,@Spell fold extend keepend
|
syntax region jsComment start=+/\*+ end=+\*/+ contains=jsCommentTodo,@Spell fold extend keepend
|
||||||
syntax region jsEnvComment start=/\%^#!/ end=/$/ display
|
syntax region jsEnvComment start=/\%^#!/ end=/$/ display
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'log') == -1
|
|||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Generic log file
|
" Language: Generic log file
|
||||||
" Maintainer: MTDL9 <https://github.com/MTDL9>
|
" Maintainer: MTDL9 <https://github.com/MTDL9>
|
||||||
" Latest Revision: 2019-04-16
|
" Latest Revision: 2019-11-24
|
||||||
|
|
||||||
if exists('b:current_syntax')
|
if exists('b:current_syntax')
|
||||||
finish
|
finish
|
||||||
@@ -52,8 +52,8 @@ syn match logDate '\(\(Mon\|Tue\|Wed\|Thu\|Fri\|Sat\|Sun\) \)\?\(Jan\|Feb\|Mar\|
|
|||||||
syn match logTime '\d\{2}:\d\{2}:\d\{2}\(\.\d\{2,6}\)\?\(\s\?[-+]\d\{2,4}\|Z\)\?\>' nextgroup=logTimeZone,logSysColumns skipwhite
|
syn match logTime '\d\{2}:\d\{2}:\d\{2}\(\.\d\{2,6}\)\?\(\s\?[-+]\d\{2,4}\|Z\)\?\>' nextgroup=logTimeZone,logSysColumns skipwhite
|
||||||
|
|
||||||
" Follows logTime, matches UTC or PDT 2019 or 2019 EDT
|
" Follows logTime, matches UTC or PDT 2019 or 2019 EDT
|
||||||
syn match logTimeZone '\(UTC\|PDT\|EDT\|GMT\|EST\|KST\)\( \d\{4}\)\?' contained
|
syn match logTimeZone '[A-Z]\{2,5}\>\( \d\{4}\)\?' contained
|
||||||
syn match logTimeZone '\d\{4} \(UTC\|PDT\|EDT\|GMT\|EST\|KST\)' contained
|
syn match logTimeZone '\d\{4} [A-Z]\{2,5}\>' contained
|
||||||
|
|
||||||
|
|
||||||
" Entities
|
" Entities
|
||||||
@@ -66,7 +66,7 @@ syn match logIPV4 '\<\d\{1,3}\(\.\d\{1,3}\)\{3}\>'
|
|||||||
syn match logIPV6 '\<\x\{1,4}\(:\x\{1,4}\)\{7}\>'
|
syn match logIPV6 '\<\x\{1,4}\(:\x\{1,4}\)\{7}\>'
|
||||||
syn match logMacAddress '\<\x\{2}\(:\x\{2}\)\{5}'
|
syn match logMacAddress '\<\x\{2}\(:\x\{2}\)\{5}'
|
||||||
syn match logFilePath '\<\w:\\[^\n|,; ()'"\]{}]\+'
|
syn match logFilePath '\<\w:\\[^\n|,; ()'"\]{}]\+'
|
||||||
syn match logFilePath '\/\w[^\n|,; ()'"\]{}]\+'
|
syn match logFilePath '[^a-zA-Z0-9"']\@<=\/\w[^\n|,; ()'"\]{}]\+'
|
||||||
|
|
||||||
|
|
||||||
" Syslog Columns
|
" Syslog Columns
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'meson') == -1
|
|||||||
|
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: Meson
|
" Language: Meson
|
||||||
|
" License: VIM License
|
||||||
" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
|
" Maintainer: Nirbheek Chauhan <nirbheek.chauhan@gmail.com>
|
||||||
" Last Change: 2016 Dec 7
|
" Last Change: 2016 Dec 7
|
||||||
" Credits: Zvezdan Petkovic <zpetkovic@acm.org>
|
" Credits: Zvezdan Petkovic <zpetkovic@acm.org>
|
||||||
@@ -29,7 +30,7 @@ endif
|
|||||||
" We need nocompatible mode in order to continue lines with backslashes.
|
" We need nocompatible mode in order to continue lines with backslashes.
|
||||||
" Original setting will be restored.
|
" Original setting will be restored.
|
||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
setlocal cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
" http://mesonbuild.com/Syntax.html
|
" http://mesonbuild.com/Syntax.html
|
||||||
syn keyword mesonConditional elif else if endif
|
syn keyword mesonConditional elif else if endif
|
||||||
@@ -118,6 +119,7 @@ syn keyword mesonBuiltin
|
|||||||
\ subdir
|
\ subdir
|
||||||
\ subdir_done
|
\ subdir_done
|
||||||
\ subproject
|
\ subproject
|
||||||
|
\ summary
|
||||||
\ target_machine
|
\ target_machine
|
||||||
\ test
|
\ test
|
||||||
\ vcs_tag
|
\ vcs_tag
|
||||||
|
|||||||
160
syntax/ocaml.vim
160
syntax/ocaml.vim
@@ -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,
|
" can be distinguished from begin/end, which is used for indentation,
|
||||||
" and folding. (David Baelde)
|
" and folding. (David Baelde)
|
||||||
|
|
||||||
" For version 5.x: Clear all syntax items
|
" Quit when a syntax file was already loaded
|
||||||
" For version 6.x: Quit when a syntax file was already loaded
|
if exists("b:current_syntax") && b:current_syntax == "ocaml"
|
||||||
if version < 600
|
|
||||||
syntax clear
|
|
||||||
elseif exists("b:current_syntax") && b:current_syntax == "ocaml"
|
|
||||||
finish
|
finish
|
||||||
endif
|
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
|
syn region ocamlModSpec matchgroup=ocamlKeyword start="\<module\>" matchgroup=ocamlModule end="\<\u\(\w\|'\)*\>" contained contains=@ocamlAllErrs,ocamlComment skipwhite skipempty nextgroup=ocamlModTRWith,ocamlMPRestr
|
||||||
|
|
||||||
" "open"
|
" "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"
|
" "include"
|
||||||
syn match ocamlKeyword "\<include\>" skipwhite skipempty nextgroup=ocamlModParam,ocamlFullMod
|
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 array bool char exn float format format4
|
||||||
syn keyword ocamlType int int32 int64 lazy_t list nativeint option
|
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*)"
|
||||||
syn match ocamlConstructor "\[\s*\]"
|
syn match ocamlConstructor "\[\s*\]"
|
||||||
@@ -233,7 +230,18 @@ syn match ocamlStar "*"
|
|||||||
syn match ocamlAngle "<"
|
syn match ocamlAngle "<"
|
||||||
syn match ocamlAngle ">"
|
syn match ocamlAngle ">"
|
||||||
" Custom indexing operators:
|
" 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):
|
" Extension operators (has to be declared before regular infix operators):
|
||||||
syn match ocamlExtensionOp "#[#~?!.:|&$%<=>@^*/+-]\+"
|
syn match ocamlExtensionOp "#[#~?!.:|&$%<=>@^*/+-]\+"
|
||||||
" Infix and prefix operators:
|
" Infix and prefix operators:
|
||||||
@@ -291,102 +299,90 @@ syn sync match ocamlSigSync grouphere ocamlSig "\<sig\>"
|
|||||||
syn sync match ocamlSigSync groupthere ocamlSig "\<end\>"
|
syn sync match ocamlSigSync groupthere ocamlSig "\<end\>"
|
||||||
|
|
||||||
" Define the default highlighting.
|
" 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
|
hi def link ocamlBraceErr Error
|
||||||
HiLink ocamlBrackErr Error
|
hi def link ocamlBrackErr Error
|
||||||
HiLink ocamlParenErr Error
|
hi def link ocamlParenErr Error
|
||||||
HiLink ocamlArrErr Error
|
hi def link ocamlArrErr Error
|
||||||
|
|
||||||
HiLink ocamlCommentErr Error
|
hi def link ocamlCommentErr Error
|
||||||
|
|
||||||
HiLink ocamlCountErr Error
|
hi def link ocamlCountErr Error
|
||||||
HiLink ocamlDoErr Error
|
hi def link ocamlDoErr Error
|
||||||
HiLink ocamlDoneErr Error
|
hi def link ocamlDoneErr Error
|
||||||
HiLink ocamlEndErr Error
|
hi def link ocamlEndErr Error
|
||||||
HiLink ocamlThenErr 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
|
hi def link ocamlModPath Include
|
||||||
HiLink ocamlObject Include
|
hi def link ocamlObject Include
|
||||||
HiLink ocamlModule Include
|
hi def link ocamlModule Include
|
||||||
HiLink ocamlModParam1 Include
|
hi def link ocamlModParam1 Include
|
||||||
HiLink ocamlGenMod Include
|
hi def link ocamlGenMod Include
|
||||||
HiLink ocamlModType Include
|
hi def link ocamlModType Include
|
||||||
HiLink ocamlMPRestr3 Include
|
hi def link ocamlMPRestr3 Include
|
||||||
HiLink ocamlFullMod Include
|
hi def link ocamlFullMod Include
|
||||||
HiLink ocamlFuncWith Include
|
hi def link ocamlFuncWith Include
|
||||||
HiLink ocamlModParam Include
|
hi def link ocamlModParam Include
|
||||||
HiLink ocamlModTypeRestr Include
|
hi def link ocamlModTypeRestr Include
|
||||||
HiLink ocamlWith Include
|
hi def link ocamlWith Include
|
||||||
HiLink ocamlMTDef Include
|
hi def link ocamlMTDef Include
|
||||||
HiLink ocamlSigEncl ocamlModule
|
hi def link ocamlSigEncl ocamlModule
|
||||||
HiLink ocamlStructEncl 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
|
hi def link ocamlVal Keyword
|
||||||
HiLink ocamlModPreRHS Keyword
|
hi def link ocamlModPreRHS Keyword
|
||||||
HiLink ocamlMPRestr2 Keyword
|
hi def link ocamlMPRestr2 Keyword
|
||||||
HiLink ocamlKeyword Keyword
|
hi def link ocamlKeyword Keyword
|
||||||
HiLink ocamlMethod Include
|
hi def link ocamlMethod Include
|
||||||
HiLink ocamlArrow Keyword
|
hi def link ocamlArrow Keyword
|
||||||
HiLink ocamlKeyChar Keyword
|
hi def link ocamlKeyChar Keyword
|
||||||
HiLink ocamlAnyVar Keyword
|
hi def link ocamlAnyVar Keyword
|
||||||
HiLink ocamlTopStop Keyword
|
hi def link ocamlTopStop Keyword
|
||||||
|
|
||||||
HiLink ocamlRefAssign ocamlKeyChar
|
hi def link ocamlRefAssign ocamlKeyChar
|
||||||
HiLink ocamlEqual ocamlKeyChar
|
hi def link ocamlEqual ocamlKeyChar
|
||||||
HiLink ocamlStar ocamlInfixOp
|
hi def link ocamlStar ocamlInfixOp
|
||||||
HiLink ocamlAngle ocamlInfixOp
|
hi def link ocamlAngle ocamlInfixOp
|
||||||
HiLink ocamlCons ocamlInfixOp
|
hi def link ocamlCons ocamlInfixOp
|
||||||
|
|
||||||
HiLink ocamlPrefixOp ocamlOperator
|
hi def link ocamlPrefixOp ocamlOperator
|
||||||
HiLink ocamlInfixOp ocamlOperator
|
hi def link ocamlInfixOp ocamlOperator
|
||||||
HiLink ocamlExtensionOp ocamlOperator
|
hi def link ocamlExtensionOp ocamlOperator
|
||||||
HiLink ocamlIndexingOp ocamlOperator
|
hi def link ocamlIndexingOp ocamlOperator
|
||||||
|
|
||||||
if exists("ocaml_highlight_operators")
|
if exists("ocaml_highlight_operators")
|
||||||
HiLink ocamlInfixOpKeyword ocamlOperator
|
hi def link ocamlInfixOpKeyword ocamlOperator
|
||||||
HiLink ocamlOperator Operator
|
hi def link ocamlOperator Operator
|
||||||
else
|
else
|
||||||
HiLink ocamlInfixOpKeyword Keyword
|
hi def link ocamlInfixOpKeyword Keyword
|
||||||
endif
|
endif
|
||||||
|
|
||||||
HiLink ocamlBoolean Boolean
|
hi def link ocamlBoolean Boolean
|
||||||
HiLink ocamlCharacter Character
|
hi def link ocamlCharacter Character
|
||||||
HiLink ocamlNumber Number
|
hi def link ocamlNumber Number
|
||||||
HiLink ocamlFloat Float
|
hi def link ocamlFloat Float
|
||||||
HiLink ocamlString String
|
hi def link ocamlString String
|
||||||
HiLink ocamlQuotedStringDelim Identifier
|
hi def link ocamlQuotedStringDelim Identifier
|
||||||
|
|
||||||
HiLink ocamlLabel Identifier
|
hi def link ocamlLabel Identifier
|
||||||
|
|
||||||
HiLink ocamlType Type
|
hi def link ocamlType Type
|
||||||
|
|
||||||
HiLink ocamlTodo Todo
|
hi def link ocamlTodo Todo
|
||||||
|
|
||||||
HiLink ocamlEncl Keyword
|
hi def link ocamlEncl Keyword
|
||||||
|
|
||||||
HiLink ocamlPpxEncl ocamlEncl
|
hi def link ocamlPpxEncl ocamlEncl
|
||||||
|
|
||||||
delcommand HiLink
|
|
||||||
endif
|
|
||||||
|
|
||||||
let b:current_syntax = "ocaml"
|
let b:current_syntax = "ocaml"
|
||||||
|
|
||||||
|
|||||||
54
syntax/ocpbuild.vim
Normal file
54
syntax/ocpbuild.vim
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1
|
||||||
|
|
||||||
|
" Vim syntax file
|
||||||
|
" Language: ocp-build files
|
||||||
|
" Maintainer: Florent Monnier
|
||||||
|
" Latest Revision: 14 September 2013
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
syn keyword ocpKeywords begin end pack
|
||||||
|
syn keyword ocpKeywords if then else
|
||||||
|
|
||||||
|
syn keyword ocpBlockKind library syntax objects program test
|
||||||
|
|
||||||
|
syn keyword ocpFields files generated dirname archive
|
||||||
|
syn keyword ocpFields requires bundle
|
||||||
|
syn keyword ocpFields tests test_dir test_args test_benchmark
|
||||||
|
syn keyword ocpFields bytecomp bytelink link
|
||||||
|
syn keyword ocpFields has_asm nopervasives sort
|
||||||
|
syn keyword ocpFields comp ccopt byte has_byte
|
||||||
|
syn keyword ocpFields version authors license copyright
|
||||||
|
syn keyword ocpFields lib_files install installed
|
||||||
|
|
||||||
|
syn keyword ocpPreProc test_exit ocp2ml env_strings
|
||||||
|
syn keyword ocpPreProc ocaml_major_version
|
||||||
|
syn keyword ocpPreProc system
|
||||||
|
|
||||||
|
" Strings
|
||||||
|
syn region ocpString start=+"+ end=+"+
|
||||||
|
|
||||||
|
" Comments
|
||||||
|
syn keyword ocpTodo TODO XXX FIXME BUG contained
|
||||||
|
syn region ocpComment start="(\*" end="\*)" contains=ocpTodo
|
||||||
|
|
||||||
|
" Usual Values
|
||||||
|
syn keyword ocpNumber None
|
||||||
|
syn keyword ocpNumber true
|
||||||
|
syn keyword ocpNumber false
|
||||||
|
|
||||||
|
hi def link ocpTodo Todo
|
||||||
|
hi def link ocpComment Comment
|
||||||
|
hi def link ocpString String
|
||||||
|
hi def link ocpBlockKind Identifier
|
||||||
|
hi def link ocpNumber Number
|
||||||
|
hi def link ocpFields Structure
|
||||||
|
hi def link ocpKeywords Keyword
|
||||||
|
hi def link ocpPreProc PreProc
|
||||||
|
|
||||||
|
let b:current_syntax = "ocpbuild"
|
||||||
|
|
||||||
|
|
||||||
|
endif
|
||||||
57
syntax/ocpbuildroot.vim
Normal file
57
syntax/ocpbuildroot.vim
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1
|
||||||
|
|
||||||
|
" Vim syntax file
|
||||||
|
" Language: ocp-build.root files
|
||||||
|
" Maintainer: Florent Monnier
|
||||||
|
" Latest Revision: 14 September 2013
|
||||||
|
|
||||||
|
if exists("b:current_syntax")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Keywords
|
||||||
|
syn keyword ocprKeywords digest
|
||||||
|
syn keyword ocprKeywords verbosity
|
||||||
|
syn keyword ocprKeywords njobs
|
||||||
|
syn keyword ocprKeywords autoscan
|
||||||
|
syn keyword ocprKeywords bytecode
|
||||||
|
syn keyword ocprKeywords native
|
||||||
|
syn keyword ocprKeywords meta_dirnames
|
||||||
|
syn keyword ocprKeywords install_destdir
|
||||||
|
syn keyword ocprKeywords install_bin
|
||||||
|
syn keyword ocprKeywords install_lib
|
||||||
|
syn keyword ocprKeywords install_data
|
||||||
|
syn keyword ocprKeywords install_doc
|
||||||
|
syn keyword ocprKeywords ocamllib
|
||||||
|
syn keyword ocprKeywords use_ocamlfind
|
||||||
|
syn keyword ocprKeywords ocpbuild_version
|
||||||
|
syn keyword ocprKeywords project_external_dirs
|
||||||
|
syn keyword ocprKeywords files
|
||||||
|
syn keyword ocprKeywords install_docdir
|
||||||
|
syn keyword ocprKeywords install_datadir
|
||||||
|
syn keyword ocprKeywords install_libdir
|
||||||
|
syn keyword ocprKeywords install_bindir
|
||||||
|
syn keyword ocprKeywords install_metadir
|
||||||
|
|
||||||
|
syn keyword ocprNumber None
|
||||||
|
syn keyword ocprNumber true
|
||||||
|
syn keyword ocprNumber false
|
||||||
|
|
||||||
|
" Strings
|
||||||
|
syn match ocprString "\".\{-}\""
|
||||||
|
|
||||||
|
" Comments
|
||||||
|
syn keyword ocprTodo TODO XXX FIXME BUG contained
|
||||||
|
syn region ocprComment start="(\*" end="\*)" contains=ocprTodo
|
||||||
|
|
||||||
|
|
||||||
|
hi def link ocprKeywords Keyword
|
||||||
|
hi def link ocprTodo Todo
|
||||||
|
hi def link ocprComment Comment
|
||||||
|
hi def link ocprString String
|
||||||
|
hi def link ocprNumber Number
|
||||||
|
|
||||||
|
let b:current_syntax = "ocpbuildroot"
|
||||||
|
|
||||||
|
|
||||||
|
endif
|
||||||
@@ -6,7 +6,7 @@ endif
|
|||||||
|
|
||||||
" need %{vars}%
|
" need %{vars}%
|
||||||
" env: [[CAML_LD_LIBRARY_PATH = "%{lib}%/stublibs"]]
|
" 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 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
|
syn keyword opamTodo FIXME NOTE NOTES TODO XXX contained
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ scriptencoding utf-8
|
|||||||
" Maintainer: Anders Thøgersen <first name at bladre dot dk>
|
" Maintainer: Anders Thøgersen <first name at bladre dot dk>
|
||||||
" License: VIM LICENSE
|
" License: VIM LICENSE
|
||||||
if exists('b:current_syntax')
|
if exists('b:current_syntax')
|
||||||
finish
|
" finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if v:version < 600
|
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
|
syntax region plantumlDir start=/\s\+/ms=s+1 end=/$/ contained
|
||||||
|
|
||||||
" type
|
" type
|
||||||
|
" From 'java - jar plantuml.jar - language' results {{{
|
||||||
syntax keyword plantumlTypeKeyword abstract actor agent archimate artifact boundary card cloud component control
|
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 database detach diamond entity enum file folder frame node object package
|
||||||
syntax keyword plantumlTypeKeyword queue rectangle stack state storage usecase
|
syntax keyword plantumlTypeKeyword participant queue rectangle stack state storage usecase
|
||||||
" class and interface are defined as plantumlClassKeyword
|
" class and interface are defined as plantumlClassKeyword
|
||||||
syntax keyword plantumlClassKeyword class interface
|
syntax keyword plantumlClassKeyword class interface
|
||||||
|
"}}}
|
||||||
|
" Not in 'java - jar plantuml.jar - language' results
|
||||||
|
syntax keyword plantumlTypeKeyword concise robust
|
||||||
|
|
||||||
" keyword
|
" 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 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 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 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 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 page par partition ref repeat return right rnote rotate show skin skinparam
|
||||||
syntax keyword plantumlKeyword start stop title top up while
|
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
|
" gantt
|
||||||
syntax keyword plantumlTypeKeyword project monday tuesday wednesday thursday friday saturday sunday
|
syntax keyword plantumlTypeKeyword project monday tuesday wednesday thursday friday saturday sunday
|
||||||
syntax keyword plantumlKeyword starts ends start end closed day after colored lasts happens
|
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
|
syntax match plantumlArrowDirectedLine /\([-.]\)\%(l\%[eft]\|r\%[ight]\|up\?\|d\%[own]\)\1/ contained
|
||||||
|
|
||||||
" Note
|
" Note and legend
|
||||||
syntax region plantumlNoteMultiLine start=/\%(^\s*[rh]\?note\)\@<=\s\%([^:"]\+$\)\@=/ end=/^\%(\s*end \?[rh]\?note$\)\@=/ contains=plantumlSpecialString,plantumlNoteMultiLineStart,plantumlTag
|
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\)\@<=\s\%([^:]\+$\)/ contained contains=plantumlKeyword,plantumlColor,plantumlString,plantumlTag
|
syntax match plantumlNoteMultiLineStart /\%(^\s*[rh]\?\%(note\|legend\)\)\@<=\s\%([^:]\+$\)/ contained contains=plantumlKeyword,plantumlColor,plantumlString,plantumlTag
|
||||||
|
|
||||||
" Class
|
" Class
|
||||||
syntax region plantumlClass
|
syntax region plantumlClass
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ if version >= 508 || !exists("did_ps1_syn_inits")
|
|||||||
HiLink ps1Comment Comment
|
HiLink ps1Comment Comment
|
||||||
HiLink ps1CommentTodo Todo
|
HiLink ps1CommentTodo Todo
|
||||||
HiLink ps1CommentDoc Tag
|
HiLink ps1CommentDoc Tag
|
||||||
HiLink ps1CDocParam Todo
|
HiLink ps1CDocParam Identifier
|
||||||
HiLink ps1Operator Operator
|
HiLink ps1Operator Operator
|
||||||
HiLink ps1Repeat Repeat
|
HiLink ps1Repeat Repeat
|
||||||
HiLink ps1RepeatAndCmdlet Repeat
|
HiLink ps1RepeatAndCmdlet Repeat
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'qml') == -1
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'qml') == -1
|
||||||
|
|
||||||
|
|
||||||
" Vim syntax file
|
" Vim syntax file
|
||||||
" Language: QML
|
" Language: QML
|
||||||
" Maintainer: Peter Hoeg <peter@hoeg.com>
|
" Maintainer: Peter Hoeg <peter@hoeg.com>
|
||||||
@@ -29,7 +30,7 @@ endif
|
|||||||
|
|
||||||
syn case ignore
|
syn case ignore
|
||||||
|
|
||||||
syn cluster qmlExpr contains=qmlStringD,qmlString,SqmlCharacter,qmlNumber,qmlObjectLiteralType,qmlBoolean,qmlType,qmlJsType,qmlNull,qmlGlobal,qmlFunction
|
syn cluster qmlExpr contains=qmlStringD,qmlStringS,qmlStringT,SqmlCharacter,qmlNumber,qmlObjectLiteralType,qmlBoolean,qmlType,qmlJsType,qmlNull,qmlGlobal,qmlFunction,qmlArrowFunction
|
||||||
syn keyword qmlCommentTodo TODO FIXME XXX TBD contained
|
syn keyword qmlCommentTodo TODO FIXME XXX TBD contained
|
||||||
syn match qmlLineComment "\/\/.*" contains=@Spell,qmlCommentTodo
|
syn match qmlLineComment "\/\/.*" contains=@Spell,qmlCommentTodo
|
||||||
syn match qmlCommentSkip "^[ \t]*\*\($\|[ \t]\+\)"
|
syn match qmlCommentSkip "^[ \t]*\*\($\|[ \t]\+\)"
|
||||||
@@ -37,6 +38,9 @@ syn region qmlComment start="/\*" end="\*/" contains=@Spell,qmlComme
|
|||||||
syn match qmlSpecial "\\\d\d\d\|\\."
|
syn match qmlSpecial "\\\d\d\d\|\\."
|
||||||
syn region qmlStringD start=+"+ skip=+\\\\\|\\"\|\\$+ end=+"+ keepend contains=qmlSpecial,@htmlPreproc,@Spell
|
syn region qmlStringD start=+"+ skip=+\\\\\|\\"\|\\$+ end=+"+ keepend contains=qmlSpecial,@htmlPreproc,@Spell
|
||||||
syn region qmlStringS start=+'+ skip=+\\\\\|\\'\|\\$+ end=+'+ keepend contains=qmlSpecial,@htmlPreproc,@Spell
|
syn region qmlStringS start=+'+ skip=+\\\\\|\\'\|\\$+ end=+'+ keepend contains=qmlSpecial,@htmlPreproc,@Spell
|
||||||
|
syn region qmlStringT start=+`+ skip=+\\\\\|\\`\|\\$+ end=+`+ keepend contains=qmlTemplateExpr,qmlSpecial,@htmlPreproc,@Spell
|
||||||
|
|
||||||
|
syntax region qmlTemplateExpr contained matchgroup=qmlBraces start=+${+ end=+}+ keepend contains=@qmlExpr
|
||||||
|
|
||||||
syn match qmlCharacter "'\\.'"
|
syn match qmlCharacter "'\\.'"
|
||||||
syn match qmlNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
|
syn match qmlNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
|
||||||
@@ -54,7 +58,7 @@ syn keyword qmlType action alias bool color date double enumeration
|
|||||||
syn keyword qmlStatement return with
|
syn keyword qmlStatement return with
|
||||||
syn keyword qmlBoolean true false
|
syn keyword qmlBoolean true false
|
||||||
syn keyword qmlNull null undefined
|
syn keyword qmlNull null undefined
|
||||||
syn keyword qmlIdentifier arguments this var
|
syn keyword qmlIdentifier arguments this var let
|
||||||
syn keyword qmlLabel case default
|
syn keyword qmlLabel case default
|
||||||
syn keyword qmlException try catch finally throw
|
syn keyword qmlException try catch finally throw
|
||||||
syn keyword qmlMessage alert confirm prompt status
|
syn keyword qmlMessage alert confirm prompt status
|
||||||
@@ -73,6 +77,7 @@ if get(g:, 'qml_fold', 0)
|
|||||||
setlocal foldtext=getline(v:foldstart)
|
setlocal foldtext=getline(v:foldstart)
|
||||||
else
|
else
|
||||||
syn keyword qmlFunction function
|
syn keyword qmlFunction function
|
||||||
|
syn match qmlArrowFunction "=>"
|
||||||
syn match qmlBraces "[{}\[\]]"
|
syn match qmlBraces "[{}\[\]]"
|
||||||
syn match qmlParens "[()]"
|
syn match qmlParens "[()]"
|
||||||
endif
|
endif
|
||||||
@@ -100,6 +105,7 @@ if version >= 508 || !exists("did_qml_syn_inits")
|
|||||||
HiLink qmlSpecial Special
|
HiLink qmlSpecial Special
|
||||||
HiLink qmlStringS String
|
HiLink qmlStringS String
|
||||||
HiLink qmlStringD String
|
HiLink qmlStringD String
|
||||||
|
HiLink qmlStringT String
|
||||||
HiLink qmlCharacter Character
|
HiLink qmlCharacter Character
|
||||||
HiLink qmlNumber Number
|
HiLink qmlNumber Number
|
||||||
HiLink qmlConditional Conditional
|
HiLink qmlConditional Conditional
|
||||||
@@ -111,6 +117,7 @@ if version >= 508 || !exists("did_qml_syn_inits")
|
|||||||
HiLink qmlObjectLiteralType Type
|
HiLink qmlObjectLiteralType Type
|
||||||
HiLink qmlStatement Statement
|
HiLink qmlStatement Statement
|
||||||
HiLink qmlFunction Function
|
HiLink qmlFunction Function
|
||||||
|
HiLink qmlArrowFunction Function
|
||||||
HiLink qmlBraces Function
|
HiLink qmlBraces Function
|
||||||
HiLink qmlError Error
|
HiLink qmlError Error
|
||||||
HiLink qmlNull Keyword
|
HiLink qmlNull Keyword
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user