Update
This commit is contained in:
parent
e404a658b1
commit
e685e4b431
@ -61,7 +61,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [haxe](https://github.com/yaymukund/vim-haxe) (syntax, ftdetect)
|
||||
- [html5](https://github.com/othree/html5.vim) (syntax, indent, autoload, ftplugin)
|
||||
- [jasmine](https://github.com/glanotte/vim-jasmine) (syntax, ftdetect)
|
||||
- [javascript](https://github.com/pangloss/vim-javascript) (syntax, indent, ftdetect, ftplugin, extras)
|
||||
- [javascript](https://github.com/pangloss/vim-javascript) (syntax, indent, compiler, ftdetect, ftplugin, extras)
|
||||
- [json](https://github.com/elzr/vim-json) (syntax, indent, ftplugin, ftdetect)
|
||||
- [jst](https://github.com/briancollins/vim-jst) (syntax, indent, ftdetect)
|
||||
- [jsx](https://github.com/mxw/vim-jsx) (ftdetect, after)
|
||||
@ -74,7 +74,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [lua](https://github.com/tbastos/vim-lua) (syntax, indent)
|
||||
- [mako](https://github.com/sophacles/vim-bundle-mako) (syntax, indent, ftplugin, ftdetect)
|
||||
- [markdown](https://github.com/plasticboy/vim-markdown) (syntax, ftdetect)
|
||||
- [nginx](https://github.com/othree/nginx-contrib-vim) (syntax, indent, ftdetect)
|
||||
- [nginx](https://github.com/othree/nginx-contrib-vim) (syntax, indent, ftplugin, ftdetect)
|
||||
- [nim](https://github.com/zah/nim.vim) (syntax, compiler, indent, ftdetect)
|
||||
- [nix](https://github.com/spwhitt/vim-nix) (syntax, ftplugin, ftdetect)
|
||||
- [objc](https://github.com/b4winckler/vim-objc) (ftplugin, syntax, indent)
|
||||
|
@ -20,7 +20,7 @@ setlocal indentexpr=GetCoffeeHtmlIndent(v:lnum)
|
||||
|
||||
function! GetCoffeeHtmlIndent(curlinenum)
|
||||
" See if we're inside a coffeescript block.
|
||||
let scriptlnum = searchpair('<script [^>]*type="text/coffeescript"[^>]*>', '',
|
||||
let scriptlnum = searchpair('<script [^>]*type=[''"]\?text/coffeescript[''"]\?[^>]*>', '',
|
||||
\ '</script>', 'bWn')
|
||||
let prevlnum = prevnonblank(a:curlinenum)
|
||||
|
||||
|
@ -11,7 +11,7 @@ endif
|
||||
|
||||
" Syntax highlighting for text/coffeescript script tags
|
||||
syn include @htmlCoffeeScript syntax/coffee.vim
|
||||
syn region coffeeScript start=#<script [^>]*type="text/coffeescript"[^>]*>#
|
||||
syn region coffeeScript start=#<script [^>]*type=['"]\?text/coffeescript['"]\?[^>]*>#
|
||||
\ end=#</script>#me=s-1 keepend
|
||||
\ contains=@htmlCoffeeScript,htmlScriptTag,@htmlPreproc
|
||||
\ containedin=htmlHead
|
||||
|
@ -40,7 +40,7 @@ syn keyword yamlConstant NULL Null null NONE None none NIL Nil nil
|
||||
syn keyword yamlConstant TRUE True true YES Yes yes ON On on
|
||||
syn keyword yamlConstant FALSE False false NO No no OFF Off off
|
||||
|
||||
syn match yamlKey "\w\+\ze\s*:"
|
||||
syn match yamlKey "^\s*\zs\S\+\ze\s*:"
|
||||
syn match yamlAnchor "&\S\+"
|
||||
syn match yamlAlias "*\S\+"
|
||||
|
||||
|
@ -3,7 +3,6 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1
|
||||
let s:NO_COLON_BEFORE = ':\@<!'
|
||||
let s:NO_COLON_AFTER = ':\@!'
|
||||
let s:ENDING_SYMBOLS = '\]\|}\|)'
|
||||
let s:STARTING_SYMBOLS = '\[\|{\|('
|
||||
let s:ARROW = '->'
|
||||
let s:END_WITH_ARROW = s:ARROW.'$'
|
||||
let s:SKIP_SYNTAX = '\%(Comment\|String\)$'
|
||||
@ -16,28 +15,31 @@ let s:MULTILINE_BLOCK = '\%(\<do\>'.s:NO_COLON_AFTER.'\|'.s:MULTILINE_FN.'\)'
|
||||
let s:BLOCK_MIDDLE = '\<\%(else\|match\|elsif\|catch\|after\|rescue\)\>'
|
||||
let s:BLOCK_END = 'end'
|
||||
let s:STARTS_WITH_PIPELINE = '^\s*|>.*$'
|
||||
let s:QUERY_FROM = '^\s*\<from\>.*\<in\>.*,'
|
||||
let s:ENDING_WITH_ASSIGNMENT = '=\s*$'
|
||||
let s:INDENT_KEYWORDS = s:NO_COLON_BEFORE.'\%('.s:MULTILINE_BLOCK.'\|'.s:BLOCK_MIDDLE.'\)'
|
||||
let s:DEINDENT_KEYWORDS = '^\s*\<\%('.s:BLOCK_END.'\|'.s:BLOCK_MIDDLE.'\)\>'
|
||||
let s:PAIR_START = '\<\%('.s:NO_COLON_BEFORE.s:BLOCK_START.'\)\>'.s:NO_COLON_AFTER
|
||||
let s:PAIR_MIDDLE = '^\s*\%('.s:BLOCK_MIDDLE.'\)\>'.s:NO_COLON_AFTER.'\zs'
|
||||
let s:PAIR_END = '\<\%('.s:NO_COLON_BEFORE.s:BLOCK_END.'\)\>\zs'
|
||||
let s:LINE_COMMENT = '^\s*#'
|
||||
let s:MATCH_OPERATOR = '[^!><=]=[^~=>]'
|
||||
|
||||
function! s:pending_parenthesis(line)
|
||||
if a:line.last.text !~ s:ARROW
|
||||
return elixir#util#count_indentable_symbol_diff(a:line.last, '(', '\%(end\s*\)\@<!)')
|
||||
if a:line.last_non_blank.text !~ s:ARROW
|
||||
return elixir#util#count_indentable_symbol_diff(a:line.last_non_blank, '(', '\%(end\s*\)\@<!)')
|
||||
end
|
||||
endfunction
|
||||
|
||||
function! s:pending_square_brackets(line)
|
||||
if a:line.last.text !~ s:ARROW
|
||||
return elixir#util#count_indentable_symbol_diff(a:line.last, '[', ']')
|
||||
if a:line.last_non_blank.text !~ s:ARROW
|
||||
return elixir#util#count_indentable_symbol_diff(a:line.last_non_blank, '[', ']')
|
||||
end
|
||||
endfunction
|
||||
|
||||
function! s:pending_brackets(line)
|
||||
if a:line.last.text !~ s:ARROW
|
||||
return elixir#util#count_indentable_symbol_diff(a:line.last, '{', '}')
|
||||
if a:line.last_non_blank.text !~ s:ARROW
|
||||
return elixir#util#count_indentable_symbol_diff(a:line.last_non_blank, '{', '}')
|
||||
end
|
||||
endfunction
|
||||
|
||||
@ -93,13 +95,21 @@ function! elixir#indent#deindent_opened_symbols(ind, line)
|
||||
endfunction
|
||||
|
||||
function! elixir#indent#indent_after_pipeline(ind, line)
|
||||
if a:line.last.text =~ s:STARTS_WITH_PIPELINE
|
||||
if exists("b:old_ind.pipeline")
|
||||
\ && elixir#util#is_blank(a:line.last.text)
|
||||
\ && a:line.current.text !~ s:STARTS_WITH_PIPELINE
|
||||
" Reset indentation in pipelines if there is a blank line between
|
||||
" pipes
|
||||
let ind = b:old_ind.pipeline
|
||||
unlet b:old_ind.pipeline
|
||||
return ind
|
||||
elseif a:line.last_non_blank.text =~ s:STARTS_WITH_PIPELINE
|
||||
if empty(substitute(a:line.current.text, ' ', '', 'g'))
|
||||
\ || a:line.current.text =~ s:STARTS_WITH_PIPELINE
|
||||
return indent(a:line.last.num)
|
||||
elseif a:line.last.text !~ s:INDENT_KEYWORDS
|
||||
return indent(a:line.last_non_blank.num)
|
||||
elseif a:line.last_non_blank.text !~ s:INDENT_KEYWORDS
|
||||
let ind = b:old_ind.pipeline
|
||||
let b:old_ind.pipeline = 0
|
||||
unlet b:old_ind.pipeline
|
||||
return ind
|
||||
end
|
||||
end
|
||||
@ -108,8 +118,8 @@ function! elixir#indent#indent_after_pipeline(ind, line)
|
||||
endfunction
|
||||
|
||||
function! elixir#indent#indent_assignment(ind, line)
|
||||
if a:line.last.text =~ s:ENDING_WITH_ASSIGNMENT
|
||||
let b:old_ind.pipeline = indent(a:line.last.num) " FIXME: side effect
|
||||
if a:line.last_non_blank.text =~ s:ENDING_WITH_ASSIGNMENT
|
||||
let b:old_ind.pipeline = indent(a:line.last_non_blank.num) " FIXME: side effect
|
||||
return a:ind + &sw
|
||||
else
|
||||
return a:ind
|
||||
@ -125,7 +135,7 @@ function! elixir#indent#indent_brackets(ind, line)
|
||||
endfunction
|
||||
|
||||
function! elixir#indent#indent_case_arrow(ind, line)
|
||||
if a:line.last.text =~ s:END_WITH_ARROW && a:line.last.text !~ '\<fn\>'
|
||||
if a:line.last_non_blank.text =~ s:END_WITH_ARROW && a:line.last_non_blank.text !~ '\<fn\>'
|
||||
let b:old_ind.arrow = a:ind
|
||||
return a:ind + &sw
|
||||
else
|
||||
@ -134,7 +144,7 @@ function! elixir#indent#indent_case_arrow(ind, line)
|
||||
endfunction
|
||||
|
||||
function! elixir#indent#indent_ending_symbols(ind, line)
|
||||
if a:line.last.text =~ '^\s*\('.s:ENDING_SYMBOLS.'\)\s*$'
|
||||
if a:line.last_non_blank.text =~ '^\s*\('.s:ENDING_SYMBOLS.'\)\s*$'
|
||||
return a:ind + &sw
|
||||
else
|
||||
return a:ind
|
||||
@ -142,7 +152,7 @@ function! elixir#indent#indent_ending_symbols(ind, line)
|
||||
endfunction
|
||||
|
||||
function! elixir#indent#indent_keywords(ind, line)
|
||||
if a:line.last.text =~ s:INDENT_KEYWORDS
|
||||
if a:line.last_non_blank.text =~ s:INDENT_KEYWORDS && a:line.last_non_blank.text !~ s:LINE_COMMENT
|
||||
return a:ind + &sw
|
||||
else
|
||||
return a:ind
|
||||
@ -151,10 +161,10 @@ endfunction
|
||||
|
||||
function! elixir#indent#indent_parenthesis(ind, line)
|
||||
if s:pending_parenthesis(a:line) > 0
|
||||
\ && a:line.last.text !~ s:DEF
|
||||
\ && a:line.last.text !~ s:END_WITH_ARROW
|
||||
\ && a:line.last_non_blank.text !~ s:DEF
|
||||
\ && a:line.last_non_blank.text !~ s:END_WITH_ARROW
|
||||
let b:old_ind.symbol = a:ind
|
||||
return matchend(a:line.last.text, '(')
|
||||
return matchend(a:line.last_non_blank.text, '(')
|
||||
else
|
||||
return a:ind
|
||||
end
|
||||
@ -162,21 +172,22 @@ endfunction
|
||||
|
||||
function! elixir#indent#indent_pipeline_assignment(ind, line)
|
||||
if a:line.current.text =~ s:STARTS_WITH_PIPELINE
|
||||
\ && a:line.last.text =~ '^[^=]\+=.\+$'
|
||||
let b:old_ind.pipeline = indent(a:line.last.num)
|
||||
\ && a:line.last_non_blank.text =~ s:MATCH_OPERATOR
|
||||
let b:old_ind.pipeline = indent(a:line.last_non_blank.num)
|
||||
" if line starts with pipeline
|
||||
" and last line is an attribution
|
||||
" and last_non_blank line is an attribution
|
||||
" indents pipeline in same level as attribution
|
||||
return match(a:line.last.text, '=\s*\zs[^ ]')
|
||||
let assign_pos = match(a:line.last_non_blank.text, '=\s*\zs[^ ]')
|
||||
return (elixir#util#is_indentable_at(a:line.last_non_blank.num, assign_pos) ? assign_pos : a:ind)
|
||||
else
|
||||
return a:ind
|
||||
end
|
||||
endfunction
|
||||
|
||||
function! elixir#indent#indent_pipeline_continuation(ind, line)
|
||||
if a:line.last.text =~ s:STARTS_WITH_PIPELINE
|
||||
if a:line.last_non_blank.text =~ s:STARTS_WITH_PIPELINE
|
||||
\ && a:line.current.text =~ s:STARTS_WITH_PIPELINE
|
||||
return indent(a:line.last.num)
|
||||
return indent(a:line.last_non_blank.num)
|
||||
else
|
||||
return a:ind
|
||||
end
|
||||
@ -184,26 +195,22 @@ endfunction
|
||||
|
||||
function! elixir#indent#indent_square_brackets(ind, line)
|
||||
if s:pending_square_brackets(a:line) > 0
|
||||
if a:line.last.text =~ '[\s*$'
|
||||
if a:line.last_non_blank.text =~ '[\s*$'
|
||||
return a:ind + &sw
|
||||
else
|
||||
" if start symbol is followed by a character, indent based on the
|
||||
" whitespace after the symbol, otherwise use the default shiftwidth
|
||||
" Avoid negative indentation index
|
||||
return matchend(a:line.last.text, '[\s*')
|
||||
return matchend(a:line.last_non_blank.text, '[\s*')
|
||||
end
|
||||
else
|
||||
return a:ind
|
||||
end
|
||||
endfunction
|
||||
|
||||
function! elixir#indent#deindent_case_arrow(ind, line)
|
||||
if get(b:old_ind, 'arrow', 0) > 0
|
||||
\ && (a:line.current.text =~ s:ARROW
|
||||
\ || a:line.current.text =~ s:BLOCK_END)
|
||||
let ind = b:old_ind.arrow
|
||||
let b:old_ind.arrow = 0
|
||||
return ind
|
||||
function! elixir#indent#indent_ecto_queries(ind, line)
|
||||
if a:line.last_non_blank.text =~ s:QUERY_FROM
|
||||
return a:ind + &sw
|
||||
else
|
||||
return a:ind
|
||||
end
|
||||
|
@ -1,7 +1,6 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1
|
||||
|
||||
let s:SKIP_SYNTAX = '\%(Comment\|String\)$'
|
||||
let s:BLOCK_SKIP = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '".s:SKIP_SYNTAX."'"
|
||||
|
||||
function! elixir#util#is_indentable_at(line, col)
|
||||
if a:col == -1 " skip synID lookup for not found match
|
||||
@ -20,31 +19,24 @@ function! elixir#util#is_indentable_at(line, col)
|
||||
\ !~ s:SKIP_SYNTAX
|
||||
endfunction
|
||||
|
||||
function! elixir#util#is_indentable_match(line, pattern)
|
||||
return elixir#util#is_indentable_at(a:line.num, match(a:line.text, a:pattern))
|
||||
endfunction
|
||||
|
||||
function! elixir#util#count_indentable_symbol_diff(line, open, close)
|
||||
if elixir#util#is_indentable_match(a:line, a:open)
|
||||
\ && elixir#util#is_indentable_match(a:line, a:close)
|
||||
return
|
||||
\ s:match_count(a:line.text, a:open)
|
||||
\ - s:match_count(a:line.text, a:close)
|
||||
else
|
||||
return 0
|
||||
end
|
||||
\ s:match_count(a:line, a:open)
|
||||
\ - s:match_count(a:line, a:close)
|
||||
endfunction
|
||||
|
||||
function! s:match_count(string, pattern)
|
||||
let size = strlen(a:string)
|
||||
function! s:match_count(line, pattern)
|
||||
let size = strlen(a:line.text)
|
||||
let index = 0
|
||||
let counter = 0
|
||||
|
||||
while index < size
|
||||
let index = match(a:string, a:pattern, index)
|
||||
let index = match(a:line.text, a:pattern, index)
|
||||
if index >= 0
|
||||
let index += 1
|
||||
if elixir#util#is_indentable_at(a:line.num, index)
|
||||
let counter +=1
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
@ -53,4 +45,8 @@ function! s:match_count(string, pattern)
|
||||
return counter
|
||||
endfunction
|
||||
|
||||
function elixir#util#is_blank(string)
|
||||
return a:string =~ '^\s*$'
|
||||
endfunction
|
||||
|
||||
endif
|
||||
|
@ -18,8 +18,10 @@ let default_role = {}
|
||||
let widget_role = ['alert', 'alertdialog', 'button', 'checkbox', 'combobox', 'dialog', 'gridcell', 'link', 'log', 'marquee', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'radiogroup', 'scrollbar', 'slider', 'spinbutton', 'status', 'tab', 'tabpanel', 'textbox', 'timer', 'tooltip', 'treeitem', 'combobox', 'grid', 'listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid']
|
||||
let document_structure = ['article', 'columnheader', 'definition', 'directory', 'document', 'group', 'heading', 'img', 'list', 'listitem', 'math', 'note', 'presentation', 'region', 'row', 'rowheader', 'separator']
|
||||
let landmark_role = ['application', 'banner', 'complementary', 'contentinfo', 'form', 'main', 'navigation', 'search']
|
||||
let dpub_role = ['dpub-abstract', 'dpub-afterword', 'dpub-appendix', 'dpub-biblioentry', 'dpub-bibliography', 'dpub-biblioref', 'dpub-chapter', 'dpub-cover', 'dpub-epilogue', 'dpub-footnote', 'dpub-footnotes', 'dpub-foreword', 'dpub-glossary', 'dpub-glossdef', 'dpub-glossref', 'dpub-glossterm', 'dpub-index', 'dpub-locator', 'dpub-noteref', 'dpub-notice', 'dpub-pagebreak', 'dpub-pagelist', 'dpub-part', 'dpub-preface', 'dpub-prologue', 'dpub-pullquote', 'dpub-qna', 'dpub-subtitle', 'dpub-tip', 'dpub-title', 'dpub-toc']
|
||||
let role = extend(widget_role, document_structure)
|
||||
let role = extend(role, landmark_role)
|
||||
let role = extend(role, dpub_role)
|
||||
|
||||
" http://www.w3.org/TR/wai-aria/states_and_properties#state_prop_taxonomy
|
||||
"let global_states_and_properties = {'aria-atomic': ['true', 'false'], 'aria-busy': ['true', 'false'], 'aria-controls': [], 'aria-describedby': [], 'aria-disabled': ['true', 'false'], 'aria-dropeffect': ['copy', 'move', 'link', 'execute', 'popup', 'none'], 'aria-flowto': [], 'aria-grabbed': ['true', 'false', 'undefined'], 'aria-haspopup': ['true', 'false'], 'aria-hidden': ['true', 'false'], 'aria-invalid': ['grammar', 'spelling', 'true', 'false'], 'aria-label': [], 'aria-labelledby': [], 'aria-live': ['off', 'polite', 'assertive'], 'aria-owns': [], 'aria-relevant': ['additions', 'removals', 'text', 'all']}
|
||||
|
@ -320,8 +320,10 @@ if g:html5_aria_attributes_complete == 1
|
||||
let widget_role = ['alert', 'alertdialog', 'button', 'checkbox', 'combobox', 'dialog', 'gridcell', 'link', 'log', 'marquee', 'menuitem', 'menuitemcheckbox', 'menuitemradio', 'option', 'progressbar', 'radio', 'radiogroup', 'scrollbar', 'slider', 'spinbutton', 'status', 'tab', 'tabpanel', 'textbox', 'timer', 'tooltip', 'treeitem', 'combobox', 'grid', 'listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid']
|
||||
let document_structure = ['article', 'columnheader', 'definition', 'directory', 'document', 'group', 'heading', 'img', 'list', 'listitem', 'math', 'note', 'presentation', 'region', 'row', 'rowheader', 'separator']
|
||||
let landmark_role = ['application', 'banner', 'complementary', 'contentinfo', 'form', 'main', 'navigation', 'search']
|
||||
let dpub_role = ['dpub-abstract', 'dpub-afterword', 'dpub-appendix', 'dpub-biblioentry', 'dpub-bibliography', 'dpub-biblioref', 'dpub-chapter', 'dpub-cover', 'dpub-epilogue', 'dpub-footnote', 'dpub-footnotes', 'dpub-foreword', 'dpub-glossary', 'dpub-glossdef', 'dpub-glossref', 'dpub-glossterm', 'dpub-index', 'dpub-locator', 'dpub-noteref', 'dpub-notice', 'dpub-pagebreak', 'dpub-pagelist', 'dpub-part', 'dpub-preface', 'dpub-prologue', 'dpub-pullquote', 'dpub-qna', 'dpub-subtitle', 'dpub-tip', 'dpub-title', 'dpub-toc']
|
||||
let role = extend(widget_role, document_structure)
|
||||
let role = extend(role, landmark_role)
|
||||
let role = extend(role, dpub_role)
|
||||
let global_attributes = extend(global_attributes, {'role': role})
|
||||
endif
|
||||
" }}}
|
||||
|
15
compiler/eslint.vim
Normal file
15
compiler/eslint.vim
Normal file
@ -0,0 +1,15 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "eslint"
|
||||
|
||||
if exists(":CompilerSet") != 2
|
||||
command! -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet makeprg=eslint\ -f\ compact\ %
|
||||
CompilerSet errorformat=%f:\ line\ %l\\,\ col\ %c\\,\ %m
|
||||
|
||||
endif
|
@ -6,16 +6,17 @@ syntax region jsFlowArray contained matchgroup=jsFlowNoise start=/\[/
|
||||
syntax region jsFlowObject contained matchgroup=jsFlowNoise start=/{/ end=/}/ contains=@jsFlowCluster
|
||||
syntax region jsFlowParens contained matchgroup=jsFlowNoise start=/(/ end=/)/ contains=@jsFlowCluster
|
||||
syntax match jsFlowNoise contained /[:;,<>]/
|
||||
syntax keyword jsFlowType contained boolean number string null void any mixed JSON array function object array bool class
|
||||
syntax keyword jsFlowType contained boolean number string null void any mixed JSON array Function object array bool class
|
||||
syntax keyword jsFlowTypeof contained typeof skipempty skipempty nextgroup=jsFlowTypeCustom,jsFlowType
|
||||
syntax match jsFlowTypeCustom contained /[0-9a-zA-Z_.]*/ skipwhite skipempty nextgroup=jsFlowGroup
|
||||
syntax region jsFlowGroup contained matchgroup=jsFlowNoise start=/</ end=/>/ contains=@jsFlowCluster
|
||||
syntax region jsFlowArrowArguments contained matchgroup=jsFlowNoise start=/(/ end=/)\%(\s*=>\)\@=/ oneline skipwhite skipempty nextgroup=jsFlowArrow contains=@jsFlowCluster
|
||||
syntax match jsFlowArrow contained /=>/ skipwhite skipempty nextgroup=jsFlowType,jsFlowTypeCustom,jsFlowParens
|
||||
syntax match jsFlowMaybe contained /?/ skipwhite skipempty nextgroup=jsFlowType,jsFlowTypeCustom,jsFlowParens,jsFlowArrowArguments
|
||||
syntax match jsFlowMaybe contained /?/ skipwhite skipempty nextgroup=jsFlowType,jsFlowTypeCustom,jsFlowParens,jsFlowArrowArguments,jsFlowObject,jsFlowReturnObject
|
||||
syntax match jsFlowObjectKey contained /[0-9a-zA-Z_$?]*\(\s*:\)\@=/ contains=jsFunctionKey,jsFlowMaybe skipwhite skipempty nextgroup=jsObjectValue containedin=jsObject
|
||||
syntax match jsFlowOrOperator contained /|/ skipwhite skipempty nextgroup=@jsFlowCluster
|
||||
syntax keyword jsFlowImportType contained type skipwhite skipempty nextgroup=jsModuleAsterisk,jsModuleKeyword,jsModuleGroup
|
||||
syntax match jsFlowWildcard contained /*/
|
||||
|
||||
syntax match jsFlowReturn contained /:\s*/ contains=jsFlowNoise skipwhite skipempty nextgroup=@jsFlowReturnCluster
|
||||
syntax region jsFlowReturnObject contained matchgroup=jsFlowNoise start=/{/ end=/}/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsFuncBlock,jsFlowReturnOrOp
|
||||
@ -25,11 +26,12 @@ syntax match jsFlowReturnKeyword contained /\k\+/ contains=jsFlowType,jsFlowT
|
||||
syntax match jsFlowReturnMaybe contained /?/ skipwhite skipempty nextgroup=jsFlowReturnKeyword
|
||||
syntax region jsFlowReturnGroup contained matchgroup=jsFlowNoise start=/</ end=/>/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsFuncBlock,jsFlowReturnOrOp
|
||||
syntax match jsFlowReturnOrOp contained /\s*|\s*/ skipwhite skipempty nextgroup=@jsFlowReturnCluster
|
||||
syntax match jsFlowWildcardReturn contained /*/ skipwhite skipempty nextgroup=jsFuncBlock
|
||||
|
||||
syntax region jsFlowFunctionGroup contained matchgroup=jsFlowNoise start=/</ end=/>/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsFuncArgs
|
||||
syntax region jsFlowClassGroup contained matchgroup=jsFlowNoise start=/</ end=/>/ contains=@jsFlowCluster skipwhite skipempty nextgroup=jsClassBlock
|
||||
|
||||
syntax region jsFlowTypeStatement start=/type/ end=/=\@=/ contains=jsFlowTypeOperator oneline skipwhite skipempty nextgroup=jsFlowTypeValue keepend
|
||||
syntax region jsFlowTypeStatement start=/type\%(\s\+\k\)\@=/ end=/=\@=/ contains=jsFlowTypeOperator oneline skipwhite skipempty nextgroup=jsFlowTypeValue keepend
|
||||
syntax region jsFlowTypeValue contained start=/=/ end=/[;\n]/ contains=@jsExpression,jsFlowGroup,jsFlowMaybe
|
||||
syntax match jsFlowTypeOperator contained /=/
|
||||
syntax keyword jsFlowTypeKeyword contained type
|
||||
@ -44,8 +46,8 @@ syntax region jsFlowDeclareBlock contained matchgroup=jsFlowNoise start=/{/ e
|
||||
|
||||
syntax region jsFlowInterfaceBlock contained matchgroup=jsFlowNoise start=/{/ end=/}/ contains=jsObjectKey,jsObjectKeyString,jsObjectKeyComputed,jsObjectSeparator,jsObjectFuncName,jsObjectMethodType,jsGenerator,jsComment,jsObjectStringKey,jsSpreadExpression,jsFlowNoise keepend
|
||||
|
||||
syntax cluster jsFlowReturnCluster contains=jsFlowNoise,jsFlowReturnObject,jsFlowReturnArray,jsFlowReturnKeyword,jsFlowReturnGroup,jsFlowReturnMaybe,jsFlowReturnOrOp
|
||||
syntax cluster jsFlowCluster contains=jsFlowArray,jsFlowObject,jsFlowNoise,jsFlowTypeof,jsFlowType,jsFlowGroup,jsFlowArrowArguments,jsFlowMaybe,jsFlowParens,jsFlowOrOperator
|
||||
syntax cluster jsFlowReturnCluster contains=jsFlowNoise,jsFlowReturnObject,jsFlowReturnArray,jsFlowReturnKeyword,jsFlowReturnGroup,jsFlowReturnMaybe,jsFlowReturnOrOp,jsFlowWildcardReturn
|
||||
syntax cluster jsFlowCluster contains=jsFlowArray,jsFlowObject,jsFlowNoise,jsFlowTypeof,jsFlowType,jsFlowGroup,jsFlowArrowArguments,jsFlowMaybe,jsFlowParens,jsFlowOrOperator,jsFlowWildcard
|
||||
|
||||
if version >= 508 || !exists("did_javascript_syn_inits")
|
||||
if version < 508
|
||||
@ -86,6 +88,8 @@ if version >= 508 || !exists("did_javascript_syn_inits")
|
||||
HiLink jsFlowObjectKey jsObjectKey
|
||||
HiLink jsFlowOrOperator PreProc
|
||||
HiLink jsFlowReturnOrOp jsFlowOrOperator
|
||||
HiLink jsFlowWildcard PreProc
|
||||
HiLink jsFlowWildcardReturn PreProc
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
|
@ -6,9 +6,9 @@ syntax region jsComment matchgroup=jsComment start="/\*\s*" end="\*/" contai
|
||||
" tags containing a param
|
||||
syntax match jsDocTags contained "@\(alias\|api\|augments\|borrows\|class\|constructs\|default\|defaultvalue\|emits\|exception\|exports\|extends\|fires\|kind\|link\|listens\|member\|member[oO]f\|mixes\|module\|name\|namespace\|requires\|template\|throws\|var\|variation\|version\)\>" skipwhite nextgroup=jsDocParam
|
||||
" tags containing type and param
|
||||
syntax match jsDocTags contained "@\(arg\|argument\|cfg\|param\|property\|prop\)\>" skipwhite nextgroup=jsDocType
|
||||
syntax match jsDocTags contained "@\(arg\|argument\|cfg\|param\|property\|prop\|typedef\)\>" skipwhite nextgroup=jsDocType
|
||||
" tags containing type but no param
|
||||
syntax match jsDocTags contained "@\(callback\|define\|enum\|external\|implements\|this\|type\|typedef\|return\|returns\)\>" skipwhite nextgroup=jsDocTypeNoParam
|
||||
syntax match jsDocTags contained "@\(callback\|define\|enum\|external\|implements\|this\|type\|return\|returns\)\>" skipwhite nextgroup=jsDocTypeNoParam
|
||||
" tags containing references
|
||||
syntax match jsDocTags contained "@\(lends\|see\|tutorial\)\>" skipwhite nextgroup=jsDocSeeTag
|
||||
" other tags (no extra syntax)
|
||||
|
@ -334,6 +334,8 @@ endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haskell') == -1
|
||||
|
||||
au BufRead,BufNewFile *.hsc set filetype=haskell
|
||||
au BufRead,BufNewFile *.bpk set filetype=haskell
|
||||
au BufRead,BufNewFile *.hsig set filetype=haskell
|
||||
|
||||
endif
|
||||
|
||||
@ -613,7 +615,6 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plantuml') == -
|
||||
" Vim ftdetect file
|
||||
" Language: PlantUML
|
||||
" Maintainer: Aaron C. Meadows < language name at shadowguarddev dot com>
|
||||
" Last Change: 19-Jun-2012
|
||||
" Version: 0.1
|
||||
|
||||
if did_filetype()
|
||||
@ -955,10 +956,8 @@ endif
|
||||
" ftdetect/toml.vim
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'toml') == -1
|
||||
|
||||
autocmd BufNewFile,BufRead *.toml set filetype=toml
|
||||
|
||||
" Rust uses Cargo.toml and Cargo.lock (both are toml files).
|
||||
autocmd BufNewFile,BufRead Cargo.lock set filetype=toml
|
||||
" Rust uses several TOML config files that are not named with .toml.
|
||||
autocmd BufNewFile,BufRead *.toml,Cargo.lock,.cargo/config set filetype=toml
|
||||
|
||||
endif
|
||||
|
||||
|
@ -12,7 +12,7 @@ if exists('loaded_matchit') && !exists('b:match_words')
|
||||
let b:match_ignorecase = 0
|
||||
|
||||
let b:match_words =
|
||||
\ '\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|struct\|lib\|macro\|ifdef\|def\|fun\|begin\)\>=\@!' .
|
||||
\ '\<\%(if\|unless\|case\|while\|until\|for\|do\|class\|module\|struct\|lib\|macro\|ifdef\|def\|fun\|begin\|enum\)\>=\@!' .
|
||||
\ ':' .
|
||||
\ '\<\%(else\|elsif\|ensure\|when\|rescue\|break\|redo\|next\|retry\)\>' .
|
||||
\ ':' .
|
||||
|
5
ftplugin/nginx.vim
Normal file
5
ftplugin/nginx.vim
Normal file
@ -0,0 +1,5 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
setlocal commentstring=#\ %s
|
||||
|
||||
endif
|
@ -3,13 +3,14 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plantuml') == -
|
||||
" Vim plugin file
|
||||
" Language: PlantUML
|
||||
" Maintainer: Aaron C. Meadows < language name at shadowguarddev dot com>
|
||||
" Last Change: 19-Jun-2012
|
||||
" Version: 0.1
|
||||
|
||||
if exists("b:loaded_plantuml_plugin")
|
||||
finish
|
||||
endif
|
||||
let b:loaded_plantuml_plugin = 1
|
||||
let s:cpo_save = &cpo
|
||||
set cpo&vim
|
||||
|
||||
if !exists("g:plantuml_executable_script")
|
||||
let g:plantuml_executable_script="plantuml"
|
||||
@ -35,4 +36,7 @@ let b:endwise_words = 'loop,group,alt,note,legend'
|
||||
let b:endwise_pattern = '^\s*\zs\<\(loop\|group\|alt\|note\ze[^:]*$\|legend\)\>.*$'
|
||||
let b:endwise_syngroups = 'plantumlKeyword'
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
endif
|
||||
|
@ -16,7 +16,7 @@ set cpo&vim
|
||||
function! elixir#indent()
|
||||
" initiates the `old_ind` dictionary
|
||||
let b:old_ind = get(b:, 'old_ind', {})
|
||||
" initialtes the `line` dictionary
|
||||
" initiates the `line` dictionary
|
||||
let line = s:build_line(v:lnum)
|
||||
|
||||
if s:is_beginning_of_file(line)
|
||||
@ -27,31 +27,48 @@ function! elixir#indent()
|
||||
elseif !s:is_indentable_line(line)
|
||||
" Keep last line indentation if the current line does not have an
|
||||
" indentable syntax
|
||||
return indent(line.last.num)
|
||||
return indent(line.last_non_blank.num)
|
||||
else
|
||||
" Calculates the indenation level based on the rules
|
||||
" All the rules are defined in `autoload/indent.vim`
|
||||
let ind = indent(line.last.num)
|
||||
let ind = elixir#indent#deindent_case_arrow(ind, line)
|
||||
let ind = elixir#indent#indent_parenthesis(ind, line)
|
||||
let ind = elixir#indent#indent_square_brackets(ind, line)
|
||||
let ind = elixir#indent#indent_brackets(ind, line)
|
||||
let ind = elixir#indent#deindent_opened_symbols(ind, line)
|
||||
let ind = elixir#indent#indent_pipeline_assignment(ind, line)
|
||||
let ind = elixir#indent#indent_pipeline_continuation(ind, line)
|
||||
let ind = elixir#indent#indent_after_pipeline(ind, line)
|
||||
let ind = elixir#indent#indent_assignment(ind, line)
|
||||
let ind = elixir#indent#indent_ending_symbols(ind, line)
|
||||
let ind = elixir#indent#indent_keywords(ind, line)
|
||||
let ind = elixir#indent#deindent_keywords(ind, line)
|
||||
let ind = elixir#indent#deindent_ending_symbols(ind, line)
|
||||
let ind = elixir#indent#indent_case_arrow(ind, line)
|
||||
" All the rules are defined in `autoload/elixir/indent.vim`
|
||||
let ind = indent(line.last_non_blank.num)
|
||||
call s:debug('>>> line = ' . string(line.current))
|
||||
call s:debug('>>> ind = ' . ind)
|
||||
let ind = s:indent('deindent_case_arrow', ind, line)
|
||||
let ind = s:indent('indent_parenthesis', ind, line)
|
||||
let ind = s:indent('indent_square_brackets', ind, line)
|
||||
let ind = s:indent('indent_brackets', ind, line)
|
||||
let ind = s:indent('deindent_opened_symbols', ind, line)
|
||||
let ind = s:indent('indent_pipeline_assignment', ind, line)
|
||||
let ind = s:indent('indent_pipeline_continuation', ind, line)
|
||||
let ind = s:indent('indent_after_pipeline', ind, line)
|
||||
let ind = s:indent('indent_assignment', ind, line)
|
||||
let ind = s:indent('indent_ending_symbols', ind, line)
|
||||
let ind = s:indent('indent_keywords', ind, line)
|
||||
let ind = s:indent('deindent_keywords', ind, line)
|
||||
let ind = s:indent('deindent_ending_symbols', ind, line)
|
||||
let ind = s:indent('indent_case_arrow', ind, line)
|
||||
let ind = s:indent('indent_ecto_queries', ind, line)
|
||||
call s:debug('<<< final = ' . ind)
|
||||
return ind
|
||||
end
|
||||
endfunction
|
||||
|
||||
function s:indent(rule, ind, line)
|
||||
let Fn = function('elixir#indent#'.a:rule)
|
||||
let ind = Fn(a:ind, a:line)
|
||||
call s:debug(a:rule . ' = ' . ind)
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
function s:debug(message)
|
||||
if get(g:, 'elixir_indent_debug', 0)
|
||||
echom a:message
|
||||
end
|
||||
endfunction
|
||||
|
||||
function! s:is_beginning_of_file(line)
|
||||
return a:line.last.num == 0
|
||||
return a:line.last_non_blank.num == 0
|
||||
endfunction
|
||||
|
||||
function! s:is_indentable_line(line)
|
||||
@ -59,15 +76,21 @@ function! s:is_indentable_line(line)
|
||||
endfunction
|
||||
|
||||
function! s:build_line(line)
|
||||
let line = { 'current': {}, 'last': {} }
|
||||
let line.current.num = a:line
|
||||
let line.current.text = getline(line.current.num)
|
||||
let line.last.num = prevnonblank(line.current.num - 1)
|
||||
let line.last.text = getline(line.last.num)
|
||||
let line = { 'current': {}, 'last': {}, 'last_non_blank': {} }
|
||||
let line.current = s:new_line(a:line)
|
||||
let line.last = s:new_line(line.current.num - 1)
|
||||
let line.last_non_blank = s:new_line(prevnonblank(line.current.num - 1))
|
||||
|
||||
return line
|
||||
endfunction
|
||||
|
||||
function! s:new_line(num)
|
||||
return {
|
||||
\ "num": a:num,
|
||||
\ "text": getline(a:num)
|
||||
\ }
|
||||
endfunction
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
unlet s:cpo_save
|
||||
|
||||
|
@ -476,11 +476,6 @@ function! GetHaskellIndent()
|
||||
if l:line =~ '^\s*]'
|
||||
return s:indentMatching(']')
|
||||
endif
|
||||
"
|
||||
" indent import
|
||||
if l:line =~ '\C^\s*import'
|
||||
return 0
|
||||
endif
|
||||
|
||||
" do not reindent indented lines
|
||||
if match(l:prevline, '\S') < match(l:line, '\S')
|
||||
|
@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') ==
|
||||
" Language: Javascript
|
||||
" Maintainer: Chris Paul ( https://github.com/bounceme )
|
||||
" URL: https://github.com/pangloss/vim-javascript
|
||||
" Last Change: December 14, 2016
|
||||
" Last Change: January 24, 2017
|
||||
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists('b:did_indent')
|
||||
@ -41,37 +41,39 @@ endif
|
||||
" searchpair() wrapper
|
||||
if has('reltime')
|
||||
function s:GetPair(start,end,flags,skip,time,...)
|
||||
return searchpair(a:start,'',a:end,a:flags,a:skip,max([prevnonblank(v:lnum) - 2000,0] + a:000),a:time)
|
||||
return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,max([prevnonblank(v:lnum) - 2000,0] + a:000),a:time)
|
||||
endfunction
|
||||
else
|
||||
function s:GetPair(start,end,flags,skip,...)
|
||||
return searchpair(a:start,'',a:end,a:flags,a:skip,max([prevnonblank(v:lnum) - 1000,get(a:000,1)]))
|
||||
return searchpair('\m'.a:start,'','\m'.a:end,a:flags,a:skip,max([prevnonblank(v:lnum) - 1000,get(a:000,1)]))
|
||||
endfunction
|
||||
endif
|
||||
|
||||
" Regex of syntax group names that are or delimit string or are comments.
|
||||
let s:syng_strcom = 'string\|comment\|regex\|special\|doc\|template'
|
||||
let s:syng_strcom = 'string\|comment\|regex\|special\|doc\|template\%(braces\)\@!'
|
||||
let s:syng_str = 'string\|template'
|
||||
let s:syng_com = 'comment\|doc'
|
||||
" Expression used to check whether we should skip a match with searchpair().
|
||||
let s:skip_expr = "synIDattr(synID(line('.'),col('.'),0),'name') =~? '".s:syng_strcom."'"
|
||||
|
||||
function s:skip_func()
|
||||
if !s:free || search('`\|\*\/','nW',s:looksyn)
|
||||
if !s:free || search('\m`\|\${\|\*\/','nW',s:looksyn)
|
||||
let s:free = !eval(s:skip_expr)
|
||||
let s:looksyn = s:free ? line('.') : s:looksyn
|
||||
let s:looksyn = line('.')
|
||||
return !s:free
|
||||
endif
|
||||
let s:looksyn = line('.')
|
||||
return (search('\/','nbW',s:looksyn) || search('[''"\\]','nW',s:looksyn)) && eval(s:skip_expr)
|
||||
return getline('.') =~ '\%<'.col('.').'c\/.\{-}\/\|\%>'.col('.').'c[''"]\|\\$' &&
|
||||
\ eval(s:skip_expr)
|
||||
endfunction
|
||||
|
||||
function s:alternatePair(stop)
|
||||
while search('[][(){}]','bW',a:stop)
|
||||
let pos = getpos('.')[1:2]
|
||||
while search('\m[][(){}]','bW',a:stop)
|
||||
if !s:skip_func()
|
||||
let idx = stridx('])}',s:looking_at())
|
||||
if idx + 1
|
||||
if !s:GetPair(['\[','(','{'][idx], '])}'[idx],'bW','s:skip_func()',2000,a:stop)
|
||||
if s:GetPair(['\[','(','{'][idx], '])}'[idx],'bW','s:skip_func()',2000,a:stop) <= 0
|
||||
break
|
||||
endif
|
||||
else
|
||||
@ -79,7 +81,14 @@ function s:alternatePair(stop)
|
||||
endif
|
||||
endif
|
||||
endwhile
|
||||
call cursor(v:lnum,1)
|
||||
call call('cursor',pos)
|
||||
endfunction
|
||||
|
||||
function s:save_pos(f,...)
|
||||
let l:pos = getpos('.')[1:2]
|
||||
let ret = call(a:f,a:000)
|
||||
call call('cursor',l:pos)
|
||||
return ret
|
||||
endfunction
|
||||
|
||||
function s:syn_at(l,c)
|
||||
@ -94,57 +103,89 @@ function s:token()
|
||||
return s:looking_at() =~ '\k' ? expand('<cword>') : s:looking_at()
|
||||
endfunction
|
||||
|
||||
" NOTE: Moves the cursor, unless a arg is supplied.
|
||||
function s:previous_token(...)
|
||||
let l:pos = getpos('.')[1:2]
|
||||
return [search('.\>\|[^[:alnum:][:space:]_$]','bW') ?
|
||||
\ (s:looking_at() == '/' || line('.') != l:pos[0] && getline('.') =~ '\/\/') &&
|
||||
\ s:syn_at(line('.'),col('.')) =~? s:syng_com ?
|
||||
\ search('\_[^/]\zs\/[/*]','bW') ? s:previous_token() : ''
|
||||
\ : s:token()
|
||||
\ : ''][a:0 && call('cursor',l:pos)]
|
||||
function s:previous_token()
|
||||
let l:n = line('.')
|
||||
if (s:looking_at() !~ '\k' || search('\m\<','cbW')) && search('\m\S','bW')
|
||||
if (getline('.')[col('.')-2:col('.')-1] == '*/' || line('.') != l:n &&
|
||||
\ getline('.') =~ '\%<'.col('.').'c\/\/') && s:syn_at(line('.'),col('.')) =~? s:syng_com
|
||||
while search('\m\/\ze[/*]','cbW')
|
||||
if !search('\m\S','bW')
|
||||
break
|
||||
elseif s:syn_at(line('.'),col('.')) !~? s:syng_com
|
||||
return s:token()
|
||||
endif
|
||||
endwhile
|
||||
else
|
||||
return s:token()
|
||||
endif
|
||||
endif
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
" switch case label pattern
|
||||
let s:case_stmt = '\<\%(case\>\s*[^ \t:].*\|default\s*\):\C'
|
||||
function s:others(p)
|
||||
return "((line2byte(line('.')) + col('.')) <= ".(line2byte(a:p[0]) + a:p[1]).") || ".s:skip_expr
|
||||
endfunction
|
||||
|
||||
function s:label_end(ln,con)
|
||||
return !cursor(a:ln,match(' '.a:con, '.*\zs' . s:case_stmt . '$')) &&
|
||||
\ (expand('<cword>') !=# 'default' || s:previous_token(1) !~ '[{,.]')
|
||||
function s:tern_skip(p)
|
||||
return s:GetPair('{','}','nbW',s:others(a:p),200,a:p[0]) > 0
|
||||
endfunction
|
||||
|
||||
function s:tern_col(p)
|
||||
return s:GetPair('?',':\@<!::\@!','nbW',s:others(a:p)
|
||||
\ .' || s:tern_skip('.string(a:p).')',200,a:p[0]) > 0
|
||||
endfunction
|
||||
|
||||
function s:label_col()
|
||||
let pos = getpos('.')[1:2]
|
||||
let [s:looksyn,s:free] = pos
|
||||
call s:alternatePair(0)
|
||||
if s:save_pos('s:IsBlock')
|
||||
let poss = getpos('.')[1:2]
|
||||
return call('cursor',pos) || !s:tern_col(poss)
|
||||
elseif s:looking_at() == ':'
|
||||
return !s:tern_col([0,0])
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" configurable regexes that define continuation lines, not including (, {, or [.
|
||||
let s:opfirst = '^' . get(g:,'javascript_opfirst',
|
||||
\ '\%([<>=,?^%|*/&]\|\([-.:+]\)\1\@!\|!=\|in\%(stanceof\)\=\>\)')
|
||||
let s:continuation = get(g:,'javascript_continuation',
|
||||
\ '\%([<=,.~!?/*^%|&:]\|+\@<!+\|-\@<!-\|=\@<!>\|\<\%(typeof\|delete\|void\|in\|instanceof\)\)') . '$'
|
||||
\ '\%([-+<>=,.~!?/*^%|&:]\|\<\%(typeof\|delete\|void\|in\|instanceof\)\)') . '$'
|
||||
|
||||
function s:continues(ln,con)
|
||||
return !cursor(a:ln, match(' '.a:con,s:continuation)) &&
|
||||
\ eval( (['s:syn_at(line("."),col(".")) !~? "regex"'] +
|
||||
\ repeat(['getline(".")[col(".")-2] != tr(s:looking_at(),">","=")'],3) +
|
||||
\ repeat(['s:previous_token() != "."'],5) + [1])[
|
||||
\ index(split('/ typeof in instanceof void delete'),s:token())])
|
||||
\ index(split('/ > - + typeof in instanceof void delete'),s:token())])
|
||||
endfunction
|
||||
|
||||
" get the line of code stripped of comments. if called with two args, leave
|
||||
" cursor at the last non-comment char.
|
||||
function s:Trim(ln,...)
|
||||
let pline = substitute(getline(a:ln),'\s*$','','')
|
||||
let l:max = max([match(pline,'.*[^/]\zs\/[/*]'),0])
|
||||
while l:max && s:syn_at(a:ln, strlen(pline)) =~? s:syng_com
|
||||
let pline = substitute(strpart(pline, 0, l:max),'\s*$','','')
|
||||
let l:max = max([match(pline,'.*[^/]\zs\/[/*]'),0])
|
||||
endwhile
|
||||
return !a:0 || cursor(a:ln,strlen(pline)) ? pline : pline
|
||||
" get the line of code stripped of comments and move cursor to the last
|
||||
" non-comment char.
|
||||
function s:Trim(ln)
|
||||
call cursor(a:ln+1,1)
|
||||
call s:previous_token()
|
||||
return strpart(getline('.'),0,col('.'))
|
||||
endfunction
|
||||
|
||||
" Find line above 'lnum' that isn't empty or in a comment
|
||||
function s:PrevCodeLine(lnum)
|
||||
let l:n = prevnonblank(a:lnum)
|
||||
while getline(l:n) =~ '^\s*\/[/*]' || s:syn_at(l:n,1) =~? s:syng_com
|
||||
let l:n = prevnonblank(l:n-1)
|
||||
endwhile
|
||||
while l:n
|
||||
if getline(l:n) =~ '^\s*\/[/*]'
|
||||
if (stridx(getline(l:n),'`') > 0 || getline(l:n-1)[-1:] == '\') &&
|
||||
\ s:syn_at(l:n,1) =~? s:syng_str
|
||||
return l:n
|
||||
endif
|
||||
let l:n = prevnonblank(l:n-1)
|
||||
elseif s:syn_at(l:n,1) =~? s:syng_com
|
||||
let l:n = s:save_pos('eval',
|
||||
\ 'cursor('.l:n.',1) + search(''\m\/\*'',"bW")')
|
||||
else
|
||||
return l:n
|
||||
endif
|
||||
endwhile
|
||||
endfunction
|
||||
|
||||
" Check if line 'lnum' has a balanced amount of parentheses.
|
||||
@ -165,17 +206,18 @@ function s:Balanced(lnum)
|
||||
endfunction
|
||||
|
||||
function s:OneScope(lnum)
|
||||
let pline = s:Trim(a:lnum,1)
|
||||
let pline = s:Trim(a:lnum)
|
||||
let kw = 'else do'
|
||||
if pline[-1:] == ')' && s:GetPair('(', ')', 'bW', s:skip_expr, 100) > 0
|
||||
let token = s:previous_token()
|
||||
if index(split('await each'),token) + 1
|
||||
return s:previous_token() ==# 'for'
|
||||
call s:previous_token()
|
||||
let kw = 'for if let while with'
|
||||
if index(split('await each'),s:token()) + 1
|
||||
call s:previous_token()
|
||||
let kw = 'for'
|
||||
endif
|
||||
return index(split('for if let while with'),token) + 1
|
||||
endif
|
||||
return eval((['getline(".")[col(".")-2] == "="'] +
|
||||
\ repeat(['s:previous_token(1) != "."'],2) + [0])[
|
||||
\ index(split('> else do'),s:token())])
|
||||
return pline[-2:] == '=>' || index(split(kw),s:token()) + 1 &&
|
||||
\ s:save_pos('s:previous_token') != '.'
|
||||
endfunction
|
||||
|
||||
" returns braceless levels started by 'i' and above lines * &sw. 'num' is the
|
||||
@ -200,26 +242,30 @@ endfunction
|
||||
|
||||
" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
|
||||
function s:IsBlock()
|
||||
let l:ln = line('.')
|
||||
if s:looking_at() == '{'
|
||||
let l:n = line('.')
|
||||
let char = s:previous_token()
|
||||
let syn = char =~ '[{>/]' ? s:syn_at(line('.'),col('.')-(char == '{')) : ''
|
||||
if syn =~? 'xml\|jsx'
|
||||
return char != '{'
|
||||
elseif char =~ '\k'
|
||||
return index(split('return const let import export yield default delete var void typeof throw new in instanceof')
|
||||
\ ,char) < (0 + (line('.') != l:ln)) || s:previous_token() == '.'
|
||||
return index(split('return const let import export yield default delete var await void typeof throw case new in instanceof')
|
||||
\ ,char) < (line('.') != l:n) || s:previous_token() == '.'
|
||||
elseif char == '>'
|
||||
return getline('.')[col('.')-2] == '=' || syn =~? '^jsflow'
|
||||
elseif char == ':'
|
||||
return s:label_end(0,strpart(getline('.'),0,col('.')))
|
||||
return getline('.')[col('.')-2] != ':' && s:label_col()
|
||||
endif
|
||||
return syn =~? 'regex' || char !~ '[=~!<*,/?^%|&([]' &&
|
||||
\ (char !~ '[-+]' || l:n != line('.') && getline('.')[col('.')-2] == char)
|
||||
endif
|
||||
return syn =~? 'regex' || char !~ '[-=~!<*+,/?^%|&([]'
|
||||
endfunction
|
||||
|
||||
function GetJavascriptIndent()
|
||||
let b:js_cache = get(b:,'js_cache',[0,0,0])
|
||||
" Get the current line.
|
||||
let l:line = getline(v:lnum)
|
||||
call cursor(v:lnum,1)
|
||||
let l:line = getline('.')
|
||||
let syns = s:syn_at(v:lnum, 1)
|
||||
|
||||
" start with strings,comments,etc.
|
||||
@ -249,8 +295,7 @@ function GetJavascriptIndent()
|
||||
endif
|
||||
|
||||
" the containing paren, bracket, or curly. Many hacks for performance
|
||||
call cursor(v:lnum,1)
|
||||
let idx = strlen(l:line) ? stridx('])}',l:line[0]) : -1
|
||||
let idx = index([']',')','}'],l:line[0])
|
||||
if b:js_cache[0] >= l:lnum && b:js_cache[0] < v:lnum &&
|
||||
\ (b:js_cache[0] > l:lnum || s:Balanced(l:lnum))
|
||||
call call('cursor',b:js_cache[1:])
|
||||
@ -266,50 +311,48 @@ function GetJavascriptIndent()
|
||||
endif
|
||||
endif
|
||||
|
||||
if idx + 1
|
||||
if idx == 2 && search('\S','bW',line('.')) && s:looking_at() == ')'
|
||||
call s:GetPair('(',')','bW',s:skip_expr,200)
|
||||
endif
|
||||
return indent('.')
|
||||
endif
|
||||
|
||||
let b:js_cache = [v:lnum] + (line('.') == v:lnum ? [0,0] : getpos('.')[1:2])
|
||||
let num = b:js_cache[1]
|
||||
|
||||
let [s:W, isOp, bL, switch_offset] = [s:sw(),0,0,0]
|
||||
if !num || s:looking_at() == '{' && s:IsBlock()
|
||||
let pline = s:Trim(l:lnum)
|
||||
if !num || s:IsBlock()
|
||||
let ilnum = line('.')
|
||||
let pline = s:save_pos('s:Trim',l:lnum)
|
||||
if num && s:looking_at() == ')' && s:GetPair('(', ')', 'bW', s:skip_expr, 100) > 0
|
||||
let num = line('.')
|
||||
if s:previous_token() ==# 'switch'
|
||||
if &cino !~ ':' || !has('float')
|
||||
let num = ilnum == num ? line('.') : num
|
||||
if idx < 0 && s:previous_token() ==# 'switch' && s:previous_token() != '.'
|
||||
if &cino !~ ':'
|
||||
let switch_offset = s:W
|
||||
else
|
||||
let cinc = matchlist(&cino,'.*:\(-\)\=\([0-9.]*\)\(s\)\=\C')
|
||||
let switch_offset = float2nr(str2float(cinc[1].(strlen(cinc[2]) ? cinc[2] : strlen(cinc[3])))
|
||||
\ * (strlen(cinc[3]) ? s:W : 1))
|
||||
let cinc = matchlist(&cino,'.*:\zs\(-\)\=\(\d*\)\(\.\d\+\)\=\(s\)\=\C')
|
||||
let switch_offset = max([cinc[0] is '' ? 0 : (cinc[1].1) *
|
||||
\ ((strlen(cinc[2].cinc[3]) ? str2nr(cinc[2].str2nr(cinc[3][1])) : 10) *
|
||||
\ (cinc[4] is '' ? 1 : s:W)) / 10, -indent(num)])
|
||||
endif
|
||||
if pline[-1:] != '.' && l:line =~# '^' . s:case_stmt
|
||||
if pline[-1:] != '.' && l:line =~# '^\%(default\|case\)\>'
|
||||
return indent(num) + switch_offset
|
||||
elseif s:label_end(l:lnum,pline)
|
||||
return indent(l:lnum) + s:W
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if pline[-1:] !~ '[{;]'
|
||||
let isOp = l:line =~# s:opfirst || s:continues(l:lnum,pline)
|
||||
let bL = s:iscontOne(l:lnum,num,isOp)
|
||||
if idx < 0 && pline !~ '[{;]$'
|
||||
if pline =~# ':\@<!:$'
|
||||
call cursor(l:lnum,strlen(pline))
|
||||
let isOp = s:tern_col(b:js_cache[1:2]) * s:W
|
||||
else
|
||||
let isOp = (l:line =~# s:opfirst || s:continues(l:lnum,pline)) * s:W
|
||||
endif
|
||||
let bL = s:iscontOne(l:lnum,b:js_cache[1],isOp)
|
||||
let bL -= (bL && l:line[0] == '{') * s:W
|
||||
endif
|
||||
endif
|
||||
|
||||
" main return
|
||||
if isOp
|
||||
return (num ? indent(num) : -s:W) + (s:W * 2) + switch_offset + bL
|
||||
if idx + 1 || l:line[:1] == '|}'
|
||||
return indent(num)
|
||||
elseif num
|
||||
return indent(num) + s:W + switch_offset + bL
|
||||
return indent(num) + s:W + switch_offset + bL + isOp
|
||||
endif
|
||||
return bL
|
||||
return bL + isOp
|
||||
endfunction
|
||||
|
||||
let &cpo = s:cpo_save
|
||||
|
@ -19,7 +19,7 @@ let s:incIndent =
|
||||
\ '^\s*[hr]\?note\>\%(\%("[^"]*" \<as\>\)\@![^:]\)*$\|' .
|
||||
\ '^\s*title\s*$\|' .
|
||||
\ '^\s*skinparam\>.*{\s*$\|' .
|
||||
\ '^\s*\%(state\|class\|partition\|rectangle\)\>.*{'
|
||||
\ '^\s*\%(state\|class\|partition\|rectangle\|enum\|interface\|namespace\)\>.*{'
|
||||
|
||||
let s:decIndent = '^\s*\%(end\|else\|}\)'
|
||||
|
||||
|
@ -10,7 +10,7 @@ set cpo&vim
|
||||
" syncing starts 2000 lines before top line so docstrings don't screw things up
|
||||
syn sync minlines=2000
|
||||
|
||||
syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@elixirDeclaration,elixirTodo,elixirArguments,elixirBlockDefinition,elixirUnusedVariable
|
||||
syn cluster elixirNotTop contains=@elixirRegexSpecial,@elixirStringContained,@elixirDeclaration,elixirTodo,elixirArguments,elixirBlockDefinition,elixirUnusedVariable,elixirStructDelimiter
|
||||
syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier,elixirRegexEscapePunctuation
|
||||
syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass
|
||||
syn cluster elixirDeclaration contains=elixirFunctionDeclaration,elixirModuleDeclaration,elixirProtocolDeclaration,elixirImplDeclaration,elixirRecordDeclaration,elixirMacroDeclaration,elixirDelegateDeclaration,elixirOverridableDeclaration,elixirExceptionDeclaration,elixirCallbackDeclaration,elixirStructDeclaration
|
||||
@ -56,7 +56,7 @@ syn match elixirAtom "\%([a-zA-Z_]\w*[?!]\?\):\(:\)\@!"
|
||||
|
||||
syn match elixirBlockInline "\<\(do\|else\)\>:\@="
|
||||
|
||||
syn match elixirAlias '\<[!]\?[A-Z]\w*\(\.[A-Z]\w*\)*\>'
|
||||
syn match elixirAlias '\([a-z]\)\@<![A-Z]\w*'
|
||||
|
||||
syn keyword elixirBoolean true false nil
|
||||
|
||||
@ -77,10 +77,17 @@ syn match elixirRegexCharClass "\[:\(alnum\|alpha\|ascii\|blank\|cntrl\|
|
||||
|
||||
syn region elixirRegex matchgroup=elixirRegexDelimiter start="%r/" end="/[uiomxfr]*" skip="\\\\" contains=@elixirRegexSpecial
|
||||
|
||||
syn region elixirTuple matchgroup=elixirTupleDelimiter start="\(\w\|#\)\@<!{" end="}" contains=ALLBUT,@elixirNotTop
|
||||
|
||||
syn match elixirStructDelimiter '{' contained containedin=elixirStruct
|
||||
syn region elixirStruct matchgroup=elixirStructDelimiter start="%\(\w\+{\)\@=" end="}" contains=ALLBUT,@elixirNotTop
|
||||
|
||||
syn region elixirMap matchgroup=elixirMapDelimiter start="%{" end="}" contains=ALLBUT,@elixirNotTop
|
||||
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start=+\z('\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@elixirStringContained
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start=+\z("\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=@elixirStringContained
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start=+\z('''\)+ end=+^\s*\z1+ skip=+'\|\\\\+ contains=@elixirStringContained
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start=+\z("""\)+ end=+^\s*\z1+ skip=+"\|\\\\+ contains=@elixirStringContained
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start=+\z('''\)+ end=+^\s*\z1+ contains=@elixirStringContained
|
||||
syn region elixirString matchgroup=elixirStringDelimiter start=+\z("""\)+ end=+^\s*\z1+ contains=@elixirStringContained
|
||||
syn region elixirInterpolation matchgroup=elixirInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,elixirKernelFunction,elixirComment,@elixirNotTop
|
||||
|
||||
syn match elixirAtomInterpolated ':\("\)\@=' contains=elixirString
|
||||
@ -90,7 +97,7 @@ syn region elixirBlock matchgroup=elixirBlockDefinition start="\<do
|
||||
syn region elixirElseBlock matchgroup=elixirBlockDefinition start="\<else\>:\@!" end="\<end\>" contains=ALLBUT,elixirKernelFunction,@elixirNotTop fold
|
||||
syn region elixirAnonymousFunction matchgroup=elixirBlockDefinition start="\<fn\>" end="\<end\>" contains=ALLBUT,elixirKernelFunction,@elixirNotTop fold
|
||||
|
||||
syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigilDelimiter
|
||||
syn region elixirArguments start="(" end=")" contained contains=elixirOperator,elixirAtom,elixirPseudoVariable,elixirAlias,elixirBoolean,elixirVariable,elixirUnusedVariable,elixirNumber,elixirDocString,elixirAtomInterpolated,elixirRegex,elixirString,elixirStringDelimiter,elixirRegexDelimiter,elixirInterpolationDelimiter,elixirSigilDelimiter,elixirAnonymousFunction
|
||||
|
||||
syn match elixirDelimEscape "\\[(<{\[)>}\]/\"'|]" transparent display contained contains=NONE
|
||||
|
||||
|
@ -12,9 +12,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'go') == -1
|
||||
" let OPTION_NAME = 0
|
||||
" in your ~/.vimrc file to disable particular options. You can also write:
|
||||
" let OPTION_NAME = 1
|
||||
" to enable particular options.
|
||||
" At present, all options default to on, except highlight of:
|
||||
" functions, methods, structs, operators, build constraints and interfaces.
|
||||
" to enable particular options. At present, all options default to off:
|
||||
"
|
||||
" - go_highlight_array_whitespace_error
|
||||
" Highlights white space after "[]".
|
||||
@ -38,23 +36,23 @@ if exists("b:current_syntax")
|
||||
endif
|
||||
|
||||
if !exists("g:go_highlight_array_whitespace_error")
|
||||
let g:go_highlight_array_whitespace_error = 1
|
||||
let g:go_highlight_array_whitespace_error = 0
|
||||
endif
|
||||
|
||||
if !exists("g:go_highlight_chan_whitespace_error")
|
||||
let g:go_highlight_chan_whitespace_error = 1
|
||||
let g:go_highlight_chan_whitespace_error = 0
|
||||
endif
|
||||
|
||||
if !exists("g:go_highlight_extra_types")
|
||||
let g:go_highlight_extra_types = 1
|
||||
let g:go_highlight_extra_types = 0
|
||||
endif
|
||||
|
||||
if !exists("g:go_highlight_space_tab_error")
|
||||
let g:go_highlight_space_tab_error = 1
|
||||
let g:go_highlight_space_tab_error = 0
|
||||
endif
|
||||
|
||||
if !exists("g:go_highlight_trailing_whitespace_error")
|
||||
let g:go_highlight_trailing_whitespace_error = 1
|
||||
let g:go_highlight_trailing_whitespace_error = 0
|
||||
endif
|
||||
|
||||
if !exists("g:go_highlight_operators")
|
||||
|
@ -17,6 +17,11 @@ if !exists('g:haskell_disable_TH')
|
||||
let g:haskell_disable_TH = 0
|
||||
endif
|
||||
|
||||
if exists('g:haskell_backpack') && g:haskell_backpack == 1
|
||||
syn keyword haskellBackpackStructure unit signature
|
||||
syn keyword haskellBackpackDependency dependency
|
||||
endif
|
||||
|
||||
syn spell notoplevel
|
||||
syn match haskellRecordField contained containedin=haskellBlock
|
||||
\ "[_a-z][a-zA-Z0-9_']*\(,\s*[_a-z][a-zA-Z0-9_']*\)*\(\s*::\|\n\s\+::\)"
|
||||
@ -48,7 +53,7 @@ syn region haskellForeignImport start="\<foreign\>" end="::" keepend
|
||||
\ haskellOperators,
|
||||
\ haskellForeignKeywords,
|
||||
\ haskellIdentifier
|
||||
syn match haskellImport "^\<import\>\s\+\(\<safe\>\s\+\)\?\(\<qualified\>\s\+\)\?.\+\(\s\+\<as\>\s\+.\+\)\?\(\s\+\<hiding\>\)\?"
|
||||
syn match haskellImport "^\s*\<import\>\s\+\(\<safe\>\s\+\)\?\(\<qualified\>\s\+\)\?.\+\(\s\+\<as\>\s\+.\+\)\?\(\s\+\<hiding\>\)\?"
|
||||
\ contains=
|
||||
\ haskellParens,
|
||||
\ haskellOperators,
|
||||
@ -196,6 +201,10 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
if exists('g:haskell_backpack') && g:haskell_backpack == 1
|
||||
highlight def link haskellBackpackStructure Structure
|
||||
highlight def link haskellBackpackDependency Include
|
||||
endif
|
||||
let b:current_syntax = "haskell"
|
||||
|
||||
endif
|
||||
|
@ -68,7 +68,7 @@ syn keyword htmlTagName contained span subset sum tan tanh tendsto times transpo
|
||||
syn keyword htmlTagName contained uplimit variance vector vectorproduct xor
|
||||
|
||||
" Custom Element
|
||||
syn match htmlTagName contained "\<[a-z_]\([a-z0-9_.]\+\)\?\(\-[a-z0-9_.]\+\)\+\>"
|
||||
syn match htmlTagName contained "\<[a-z][-.0-9_a-z]*-[-.0-9_a-z]*\>"
|
||||
|
||||
" HTML 5 arguments
|
||||
" Core Attributes
|
||||
|
@ -26,15 +26,17 @@ syntax sync fromstart
|
||||
" syntax case ignore
|
||||
syntax case match
|
||||
|
||||
syntax match jsNoise /[:,\;\.]\{1}/
|
||||
syntax match jsNoise /[:,\;]\{1}/
|
||||
syntax match jsNoise /[\.]\{1}/ skipwhite skipempty nextgroup=jsObjectProp
|
||||
syntax match jsFuncCall /\k\+\%(\s*(\)\@=/
|
||||
syntax match jsParensError /[)}\]]/
|
||||
|
||||
" Program Keywords
|
||||
syntax keyword jsStorageClass const var let skipwhite skipempty nextgroup=jsDestructuringBlock,jsDestructuringArray,jsVariableDef
|
||||
syntax match jsVariableDef contained /\k\+/ nextgroup=jsFlowDefinition
|
||||
syntax keyword jsOperator delete instanceof typeof void new in of
|
||||
syntax match jsOperator /[\!\|\&\+\-\<\>\=\%\/\*\~\^]\{1}/
|
||||
syntax match jsVariableDef contained /\k\+/ skipwhite skipempty nextgroup=jsFlowDefinition
|
||||
syntax keyword jsOperator delete instanceof typeof void new in of skipwhite skipempty nextgroup=@jsExpression
|
||||
syntax match jsOperator /[\!\|\&\+\-\<\>\=\%\/\*\~\^]\{1}/ skipwhite skipempty nextgroup=@jsExpression
|
||||
syntax match jsOperator /::/ skipwhite skipempty nextgroup=@jsExpression
|
||||
syntax keyword jsBooleanTrue true
|
||||
syntax keyword jsBooleanFalse false
|
||||
|
||||
@ -52,7 +54,7 @@ syntax match jsModuleComma contained /,/ skipwhite skipempty nextgroup=
|
||||
" Strings, Templates, Numbers
|
||||
syntax region jsString start=+"+ skip=+\\\("\|$\)+ end=+"\|$+ contains=jsSpecial,@Spell extend
|
||||
syntax region jsString start=+'+ skip=+\\\('\|$\)+ end=+'\|$+ contains=jsSpecial,@Spell extend
|
||||
syntax region jsTemplateString start=+`+ skip=+\\\(`\|$\)+ end=+`+ contains=jsTemplateVar,jsSpecial extend
|
||||
syntax region jsTemplateString start=+`+ skip=+\\\(`\|$\)+ end=+`+ contains=jsTemplateExpression,jsSpecial extend
|
||||
syntax match jsTaggedTemplate /\k\+\%(`\)\@=/ nextgroup=jsTemplateString
|
||||
syntax match jsNumber /\<\d\+\%([eE][+-]\=\d\+\)\=\>\|\<0[bB][01]\+\>\|\<0[oO]\o\+\>\|\<0[xX]\x\+\>/
|
||||
syntax keyword jsNumber Infinity
|
||||
@ -60,7 +62,7 @@ syntax match jsFloat /\<\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%([eE][+-]\
|
||||
|
||||
" Regular Expressions
|
||||
syntax match jsSpecial contained "\v\\%(0|\\x\x\{2\}\|\\u\x\{4\}\|\c[A-Z]|.)"
|
||||
syntax region jsTemplateVar contained matchgroup=jsTemplateBraces start=+${+ end=+}+ contains=@jsExpression
|
||||
syntax region jsTemplateExpression contained matchgroup=jsTemplateBraces start=+${+ end=+}+ contains=@jsExpression keepend
|
||||
syntax region jsRegexpCharClass contained start=+\[+ skip=+\\.+ end=+\]+
|
||||
syntax match jsRegexpBoundary contained "\v%(\<@![\^$]|\\[bB])"
|
||||
syntax match jsRegexpBackRef contained "\v\\[1-9][0-9]*"
|
||||
@ -82,15 +84,15 @@ syntax region jsObjectKeyString contained start=+"+ skip=+\\\("\|$\)+ end=+
|
||||
syntax region jsObjectKeyString contained start=+'+ skip=+\\\('\|$\)+ end=+'\|$+ contains=jsSpecial,@Spell skipwhite skipempty nextgroup=jsObjectValue
|
||||
syntax region jsObjectKeyComputed contained matchgroup=jsBrackets start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsObjectValue,jsFuncArgs extend
|
||||
syntax match jsObjectSeparator contained /,/
|
||||
syntax region jsObjectValue contained start=/:/ end=/\%(,\|}\)\@=/ contains=jsObjectColon,@jsExpression extend
|
||||
syntax region jsObjectValue contained matchgroup=jsNoise start=/:/ end=/\%(,\|}\)\@=/ contains=@jsExpression extend
|
||||
syntax match jsObjectFuncName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>[\r\n\t ]*(\@=/ skipwhite skipempty nextgroup=jsFuncArgs
|
||||
syntax match jsFunctionKey contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>\(\s*:\s*function\s*\)\@=/
|
||||
syntax match jsObjectMethodType contained /\%(get\|set\|static\|async\)\%( \k\+\)\@=/ skipwhite skipempty nextgroup=jsObjectFuncName
|
||||
syntax match jsObjectMethodType contained /\%(get\|set\)\%( \k\+\)\@=/ skipwhite skipempty nextgroup=jsObjectFuncName
|
||||
syntax region jsObjectStringKey contained start=+"+ skip=+\\\("\|$\)+ end=+"\|$+ contains=jsSpecial,@Spell extend skipwhite skipempty nextgroup=jsFuncArgs,jsObjectValue
|
||||
syntax region jsObjectStringKey contained start=+'+ skip=+\\\('\|$\)+ end=+'\|$+ contains=jsSpecial,@Spell extend skipwhite skipempty nextgroup=jsFuncArgs,jsObjectValue
|
||||
|
||||
exe 'syntax keyword jsNull null '.(exists('g:javascript_conceal_null') ? 'conceal cchar='.g:javascript_conceal_null : '')
|
||||
exe 'syntax keyword jsReturn return contained '.(exists('g:javascript_conceal_return') ? 'conceal cchar='.g:javascript_conceal_return : '')
|
||||
exe 'syntax keyword jsReturn return contained '.(exists('g:javascript_conceal_return') ? 'conceal cchar='.g:javascript_conceal_return : '').' skipwhite skipempty nextgroup=@jsExpression'
|
||||
exe 'syntax keyword jsUndefined undefined '.(exists('g:javascript_conceal_undefined') ? 'conceal cchar='.g:javascript_conceal_undefined : '')
|
||||
exe 'syntax keyword jsNan NaN '.(exists('g:javascript_conceal_NaN') ? 'conceal cchar='.g:javascript_conceal_NaN : '')
|
||||
exe 'syntax keyword jsPrototype prototype '.(exists('g:javascript_conceal_prototype') ? 'conceal cchar='.g:javascript_conceal_prototype : '')
|
||||
@ -98,24 +100,27 @@ exe 'syntax keyword jsThis this '.(exists('g:javascript_conceal
|
||||
exe 'syntax keyword jsSuper super contained '.(exists('g:javascript_conceal_super') ? 'conceal cchar='.g:javascript_conceal_super : '')
|
||||
|
||||
" Statement Keywords
|
||||
syntax keyword jsStatement contained break continue with yield debugger
|
||||
syntax match jsBlockLabel /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>\s*::\@!/ contains=jsNoise skipwhite skipempty nextgroup=jsBlock
|
||||
syntax match jsBlockLabelKey contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>\%(\s*\%(;\|\n\)\)\@=/
|
||||
syntax keyword jsStatement contained with yield debugger
|
||||
syntax keyword jsStatement contained break continue skipwhite skipempty nextgroup=jsBlockLabelKey
|
||||
syntax keyword jsConditional if skipwhite skipempty nextgroup=jsParenIfElse
|
||||
syntax keyword jsConditional else skipwhite skipempty nextgroup=jsCommentMisc,jsIfElseBlock
|
||||
syntax keyword jsConditional switch skipwhite skipempty nextgroup=jsParenSwitch
|
||||
syntax keyword jsRepeat while for skipwhite skipempty nextgroup=jsParenRepeat,jsForAwait
|
||||
syntax keyword jsDo do skipwhite skipempty nextgroup=jsRepeatBlock
|
||||
syntax keyword jsLabel contained case default
|
||||
syntax region jsSwitchCase contained matchgroup=jsLabel start=/\<\%(case\|default\)\>/ end=/:\@=/ contains=@jsExpression,jsLabel skipwhite skipempty nextgroup=jsSwitchColon keepend
|
||||
syntax keyword jsTry try skipwhite skipempty nextgroup=jsTryCatchBlock
|
||||
syntax keyword jsFinally contained finally skipwhite skipempty nextgroup=jsFinallyBlock
|
||||
syntax keyword jsCatch contained catch skipwhite skipempty nextgroup=jsParenCatch
|
||||
syntax keyword jsException throw
|
||||
syntax keyword jsAsyncKeyword async await
|
||||
syntax match jsSwitchColon contained /:/ skipwhite skipempty nextgroup=jsSwitchBlock
|
||||
syntax match jsSwitchColon contained /::\@!/ skipwhite skipempty nextgroup=jsSwitchBlock
|
||||
|
||||
" Keywords
|
||||
syntax keyword jsGlobalObjects Array Boolean Date Function Iterator Number Object Symbol Map WeakMap Set 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 jsGlobalNodeObjects module exports global process
|
||||
syntax match jsGlobalNodeObjects /require/ containedin=jsFuncCall
|
||||
syntax keyword jsGlobalNodeObjects module exports global process __dirname __filename
|
||||
syntax match jsGlobalNodeObjects /\<require\>/ containedin=jsFuncCall
|
||||
syntax keyword jsExceptions Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError
|
||||
syntax keyword jsBuiltins decodeURI decodeURIComponent encodeURI encodeURIComponent eval isFinite isNaN parseFloat parseInt uneval
|
||||
" DISCUSS: How imporant is this, really? Perhaps it should be linked to an error because I assume the keywords are reserved?
|
||||
@ -144,22 +149,21 @@ syntax region jsParenRepeat contained matchgroup=jsParensRepeat s
|
||||
syntax region jsParenSwitch contained matchgroup=jsParensSwitch start=/(/ end=/)/ contains=@jsAll skipwhite skipempty nextgroup=jsSwitchBlock extend fold
|
||||
syntax region jsParenCatch contained matchgroup=jsParensCatch start=/(/ end=/)/ skipwhite skipempty nextgroup=jsTryCatchBlock extend fold
|
||||
syntax region jsFuncArgs contained matchgroup=jsFuncParens start=/(/ end=/)/ contains=jsFuncArgCommas,jsComment,jsFuncArgExpression,jsDestructuringBlock,jsDestructuringArray,jsRestExpression,jsFlowArgumentDef skipwhite skipempty nextgroup=jsCommentFunction,jsFuncBlock,jsFlowReturn extend fold
|
||||
syntax region jsClassBlock contained matchgroup=jsClassBraces start=/{/ end=/}/ contains=jsClassFuncName,jsClassMethodType,jsArrowFunction,jsArrowFuncArgs,jsComment,jsGenerator,jsDecorator,jsClassProperty,jsClassPropertyComputed,jsClassStringKey,jsNoise extend fold
|
||||
syntax region jsFuncBlock contained matchgroup=jsFuncBraces start=/{/ end=/}/ contains=@jsAll extend fold
|
||||
syntax region jsIfElseBlock contained matchgroup=jsIfElseBraces start=/{/ end=/}/ contains=@jsAll extend fold
|
||||
syntax region jsBlock contained matchgroup=jsBraces start=/{/ end=/}/ contains=@jsAll extend fold
|
||||
syntax region jsTryCatchBlock contained matchgroup=jsTryCatchBraces start=/{/ end=/}/ contains=@jsAll skipwhite skipempty nextgroup=jsCatch,jsFinally extend fold
|
||||
syntax region jsFinallyBlock contained matchgroup=jsFinallyBraces start=/{/ end=/}/ contains=@jsAll extend fold
|
||||
syntax region jsSwitchBlock contained matchgroup=jsSwitchBraces start=/{/ end=/}/ contains=@jsAll,jsLabel,jsSwitchColon extend fold
|
||||
syntax region jsRepeatBlock contained matchgroup=jsRepeatBraces start=/{/ end=/}/ contains=@jsAll extend fold
|
||||
syntax region jsDestructuringBlock contained matchgroup=jsDestructuringBraces start=/{/ end=/}/ contains=jsDestructuringProperty,jsDestructuringAssignment,jsDestructuringNoise,jsDestructuringPropertyComputed,jsSpreadExpression extend fold
|
||||
syntax region jsDestructuringArray contained matchgroup=jsDestructuringBraces start=/\[/ end=/\]/ contains=jsDestructuringPropertyValue,jsNoise,jsDestructuringProperty,jsSpreadExpression extend fold
|
||||
syntax region jsObject matchgroup=jsObjectBraces start=/{/ end=/}/ contains=jsObjectKey,jsObjectKeyString,jsObjectKeyComputed,jsObjectSeparator,jsObjectFuncName,jsObjectMethodType,jsGenerator,jsComment,jsObjectStringKey,jsSpreadExpression,jsDecorator extend fold
|
||||
syntax region jsClassBlock contained matchgroup=jsClassBraces start=/{/ end=/}/ contains=jsClassFuncName,jsClassMethodType,jsArrowFunction,jsArrowFuncArgs,jsComment,jsGenerator,jsDecorator,jsClassProperty,jsClassPropertyComputed,jsClassStringKey,jsAsyncKeyword,jsNoise extend fold
|
||||
syntax region jsFuncBlock contained matchgroup=jsFuncBraces start=/{/ end=/}/ contains=@jsAll,jsBlock extend fold
|
||||
syntax region jsIfElseBlock contained matchgroup=jsIfElseBraces start=/{/ end=/}/ contains=@jsAll,jsBlock extend fold
|
||||
syntax region jsTryCatchBlock contained matchgroup=jsTryCatchBraces start=/{/ end=/}/ contains=@jsAll,jsBlock skipwhite skipempty nextgroup=jsCatch,jsFinally extend fold
|
||||
syntax region jsFinallyBlock contained matchgroup=jsFinallyBraces start=/{/ end=/}/ contains=@jsAll,jsBlock extend fold
|
||||
syntax region jsSwitchBlock contained matchgroup=jsSwitchBraces start=/{/ end=/}/ contains=@jsAll,jsBlock,jsSwitchCase 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 extend fold
|
||||
syntax region jsDestructuringArray contained matchgroup=jsDestructuringBraces start=/\[/ end=/\]/ contains=jsDestructuringPropertyValue,jsNoise,jsDestructuringProperty,jsSpreadExpression,jsComment extend fold
|
||||
syntax region jsObject contained matchgroup=jsObjectBraces start=/{/ end=/}/ contains=jsObjectKey,jsObjectKeyString,jsObjectKeyComputed,jsObjectSeparator,jsObjectFuncName,jsObjectMethodType,jsGenerator,jsComment,jsObjectStringKey,jsSpreadExpression,jsDecorator,jsAsyncKeyword 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 skipwhite skipempty nextgroup=jsFrom
|
||||
syntax region jsTernaryIf matchgroup=jsTernaryIfOperator start=/?/ end=/\%(:\|[\}]\@=\)/ contains=@jsExpression
|
||||
syntax region jsSpreadExpression contained matchgroup=jsSpreadOperator start=/\.\.\./ end=/[,}\]]\@=/ contains=@jsExpression
|
||||
syntax region jsRestExpression contained matchgroup=jsRestOperator start=/\.\.\./ end=/[,)]\@=/
|
||||
syntax region jsTernaryIf matchgroup=jsTernaryIfOperator start=/?/ end=/\%(:\|[\}]\@=\)/ contains=@jsExpression
|
||||
syntax region jsTernaryIf matchgroup=jsTernaryIfOperator start=/?/ end=/\%(:\|[\}]\@=\)/ contains=@jsExpression extend skipwhite skipempty nextgroup=@jsExpression
|
||||
|
||||
syntax match jsGenerator contained /\*/ skipwhite skipempty nextgroup=jsFuncName,jsFuncArgs
|
||||
syntax match jsFuncName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>/ skipwhite skipempty nextgroup=jsFuncArgs,jsFlowFunctionGroup
|
||||
@ -175,14 +179,14 @@ syntax match jsArrowFuncArgs /([^()]*)\s*\(=>\)\@=/ contains=jsFuncArgs skipe
|
||||
|
||||
exe 'syntax match jsFunction /\<function\>/ skipwhite skipempty nextgroup=jsGenerator,jsFuncName,jsFuncArgs skipwhite '.(exists('g:javascript_conceal_function') ? 'conceal cchar='.g:javascript_conceal_function : '')
|
||||
exe 'syntax match jsArrowFunction /=>/ skipwhite skipempty nextgroup=jsFuncBlock,jsCommentFunction '.(exists('g:javascript_conceal_arrow_function') ? 'conceal cchar='.g:javascript_conceal_arrow_function : '')
|
||||
exe 'syntax match jsArrowFunction /()\s*\(=>\)\@=/ skipwhite skipempty nextgroup=jsArrowFunction '.(exists('g:javascript_conceal_noarg_arrow_function') ? 'conceal cchar='.g:javascript_conceal_noarg_arrow_function : '')
|
||||
exe 'syntax match jsArrowFunction /()\s*\(=>\)\@=/ skipwhite skipempty nextgroup=jsArrowFunction '.(exists('g:javascript_conceal_noarg_arrow_function') ? 'conceal cchar='.g:javascript_conceal_noarg_arrow_function : '').(' contains=jsArrowFuncArgs')
|
||||
exe 'syntax match jsArrowFunction /_\s*\(=>\)\@=/ skipwhite skipempty nextgroup=jsArrowFunction '.(exists('g:javascript_conceal_underscore_arrow_function') ? 'conceal cchar='.g:javascript_conceal_underscore_arrow_function : '')
|
||||
|
||||
" Classes
|
||||
syntax keyword jsClassKeyword contained class
|
||||
syntax keyword jsExtendsKeyword contained extends skipwhite skipempty nextgroup=@jsExpression
|
||||
syntax match jsClassNoise contained /\./
|
||||
syntax match jsClassMethodType contained /\%(get\|set\|static\|async\)\%( \k\+\)\@=/ skipwhite skipempty nextgroup=jsFuncName,jsClassProperty
|
||||
syntax match jsClassMethodType contained /\%(get\|set\|static\)\%( \k\+\)\@=/ skipwhite skipempty nextgroup=jsAsyncKeyword,jsFuncName,jsClassProperty
|
||||
syntax region jsClassDefinition start=/\<class\>/ end=/\(\<extends\>\s\+\)\@<!{\@=/ contains=jsClassKeyword,jsExtendsKeyword,jsClassNoise,@jsExpression skipwhite skipempty nextgroup=jsCommentClass,jsClassBlock,jsFlowClassGroup
|
||||
syntax match jsClassProperty contained /\<[0-9a-zA-Z_$]*\>\(\s*=\)\@=/ skipwhite skipempty nextgroup=jsClassValue
|
||||
syntax region jsClassValue contained start=/=/ end=/\%(;\|}\|\n\)\@=/ contains=@jsExpression
|
||||
@ -219,6 +223,7 @@ syntax region jsCommentMisc contained start=/\/\*/ end=/\*\// contains=j
|
||||
" Decorators
|
||||
syntax match jsDecorator /^\s*@/ nextgroup=jsDecoratorFunction
|
||||
syntax match jsDecoratorFunction contained /[a-zA-Z_][a-zA-Z0-9_.]*/ nextgroup=jsParenDecorator
|
||||
syntax match jsObjectProp contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>/
|
||||
|
||||
if exists("javascript_plugin_jsdoc")
|
||||
runtime extras/jsdoc.vim
|
||||
@ -232,8 +237,8 @@ if exists("javascript_plugin_flow")
|
||||
runtime extras/flow.vim
|
||||
endif
|
||||
|
||||
syntax cluster jsExpression contains=jsBracket,jsParen,jsObject,jsBlock,jsTernaryIf,jsTaggedTemplate,jsTemplateString,jsString,jsRegexpString,jsNumber,jsFloat,jsOperator,jsBooleanTrue,jsBooleanFalse,jsNull,jsFunction,jsArrowFunction,jsGlobalObjects,jsExceptions,jsFutureKeys,jsDomErrNo,jsDomNodeConsts,jsHtmlEvents,jsFuncCall,jsUndefined,jsNan,jsPrototype,jsBuiltins,jsNoise,jsClassDefinition,jsArrowFunction,jsArrowFuncArgs,jsParensError,jsComment,jsArguments,jsThis,jsSuper,jsDo
|
||||
syntax cluster jsAll contains=@jsExpression,jsStorageClass,jsConditional,jsRepeat,jsReturn,jsStatement,jsException,jsTry,jsAsyncKeyword
|
||||
syntax cluster jsExpression contains=jsBracket,jsParen,jsObject,jsTernaryIf,jsTaggedTemplate,jsTemplateString,jsString,jsRegexpString,jsNumber,jsFloat,jsOperator,jsBooleanTrue,jsBooleanFalse,jsNull,jsFunction,jsArrowFunction,jsGlobalObjects,jsExceptions,jsFutureKeys,jsDomErrNo,jsDomNodeConsts,jsHtmlEvents,jsFuncCall,jsUndefined,jsNan,jsPrototype,jsBuiltins,jsNoise,jsClassDefinition,jsArrowFunction,jsArrowFuncArgs,jsParensError,jsComment,jsArguments,jsThis,jsSuper,jsDo
|
||||
syntax cluster jsAll contains=@jsExpression,jsStorageClass,jsConditional,jsRepeat,jsReturn,jsStatement,jsException,jsTry,jsAsyncKeyword,jsNoise,,jsBlockLabel
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
@ -315,17 +320,16 @@ if version >= 508 || !exists("did_javascript_syn_inits")
|
||||
HiLink jsFuncParens Noise
|
||||
HiLink jsClassBraces Noise
|
||||
HiLink jsClassNoise Noise
|
||||
HiLink jsIfElseBraces jsBraces
|
||||
HiLink jsTryCatchBraces jsBraces
|
||||
HiLink jsModuleBraces jsBraces
|
||||
HiLink jsIfElseBraces Noise
|
||||
HiLink jsTryCatchBraces Noise
|
||||
HiLink jsModuleBraces Noise
|
||||
HiLink jsObjectBraces Noise
|
||||
HiLink jsObjectSeparator Noise
|
||||
HiLink jsFinallyBraces jsBraces
|
||||
HiLink jsRepeatBraces jsBraces
|
||||
HiLink jsSwitchBraces jsBraces
|
||||
HiLink jsFinallyBraces Noise
|
||||
HiLink jsRepeatBraces Noise
|
||||
HiLink jsSwitchBraces Noise
|
||||
HiLink jsSpecial Special
|
||||
HiLink jsTemplateVar Special
|
||||
HiLink jsTemplateBraces jsBraces
|
||||
HiLink jsTemplateBraces Noise
|
||||
HiLink jsGlobalObjects Constant
|
||||
HiLink jsGlobalNodeObjects Constant
|
||||
HiLink jsExceptions Constant
|
||||
@ -350,6 +354,8 @@ if version >= 508 || !exists("did_javascript_syn_inits")
|
||||
HiLink jsClassMethodType Type
|
||||
HiLink jsObjectMethodType Type
|
||||
HiLink jsClassDefinition jsFuncName
|
||||
HiLink jsBlockLabel Identifier
|
||||
HiLink jsBlockLabelKey jsBlockLabel
|
||||
|
||||
HiLink jsDestructuringBraces Noise
|
||||
HiLink jsDestructuringProperty jsFuncArgs
|
||||
|
@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kotlin') == -1
|
||||
" Vim syntax file
|
||||
" Language: Kotlin
|
||||
" Maintainer: Alexander Udalov
|
||||
" Latest Revision: 4 July 2016
|
||||
" Latest Revision: 29 December 2016
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@ -21,7 +21,7 @@ syn keyword ktException try catch finally throw
|
||||
syn keyword ktInclude import package
|
||||
|
||||
syn keyword ktType Any Boolean Byte Char Double Float Int Long Nothing Short Unit
|
||||
syn keyword ktModifier annotation companion enum inner internal private protected public abstract final open override sealed vararg dynamic
|
||||
syn keyword ktModifier annotation companion enum inner internal private protected public abstract final open override sealed vararg dynamic header impl
|
||||
syn keyword ktStructure class object interface typealias fun val var constructor init
|
||||
|
||||
syn keyword ktReservedKeyword typeof
|
||||
@ -29,7 +29,7 @@ syn keyword ktReservedKeyword typeof
|
||||
syn keyword ktBoolean true false
|
||||
syn keyword ktConstant null
|
||||
|
||||
syn keyword ktModifier data tailrec lateinit reified external inline noinline crossinline const operator infix coroutine suspend
|
||||
syn keyword ktModifier data tailrec lateinit reified external inline noinline crossinline const operator infix suspend
|
||||
|
||||
syn keyword ktTodo TODO FIXME XXX contained
|
||||
syn match ktShebang "\v^#!.*$"
|
||||
|
@ -1,25 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" highlight
|
||||
|
||||
hi link ngxComment Comment
|
||||
hi link ngxVariable Identifier
|
||||
hi link ngxVariableString PreProc
|
||||
hi link ngxString String
|
||||
hi link ngxLocationPath String
|
||||
hi link ngxLocationNamedLoc Identifier
|
||||
|
||||
hi link ngxBoolean Boolean
|
||||
hi link ngxRewriteFlag Boolean
|
||||
hi link ngxDirectiveBlock Statement
|
||||
hi link ngxDirectiveImportant Type
|
||||
hi link ngxDirectiveControl Keyword
|
||||
hi link ngxDirectiveError Constant
|
||||
hi link ngxDirectiveDeprecated Error
|
||||
hi link ngxDirective Identifier
|
||||
hi link ngxDirectiveThirdParty Special
|
||||
|
||||
let b:current_syntax = "nginx"
|
||||
|
||||
|
||||
endif
|
@ -7,9 +7,17 @@ if exists("b:current_syntax")
|
||||
finish
|
||||
end
|
||||
|
||||
if has("patch-7.4-1142")
|
||||
if has("win32")
|
||||
syn iskeyword @,48-57,_,128-167,224-235,.,/,:
|
||||
else
|
||||
syn iskeyword @,48-57,_,192-255,.,/,:
|
||||
endif
|
||||
else
|
||||
setlocal iskeyword+=.
|
||||
setlocal iskeyword+=/
|
||||
setlocal iskeyword+=:
|
||||
endif
|
||||
|
||||
syn match ngxVariable '\$\(\w\+\|{\w\+}\)'
|
||||
syn match ngxVariableString '\$\(\w\+\|{\w\+}\)' contained
|
||||
@ -27,6 +35,7 @@ syn keyword ngxDirectiveBlock http
|
||||
syn keyword ngxDirectiveBlock mail
|
||||
syn keyword ngxDirectiveBlock events
|
||||
syn keyword ngxDirectiveBlock server
|
||||
syn keyword ngxDirectiveBlock stream
|
||||
syn keyword ngxDirectiveBlock types
|
||||
syn match ngxLocationOperator /\(=\|\~\*\|\^\~\|\~\)/ contained nextgroup=ngxLocationPath,ngxString skipwhite
|
||||
syn match ngxLocationNamedLoc /@\w\+/
|
||||
@ -57,7 +66,10 @@ syn keyword ngxDirectiveControl return
|
||||
syn keyword ngxDirectiveControl rewrite nextgroup=ngxRewriteURI skipwhite
|
||||
syn keyword ngxDirectiveControl set
|
||||
|
||||
syn keyword ngxRewriteFlag last break redirect permanent
|
||||
syn keyword ngxRewriteFlag last
|
||||
syn keyword ngxRewriteFlag break
|
||||
syn keyword ngxRewriteFlag redirect
|
||||
syn keyword ngxRewriteFlag permanent
|
||||
|
||||
syn keyword ngxDirectiveError error_page
|
||||
syn keyword ngxDirectiveError post_action
|
||||
@ -70,7 +82,16 @@ syn keyword ngxDirectiveDeprecated open_file_cache_retest
|
||||
syn keyword ngxDirectiveDeprecated optimize_server_names
|
||||
syn keyword ngxDirectiveDeprecated satisfy_any
|
||||
syn keyword ngxDirectiveDeprecated so_keepalive
|
||||
syn keyword ngxDirectiveDeprecated spdy_chunk_size
|
||||
syn keyword ngxDirectiveDeprecated spdy_headers_comp
|
||||
syn keyword ngxDirectiveDeprecated spdy_keepalive_timeout
|
||||
syn keyword ngxDirectiveDeprecated spdy_max_concurrent_streams
|
||||
syn keyword ngxDirectiveDeprecated spdy_pool_size
|
||||
syn keyword ngxDirectiveDeprecated spdy_recv_buffer_size
|
||||
syn keyword ngxDirectiveDeprecated spdy_recv_timeout
|
||||
syn keyword ngxDirectiveDeprecated spdy_streams_index_size
|
||||
|
||||
syn keyword ngxDirective absolute_redirect
|
||||
syn keyword ngxDirective accept_mutex
|
||||
syn keyword ngxDirective accept_mutex_delay
|
||||
syn keyword ngxDirective acceptex_read
|
||||
@ -80,6 +101,7 @@ syn keyword ngxDirective add_before_body
|
||||
syn keyword ngxDirective add_header
|
||||
syn keyword ngxDirective addition_types
|
||||
syn keyword ngxDirective aio
|
||||
syn keyword ngxDirective aio_write
|
||||
syn keyword ngxDirective alias
|
||||
syn keyword ngxDirective allow
|
||||
syn keyword ngxDirective ancient_browser
|
||||
@ -88,13 +110,18 @@ syn keyword ngxDirective auth_basic
|
||||
syn keyword ngxDirective auth_basic_user_file
|
||||
syn keyword ngxDirective auth_http
|
||||
syn keyword ngxDirective auth_http_header
|
||||
syn keyword ngxDirective auth_http_pass_client_cert
|
||||
syn keyword ngxDirective auth_http_timeout
|
||||
syn keyword ngxDirective auth_jwt
|
||||
syn keyword ngxDirective auth_jwt_key_file
|
||||
syn keyword ngxDirective auth_request
|
||||
syn keyword ngxDirective auth_request_set
|
||||
syn keyword ngxDirective autoindex
|
||||
syn keyword ngxDirective autoindex_exact_size
|
||||
syn keyword ngxDirective autoindex_format
|
||||
syn keyword ngxDirective autoindex_localtime
|
||||
syn keyword ngxDirective charset
|
||||
syn keyword ngxDirective charset_map
|
||||
syn keyword ngxDirective charset_types
|
||||
syn keyword ngxDirective chunked_transfer_encoding
|
||||
syn keyword ngxDirective client_body_buffer_size
|
||||
@ -128,6 +155,8 @@ syn keyword ngxDirective error_log
|
||||
syn keyword ngxDirective etag
|
||||
syn keyword ngxDirective eventport_events
|
||||
syn keyword ngxDirective expires
|
||||
syn keyword ngxDirective f4f
|
||||
syn keyword ngxDirective f4f_buffer_size
|
||||
syn keyword ngxDirective fastcgi_bind
|
||||
syn keyword ngxDirective fastcgi_buffer_size
|
||||
syn keyword ngxDirective fastcgi_buffering
|
||||
@ -139,6 +168,7 @@ syn keyword ngxDirective fastcgi_cache_key
|
||||
syn keyword ngxDirective fastcgi_cache_lock
|
||||
syn keyword ngxDirective fastcgi_cache_lock_age
|
||||
syn keyword ngxDirective fastcgi_cache_lock_timeout
|
||||
syn keyword ngxDirective fastcgi_cache_max_range_offset
|
||||
syn keyword ngxDirective fastcgi_cache_methods
|
||||
syn keyword ngxDirective fastcgi_cache_min_uses
|
||||
syn keyword ngxDirective fastcgi_cache_path
|
||||
@ -197,7 +227,24 @@ syn keyword ngxDirective gzip_types
|
||||
syn keyword ngxDirective gzip_vary
|
||||
syn keyword ngxDirective gzip_window
|
||||
syn keyword ngxDirective hash
|
||||
syn keyword ngxDirective health_check
|
||||
syn keyword ngxDirective health_check_timeout
|
||||
syn keyword ngxDirective hls
|
||||
syn keyword ngxDirective hls_buffers
|
||||
syn keyword ngxDirective hls_forward_args
|
||||
syn keyword ngxDirective hls_fragment
|
||||
syn keyword ngxDirective hls_mp4_buffer_size
|
||||
syn keyword ngxDirective hls_mp4_max_buffer_size
|
||||
syn keyword ngxDirective http2 " Not a real directive
|
||||
syn keyword ngxDirective http2_chunk_size
|
||||
syn keyword ngxDirective http2_body_preread_size
|
||||
syn keyword ngxDirective http2_idle_timeout
|
||||
syn keyword ngxDirective http2_max_concurrent_streams
|
||||
syn keyword ngxDirective http2_max_field_size
|
||||
syn keyword ngxDirective http2_max_header_size
|
||||
syn keyword ngxDirective http2_max_requests
|
||||
syn keyword ngxDirective http2_recv_buffer_size
|
||||
syn keyword ngxDirective http2_recv_timeout
|
||||
syn keyword ngxDirective if_modified_since
|
||||
syn keyword ngxDirective ignore_invalid_headers
|
||||
syn keyword ngxDirective image_filter
|
||||
@ -206,13 +253,18 @@ syn keyword ngxDirective image_filter_interlace
|
||||
syn keyword ngxDirective image_filter_jpeg_quality
|
||||
syn keyword ngxDirective image_filter_sharpen
|
||||
syn keyword ngxDirective image_filter_transparency
|
||||
syn keyword ngxDirective image_filter_webp_quality
|
||||
syn keyword ngxDirective imap_auth
|
||||
syn keyword ngxDirective imap_capabilities
|
||||
syn keyword ngxDirective imap_client_buffer
|
||||
syn keyword ngxDirective index
|
||||
syn keyword ngxDirective iocp_threads
|
||||
syn keyword ngxDirective ip_hash
|
||||
syn keyword ngxDirective js_run
|
||||
syn keyword ngxDirective js_access
|
||||
syn keyword ngxDirective js_content
|
||||
syn keyword ngxDirective js_filter
|
||||
syn keyword ngxDirective js_include
|
||||
syn keyword ngxDirective js_preread
|
||||
syn keyword ngxDirective js_set
|
||||
syn keyword ngxDirective keepalive
|
||||
syn keyword ngxDirective keepalive_disable
|
||||
@ -222,6 +274,7 @@ syn keyword ngxDirective kqueue_changes
|
||||
syn keyword ngxDirective kqueue_events
|
||||
syn keyword ngxDirective large_client_header_buffers
|
||||
syn keyword ngxDirective least_conn
|
||||
syn keyword ngxDirective least_time
|
||||
syn keyword ngxDirective limit_conn
|
||||
syn keyword ngxDirective limit_conn_log_level
|
||||
syn keyword ngxDirective limit_conn_status
|
||||
@ -242,11 +295,13 @@ syn keyword ngxDirective log_not_found
|
||||
syn keyword ngxDirective log_subrequest
|
||||
syn keyword ngxDirective map_hash_bucket_size
|
||||
syn keyword ngxDirective map_hash_max_size
|
||||
syn keyword ngxDirective match
|
||||
syn keyword ngxDirective master_process
|
||||
syn keyword ngxDirective max_ranges
|
||||
syn keyword ngxDirective memcached_bind
|
||||
syn keyword ngxDirective memcached_buffer_size
|
||||
syn keyword ngxDirective memcached_connect_timeout
|
||||
syn keyword ngxDirective memcached_force_ranges
|
||||
syn keyword ngxDirective memcached_gzip_flag
|
||||
syn keyword ngxDirective memcached_next_upstream
|
||||
syn keyword ngxDirective memcached_next_upstream_timeout
|
||||
@ -265,6 +320,7 @@ syn keyword ngxDirective mp4_limit_rate_after
|
||||
syn keyword ngxDirective msie_padding
|
||||
syn keyword ngxDirective msie_refresh
|
||||
syn keyword ngxDirective multi_accept
|
||||
syn keyword ngxDirective ntlm
|
||||
syn keyword ngxDirective open_file_cache
|
||||
syn keyword ngxDirective open_file_cache_errors
|
||||
syn keyword ngxDirective open_file_cache_events
|
||||
@ -285,6 +341,8 @@ syn keyword ngxDirective port_in_redirect
|
||||
syn keyword ngxDirective post_acceptex
|
||||
syn keyword ngxDirective postpone_gzipping
|
||||
syn keyword ngxDirective postpone_output
|
||||
syn keyword ngxDirective preread_buffer_size
|
||||
syn keyword ngxDirective preread_timeout
|
||||
syn keyword ngxDirective protocol nextgroup=ngxMailProtocol skipwhite
|
||||
syn keyword ngxMailProtocol imap pop3 smtp
|
||||
syn keyword ngxDirective proxy
|
||||
@ -296,18 +354,23 @@ syn keyword ngxDirective proxy_buffers
|
||||
syn keyword ngxDirective proxy_busy_buffers_size
|
||||
syn keyword ngxDirective proxy_cache
|
||||
syn keyword ngxDirective proxy_cache_bypass
|
||||
syn keyword ngxDirective proxy_cache_convert_head
|
||||
syn keyword ngxDirective proxy_cache_key
|
||||
syn keyword ngxDirective proxy_cache_lock
|
||||
syn keyword ngxDirective proxy_cache_lock_age
|
||||
syn keyword ngxDirective proxy_cache_lock_timeout
|
||||
syn keyword ngxDirective proxy_cache_max_range_offset
|
||||
syn keyword ngxDirective proxy_cache_methods
|
||||
syn keyword ngxDirective proxy_cache_min_uses
|
||||
syn keyword ngxDirective proxy_cache_path
|
||||
syn keyword ngxDirective proxy_cache_purge
|
||||
syn keyword ngxDirective proxy_cache_revalidate
|
||||
syn keyword ngxDirective proxy_cache_use_stale
|
||||
syn keyword ngxDirective proxy_cache_valid
|
||||
syn keyword ngxDirective proxy_connect_timeout
|
||||
syn keyword ngxDirective proxy_cookie_domain
|
||||
syn keyword ngxDirective proxy_cookie_path
|
||||
syn keyword ngxDirective proxy_download_rate
|
||||
syn keyword ngxDirective proxy_force_ranges
|
||||
syn keyword ngxDirective proxy_headers_hash_bucket_size
|
||||
syn keyword ngxDirective proxy_headers_hash_max_size
|
||||
@ -316,6 +379,7 @@ syn keyword ngxDirective proxy_http_version
|
||||
syn keyword ngxDirective proxy_ignore_client_abort
|
||||
syn keyword ngxDirective proxy_ignore_headers
|
||||
syn keyword ngxDirective proxy_intercept_errors
|
||||
syn keyword ngxDirective proxy_limit_rate
|
||||
syn keyword ngxDirective proxy_max_temp_file_size
|
||||
syn keyword ngxDirective proxy_method
|
||||
syn keyword ngxDirective proxy_next_upstream
|
||||
@ -326,16 +390,23 @@ syn keyword ngxDirective proxy_pass_error_message
|
||||
syn keyword ngxDirective proxy_pass_header
|
||||
syn keyword ngxDirective proxy_pass_request_body
|
||||
syn keyword ngxDirective proxy_pass_request_headers
|
||||
syn keyword ngxDirective proxy_protocol
|
||||
syn keyword ngxDirective proxy_protocol_timeout
|
||||
syn keyword ngxDirective proxy_read_timeout
|
||||
syn keyword ngxDirective proxy_redirect
|
||||
syn keyword ngxDirective proxy_request_buffering
|
||||
syn keyword ngxDirective proxy_responses
|
||||
syn keyword ngxDirective proxy_send_lowat
|
||||
syn keyword ngxDirective proxy_send_timeout
|
||||
syn keyword ngxDirective proxy_set_body
|
||||
syn keyword ngxDirective proxy_set_header
|
||||
syn keyword ngxDirective proxy_ssl_certificate
|
||||
syn keyword ngxDirective proxy_ssl_certificate_key
|
||||
syn keyword ngxDirective proxy_ssl_ciphers
|
||||
syn keyword ngxDirective proxy_ssl_crl
|
||||
syn keyword ngxDirective proxy_ssl_name
|
||||
syn keyword ngxDirective proxy_ssl_protocols
|
||||
syn keyword ngxDirective proxy_ssl_password_file
|
||||
syn keyword ngxDirective proxy_ssl_protocols nextgroup=ngxSSLProtocol skipwhite
|
||||
syn keyword ngxDirective proxy_ssl_server_name
|
||||
syn keyword ngxDirective proxy_ssl_session_reuse
|
||||
syn keyword ngxDirective proxy_ssl_trusted_certificate
|
||||
@ -346,6 +417,8 @@ syn keyword ngxDirective proxy_store_access
|
||||
syn keyword ngxDirective proxy_temp_file_write_size
|
||||
syn keyword ngxDirective proxy_temp_path
|
||||
syn keyword ngxDirective proxy_timeout
|
||||
syn keyword ngxDirective proxy_upload_rate
|
||||
syn keyword ngxDirective queue
|
||||
syn keyword ngxDirective random_index
|
||||
syn keyword ngxDirective read_ahead
|
||||
syn keyword ngxDirective real_ip_header
|
||||
@ -372,10 +445,13 @@ syn keyword ngxDirective scgi_cache
|
||||
syn keyword ngxDirective scgi_cache_bypass
|
||||
syn keyword ngxDirective scgi_cache_key
|
||||
syn keyword ngxDirective scgi_cache_lock
|
||||
syn keyword ngxDirective scgi_cache_lock_age
|
||||
syn keyword ngxDirective scgi_cache_lock_timeout
|
||||
syn keyword ngxDirective scgi_cache_max_range_offset
|
||||
syn keyword ngxDirective scgi_cache_methods
|
||||
syn keyword ngxDirective scgi_cache_min_uses
|
||||
syn keyword ngxDirective scgi_cache_path
|
||||
syn keyword ngxDirective scgi_cache_purge
|
||||
syn keyword ngxDirective scgi_cache_revalidate
|
||||
syn keyword ngxDirective scgi_cache_use_stale
|
||||
syn keyword ngxDirective scgi_cache_valid
|
||||
@ -385,6 +461,7 @@ syn keyword ngxDirective scgi_hide_header
|
||||
syn keyword ngxDirective scgi_ignore_client_abort
|
||||
syn keyword ngxDirective scgi_ignore_headers
|
||||
syn keyword ngxDirective scgi_intercept_errors
|
||||
syn keyword ngxDirective scgi_limit_rate
|
||||
syn keyword ngxDirective scgi_max_temp_file_size
|
||||
syn keyword ngxDirective scgi_next_upstream
|
||||
syn keyword ngxDirective scgi_next_upstream_timeout
|
||||
@ -395,6 +472,7 @@ syn keyword ngxDirective scgi_pass_header
|
||||
syn keyword ngxDirective scgi_pass_request_body
|
||||
syn keyword ngxDirective scgi_pass_request_headers
|
||||
syn keyword ngxDirective scgi_read_timeout
|
||||
syn keyword ngxDirective scgi_request_buffering
|
||||
syn keyword ngxDirective scgi_send_timeout
|
||||
syn keyword ngxDirective scgi_store
|
||||
syn keyword ngxDirective scgi_store_access
|
||||
@ -411,20 +489,16 @@ syn keyword ngxDirective server_name_in_redirect
|
||||
syn keyword ngxDirective server_names_hash_bucket_size
|
||||
syn keyword ngxDirective server_names_hash_max_size
|
||||
syn keyword ngxDirective server_tokens
|
||||
syn keyword ngxDirective session_log
|
||||
syn keyword ngxDirective session_log_format
|
||||
syn keyword ngxDirective session_log_zone
|
||||
syn keyword ngxDirective set_real_ip_from
|
||||
syn keyword ngxDirective slice
|
||||
syn keyword ngxDirective smtp_auth
|
||||
syn keyword ngxDirective smtp_capabilities
|
||||
syn keyword ngxDirective smtp_client_buffer
|
||||
syn keyword ngxDirective smtp_greeting_delay
|
||||
syn keyword ngxDirective source_charset
|
||||
syn keyword ngxDirective spdy_chunk_size
|
||||
syn keyword ngxDirective spdy_headers_comp
|
||||
syn keyword ngxDirective spdy_keepalive_timeout
|
||||
syn keyword ngxDirective spdy_max_concurrent_streams
|
||||
syn keyword ngxDirective spdy_pool_size
|
||||
syn keyword ngxDirective spdy_recv_buffer_size
|
||||
syn keyword ngxDirective spdy_recv_timeout
|
||||
syn keyword ngxDirective spdy_streams_index_size
|
||||
syn keyword ngxDirective ssi
|
||||
syn keyword ngxDirective ssi_ignore_recycled_buffers
|
||||
syn keyword ngxDirective ssi_last_modified
|
||||
@ -442,9 +516,12 @@ syn keyword ngxDirective ssl_crl
|
||||
syn keyword ngxDirective ssl_dhparam
|
||||
syn keyword ngxDirective ssl_ecdh_curve
|
||||
syn keyword ngxDirective ssl_engine
|
||||
syn keyword ngxDirective ssl_handshake_timeout
|
||||
syn keyword ngxDirective ssl_password_file
|
||||
syn keyword ngxDirective ssl_prefer_server_ciphers
|
||||
syn keyword ngxDirective ssl_protocols
|
||||
syn keyword ngxDirective ssl_preread
|
||||
syn keyword ngxDirective ssl_protocols nextgroup=ngxSSLProtocol skipwhite
|
||||
syn keyword ngxSSLProtocol SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2
|
||||
syn keyword ngxDirective ssl_session_cache
|
||||
syn keyword ngxDirective ssl_session_ticket_key
|
||||
syn keyword ngxDirective ssl_session_tickets
|
||||
@ -457,6 +534,12 @@ syn keyword ngxDirective ssl_trusted_certificate
|
||||
syn keyword ngxDirective ssl_verify_client
|
||||
syn keyword ngxDirective ssl_verify_depth
|
||||
syn keyword ngxDirective starttls
|
||||
syn keyword ngxDirective state
|
||||
syn keyword ngxDirective status
|
||||
syn keyword ngxDirective status_format
|
||||
syn keyword ngxDirective status_zone
|
||||
syn keyword ngxDirective sticky
|
||||
syn keyword ngxDirective sticky_cookie_insert
|
||||
syn keyword ngxDirective stub_status
|
||||
syn keyword ngxDirective sub_filter
|
||||
syn keyword ngxDirective sub_filter_last_modified
|
||||
@ -472,6 +555,7 @@ syn keyword ngxDirective types_hash_bucket_size
|
||||
syn keyword ngxDirective types_hash_max_size
|
||||
syn keyword ngxDirective underscores_in_headers
|
||||
syn keyword ngxDirective uninitialized_variable_warn
|
||||
syn keyword ngxDirective upstream_conf
|
||||
syn keyword ngxDirective use
|
||||
syn keyword ngxDirective user
|
||||
syn keyword ngxDirective userid
|
||||
@ -496,6 +580,7 @@ syn keyword ngxDirective uwsgi_cache_lock_timeout
|
||||
syn keyword ngxDirective uwsgi_cache_methods
|
||||
syn keyword ngxDirective uwsgi_cache_min_uses
|
||||
syn keyword ngxDirective uwsgi_cache_path
|
||||
syn keyword ngxDirective uwsgi_cache_purge
|
||||
syn keyword ngxDirective uwsgi_cache_revalidate
|
||||
syn keyword ngxDirective uwsgi_cache_use_stale
|
||||
syn keyword ngxDirective uwsgi_cache_valid
|
||||
@ -505,6 +590,7 @@ syn keyword ngxDirective uwsgi_hide_header
|
||||
syn keyword ngxDirective uwsgi_ignore_client_abort
|
||||
syn keyword ngxDirective uwsgi_ignore_headers
|
||||
syn keyword ngxDirective uwsgi_intercept_errors
|
||||
syn keyword ngxDirective uwsgi_limit_rate
|
||||
syn keyword ngxDirective uwsgi_max_temp_file_size
|
||||
syn keyword ngxDirective uwsgi_modifier1
|
||||
syn keyword ngxDirective uwsgi_modifier2
|
||||
@ -526,7 +612,7 @@ syn keyword ngxDirective uwsgi_ssl_ciphers
|
||||
syn keyword ngxDirective uwsgi_ssl_crl
|
||||
syn keyword ngxDirective uwsgi_ssl_name
|
||||
syn keyword ngxDirective uwsgi_ssl_password_file
|
||||
syn keyword ngxDirective uwsgi_ssl_protocols
|
||||
syn keyword ngxDirective uwsgi_ssl_protocols nextgroup=ngxSSLProtocol skipwhite
|
||||
syn keyword ngxDirective uwsgi_ssl_server_name
|
||||
syn keyword ngxDirective uwsgi_ssl_session_reuse
|
||||
syn keyword ngxDirective uwsgi_ssl_trusted_certificate
|
||||
@ -557,10 +643,33 @@ syn keyword ngxDirective xslt_param
|
||||
syn keyword ngxDirective xslt_string_param
|
||||
syn keyword ngxDirective xslt_stylesheet
|
||||
syn keyword ngxDirective xslt_types
|
||||
syn keyword ngxDirective zone
|
||||
|
||||
" 3rd party module list:
|
||||
" https://www.nginx.com/resources/wiki/modules/
|
||||
|
||||
" @3PARTY
|
||||
|
||||
" highlight
|
||||
|
||||
hi link ngxComment Comment
|
||||
hi link ngxVariable Identifier
|
||||
hi link ngxVariableString PreProc
|
||||
hi link ngxString String
|
||||
hi link ngxLocationPath String
|
||||
hi link ngxLocationNamedLoc Identifier
|
||||
|
||||
hi link ngxBoolean Boolean
|
||||
hi link ngxRewriteFlag Boolean
|
||||
hi link ngxDirectiveBlock Statement
|
||||
hi link ngxDirectiveImportant Type
|
||||
hi link ngxDirectiveControl Keyword
|
||||
hi link ngxDirectiveError Constant
|
||||
hi link ngxDirectiveDeprecated Error
|
||||
hi link ngxDirective Identifier
|
||||
hi link ngxDirectiveThirdParty Special
|
||||
|
||||
let b:current_syntax = "nginx"
|
||||
|
||||
|
||||
endif
|
@ -49,12 +49,15 @@ if get(g:, 'vim_markdown_emphasis_multiline', 1)
|
||||
else
|
||||
let s:oneline = ' oneline'
|
||||
endif
|
||||
execute 'syn region htmlItalic start="\%(^\|\s\)\zs\*\ze[^\\\*\t ]\%(\%([^*]\|\\\*\|\n\)*[^\\\*\t ]\)\?\*\_W" end="[^\\\*\t ]\zs\*\ze\_W" keepend' . s:oneline
|
||||
execute 'syn region htmlItalic start="\%(^\|\s\)\zs_\ze[^\\_\t ]" end="[^\\_\t ]\zs_\ze\_W" keepend' . s:oneline
|
||||
execute 'syn region htmlBold start="\%(^\|\s\)\*\*\ze\S" end="\S\zs\*\*" keepend' . s:oneline
|
||||
execute 'syn region htmlBold start="\%(^\|\s\)\zs__\ze\S" end="\S\zs__" keepend' . s:oneline
|
||||
execute 'syn region htmlBoldItalic start="\%(^\|\s\)\zs\*\*\*\ze\S" end="\S\zs\*\*\*" keepend' . s:oneline
|
||||
execute 'syn region htmlBoldItalic start="\%(^\|\s\)\zs___\ze\S" end="\S\zs___" keepend' . s:oneline
|
||||
syn region mkdItalic matchgroup=mkdItalic start="\%(\*\|_\)" end="\%(\*\|_\)"
|
||||
syn region mkdBold matchgroup=mkdBold start="\%(\*\*\|__\)" end="\%(\*\*\|__\)"
|
||||
syn region mkdBoldItalic matchgroup=mkdBoldItalic start="\%(\*\*\*\|___\)" end="\%(\*\*\*\|___\)"
|
||||
execute 'syn region htmlItalic matchgroup=mkdItalic start="\%(^\|\s\)\zs\*\ze[^\\\*\t ]\%(\%([^*]\|\\\*\|\n\)*[^\\\*\t ]\)\?\*\_W" end="[^\\\*\t ]\zs\*\ze\_W" keepend contains=@Spell' . s:oneline . s:concealends
|
||||
execute 'syn region htmlItalic matchgroup=mkdItalic start="\%(^\|\s\)\zs_\ze[^\\_\t ]" end="[^\\_\t ]\zs_\ze\_W" keepend contains=@Spell' . s:oneline . s:concealends
|
||||
execute 'syn region htmlBold matchgroup=mkdBold start="\%(^\|\s\)\zs\*\*\ze\S" end="\S\zs\*\*" keepend contains=@Spell' . s:oneline . s:concealends
|
||||
execute 'syn region htmlBold matchgroup=mkdBold start="\%(^\|\s\)\zs__\ze\S" end="\S\zs__" keepend contains=@Spell' . s:oneline . s:concealends
|
||||
execute 'syn region htmlBoldItalic matchgroup=mkdBoldItalic start="\%(^\|\s\)\zs\*\*\*\ze\S" end="\S\zs\*\*\*" keepend contains=@Spell' . s:oneline . s:concealends
|
||||
execute 'syn region htmlBoldItalic matchgroup=mkdBoldItalic start="\%(^\|\s\)\zs___\ze\S" end="\S\zs___" keepend contains=@Spell' . s:oneline . s:concealends
|
||||
|
||||
" [link](URL) | [link][id] | [link][] | ![image](URL)
|
||||
syn region mkdFootnotes matchgroup=mkdDelimiter start="\[^" end="\]"
|
||||
@ -104,7 +107,7 @@ syn region mkdFootnote start="\[^" end="\]"
|
||||
syn match mkdCode /^\s*\n\(\(\s\{8,}[^ ]\|\t\t\+[^\t]\).*\n\)\+/
|
||||
syn match mkdCode /\%^\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/
|
||||
syn match mkdCode /^\s*\n\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/ contained
|
||||
syn match mkdListItem /^\s*\%([-*+]\|\d\+\.\)\s\+/ contained
|
||||
syn match mkdListItem /^\s*\%([-*+]\|\d\+\.\)\ze\s\+/ contained
|
||||
syn region mkdListItemLine start="^\s*\%([-*+]\|\d\+\.\)\s\+" end="$" oneline contains=@mkdNonListItem,mkdListItem,@Spell
|
||||
syn region mkdNonListItemBlock start="\(\%^\(\s*\([-*+]\|\d\+\.\)\s\+\)\@!\|\n\(\_^\_$\|\s\{4,}[^ ]\|\t+[^\t]\)\@!\)" end="^\(\s*\([-*+]\|\d\+\.\)\s\+\)\@=" contains=@mkdNonListItem,@Spell
|
||||
syn match mkdRule /^\s*\*\s\{0,1}\*\s\{0,1}\*$/
|
||||
|
@ -2,10 +2,10 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Access Key Module (DEPRECATED) <http://wiki.nginx.org/NginxHttpAccessKeyModule>
|
||||
" Denies access unless the request URL contains an access key.
|
||||
syn keyword ngxDirectiveThirdParty accesskey
|
||||
syn keyword ngxDirectiveThirdParty accesskey_arg
|
||||
syn keyword ngxDirectiveThirdParty accesskey_hashmethod
|
||||
syn keyword ngxDirectiveThirdParty accesskey_signature
|
||||
syn keyword ngxDirectiveDeprecated accesskey
|
||||
syn keyword ngxDirectiveDeprecated accesskey_arg
|
||||
syn keyword ngxDirectiveDeprecated accesskey_hashmethod
|
||||
syn keyword ngxDirectiveDeprecated accesskey_signature
|
||||
|
||||
|
||||
endif
|
||||
|
@ -1,9 +1,11 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Cache Purge Module <https://github.com/FRiCKLE/ngx_cache_purge>
|
||||
" Module adding ability to purge content from FastCGI and proxy caches.
|
||||
" Adds ability to purge content from FastCGI, proxy, SCGI and uWSGI caches.
|
||||
syn keyword ngxDirectiveThirdParty fastcgi_cache_purge
|
||||
syn keyword ngxDirectiveThirdParty proxy_cache_purge
|
||||
" syn keyword ngxDirectiveThirdParty scgi_cache_purge
|
||||
" syn keyword ngxDirectiveThirdParty uwsgi_cache_purge
|
||||
|
||||
|
||||
endif
|
||||
|
@ -2,10 +2,10 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Chunkin Module (DEPRECATED) <http://wiki.nginx.org/NginxHttpChunkinModule>
|
||||
" HTTP 1.1 chunked-encoding request body support for Nginx.
|
||||
syn keyword ngxDirectiveThirdParty chunkin
|
||||
syn keyword ngxDirectiveThirdParty chunkin_keepalive
|
||||
syn keyword ngxDirectiveThirdParty chunkin_max_chunks_per_buf
|
||||
syn keyword ngxDirectiveThirdParty chunkin_resume
|
||||
syn keyword ngxDirectiveDeprecated chunkin
|
||||
syn keyword ngxDirectiveDeprecated chunkin_keepalive
|
||||
syn keyword ngxDirectiveDeprecated chunkin_max_chunks_per_buf
|
||||
syn keyword ngxDirectiveDeprecated chunkin_resume
|
||||
|
||||
|
||||
endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Nginx-Clojure Module http://nginx-clojure.github.io/index.html<>
|
||||
" Nginx-Clojure Module <http://nginx-clojure.github.io/index.html>
|
||||
" Parses the Accept-Language header and gives the most suitable locale from a list of supported locales.
|
||||
syn keyword ngxDirectiveThirdParty jvm_path
|
||||
syn keyword ngxDirectiveThirdParty jvm_var
|
||||
|
@ -1,17 +1,18 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Drizzle Module <https://github.com/openresty/drizzle-nginx-module>
|
||||
" Make nginx talk directly to mysql, drizzle, and sqlite3 by libdrizzle.
|
||||
syn keyword ngxDirectiveThirdParty drizzle_connect_timeout
|
||||
syn keyword ngxDirectiveThirdParty drizzle_dbname
|
||||
" Drizzle Module <https://www.nginx.com/resources/wiki/modules/drizzle/>
|
||||
" Upstream module for talking to MySQL and Drizzle directly
|
||||
syn keyword ngxDirectiveThirdParty drizzle_server
|
||||
syn keyword ngxDirectiveThirdParty drizzle_keepalive
|
||||
syn keyword ngxDirectiveThirdParty drizzle_module_header
|
||||
syn keyword ngxDirectiveThirdParty drizzle_pass
|
||||
syn keyword ngxDirectiveThirdParty drizzle_query
|
||||
syn keyword ngxDirectiveThirdParty drizzle_pass
|
||||
syn keyword ngxDirectiveThirdParty drizzle_connect_timeout
|
||||
syn keyword ngxDirectiveThirdParty drizzle_send_query_timeout
|
||||
syn keyword ngxDirectiveThirdParty drizzle_recv_cols_timeout
|
||||
syn keyword ngxDirectiveThirdParty drizzle_recv_rows_timeout
|
||||
syn keyword ngxDirectiveThirdParty drizzle_send_query_timeout
|
||||
syn keyword ngxDirectiveThirdParty drizzle_server
|
||||
syn keyword ngxDirectiveThirdParty drizzle_buffer_size
|
||||
syn keyword ngxDirectiveThirdParty drizzle_module_header
|
||||
syn keyword ngxDirectiveThirdParty drizzle_status
|
||||
|
||||
|
||||
endif
|
||||
|
@ -1,24 +1,25 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Echo Module <https://github.com/openresty/echo-nginx-module>
|
||||
" Brings 'echo', 'sleep', 'time', 'exec' and more shell-style goodies to Nginx config file.
|
||||
" Echo Module <https://www.nginx.com/resources/wiki/modules/echo/>
|
||||
" Bringing the power of "echo", "sleep", "time" and more to Nginx's config file
|
||||
syn keyword ngxDirectiveThirdParty echo
|
||||
syn keyword ngxDirectiveThirdParty echo_after_body
|
||||
syn keyword ngxDirectiveThirdParty echo_before_body
|
||||
syn keyword ngxDirectiveThirdParty echo_blocking_sleep
|
||||
syn keyword ngxDirectiveThirdParty echo_duplicate
|
||||
syn keyword ngxDirectiveThirdParty echo_end
|
||||
syn keyword ngxDirectiveThirdParty echo_exec
|
||||
syn keyword ngxDirectiveThirdParty echo_flush
|
||||
syn keyword ngxDirectiveThirdParty echo_foreach_split
|
||||
syn keyword ngxDirectiveThirdParty echo_location
|
||||
syn keyword ngxDirectiveThirdParty echo_location_async
|
||||
syn keyword ngxDirectiveThirdParty echo_read_request_body
|
||||
syn keyword ngxDirectiveThirdParty echo_request_body
|
||||
syn keyword ngxDirectiveThirdParty echo_reset_timer
|
||||
syn keyword ngxDirectiveThirdParty echo_sleep
|
||||
syn keyword ngxDirectiveThirdParty echo_subrequest
|
||||
syn keyword ngxDirectiveThirdParty echo_blocking_sleep
|
||||
syn keyword ngxDirectiveThirdParty echo_reset_timer
|
||||
syn keyword ngxDirectiveThirdParty echo_read_request_body
|
||||
syn keyword ngxDirectiveThirdParty echo_location_async
|
||||
syn keyword ngxDirectiveThirdParty echo_location
|
||||
syn keyword ngxDirectiveThirdParty echo_subrequest_async
|
||||
syn keyword ngxDirectiveThirdParty echo_subrequest
|
||||
syn keyword ngxDirectiveThirdParty echo_foreach_split
|
||||
syn keyword ngxDirectiveThirdParty echo_end
|
||||
syn keyword ngxDirectiveThirdParty echo_request_body
|
||||
syn keyword ngxDirectiveThirdParty echo_exec
|
||||
syn keyword ngxDirectiveThirdParty echo_status
|
||||
syn keyword ngxDirectiveThirdParty echo_before_body
|
||||
syn keyword ngxDirectiveThirdParty echo_after_body
|
||||
|
||||
|
||||
endif
|
||||
|
@ -9,5 +9,4 @@ syn keyword ngxDirectiveThirdParty set_encrypt_session
|
||||
syn keyword ngxDirectiveThirdParty set_decrypt_session
|
||||
|
||||
|
||||
|
||||
endif
|
||||
|
@ -2,8 +2,8 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Events Module (DEPRECATED) <http://docs.dutov.org/nginx_modules_events_en.html>
|
||||
" Provides options for start/stop events.
|
||||
syn keyword ngxDirectiveThirdParty on_start
|
||||
syn keyword ngxDirectiveThirdParty on_stop
|
||||
syn keyword ngxDirectiveDeprecated on_start
|
||||
syn keyword ngxDirectiveDeprecated on_stop
|
||||
|
||||
|
||||
endif
|
||||
|
@ -3,12 +3,18 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
" Fancy Indexes Module <https://github.com/aperezdc/ngx-fancyindex>
|
||||
" Like the built-in autoindex module, but fancier.
|
||||
syn keyword ngxDirectiveThirdParty fancyindex
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_default_sort
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_directories_first
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_css_href
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_exact_size
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_name_length
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_footer
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_header
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_show_path
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_ignore
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_hide_symlinks
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_localtime
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_readme
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_readme_mode
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_time_format
|
||||
|
||||
|
||||
endif
|
||||
|
@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" GeoIP Module (DEPRECATED) <http://wiki.nginx.org/NginxHttp3rdPartyGeoIPModule>
|
||||
" Country code lookups via the MaxMind GeoIP API.
|
||||
syn keyword ngxDirectiveThirdParty geoip_country_file
|
||||
syn keyword ngxDirectiveDeprecated geoip_country_file
|
||||
|
||||
|
||||
endif
|
||||
|
8
syntax/modules/geoip2.vim
Normal file
8
syntax/modules/geoip2.vim
Normal file
@ -0,0 +1,8 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" GeoIP 2 Module <https://github.com/leev/ngx_http_geoip2_module>
|
||||
" Creates variables with values from the maxmind geoip2 databases based on the client IP
|
||||
syn keyword ngxDirectiveThirdParty geoip2
|
||||
|
||||
|
||||
endif
|
@ -2,8 +2,8 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" HTTP Auth Request Module <http://nginx.org/en/docs/http/ngx_http_auth_request_module.html>
|
||||
" Implements client authorization based on the result of a subrequest
|
||||
syn keyword ngxDirectiveThirdParty auth_request
|
||||
syn keyword ngxDirectiveThirdParty auth_request_set
|
||||
" syn keyword ngxDirectiveThirdParty auth_request
|
||||
" syn keyword ngxDirectiveThirdParty auth_request_set
|
||||
|
||||
|
||||
endif
|
||||
|
@ -2,11 +2,11 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" HTTP Push Module (DEPRECATED) <http://pushmodule.slact.net/>
|
||||
" Turn Nginx into an adept long-polling HTTP Push (Comet) server.
|
||||
syn keyword ngxDirectiveThirdParty push_buffer_size
|
||||
syn keyword ngxDirectiveThirdParty push_listener
|
||||
syn keyword ngxDirectiveThirdParty push_message_timeout
|
||||
syn keyword ngxDirectiveThirdParty push_queue_messages
|
||||
syn keyword ngxDirectiveThirdParty push_sender
|
||||
syn keyword ngxDirectiveDeprecated push_buffer_size
|
||||
syn keyword ngxDirectiveDeprecated push_listener
|
||||
syn keyword ngxDirectiveDeprecated push_message_timeout
|
||||
syn keyword ngxDirectiveDeprecated push_queue_messages
|
||||
syn keyword ngxDirectiveDeprecated push_sender
|
||||
|
||||
|
||||
endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" HTTP Redis Module <https://www.nginx.com/resources/wiki/modules/redis/>
|
||||
" Redis <http://code.google.com/p/redis/> support.>
|
||||
" Redis <http://code.google.com/p/redis/> support.
|
||||
syn keyword ngxDirectiveThirdParty redis_bind
|
||||
syn keyword ngxDirectiveThirdParty redis_buffer_size
|
||||
syn keyword ngxDirectiveThirdParty redis_connect_timeout
|
||||
|
11
syntax/modules/js.vim
Normal file
11
syntax/modules/js.vim
Normal file
@ -0,0 +1,11 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" JS Module <https://github.com/peter-leonov/ngx_http_js_module>
|
||||
" Reflect the nginx functionality in JS
|
||||
syn keyword ngxDirectiveThirdParty js
|
||||
syn keyword ngxDirectiveThirdParty js_access
|
||||
syn keyword ngxDirectiveThirdParty js_load
|
||||
syn keyword ngxDirectiveThirdParty js_set
|
||||
|
||||
|
||||
endif
|
@ -2,8 +2,8 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Log Request Speed (DEPRECATED) <http://wiki.nginx.org/NginxHttpLogRequestSpeed>
|
||||
" Log the time it took to process each request.
|
||||
syn keyword ngxDirectiveThirdParty log_request_speed_filter
|
||||
syn keyword ngxDirectiveThirdParty log_request_speed_filter_timeout
|
||||
syn keyword ngxDirectiveDeprecated log_request_speed_filter
|
||||
syn keyword ngxDirectiveDeprecated log_request_speed_filter_timeout
|
||||
|
||||
|
||||
endif
|
||||
|
@ -3,6 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
" Lua Module <https://github.com/openresty/lua-nginx-module>
|
||||
" Embed the Power of Lua into NGINX HTTP servers
|
||||
syn keyword ngxDirectiveThirdParty lua_use_default_type
|
||||
syn keyword ngxDirectiveThirdParty lua_malloc_trim
|
||||
syn keyword ngxDirectiveThirdParty lua_code_cache
|
||||
syn keyword ngxDirectiveThirdParty lua_regex_cache_max_entries
|
||||
syn keyword ngxDirectiveThirdParty lua_regex_match_limit
|
||||
@ -40,6 +41,10 @@ syn keyword ngxDirectiveThirdParty balancer_by_lua_file
|
||||
syn keyword ngxDirectiveThirdParty lua_need_request_body
|
||||
syn keyword ngxDirectiveThirdParty ssl_certificate_by_lua_block
|
||||
syn keyword ngxDirectiveThirdParty ssl_certificate_by_lua_file
|
||||
syn keyword ngxDirectiveThirdParty ssl_session_fetch_by_lua_block
|
||||
syn keyword ngxDirectiveThirdParty ssl_session_fetch_by_lua_file
|
||||
syn keyword ngxDirectiveThirdParty ssl_session_store_by_lua_block
|
||||
syn keyword ngxDirectiveThirdParty ssl_session_store_by_lua_file
|
||||
syn keyword ngxDirectiveThirdParty lua_shared_dict
|
||||
syn keyword ngxDirectiveThirdParty lua_socket_connect_timeout
|
||||
syn keyword ngxDirectiveThirdParty lua_socket_send_timeout
|
||||
|
@ -1,15 +1,16 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Mogilefs Module <http://www.grid.net.ru/nginx/mogilefs.en.html>
|
||||
" Implements a MogileFS client, provides a replace to the Perlbal reverse proxy of the original MogileFS.
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_connect_timeout
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_domain
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_methods
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_noverify
|
||||
" MogileFS client for nginx web server.
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_pass
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_read_timeout
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_send_timeout
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_methods
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_domain
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_class
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_tracker
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_noverify
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_connect_timeout
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_send_timeout
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_read_timeout
|
||||
|
||||
|
||||
endif
|
||||
|
@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" MP4 Streaming Lite Module <https://www.nginx.com/resources/wiki/modules/mp4_streaming/>
|
||||
" Will seek to a certain time within H.264/MP4 files when provided with a 'start' parameter in the URL.
|
||||
syn keyword ngxDirectiveThirdParty mp4
|
||||
" syn keyword ngxDirectiveThirdParty mp4
|
||||
|
||||
|
||||
endif
|
||||
|
56
syntax/modules/nchan.vim
Normal file
56
syntax/modules/nchan.vim
Normal file
@ -0,0 +1,56 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Nchan Module <https://nchan.slact.net/>
|
||||
" Fast, horizontally scalable, multiprocess pub/sub queuing server and proxy for HTTP, long-polling, Websockets and EventSource (SSE)
|
||||
syn keyword ngxDirectiveThirdParty nchan_channel_id
|
||||
syn keyword ngxDirectiveThirdParty nchan_channel_id_split_delimiter
|
||||
syn keyword ngxDirectiveThirdParty nchan_eventsource_event
|
||||
syn keyword ngxDirectiveThirdParty nchan_longpoll_multipart_response
|
||||
syn keyword ngxDirectiveThirdParty nchan_publisher
|
||||
syn keyword ngxDirectiveThirdParty nchan_publisher_channel_id
|
||||
syn keyword ngxDirectiveThirdParty nchan_publisher_upstream_request
|
||||
syn keyword ngxDirectiveThirdParty nchan_pubsub
|
||||
syn keyword ngxDirectiveThirdParty nchan_subscribe_request
|
||||
syn keyword ngxDirectiveThirdParty nchan_subscriber
|
||||
syn keyword ngxDirectiveThirdParty nchan_subscriber_channel_id
|
||||
syn keyword ngxDirectiveThirdParty nchan_subscriber_compound_etag_message_id
|
||||
syn keyword ngxDirectiveThirdParty nchan_subscriber_first_message
|
||||
syn keyword ngxDirectiveThirdParty nchan_subscriber_http_raw_stream_separator
|
||||
syn keyword ngxDirectiveThirdParty nchan_subscriber_last_message_id
|
||||
syn keyword ngxDirectiveThirdParty nchan_subscriber_message_id_custom_etag_header
|
||||
syn keyword ngxDirectiveThirdParty nchan_subscriber_timeout
|
||||
syn keyword ngxDirectiveThirdParty nchan_unsubscribe_request
|
||||
syn keyword ngxDirectiveThirdParty nchan_websocket_ping_interval
|
||||
syn keyword ngxDirectiveThirdParty nchan_authorize_request
|
||||
syn keyword ngxDirectiveThirdParty nchan_max_reserved_memory
|
||||
syn keyword ngxDirectiveThirdParty nchan_message_buffer_length
|
||||
syn keyword ngxDirectiveThirdParty nchan_message_timeout
|
||||
syn keyword ngxDirectiveThirdParty nchan_redis_idle_channel_cache_timeout
|
||||
syn keyword ngxDirectiveThirdParty nchan_redis_namespace
|
||||
syn keyword ngxDirectiveThirdParty nchan_redis_pass
|
||||
syn keyword ngxDirectiveThirdParty nchan_redis_ping_interval
|
||||
syn keyword ngxDirectiveThirdParty nchan_redis_server
|
||||
syn keyword ngxDirectiveThirdParty nchan_redis_storage_mode
|
||||
syn keyword ngxDirectiveThirdParty nchan_redis_url
|
||||
syn keyword ngxDirectiveThirdParty nchan_store_messages
|
||||
syn keyword ngxDirectiveThirdParty nchan_use_redis
|
||||
syn keyword ngxDirectiveThirdParty nchan_access_control_allow_origin
|
||||
syn keyword ngxDirectiveThirdParty nchan_channel_group
|
||||
syn keyword ngxDirectiveThirdParty nchan_channel_group_accounting
|
||||
syn keyword ngxDirectiveThirdParty nchan_group_location
|
||||
syn keyword ngxDirectiveThirdParty nchan_group_max_channels
|
||||
syn keyword ngxDirectiveThirdParty nchan_group_max_messages
|
||||
syn keyword ngxDirectiveThirdParty nchan_group_max_messages_disk
|
||||
syn keyword ngxDirectiveThirdParty nchan_group_max_messages_memory
|
||||
syn keyword ngxDirectiveThirdParty nchan_group_max_subscribers
|
||||
syn keyword ngxDirectiveThirdParty nchan_subscribe_existing_channels_only
|
||||
syn keyword ngxDirectiveThirdParty nchan_channel_event_string
|
||||
syn keyword ngxDirectiveThirdParty nchan_channel_events_channel_id
|
||||
syn keyword ngxDirectiveThirdParty nchan_stub_status
|
||||
syn keyword ngxDirectiveThirdParty nchan_max_channel_id_length
|
||||
syn keyword ngxDirectiveThirdParty nchan_max_channel_subscribers
|
||||
syn keyword ngxDirectiveThirdParty nchan_channel_timeout
|
||||
syn keyword ngxDirectiveThirdParty nchan_storage_engine
|
||||
|
||||
|
||||
endif
|
@ -1,6 +1,6 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" PHP Memcache Standard Balancer Module <>
|
||||
" PHP Memcache Standard Balancer Module <https://github.com/replay/ngx_http_php_memcache_standard_balancer>
|
||||
" Loadbalancer that is compatible to the standard loadbalancer in the php-memcache module
|
||||
syn keyword ngxDirectiveThirdParty hash_key
|
||||
|
||||
|
@ -1,23 +1,84 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Phusion Passenger <https://www.phusionpassenger.com/>
|
||||
" Easy and robust deployment of Ruby on Rails application on Apache and Nginx webservers.
|
||||
syn keyword ngxDirectiveThirdParty passenger_base_uri
|
||||
syn keyword ngxDirectiveThirdParty passenger_default_user
|
||||
syn keyword ngxDirectiveThirdParty passenger_enabled
|
||||
syn keyword ngxDirectiveThirdParty passenger_log_level
|
||||
syn keyword ngxDirectiveThirdParty passenger_max_instances_per_app
|
||||
syn keyword ngxDirectiveThirdParty passenger_max_pool_size
|
||||
syn keyword ngxDirectiveThirdParty passenger_pool_idle_time
|
||||
" Phusion Passenger Module <https://www.phusionpassenger.com/library/config/nginx/>
|
||||
" Passenger is an open source web application server.
|
||||
syn keyword ngxDirectiveThirdParty passenger_root
|
||||
syn keyword ngxDirectiveThirdParty passenger_enabled
|
||||
syn keyword ngxDirectiveThirdParty passenger_base_uri
|
||||
syn keyword ngxDirectiveThirdParty passenger_document_root
|
||||
syn keyword ngxDirectiveThirdParty passenger_ruby
|
||||
syn keyword ngxDirectiveThirdParty passenger_use_global_queue
|
||||
syn keyword ngxDirectiveThirdParty passenger_python
|
||||
syn keyword ngxDirectiveThirdParty passenger_nodejs
|
||||
syn keyword ngxDirectiveThirdParty passenger_meteor_app_settings
|
||||
syn keyword ngxDirectiveThirdParty passenger_app_env
|
||||
syn keyword ngxDirectiveThirdParty passenger_app_root
|
||||
syn keyword ngxDirectiveThirdParty passenger_app_group_name
|
||||
syn keyword ngxDirectiveThirdParty passenger_app_type
|
||||
syn keyword ngxDirectiveThirdParty passenger_startup_file
|
||||
syn keyword ngxDirectiveThirdParty passenger_restart_dir
|
||||
syn keyword ngxDirectiveThirdParty passenger_spawn_method
|
||||
syn keyword ngxDirectiveThirdParty passenger_env_var
|
||||
syn keyword ngxDirectiveThirdParty passenger_load_shell_envvars
|
||||
syn keyword ngxDirectiveThirdParty passenger_rolling_restarts
|
||||
syn keyword ngxDirectiveThirdParty passenger_resist_deployment_errors
|
||||
syn keyword ngxDirectiveThirdParty passenger_user_switching
|
||||
syn keyword ngxDirectiveThirdParty rack_env
|
||||
syn keyword ngxDirectiveThirdParty rails_app_spawner_idle_time
|
||||
syn keyword ngxDirectiveThirdParty rails_env
|
||||
syn keyword ngxDirectiveThirdParty rails_framework_spawner_idle_time
|
||||
syn keyword ngxDirectiveThirdParty rails_spawn_method
|
||||
syn keyword ngxDirectiveThirdParty passenger_user
|
||||
syn keyword ngxDirectiveThirdParty passenger_group
|
||||
syn keyword ngxDirectiveThirdParty passenger_default_user
|
||||
syn keyword ngxDirectiveThirdParty passenger_default_group
|
||||
syn keyword ngxDirectiveThirdParty passenger_show_version_in_header
|
||||
syn keyword ngxDirectiveThirdParty passenger_friendly_error_pages
|
||||
syn keyword ngxDirectiveThirdParty passenger_disable_security_update_check
|
||||
syn keyword ngxDirectiveThirdParty passenger_security_update_check_proxy
|
||||
syn keyword ngxDirectiveThirdParty passenger_max_pool_size
|
||||
syn keyword ngxDirectiveThirdParty passenger_min_instances
|
||||
syn keyword ngxDirectiveThirdParty passenger_max_instances
|
||||
syn keyword ngxDirectiveThirdParty passenger_max_instances_per_app
|
||||
syn keyword ngxDirectiveThirdParty passenger_pool_idle_time
|
||||
syn keyword ngxDirectiveThirdParty passenger_max_preloader_idle_time
|
||||
syn keyword ngxDirectiveThirdParty passenger_force_max_concurrent_requests_per_process
|
||||
syn keyword ngxDirectiveThirdParty passenger_start_timeout
|
||||
syn keyword ngxDirectiveThirdParty passenger_concurrency_model
|
||||
syn keyword ngxDirectiveThirdParty passenger_thread_count
|
||||
syn keyword ngxDirectiveThirdParty passenger_max_requests
|
||||
syn keyword ngxDirectiveThirdParty passenger_max_request_time
|
||||
syn keyword ngxDirectiveThirdParty passenger_memory_limit
|
||||
syn keyword ngxDirectiveThirdParty passenger_stat_throttle_rate
|
||||
syn keyword ngxDirectiveThirdParty passenger_core_file_descriptor_ulimit
|
||||
syn keyword ngxDirectiveThirdParty passenger_app_file_descriptor_ulimit
|
||||
syn keyword ngxDirectiveThirdParty passenger_pre_start
|
||||
syn keyword ngxDirectiveThirdParty passenger_set_header
|
||||
syn keyword ngxDirectiveThirdParty passenger_max_request_queue_size
|
||||
syn keyword ngxDirectiveThirdParty passenger_request_queue_overflow_status_code
|
||||
syn keyword ngxDirectiveThirdParty passenger_sticky_sessions
|
||||
syn keyword ngxDirectiveThirdParty passenger_sticky_sessions_cookie_name
|
||||
syn keyword ngxDirectiveThirdParty passenger_abort_websockets_on_process_shutdown
|
||||
syn keyword ngxDirectiveThirdParty passenger_ignore_client_abort
|
||||
syn keyword ngxDirectiveThirdParty passenger_intercept_errors
|
||||
syn keyword ngxDirectiveThirdParty passenger_pass_header
|
||||
syn keyword ngxDirectiveThirdParty passenger_ignore_headers
|
||||
syn keyword ngxDirectiveThirdParty passenger_headers_hash_bucket_size
|
||||
syn keyword ngxDirectiveThirdParty passenger_headers_hash_max_size
|
||||
syn keyword ngxDirectiveThirdParty passenger_buffer_response
|
||||
syn keyword ngxDirectiveThirdParty passenger_response_buffer_high_watermark
|
||||
syn keyword ngxDirectiveThirdParty passenger_buffer_size, passenger_buffers, passenger_busy_buffers_size
|
||||
syn keyword ngxDirectiveThirdParty passenger_socket_backlog
|
||||
syn keyword ngxDirectiveThirdParty passenger_log_level
|
||||
syn keyword ngxDirectiveThirdParty passenger_log_file
|
||||
syn keyword ngxDirectiveThirdParty passenger_file_descriptor_log_file
|
||||
syn keyword ngxDirectiveThirdParty passenger_debugger
|
||||
syn keyword ngxDirectiveThirdParty passenger_instance_registry_dir
|
||||
syn keyword ngxDirectiveThirdParty passenger_data_buffer_dir
|
||||
syn keyword ngxDirectiveThirdParty passenger_fly_with
|
||||
syn keyword ngxDirectiveThirdParty union_station_support
|
||||
syn keyword ngxDirectiveThirdParty union_station_key
|
||||
syn keyword ngxDirectiveThirdParty union_station_proxy_address
|
||||
syn keyword ngxDirectiveThirdParty union_station_filter
|
||||
syn keyword ngxDirectiveThirdParty union_station_gateway_address
|
||||
syn keyword ngxDirectiveThirdParty union_station_gateway_port
|
||||
syn keyword ngxDirectiveThirdParty union_station_gateway_cert
|
||||
syn keyword ngxDirectiveDeprecated rails_spawn_method
|
||||
syn keyword ngxDirectiveDeprecated passenger_debug_log_file
|
||||
|
||||
|
||||
endif
|
||||
|
@ -1,11 +1,17 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" RDS JSON Module <https://github.com/openresty/rds-json-nginx-module>
|
||||
" Help ngx_drizzle and other DBD modules emit JSON data.
|
||||
" An output filter that formats Resty DBD Streams generated by ngx_drizzle and others to JSON
|
||||
syn keyword ngxDirectiveThirdParty rds_json
|
||||
syn keyword ngxDirectiveThirdParty rds_json_content_type
|
||||
syn keyword ngxDirectiveThirdParty rds_json_buffer_size
|
||||
syn keyword ngxDirectiveThirdParty rds_json_format
|
||||
syn keyword ngxDirectiveThirdParty rds_json_root
|
||||
syn keyword ngxDirectiveThirdParty rds_json_success_property
|
||||
syn keyword ngxDirectiveThirdParty rds_json_user_property
|
||||
syn keyword ngxDirectiveThirdParty rds_json_errcode_key
|
||||
syn keyword ngxDirectiveThirdParty rds_json_errstr_key
|
||||
syn keyword ngxDirectiveThirdParty rds_json_ret
|
||||
syn keyword ngxDirectiveThirdParty rds_json_content_type
|
||||
|
||||
|
||||
endif
|
||||
|
15
syntax/modules/redis.vim
Normal file
15
syntax/modules/redis.vim
Normal file
@ -0,0 +1,15 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Redis Module <https://www.nginx.com/resources/wiki/modules/redis/>
|
||||
" Use this module to perform simple caching
|
||||
syn keyword ngxDirectiveThirdParty redis_pass
|
||||
syn keyword ngxDirectiveThirdParty redis_bind
|
||||
syn keyword ngxDirectiveThirdParty redis_connect_timeout
|
||||
syn keyword ngxDirectiveThirdParty redis_read_timeout
|
||||
syn keyword ngxDirectiveThirdParty redis_send_timeout
|
||||
syn keyword ngxDirectiveThirdParty redis_buffer_size
|
||||
syn keyword ngxDirectiveThirdParty redis_next_upstream
|
||||
syn keyword ngxDirectiveThirdParty redis_gzip_flag
|
||||
|
||||
|
||||
endif
|
@ -3,10 +3,10 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
" RTMP Module <https://github.com/arut/nginx-rtmp-module>
|
||||
" NGINX-based Media Streaming Server
|
||||
syn keyword ngxDirectiveThirdParty rtmp
|
||||
syn keyword ngxDirectiveThirdParty server
|
||||
syn keyword ngxDirectiveThirdParty listen
|
||||
" syn keyword ngxDirectiveThirdParty server
|
||||
" syn keyword ngxDirectiveThirdParty listen
|
||||
syn keyword ngxDirectiveThirdParty application
|
||||
syn keyword ngxDirectiveThirdParty timeout
|
||||
" syn keyword ngxDirectiveThirdParty timeout
|
||||
syn keyword ngxDirectiveThirdParty ping
|
||||
syn keyword ngxDirectiveThirdParty ping_timeout
|
||||
syn keyword ngxDirectiveThirdParty max_streams
|
||||
@ -16,8 +16,8 @@ syn keyword ngxDirectiveThirdParty max_queue
|
||||
syn keyword ngxDirectiveThirdParty max_message
|
||||
syn keyword ngxDirectiveThirdParty out_queue
|
||||
syn keyword ngxDirectiveThirdParty out_cork
|
||||
syn keyword ngxDirectiveThirdParty allow
|
||||
syn keyword ngxDirectiveThirdParty deny
|
||||
" syn keyword ngxDirectiveThirdParty allow
|
||||
" syn keyword ngxDirectiveThirdParty deny
|
||||
syn keyword ngxDirectiveThirdParty exec_push
|
||||
syn keyword ngxDirectiveThirdParty exec_pull
|
||||
syn keyword ngxDirectiveThirdParty exec
|
||||
@ -94,8 +94,8 @@ syn keyword ngxDirectiveThirdParty dash_fragment
|
||||
syn keyword ngxDirectiveThirdParty dash_playlist_length
|
||||
syn keyword ngxDirectiveThirdParty dash_nested
|
||||
syn keyword ngxDirectiveThirdParty dash_cleanup
|
||||
syn keyword ngxDirectiveThirdParty access_log
|
||||
syn keyword ngxDirectiveThirdParty log_format
|
||||
" syn keyword ngxDirectiveThirdParty access_log
|
||||
" syn keyword ngxDirectiveThirdParty log_format
|
||||
syn keyword ngxDirectiveThirdParty max_connections
|
||||
syn keyword ngxDirectiveThirdParty rtmp_stat
|
||||
syn keyword ngxDirectiveThirdParty rtmp_stat_stylesheet
|
||||
|
@ -9,4 +9,5 @@ syn keyword ngxDirectiveThirdParty rtmpt_proxy
|
||||
syn keyword ngxDirectiveThirdParty rtmpt_proxy_stat
|
||||
syn keyword ngxDirectiveThirdParty rtmpt_proxy_stylesheet
|
||||
|
||||
|
||||
endif
|
||||
|
@ -1,11 +1,10 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Secure Download <https://www.nginx.com/resources/wiki/modules/secure_download/>
|
||||
" Create expiring links.
|
||||
" Secure Download Module <https://www.nginx.com/resources/wiki/modules/secure_download/>
|
||||
" Enables you to create links which are only valid until a certain datetime is reached
|
||||
syn keyword ngxDirectiveThirdParty secure_download
|
||||
syn keyword ngxDirectiveThirdParty secure_download_fail_location
|
||||
syn keyword ngxDirectiveThirdParty secure_download_path_mode
|
||||
syn keyword ngxDirectiveThirdParty secure_download_secret
|
||||
syn keyword ngxDirectiveThirdParty secure_download_path_mode
|
||||
|
||||
|
||||
endif
|
||||
|
@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Slice Module <https://github.com/alibaba/nginx-http-slice>
|
||||
" Nginx module for serving a file in slices (reverse byte-range)
|
||||
syn keyword ngxDirectiveThirdParty slice
|
||||
" syn keyword ngxDirectiveThirdParty slice
|
||||
syn keyword ngxDirectiveThirdParty slice_arg_begin
|
||||
syn keyword ngxDirectiveThirdParty slice_arg_end
|
||||
syn keyword ngxDirectiveThirdParty slice_header
|
||||
|
@ -2,7 +2,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Sticky Module <https://bitbucket.org/nginx-goodies/nginx-sticky-module-ng>
|
||||
" Add a sticky cookie to be always forwarded to the same upstream server
|
||||
syn keyword ngxDirectiveThirdParty sticky
|
||||
" syn keyword ngxDirectiveThirdParty sticky
|
||||
|
||||
|
||||
endif
|
||||
|
@ -2,19 +2,18 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" TCP Proxy Module <http://yaoweibin.github.io/nginx_tcp_proxy_module/>
|
||||
" Add the feature of tcp proxy with nginx, with health check and status monitor
|
||||
syn keyword ngxDirectiveThirdParty tcp
|
||||
syn keyword ngxDirectiveThirdParty server
|
||||
syn keyword ngxDirectiveThirdParty listen
|
||||
syn keyword ngxDirectiveThirdParty allow
|
||||
syn keyword ngxDirectiveThirdParty deny
|
||||
syn keyword ngxDirectiveThirdParty so_keepalive
|
||||
syn keyword ngxDirectiveThirdParty tcp_nodelay
|
||||
syn keyword ngxDirectiveThirdParty timeout
|
||||
syn keyword ngxDirectiveThirdParty server_name
|
||||
syn keyword ngxDirectiveThirdParty resolver
|
||||
syn keyword ngxDirectiveThirdParty resolver_timeout
|
||||
syn keyword ngxDirectiveThirdParty upstream
|
||||
syn keyword ngxDirectiveThirdParty server
|
||||
syn keyword ngxDirectiveBlock tcp
|
||||
" syn keyword ngxDirectiveThirdParty server
|
||||
" syn keyword ngxDirectiveThirdParty listen
|
||||
" syn keyword ngxDirectiveThirdParty allow
|
||||
" syn keyword ngxDirectiveThirdParty deny
|
||||
" syn keyword ngxDirectiveThirdParty so_keepalive
|
||||
" syn keyword ngxDirectiveThirdParty tcp_nodelay
|
||||
" syn keyword ngxDirectiveThirdParty timeout
|
||||
" syn keyword ngxDirectiveThirdParty server_name
|
||||
" syn keyword ngxDirectiveThirdParty resolver
|
||||
" syn keyword ngxDirectiveThirdParty resolver_timeout
|
||||
" syn keyword ngxDirectiveThirdParty upstream
|
||||
syn keyword ngxDirectiveThirdParty check
|
||||
syn keyword ngxDirectiveThirdParty check_http_send
|
||||
syn keyword ngxDirectiveThirdParty check_http_expect_alive
|
||||
@ -22,11 +21,11 @@ syn keyword ngxDirectiveThirdParty check_smtp_send
|
||||
syn keyword ngxDirectiveThirdParty check_smtp_expect_alive
|
||||
syn keyword ngxDirectiveThirdParty check_shm_size
|
||||
syn keyword ngxDirectiveThirdParty check_status
|
||||
syn keyword ngxDirectiveThirdParty ip_hash
|
||||
syn keyword ngxDirectiveThirdParty proxy_pass
|
||||
syn keyword ngxDirectiveThirdParty proxy_buffer
|
||||
syn keyword ngxDirectiveThirdParty proxy_connect_timeout
|
||||
syn keyword ngxDirectiveThirdParty proxy_read_timeout
|
||||
" syn keyword ngxDirectiveThirdParty ip_hash
|
||||
" syn keyword ngxDirectiveThirdParty proxy_pass
|
||||
" syn keyword ngxDirectiveThirdParty proxy_buffer
|
||||
" syn keyword ngxDirectiveThirdParty proxy_connect_timeout
|
||||
" syn keyword ngxDirectiveThirdParty proxy_read_timeout
|
||||
syn keyword ngxDirectiveThirdParty proxy_write_timeout
|
||||
|
||||
|
||||
|
@ -1,13 +1,15 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Upload Progress Module <https://www.nginx.com/resources/wiki/modules/upload_progress/>
|
||||
" Tracks and reports upload progress.
|
||||
syn keyword ngxDirectiveThirdParty report_uploads
|
||||
syn keyword ngxDirectiveThirdParty track_uploads
|
||||
" An upload progress system, that monitors RFC1867 POST upload as they are transmitted to upstream servers
|
||||
syn keyword ngxDirectiveThirdParty upload_progress
|
||||
syn keyword ngxDirectiveThirdParty track_uploads
|
||||
syn keyword ngxDirectiveThirdParty report_uploads
|
||||
syn keyword ngxDirectiveThirdParty upload_progress_content_type
|
||||
syn keyword ngxDirectiveThirdParty upload_progress_header
|
||||
syn keyword ngxDirectiveThirdParty upload_progress_jsonp_parameter
|
||||
syn keyword ngxDirectiveThirdParty upload_progress_json_output
|
||||
syn keyword ngxDirectiveThirdParty upload_progress_jsonp_output
|
||||
syn keyword ngxDirectiveThirdParty upload_progress_template
|
||||
|
||||
|
||||
|
@ -1,20 +1,23 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Upload Module <https://www.nginx.com/resources/wiki/modules/upload/>
|
||||
" Parses multipart/form-data allowing arbitrary handling of uploaded files.
|
||||
syn keyword ngxDirectiveThirdParty upload_aggregate_form_field
|
||||
syn keyword ngxDirectiveThirdParty upload_buffer_size
|
||||
syn keyword ngxDirectiveThirdParty upload_cleanup
|
||||
syn keyword ngxDirectiveThirdParty upload_limit_rate
|
||||
syn keyword ngxDirectiveThirdParty upload_max_file_size
|
||||
syn keyword ngxDirectiveThirdParty upload_max_output_body_len
|
||||
syn keyword ngxDirectiveThirdParty upload_max_part_header_len
|
||||
" Parses request body storing all files being uploaded to a directory specified by upload_store directive
|
||||
syn keyword ngxDirectiveThirdParty upload_pass
|
||||
syn keyword ngxDirectiveThirdParty upload_pass_args
|
||||
syn keyword ngxDirectiveThirdParty upload_pass_form_field
|
||||
syn keyword ngxDirectiveThirdParty upload_set_form_field
|
||||
syn keyword ngxDirectiveThirdParty upload_resumable
|
||||
syn keyword ngxDirectiveThirdParty upload_store
|
||||
syn keyword ngxDirectiveThirdParty upload_state_store
|
||||
syn keyword ngxDirectiveThirdParty upload_store_access
|
||||
syn keyword ngxDirectiveThirdParty upload_set_form_field
|
||||
syn keyword ngxDirectiveThirdParty upload_aggregate_form_field
|
||||
syn keyword ngxDirectiveThirdParty upload_pass_form_field
|
||||
syn keyword ngxDirectiveThirdParty upload_cleanup
|
||||
syn keyword ngxDirectiveThirdParty upload_buffer_size
|
||||
syn keyword ngxDirectiveThirdParty upload_max_part_header_len
|
||||
syn keyword ngxDirectiveThirdParty upload_max_file_size
|
||||
syn keyword ngxDirectiveThirdParty upload_limit_rate
|
||||
syn keyword ngxDirectiveThirdParty upload_max_output_body_len
|
||||
syn keyword ngxDirectiveThirdParty upload_tame_arrays
|
||||
syn keyword ngxDirectiveThirdParty upload_pass_args
|
||||
|
||||
|
||||
endif
|
||||
|
@ -2,8 +2,8 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" Upstream Hash Module (DEPRECATED) <http://wiki.nginx.org/NginxHttpUpstreamRequestHashModule>
|
||||
" Provides simple upstream load distribution by hashing a configurable variable.
|
||||
syn keyword ngxDirectiveThirdParty hash
|
||||
syn keyword ngxDirectiveThirdParty hash_again
|
||||
" syn keyword ngxDirectiveDeprecated hash
|
||||
syn keyword ngxDirectiveDeprecated hash_again
|
||||
|
||||
|
||||
endif
|
||||
|
@ -2,10 +2,11 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
|
||||
|
||||
" XSS Module <https://github.com/openresty/xss-nginx-module>
|
||||
" Native support for cross-site scripting (XSS) in an nginx.
|
||||
syn keyword ngxDirectiveThirdParty xss_callback_arg
|
||||
syn keyword ngxDirectiveThirdParty xss_get
|
||||
syn keyword ngxDirectiveThirdParty xss_callback_arg
|
||||
syn keyword ngxDirectiveThirdParty xss_override_status
|
||||
syn keyword ngxDirectiveThirdParty xss_check_status
|
||||
syn keyword ngxDirectiveThirdParty xss_input_types
|
||||
syn keyword ngxDirectiveThirdParty xss_output_type
|
||||
|
||||
|
||||
endif
|
||||
|
1382
syntax/nginx.vim
1382
syntax/nginx.vim
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -3,9 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plantuml') == -
|
||||
" Vim syntax file
|
||||
" Language: PlantUML
|
||||
" Maintainer: Anders Thøgersen <first name at bladre dot dk>
|
||||
" Last Change: 03-Apr-2011
|
||||
" Version: 0.2
|
||||
" TODO: There are some bugs, add << >>
|
||||
"
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@ -25,10 +23,11 @@ syntax sync minlines=100
|
||||
syntax match plantumlPreProc /\%(^@startuml\|^@enduml\)\|!\%(include\|define\|undev\|ifdef\|endif\|ifndef\)\s*.*/ contains=plantumlDir
|
||||
syntax region plantumlDir start=/\s\+/ms=s+1 end=/$/ contained
|
||||
|
||||
syntax keyword plantumlTypeKeyword actor participant usecase interface abstract enum component state object artifact folder rect node frame cloud database storage agent boundary control entity card
|
||||
syntax keyword plantumlTypeKeyword actor participant usecase abstract enum component state object artifact folder rect node frame cloud database storage agent boundary control entity card rectangle
|
||||
syntax keyword plantumlKeyword as also autonumber caption title newpage box alt opt loop par break critical note rnote hnote legend group left right of on link over end activate deactivate destroy create footbox hide show skinparam skin top bottom
|
||||
syntax keyword plantumlKeyword package namespace page up down if else elseif endif partition footer header center rotate ref return is repeat start stop while endwhile fork again kill
|
||||
syntax keyword plantumlKeyword then detach
|
||||
syntax keyword plantumlClassKeyword class interface
|
||||
|
||||
syntax keyword plantumlCommentTODO XXX TODO FIXME NOTE contained
|
||||
syntax match plantumlColor /#[0-9A-Fa-f]\{6\}\>/
|
||||
@ -41,14 +40,17 @@ syntax region plantumlLabel start=/\[/ms=s+1 end=/\]/me=s-1 contained contains=p
|
||||
syntax match plantumlText /\%([0-9A-Za-zÀ-ÿ]\|\s\|[\.,;_-]\)\+/ contained
|
||||
|
||||
" Class
|
||||
syntax region plantumlClassString matchgroup=plantumlClass start=/\s*class\ze [^{]\+{/ end=/\s*\ze}/ contains=plantumlKeyword,
|
||||
\ @plantumlClassOp
|
||||
syntax match plantumlClass /\s*class\ze [^{]\+$/
|
||||
syntax region plantumlClass start=/{/ end=/\s*}/ contains=plantumlClassArrows,
|
||||
\ plantumlClassKeyword,
|
||||
\ @plantumlClassOp,
|
||||
\ plantumlClassSeparator,
|
||||
\ plantumlComment
|
||||
|
||||
syntax match plantumlClassPublic /+\w\+/ contained
|
||||
syntax match plantumlClassPrivate /-\w\+/ contained
|
||||
syntax match plantumlClassProtected /#\w\+/ contained
|
||||
syntax match plantumlClassPackPrivate /\~\w\+/ contained
|
||||
syntax match plantumlClassSeparator /__.\+__\|==.\+==/ contained
|
||||
|
||||
syntax cluster plantumlClassOp contains=plantumlClassPublic,
|
||||
\ plantumlClassPrivate,
|
||||
@ -59,7 +61,7 @@ syntax cluster plantumlClassOp contains=plantumlClassPublic,
|
||||
syntax match plantumlSpecialString /\\n/ contained
|
||||
syntax region plantumlString start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=plantumlSpecialString
|
||||
syntax region plantumlString start=/'/ skip=/\\\\\|\\'/ end=/'/ contains=plantumlSpecialString
|
||||
syntax match plantumlComment /'[^']*$/ contains=plantumlCommentTODO
|
||||
syntax match plantumlComment /'.*$/ contains=plantumlCommentTODO
|
||||
syntax region plantumlMultilineComment start=/\/'/ end=/'\// contains=plantumlCommentTODO
|
||||
|
||||
" Labels with a colon
|
||||
@ -127,7 +129,7 @@ syntax keyword plantumlSkinparamKeyword ActorBackgroundColor ActorBorderColor Ac
|
||||
syntax keyword plantumlSkinparamKeyword ActorFontSize ActorFontStyle ActorStereotypeFontColor ActorStereotypeFontName
|
||||
syntax keyword plantumlSkinparamKeyword ActorStereotypeFontSize ActorStereotypeFontStyle ArrowColor ArrowFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ArrowFontName ArrowFontSize ArrowFontStyle AttributeFontColor AttributeFontName
|
||||
syntax keyword plantumlSkinparamKeyword AttributeFontSize AttributeFontStyle AttributeIconSize BackgroundColor BarColor
|
||||
syntax keyword plantumlSkinparamKeyword AttributeFontSize AttributeFontStyle AttributeIconSize BarColor
|
||||
syntax keyword plantumlSkinparamKeyword BorderColor CharacterFontColor CharacterFontName CharacterFontSize
|
||||
syntax keyword plantumlSkinparamKeyword CharacterFontStyle CharacterRadius Color DividerBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword DividerFontColor DividerFontName DividerFontSize DividerFontStyle EndColor
|
||||
@ -137,14 +139,13 @@ syntax keyword plantumlSkinparamKeyword GroupingHeaderFontName GroupingHeaderFon
|
||||
syntax keyword plantumlSkinparamKeyword InterfaceBackgroundColor InterfaceBorderColor LifeLineBackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword LifeLineBorderColor ParticipantBackgroundColor ParticipantBorderColor
|
||||
syntax keyword plantumlSkinparamKeyword ParticipantFontColor ParticipantFontName ParticipantFontSize
|
||||
syntax keyword plantumlSkinparamKeyword ParticipantFontStyle StartColor stateArrowColor stereotypeABackgroundColor
|
||||
syntax keyword plantumlSkinparamKeyword stereotypeCBackgroundColor stereotypeEBackgroundColor StereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword ParticipantFontStyle StartColor StereotypeFontColor
|
||||
syntax keyword plantumlSkinparamKeyword StereotypeFontName StereotypeFontSize StereotypeFontStyle
|
||||
syntax keyword plantumlSkinparamKeyword stereotypeIBackgroundColor TitleFontColor TitleFontName TitleFontSize TitleFontStyle
|
||||
|
||||
" Highlight
|
||||
highlight default link plantumlCommentTODO Todo
|
||||
highlight default link plantumlKeyword Keyword
|
||||
highlight default link plantumlClassKeyword Keyword
|
||||
highlight default link plantumlTypeKeyword Type
|
||||
highlight default link plantumlPreProc PreProc
|
||||
highlight default link plantumlDir Constant
|
||||
@ -159,6 +160,7 @@ highlight default link plantumlClassPublic Structure
|
||||
highlight default link plantumlClassPrivate Macro
|
||||
highlight default link plantumlClassProtected Statement
|
||||
highlight default link plantumlClassPackPrivate Function
|
||||
highlight default link plantumlClassSeparator Comment
|
||||
highlight default link plantumlSpecialString Special
|
||||
highlight default link plantumlString String
|
||||
highlight default link plantumlComment Comment
|
||||
|
@ -38,8 +38,9 @@ syntax keyword pugCommentTodo contained TODO FIXME XXX TBD
|
||||
syn match pugComment '\(\s\+\|^\)\/\/.*$' contains=pugCommentTodo
|
||||
syn region pugCommentBlock start="\z(\s\+\|^\)\/\/.*$" end="^\%(\z1\s\|\s*$\)\@!" contains=pugCommentTodo keepend
|
||||
syn region pugHtmlConditionalComment start="<!--\%(.*\)>" end="<!\%(.*\)-->" contains=pugCommentTodo
|
||||
syn region pugAttributes matchgroup=pugAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,pugHtmlArg,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@pugComponent
|
||||
syn match pugClassChar "\." contained nextgroup=pugClass
|
||||
syn region pugAngular2 start="(" end=")" contains=htmlEvent
|
||||
syn region pugAttributes matchgroup=pugAttributesDelimiter start="(" end=")" contained contains=@htmlJavascript,pugHtmlArg,pugAngular2,htmlArg,htmlEvent,htmlCssDefinition nextgroup=@pugComponent
|
||||
syn match pugClassChar "\." containedin=htmlTagName nextgroup=pugClass
|
||||
syn match pugBlockExpansionChar ":\s\+" contained nextgroup=pugTag,pugClassChar,pugIdChar
|
||||
syn match pugIdChar "#[[{]\@!" contained nextgroup=pugId
|
||||
syn match pugClass "\%(\w\|-\)\+" contained nextgroup=@pugComponent
|
||||
|
@ -277,10 +277,10 @@ else
|
||||
endif
|
||||
|
||||
" Here Document {{{1
|
||||
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<[-~]\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<[-~]\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<[-~]\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<[-~]\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<[-~]\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<[-~]\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<[-~]\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<[-~]\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop
|
||||
|
||||
if s:foldable('<<')
|
||||
syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<[-~]\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend
|
||||
|
@ -71,8 +71,8 @@ syn match rustMacroVariable "$\w\+"
|
||||
syn keyword rustReservedKeyword alignof become do offsetof priv pure sizeof typeof unsized yield abstract virtual final override macro
|
||||
|
||||
" Built-in types {{{2
|
||||
syn keyword rustType isize usize char bool u8 u16 u32 u64 f32
|
||||
syn keyword rustType f64 i8 i16 i32 i64 str Self
|
||||
syn keyword rustType isize usize char bool u8 u16 u32 u64 u128 f32
|
||||
syn keyword rustType f64 i8 i16 i32 i64 i128 str Self
|
||||
|
||||
" Things from the libstd v1 prelude (src/libstd/prelude/v1.rs) {{{2
|
||||
" This section is just straight transformation of the contents of the prelude,
|
||||
@ -152,10 +152,10 @@ syn region rustDerive start="derive(" end=")" contained contains=rustDer
|
||||
syn keyword rustDeriveTrait contained Clone Hash RustcEncodable RustcDecodable Encodable Decodable PartialEq Eq PartialOrd Ord Rand Show Debug Default FromPrimitive Send Sync Copy
|
||||
|
||||
" Number literals
|
||||
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(size\|8\|16\|32\|64\)\)\="
|
||||
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
|
||||
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
|
||||
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(size\|8\|16\|32\|64\)\)\="
|
||||
syn match rustDecNumber display "\<[0-9][0-9_]*\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
|
||||
syn match rustHexNumber display "\<0x[a-fA-F0-9_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
|
||||
syn match rustOctNumber display "\<0o[0-7_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
|
||||
syn match rustBinNumber display "\<0b[01_]\+\%([iu]\%(size\|8\|16\|32\|64\|128\)\)\="
|
||||
|
||||
" Special case for numbers of the form "1." which are float literals, unless followed by
|
||||
" an identifier, which makes them integer literals with a method call or field access,
|
||||
|
@ -172,6 +172,7 @@ syntax keyword swiftKeywords
|
||||
\ willSet
|
||||
|
||||
syntax match swiftMultiwordKeywords "indirect case"
|
||||
syntax match swiftMultiwordKeywords "indirect enum"
|
||||
" }}}
|
||||
|
||||
" Names surrounded by backticks. This aren't limited to keywords because 1)
|
||||
|
Loading…
x
Reference in New Issue
Block a user