-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
656 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c++11') == -1 | |
" Language: C++ Additions | ||
" Maintainer: Jon Haggblad <[email protected]> | ||
" URL: http://www.haeggblad.com | ||
" Last Change: 12 Oct 2016 | ||
" Last Change: 1 Feb 2018 | ||
" Version: 0.6 | ||
" Changelog: | ||
" 0.1 - initial version. | ||
|
@@ -37,7 +37,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c++11') == -1 | |
|
||
" Functions | ||
if !exists('g:cpp_no_function_highlight') | ||
syn match cCustomParen "(" contains=cParen contains=cCppParen | ||
syn match cCustomParen transparent "(" contains=cParen contains=cCppParen | ||
syn match cCustomFunc "\w\+\s*(\@=" | ||
hi def link cCustomFunc Function | ||
endif | ||
|
@@ -855,6 +855,37 @@ syntax keyword cppSTLconstant WEOF | |
syntax keyword cppSTLconstant WCHAR_MIN | ||
syntax keyword cppSTLconstant WCHAR_MAX | ||
|
||
" locale | ||
syntax keyword cppSTLtype locale | ||
syntax keyword cppSTLtype ctype_base | ||
syntax keyword cppSTLtype codecvt_base | ||
syntax keyword cppSTLtype messages_base | ||
syntax keyword cppSTLtype time_base | ||
syntax keyword cppSTLtype money_base | ||
syntax keyword cppSTLtype ctype | ||
syntax keyword cppSTLtype codecvt | ||
syntax keyword cppSTLtype collate | ||
syntax keyword cppSTLtype messages | ||
syntax keyword cppSTLtype time_get | ||
syntax keyword cppSTLtype time_put | ||
syntax keyword cppSTLtype num_get | ||
syntax keyword cppSTLtype num_put | ||
syntax keyword cppSTLtype numpunct | ||
syntax keyword cppSTLtype money_get | ||
syntax keyword cppSTLtype money_put | ||
syntax keyword cppSTLtype moneypunct | ||
syntax keyword cppSTLtype ctype_byname | ||
syntax keyword cppSTLtype codecvt_byname | ||
syntax keyword cppSTLtype messages_byname | ||
syntax keyword cppSTLtype collate_byname | ||
syntax keyword cppSTLtype time_get_byname | ||
syntax keyword cppSTLtype time_put_byname | ||
syntax keyword cppSTLtype numpunct_byname | ||
syntax keyword cppSTLtype moneypunct_byname | ||
syntax keyword cppSTLfunction use_facet | ||
syntax keyword cppSTLfunction has_facet | ||
syntax keyword cppSTLfunction isspace isblank iscntrl isupper islower isalpha | ||
syntax keyword cppSTLfunction isdigit ispunct isxdigit isalnum isprint isgraph | ||
|
||
if !exists("cpp_no_cpp11") | ||
syntax keyword cppSTLconstant nullptr | ||
|
@@ -1766,6 +1797,9 @@ if !exists("cpp_no_cpp17") | |
syntax keyword cppSTLfunction do_deallocate | ||
syntax keyword cppSTLfunction do_is_equal | ||
|
||
" mutex | ||
syntax keyword cppSTLtype scoped_lock | ||
|
||
" new | ||
syntax keyword cppSTLconstant hardware_destructive_interference_size | ||
syntax keyword cppSTLconstant hardware_constructive_interference_size | ||
|
@@ -1804,7 +1838,7 @@ if !exists("cpp_no_cpp17") | |
syntax keyword cppSTLbool is_error_code_enum_v | ||
syntax keyword cppSTLbool is_error_condition_enum_v | ||
|
||
" thread | ||
" shared_mutex | ||
syntax keyword cppSTLtype shared_mutex | ||
|
||
" tuple | ||
|
@@ -1879,6 +1913,16 @@ if !exists("cpp_no_cpp17") | |
syntax keyword cppSTLbool conjunction_v | ||
syntax keyword cppSTLbool disjunction_v | ||
syntax keyword cppSTLbool negation_v | ||
syntax keyword cppSTLbool has_unique_object_representations_v | ||
syntax keyword cppSTLbool is_swappable_v | ||
syntax keyword cppSTLbool is_swappable_with_v | ||
syntax keyword cppSTLbool is_nothrow_swappable_v | ||
syntax keyword cppSTLbool is_nothrow_swappable_with_v | ||
syntax keyword cppSTLbool is_invocable_v | ||
syntax keyword cppSTLbool is_invocable_r_v | ||
syntax keyword cppSTLbool is_nothrow_invocable_v | ||
syntax keyword cppSTLbool is_nothrow_invocable_r_v | ||
syntax keyword cppSTLbool is_aggregate_v | ||
syntax keyword cppSTLconstant alignment_of_v | ||
syntax keyword cppSTLconstant rank_v | ||
syntax keyword cppSTLconstant extent_v | ||
|
@@ -1888,6 +1932,19 @@ if !exists("cpp_no_cpp17") | |
syntax keyword cppSTLtype conjunction | ||
syntax keyword cppSTLtype disjunction | ||
syntax keyword cppSTLtype negation | ||
syntax keyword cppSTLtype void_t | ||
syntax keyword cppSTLtype has_unique_object_representations | ||
syntax keyword cppSTLtype is_swappable | ||
syntax keyword cppSTLtype is_swappable_with | ||
syntax keyword cppSTLtype is_nothrow_swappable | ||
syntax keyword cppSTLtype is_nothrow_swappable_with | ||
syntax keyword cppSTLtype is_invocable | ||
syntax keyword cppSTLtype is_invocable_r | ||
syntax keyword cppSTLtype is_nothrow_invocable | ||
syntax keyword cppSTLtype is_nothrow_invocable_r | ||
syntax keyword cppSTLtype invoke_result | ||
syntax keyword cppSTLtype invoke_result_t | ||
syntax keyword cppSTLtype is_aggregate | ||
|
||
" unordered_map, unordered_set, unordered_multimap, unordered_multiset | ||
syntax keyword cppSTLtype node_type | ||
|
@@ -1921,6 +1978,12 @@ if !exists("cpp_no_cpp17") | |
endif " C++17 | ||
|
||
|
||
if !exists("cpp_no_cpp20") | ||
" type_traits | ||
syntax keyword cppSTLtype remove_cvref remove_cvref_t | ||
endif | ||
|
||
|
||
if exists('g:cpp_concepts_highlight') && g:cpp_concepts_highlight | ||
syntax keyword cppStatement concept | ||
syntax keyword cppStorageClass requires | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 | ||
|
||
function! cargo#cmd(args) | ||
silent! clear | ||
if !a:args | ||
execute "!" . "cargo ". a:args | ||
else | ||
echom "Missing arguments" | ||
endif | ||
endfunction | ||
|
||
function! cargo#build(args) | ||
silent! clear | ||
if !a:args | ||
execute "!" . "cargo build " . a:args | ||
else | ||
execute "!" . "cargo build" | ||
endif | ||
silent! clear | ||
execute "!" . "cargo build" | ||
endfunction | ||
|
||
function! cargo#clean(args) | ||
silent! clear | ||
if !a:args | ||
execute "!" . "cargo clean " . a:args | ||
else | ||
execute "!" . "cargo clean" | ||
endif | ||
silent! clear | ||
execute "!" . "cargo clean" | ||
endfunction | ||
|
||
function! cargo#doc(args) | ||
silent! clear | ||
if !a:args | ||
execute "!" . "cargo doc " . a:args | ||
else | ||
execute "!" . "cargo doc" | ||
endif | ||
endfunction | ||
|
||
function! cargo#new(args) | ||
silent! clear | ||
if !a:args | ||
execute "!cargo new " . a:args | ||
:cd `=a:args` | ||
else | ||
echom "Missing arguments" | ||
endif | ||
endfunction | ||
|
||
function! cargo#init(args) | ||
silent! clear | ||
if !a:args | ||
execute "!" . "cargo init " . a:args | ||
else | ||
execute "!" . "cargo init" | ||
endif | ||
endfunction | ||
|
||
function! cargo#run(args) | ||
silent! clear | ||
if !a:args | ||
execute "!" . "cargo run " . a:args | ||
else | ||
execute "!" . "cargo run" | ||
endif | ||
endfunction | ||
|
||
function! cargo#test(args) | ||
silent! clear | ||
if !a:args | ||
execute "!" . "cargo test " . a:args | ||
else | ||
execute "!" . "cargo test" | ||
endif | ||
endfunction | ||
|
||
function! cargo#bench(args) | ||
silent! clear | ||
if !a:args | ||
execute "!" . "cargo bench " . a:args | ||
else | ||
execute "!" . "cargo bench" | ||
endif | ||
endfunction | ||
|
||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.