mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Update
This commit is contained in:
@@ -760,6 +760,7 @@ syntax keyword cppSTLconstant WCHAR_MAX
|
|||||||
if !exists("cpp_no_cpp11")
|
if !exists("cpp_no_cpp11")
|
||||||
syntax keyword cppSTLtype nullptr_t max_align_t
|
syntax keyword cppSTLtype nullptr_t max_align_t
|
||||||
syntax keyword cppSTLtype type_index
|
syntax keyword cppSTLtype type_index
|
||||||
|
syntax keyword cppSTLconstant nullptr
|
||||||
|
|
||||||
" type_traits
|
" type_traits
|
||||||
syntax keyword cppSTLtype is_void
|
syntax keyword cppSTLtype is_void
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ function! s:DetectPerl6()
|
|||||||
endif
|
endif
|
||||||
if line =~ '^\s*\%(use\s\+\)\=v6\%(\.\d\%(\.\d\)\=\)\=;'
|
if line =~ '^\s*\%(use\s\+\)\=v6\%(\.\d\%(\.\d\)\=\)\=;'
|
||||||
set filetype=perl6 " we matched a 'use v6' declaration
|
set filetype=perl6 " we matched a 'use v6' declaration
|
||||||
elseif line =~ '^\s*\%(\%(my\|our\)\s\+\)\=\(module\|class\|role\|enum\|grammar\)'
|
elseif line =~ '^\s*\%(\%(my\|our\)\s\+\)\=\%(unit\s\+\)\=\(module\|class\|role\|enum\|grammar\)'
|
||||||
set filetype=perl6 " we found a class, role, module, enum, or grammar declaration
|
set filetype=perl6 " we found a class, role, module, enum, or grammar declaration
|
||||||
endif
|
endif
|
||||||
break " we either found what we needed, or we found a non-POD, non-comment,
|
break " we either found what we needed, or we found a non-POD, non-comment,
|
||||||
|
|||||||
@@ -179,7 +179,13 @@ function! LatexBox_GetTexRoot()
|
|||||||
return fnamemodify(LatexBox_GetMainTexFile(), ':h')
|
return fnamemodify(LatexBox_GetMainTexFile(), ':h')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! LatexBox_GetTexBasename(with_dir)
|
function! LatexBox_GetBuildBasename(with_dir)
|
||||||
|
" 1. Check for g:LatexBox_jobname
|
||||||
|
if exists('g:LatexBox_jobname')
|
||||||
|
return g:LatexBox_jobname
|
||||||
|
endif
|
||||||
|
|
||||||
|
" 2. Get the basename from the main tex file
|
||||||
if a:with_dir
|
if a:with_dir
|
||||||
return fnamemodify(LatexBox_GetMainTexFile(), ':r')
|
return fnamemodify(LatexBox_GetMainTexFile(), ':r')
|
||||||
else
|
else
|
||||||
@@ -190,48 +196,48 @@ endfunction
|
|||||||
function! LatexBox_GetAuxFile()
|
function! LatexBox_GetAuxFile()
|
||||||
" 1. check for b:build_dir variable
|
" 1. check for b:build_dir variable
|
||||||
if exists('b:build_dir') && isdirectory(b:build_dir)
|
if exists('b:build_dir') && isdirectory(b:build_dir)
|
||||||
return b:build_dir . '/' . LatexBox_GetTexBasename(0) . '.aux'
|
return b:build_dir . '/' . LatexBox_GetBuildBasename(0) . '.aux'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" 2. check for g:LatexBox_build_dir variable
|
" 2. check for g:LatexBox_build_dir variable
|
||||||
if exists('g:LatexBox_build_dir') && isdirectory(g:LatexBox_build_dir)
|
if exists('g:LatexBox_build_dir') && isdirectory(g:LatexBox_build_dir)
|
||||||
return g:LatexBox_build_dir . '/' . LatexBox_GetTexBasename(0) . '.aux'
|
return g:LatexBox_build_dir . '/' . LatexBox_GetBuildBasename(0) . '.aux'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" 3. use the base name of main tex file
|
" 3. use the base name of main tex file
|
||||||
return LatexBox_GetTexBasename(1) . '.aux'
|
return LatexBox_GetBuildBasename(1) . '.aux'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! LatexBox_GetLogFile()
|
function! LatexBox_GetLogFile()
|
||||||
" 1. check for b:build_dir variable
|
" 1. check for b:build_dir variable
|
||||||
if exists('b:build_dir') && isdirectory(b:build_dir)
|
if exists('b:build_dir') && isdirectory(b:build_dir)
|
||||||
return b:build_dir . '/' . LatexBox_GetTexBasename(0) . '.log'
|
return b:build_dir . '/' . LatexBox_GetBuildBasename(0) . '.log'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" 2. check for g:LatexBox_build_dir variable
|
" 2. check for g:LatexBox_build_dir variable
|
||||||
if exists('g:LatexBox_build_dir') && isdirectory(g:LatexBox_build_dir)
|
if exists('g:LatexBox_build_dir') && isdirectory(g:LatexBox_build_dir)
|
||||||
return g:LatexBox_build_dir . '/' . LatexBox_GetTexBasename(0) . '.log'
|
return g:LatexBox_build_dir . '/' . LatexBox_GetBuildBasename(0) . '.log'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" 3. use the base name of main tex file
|
" 3. use the base name of main tex file
|
||||||
return LatexBox_GetTexBasename(1) . '.log'
|
return LatexBox_GetBuildBasename(1) . '.log'
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! LatexBox_GetOutputFile()
|
function! LatexBox_GetOutputFile()
|
||||||
" 1. check for b:build_dir variable
|
" 1. check for b:build_dir variable
|
||||||
if exists('b:build_dir') && isdirectory(b:build_dir)
|
if exists('b:build_dir') && isdirectory(b:build_dir)
|
||||||
return b:build_dir . '/' . LatexBox_GetTexBasename(0)
|
return b:build_dir . '/' . LatexBox_GetBuildBasename(0)
|
||||||
\ . '.' . g:LatexBox_output_type
|
\ . '.' . g:LatexBox_output_type
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" 2. check for g:LatexBox_build_dir variable
|
" 2. check for g:LatexBox_build_dir variable
|
||||||
if exists('g:LatexBox_build_dir') && isdirectory(g:LatexBox_build_dir)
|
if exists('g:LatexBox_build_dir') && isdirectory(g:LatexBox_build_dir)
|
||||||
return g:LatexBox_build_dir . '/' . LatexBox_GetTexBasename(0)
|
return g:LatexBox_build_dir . '/' . LatexBox_GetBuildBasename(0)
|
||||||
\ . '.' . g:LatexBox_output_type
|
\ . '.' . g:LatexBox_output_type
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" 3. use the base name of main tex file
|
" 3. use the base name of main tex file
|
||||||
return LatexBox_GetTexBasename(1) . '.' . g:LatexBox_output_type
|
return LatexBox_GetBuildBasename(1) . '.' . g:LatexBox_output_type
|
||||||
endfunction
|
endfunction
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ if !exists('g:LatexBox_cite_pattern')
|
|||||||
let g:LatexBox_cite_pattern = '\C\\\a*cite\a*\*\?\(\[[^\]]*\]\)*\_\s*{'
|
let g:LatexBox_cite_pattern = '\C\\\a*cite\a*\*\?\(\[[^\]]*\]\)*\_\s*{'
|
||||||
endif
|
endif
|
||||||
if !exists('g:LatexBox_ref_pattern')
|
if !exists('g:LatexBox_ref_pattern')
|
||||||
let g:LatexBox_ref_pattern = '\C\\v\?\(eq\|page\|[cC]\|labelc\|name\)\?ref\*\?\_\s*{'
|
let g:LatexBox_ref_pattern = '\C\\v\?\(eq\|page\|[cC]\|labelc\|name\|auto\)\?ref\*\?\_\s*{'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if !exists('g:LatexBox_completion_environments')
|
if !exists('g:LatexBox_completion_environments')
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ endfunction
|
|||||||
|
|
||||||
function! LatexBox_Latexmk(force)
|
function! LatexBox_Latexmk(force)
|
||||||
" Define often used names
|
" Define often used names
|
||||||
let basepath = LatexBox_GetTexBasename(1)
|
let basepath = LatexBox_GetBuildBasename(1)
|
||||||
let basename = fnamemodify(basepath, ':t')
|
let basename = fnamemodify(basepath, ':t')
|
||||||
let texroot = shellescape(LatexBox_GetTexRoot())
|
let texroot = shellescape(LatexBox_GetTexRoot())
|
||||||
let mainfile = fnameescape(fnamemodify(LatexBox_GetMainTexFile(), ':t'))
|
let mainfile = fnameescape(fnamemodify(LatexBox_GetMainTexFile(), ':t'))
|
||||||
@@ -369,7 +369,7 @@ function! LatexBox_LatexmkClean(cleanall)
|
|||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let basename = LatexBox_GetTexBasename(1)
|
let basename = LatexBox_GetBuildBasename(1)
|
||||||
|
|
||||||
if has_key(g:latexmk_running_pids, basename)
|
if has_key(g:latexmk_running_pids, basename)
|
||||||
echomsg "don't clean when latexmk is running"
|
echomsg "don't clean when latexmk is running"
|
||||||
@@ -502,7 +502,7 @@ function! LatexBox_LatexmkStatus(detailed)
|
|||||||
echo "latexmk is running (" . plist . ")"
|
echo "latexmk is running (" . plist . ")"
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let basename = LatexBox_GetTexBasename(1)
|
let basename = LatexBox_GetBuildBasename(1)
|
||||||
if has_key(g:latexmk_running_pids, basename)
|
if has_key(g:latexmk_running_pids, basename)
|
||||||
echo "latexmk is running"
|
echo "latexmk is running"
|
||||||
else
|
else
|
||||||
@@ -516,12 +516,12 @@ endfunction
|
|||||||
function! LatexBox_LatexmkStop(silent)
|
function! LatexBox_LatexmkStop(silent)
|
||||||
if empty(g:latexmk_running_pids)
|
if empty(g:latexmk_running_pids)
|
||||||
if !a:silent
|
if !a:silent
|
||||||
let basepath = LatexBox_GetTexBasename(1)
|
let basepath = LatexBox_GetBuildBasename(1)
|
||||||
let basename = fnamemodify(basepath, ':t')
|
let basename = fnamemodify(basepath, ':t')
|
||||||
echoerr "latexmk is not running for `" . basename . "'"
|
echoerr "latexmk is not running for `" . basename . "'"
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
let basepath = LatexBox_GetTexBasename(1)
|
let basepath = LatexBox_GetBuildBasename(1)
|
||||||
let basename = fnamemodify(basepath, ':t')
|
let basename = fnamemodify(basepath, ':t')
|
||||||
if has_key(g:latexmk_running_pids, basepath)
|
if has_key(g:latexmk_running_pids, basepath)
|
||||||
call s:kill_latexmk_process(g:latexmk_running_pids[basepath])
|
call s:kill_latexmk_process(g:latexmk_running_pids[basepath])
|
||||||
|
|||||||
@@ -15,11 +15,20 @@ syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@el
|
|||||||
syn match elixirComment '#.*' contains=elixirTodo
|
syn match elixirComment '#.*' contains=elixirTodo
|
||||||
syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
|
syn keyword elixirTodo FIXME NOTE TODO OPTIMIZE XXX HACK contained
|
||||||
|
|
||||||
syn keyword elixirKeyword is_atom is_binary is_bitstring is_boolean is_float is_function is_integer is_list is_map is_number is_pid is_port is_record is_reference is_tuple is_exception
|
|
||||||
syn keyword elixirKeyword case when cond for if unless try receive send
|
syn keyword elixirKeyword case when cond for if unless try receive send
|
||||||
syn keyword elixirKeyword exit raise throw after rescue catch else do end
|
syn keyword elixirKeyword exit raise throw after rescue catch else do end
|
||||||
syn keyword elixirKeyword quote unquote super
|
syn keyword elixirKeyword quote unquote super
|
||||||
|
|
||||||
|
" Functions used on guards
|
||||||
|
syn keyword elixirKeyword contained is_atom is_binary is_bitstring is_boolean
|
||||||
|
syn keyword elixirKeyword contained is_float is_function is_integer is_list
|
||||||
|
syn keyword elixirKeyword contained is_map is_number is_pid is_port is_record
|
||||||
|
syn keyword elixirKeyword contained is_reference is_tuple is_exception abs
|
||||||
|
syn keyword elixirKeyword contained bit_size byte_size div elem hd length
|
||||||
|
syn keyword elixirKeyword contained map_size node rem round tl trunc tuple_size
|
||||||
|
|
||||||
|
syn match elixirGuard '.*when.*' contains=ALLBUT,@elixirNotTop
|
||||||
|
|
||||||
syn keyword elixirInclude import require alias use
|
syn keyword elixirInclude import require alias use
|
||||||
|
|
||||||
syn keyword elixirSelf self
|
syn keyword elixirSelf self
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ syn keyword htmlTagName contained missing-glyph mpath
|
|||||||
syn keyword htmlTagName contained text textPath tref tspan vkern
|
syn keyword htmlTagName contained text textPath tref tspan vkern
|
||||||
|
|
||||||
" Custom Element
|
" Custom Element
|
||||||
syn match htmlTagName contained "\<[a-z_]\+\(\-[a-z_]\+\)\+\>"
|
syn match htmlTagName contained "\<[a-z_]\([a-z0-9_.]\+\)\?\(\-[a-z0-9_.]\+\)\+\>"
|
||||||
|
|
||||||
" HTML 5 arguments
|
" HTML 5 arguments
|
||||||
" Core Attributes
|
" Core Attributes
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ set cpo&vim
|
|||||||
" @@IDENTIFIER@@ "\%(@@IDENT_NONDIGIT@@\%(@@IDENT_CHAR@@\|[-']@@IDENT_NONDIGIT@@\@=\)*\)"
|
" @@IDENTIFIER@@ "\%(@@IDENT_NONDIGIT@@\%(@@IDENT_CHAR@@\|[-']@@IDENT_NONDIGIT@@\@=\)*\)"
|
||||||
" @@IDENTIFIER_START@@ "@@IDENT_CHAR@@\@1<!\%(@@IDENT_NONDIGIT@@[-']\)\@2<!"
|
" @@IDENTIFIER_START@@ "@@IDENT_CHAR@@\@1<!\%(@@IDENT_NONDIGIT@@[-']\)\@2<!"
|
||||||
" @@IDENTIFIER_END@@ "\%(@@IDENT_CHAR@@\|[-']@@IDENT_NONDIGIT@@\)\@!"
|
" @@IDENTIFIER_END@@ "\%(@@IDENT_CHAR@@\|[-']@@IDENT_NONDIGIT@@\)\@!"
|
||||||
" @@METAOP@@ #\%(\d\|[@%$][.?^=[:alpha:]]\)\@!\%(\.\|[^[{('".([:space:]]\)\+#
|
" @@METAOP@@ #\%(\d\|[@%$][.?^=[:alpha:]]\)\@!\%(\.\|[^[{('".[:space:]]\)\+#
|
||||||
" @@ADVERBS@@ "\%(\_s*:!\?@@IDENTIFIER@@\%(([^)]*)\)\?\)*"
|
" @@ADVERBS@@ "\%(\_s*:!\?@@IDENTIFIER@@\%(([^)]*)\)\?\)*"
|
||||||
"
|
"
|
||||||
" Same but escaped, for use in string eval
|
" Same but escaped, for use in string eval
|
||||||
@@ -67,7 +67,7 @@ syn match p6Identifier display "\%([A-Za-z_\xC0-\xFF]\%([A-Za-z_\xC0-\xFF0-9]\|[
|
|||||||
|
|
||||||
let s:keywords = {
|
let s:keywords = {
|
||||||
\ "p6DeclareRoutine": [
|
\ "p6DeclareRoutine": [
|
||||||
\ "macro sub submethod method multi proto only category",
|
\ "macro sub submethod method multi proto only category unit",
|
||||||
\ ],
|
\ ],
|
||||||
\ "p6Module": [
|
\ "p6Module": [
|
||||||
\ "module class role package enum grammar slang subset",
|
\ "module class role package enum grammar slang subset",
|
||||||
@@ -182,7 +182,7 @@ syn match p6Operator display "\%(\s\|^\)\@1<=\%(xx=\|p5=>\)"
|
|||||||
syn match p6Operator display "\%(&\.(\@=\|@\.\[\@=\|%\.{\@=\)"
|
syn match p6Operator display "\%(&\.(\@=\|@\.\[\@=\|%\.{\@=\)"
|
||||||
|
|
||||||
" Reduce metaoperators like [+]
|
" Reduce metaoperators like [+]
|
||||||
syn match p6ReduceOp display "\%(^\|\s\|(\)\@1<=!*\%([RSXZ\[]\)*[&RSXZ]\?\[\+(\?\%(\d\|[@%$][.?^=[:alpha:]]\)\@!\%(\.\|[^[{('".([:space:]]\)\+)\?]\+"
|
syn match p6ReduceOp display "\%(^\|\s\|(\)\@1<=!*\%([RSXZ\[]\)*[&RSXZ]\?\[\+(\?\%(\d\|[@%$][.?^=[:alpha:]]\)\@!\%(\.\|[^[{('".[:space:]]\)\+)\?]\+"
|
||||||
syn match p6SetOp display "R\?(\%([-^.+|&]\|[<>][=+]\?\|cont\|elem\))"
|
syn match p6SetOp display "R\?(\%([-^.+|&]\|[<>][=+]\?\|cont\|elem\))"
|
||||||
|
|
||||||
" Reverse, cross, and zip metaoperators
|
" Reverse, cross, and zip metaoperators
|
||||||
@@ -422,10 +422,10 @@ syn region p6InnerFrench
|
|||||||
" them, but before other types of strings, to avoid matching those delimiters
|
" them, but before other types of strings, to avoid matching those delimiters
|
||||||
" as parts of hyperops.
|
" as parts of hyperops.
|
||||||
syn match p6HyperOp display #[^[:digit:][{('",:[:space:]][^[{('",:[:space:]]*\%(«\|<<\)#
|
syn match p6HyperOp display #[^[:digit:][{('",:[:space:]][^[{('",:[:space:]]*\%(«\|<<\)#
|
||||||
syn match p6HyperOp display "«\%(\d\|[@%$][.?^=[:alpha:]]\)\@!\%(\.\|[^[{('".([:space:]]\)\+[«»]"
|
syn match p6HyperOp display "«\%(\d\|[@%$][.?^=[:alpha:]]\)\@!\%(\.\|[^[{('".[:space:]]\)\+[«»]"
|
||||||
syn match p6HyperOp display "»\%(\d\|[@%$][.?^=[:alpha:]]\)\@!\%(\.\|[^[{('".([:space:]]\)\+\%(«\|»\?\)"
|
syn match p6HyperOp display "»\%(\d\|[@%$][.?^=[:alpha:]]\)\@!\%(\.\|[^[{('".[:space:]]\)\+\%(«\|»\?\)"
|
||||||
syn match p6HyperOp display "<<\%(\d\|[@%$][.?^=[:alpha:]]\)\@!\%(\.\|[^[{('".([:space:]]\)\+\%(<<\|>>\)"
|
syn match p6HyperOp display "<<\%(\d\|[@%$][.?^=[:alpha:]]\)\@!\%(\.\|[^[{('".[:space:]]\)\+\%(<<\|>>\)"
|
||||||
syn match p6HyperOp display ">>\%(\d\|[@%$][.?^=[:alpha:]]\)\@!\%(\.\|[^[{('".([:space:]]\)\+\%(<<\|\%(>>\)\?\)"
|
syn match p6HyperOp display ">>\%(\d\|[@%$][.?^=[:alpha:]]\)\@!\%(\.\|[^[{('".[:space:]]\)\+\%(<<\|\%(>>\)\?\)"
|
||||||
|
|
||||||
" 'string'
|
" 'string'
|
||||||
syn region p6StringSQ
|
syn region p6StringSQ
|
||||||
@@ -998,7 +998,7 @@ endif
|
|||||||
syn match p6Attention display "\<\%(ACHTUNG\|ATTN\|ATTENTION\|FIXME\|NB\|TODO\|TBD\|WTF\|XXX\|NOTE\)" contained
|
syn match p6Attention display "\<\%(ACHTUNG\|ATTN\|ATTENTION\|FIXME\|NB\|TODO\|TBD\|WTF\|XXX\|NOTE\)" contained
|
||||||
|
|
||||||
" normal end-of-line comment
|
" normal end-of-line comment
|
||||||
syn match p6Comment display "#`\@!.*" contains=p6Attention
|
syn match p6Comment display "#.*" contains=p6Attention
|
||||||
|
|
||||||
" Multiline comments. Arbitrary numbers of opening brackets are allowed,
|
" Multiline comments. Arbitrary numbers of opening brackets are allowed,
|
||||||
" but we only define regions for 1 to 3
|
" but we only define regions for 1 to 3
|
||||||
|
|||||||
@@ -202,7 +202,6 @@ syn match typescriptLogicSymbols "\(&&\)\|\(||\)"
|
|||||||
" typescriptFold Function {{{
|
" typescriptFold Function {{{
|
||||||
|
|
||||||
" function! typescriptFold()
|
" function! typescriptFold()
|
||||||
setl foldlevelstart=1
|
|
||||||
syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend
|
syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend
|
||||||
|
|
||||||
setl foldtext=FoldText()
|
setl foldtext=FoldText()
|
||||||
|
|||||||
Reference in New Issue
Block a user