Compare commits

...

4 Commits

Author SHA1 Message Date
Adam Stankiewicz
7dd2e11698 Switch nginx vendor to chr4/nginx.vim, closes #205 2017-05-17 11:28:13 +02:00
Adam Stankiewicz
9197c69900 Add asciidoc, closes #207 2017-05-17 11:18:30 +02:00
Adam Stankiewicz
c7dfe2f626 Add graphql, closes #206 2017-05-17 11:17:16 +02:00
Adam Stankiewicz
af87010071 Update 2017-05-17 11:07:28 +02:00
178 changed files with 1741 additions and 3734 deletions

View File

@@ -40,6 +40,7 @@ If you need full functionality of any plugin, please use it directly with your p
- [apiblueprint](https://github.com/sheerun/apiblueprint.vim) (syntax)
- [applescript](https://github.com/vim-scripts/applescript.vim) (syntax)
- [arduino](https://github.com/sudar/vim-arduino-syntax) (syntax, indent)
- [asciidoc](https://github.com/asciidoc/vim-asciidoc) (syntax)
- [blade](https://github.com/jwalton512/vim-blade) (syntax, indent, ftplugin)
- [c++11](https://github.com/octol/vim-cpp-enhanced-highlight) (syntax)
- [c/c++](https://github.com/vim-jp/vim-cpp) (syntax)
@@ -64,6 +65,7 @@ If you need full functionality of any plugin, please use it directly with your p
- [glsl](https://github.com/tikhomirov/vim-glsl) (syntax, indent)
- [gnuplot](https://github.com/vim-scripts/gnuplot-syntax-highlighting) (syntax)
- [go](https://github.com/fatih/vim-go) (syntax, compiler, indent)
- [graphql](https://github.com/jparise/vim-graphql) (syntax, ftplugin)
- [groovy](https://github.com/vim-scripts/groovy.vim) (syntax)
- [haml](https://github.com/sheerun/vim-haml) (syntax, indent, compiler, ftplugin)
- [handlebars](https://github.com/mustache/vim-mustache-handlebars) (syntax, indent, ftplugin)
@@ -86,7 +88,7 @@ If you need full functionality of any plugin, please use it directly with your p
- [mako](https://github.com/sophacles/vim-bundle-mako) (syntax, indent, ftplugin)
- [markdown](https://github.com/plasticboy/vim-markdown) (syntax)
- [mathematica](https://github.com/rsmenon/vim-mathematica) (syntax, ftplugin)
- [nginx](https://github.com/othree/nginx-contrib-vim) (syntax, indent, ftplugin)
- [nginx](https://github.com/chr4/nginx.vim) (syntax, indent, ftplugin)
- [nim](https://github.com/zah/nim.vim) (syntax, compiler, indent)
- [nix](https://github.com/spwhitt/vim-nix) (syntax, ftplugin)
- [objc](https://github.com/b4winckler/vim-objc) (ftplugin, syntax, indent)

View File

@@ -18,6 +18,38 @@ if g:terraform_align && exists(':Tabularize')
endfunction
endif
function! TerraformFolds()
let thisline = getline(v:lnum)
if match(thisline, '^resource') >= 0
return ">1"
elseif match(thisline, '^provider') >= 0
return ">1"
elseif match(thisline, '^module') >= 0
return ">1"
elseif match(thisline, '^variable') >= 0
return ">1"
elseif match(thisline, '^output') >= 0
return ">1"
else
return "="
endif
endfunction
setlocal foldmethod=expr
setlocal foldexpr=TerraformFolds()
setlocal foldlevel=1
function! TerraformFoldText()
let foldsize = (v:foldend-v:foldstart)
return getline(v:foldstart).' ('.foldsize.' lines)'
endfunction
setlocal foldtext=TerraformFoldText()
"inoremap <space> <C-O>za
nnoremap <space> za
onoremap <space> <C-C>za
vnoremap <space> zf
" Match the identation put in place by Hashicorp and :TerraformFmt, https://github.com/hashivim/vim-terraform/issues/21
if get(g:, "terraform_align", 1)
setlocal tabstop=2
@@ -25,4 +57,5 @@ if get(g:, "terraform_align", 1)
setlocal shiftwidth=2
endif
endif

View File

@@ -38,8 +38,8 @@ 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 "^\s*\zs\S\+\ze\s*:"
syn match yamlKey "^\s*-\s*\zs\S\+\ze\s*:"
syn match yamlKey "^\s*\zs[^ \t\"]\+\ze\s*:"
syn match yamlKey "^\s*-\s*\zs[^ \t\"]\+\ze\s*:"
syn match yamlAnchor "&\S\+"
syn match yamlAlias "*\S\+"

View File

@@ -1,219 +1,347 @@
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:ARROW = '->'
let s:END_WITH_ARROW = s:ARROW.'$'
let s:SKIP_SYNTAX = '\%(Comment\|String\)$'
let s:BLOCK_SKIP = "synIDattr(synID(line('.'),col('.'),1),'name') =~? '".s:SKIP_SYNTAX."'"
let s:DEF = '^\s*def'
let s:FN = '\<fn\>'
let s:MULTILINE_FN = s:FN.'\%(.*end\)\@!'
let s:BLOCK_START = '\%(\<do\>\|'.s:FN.'\)\>'
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_non_blank.text !~ s:ARROW
return elixir#util#count_indentable_symbol_diff(a:line.last_non_blank, '(', '\%(end\s*\)\@<!)')
end
function! elixir#indent#debug(str)
if exists("g:elixir_indent_debug") && g:elixir_indent_debug
echom a:str
endif
endfunction
function! s:pending_square_brackets(line)
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_non_blank.text !~ s:ARROW
return elixir#util#count_indentable_symbol_diff(a:line.last_non_blank, '{', '}')
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
" Returns 0 or 1 based on whether or not the text starts with the given
" expression and is not a string or comment
function! elixir#indent#starts_with(text, expr, lnum)
let pos = match(a:text, '^\s*'.a:expr)
if pos == -1
return 0
else
return a:ind
end
endfunction
function! elixir#indent#deindent_ending_symbols(ind, line)
if a:line.current.text =~ '^\s*\('.s:ENDING_SYMBOLS.'\)'
return a:ind - &sw
else
return a:ind
end
endfunction
function! elixir#indent#deindent_keywords(ind, line)
if a:line.current.text =~ s:DEINDENT_KEYWORDS
let bslnum = searchpair(
\ s:PAIR_START,
\ s:PAIR_MIDDLE,
\ s:PAIR_END,
\ 'nbW',
\ s:BLOCK_SKIP
\ )
return indent(bslnum)
else
return a:ind
end
endfunction
function! elixir#indent#deindent_opened_symbols(ind, line)
let s:opened_symbol =
\ s:pending_parenthesis(a:line)
\ + s:pending_square_brackets(a:line)
\ + s:pending_brackets(a:line)
if s:opened_symbol < 0
let ind = get(b:old_ind, 'symbol', a:ind + (s:opened_symbol * &sw))
let ind = float2nr(ceil(floor(ind)/&sw)*&sw)
return ind <= 0 ? 0 : ind
else
return a:ind
end
endfunction
function! elixir#indent#indent_after_pipeline(ind, line)
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_non_blank.num)
elseif a:line.last_non_blank.text !~ s:INDENT_KEYWORDS
let ind = b:old_ind.pipeline
unlet b:old_ind.pipeline
return ind
end
end
return a:ind
endfunction
function! elixir#indent#indent_assignment(ind, line)
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
end
endfunction
function! elixir#indent#indent_brackets(ind, line)
if s:pending_brackets(a:line) > 0
return a:ind + &sw
else
return a:ind
end
endfunction
function! elixir#indent#indent_case_arrow(ind, line)
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
return a:ind
end
endfunction
function! elixir#indent#indent_ending_symbols(ind, line)
if a:line.last_non_blank.text =~ '^\s*\('.s:ENDING_SYMBOLS.'\)\s*$'
return a:ind + &sw
else
return a:ind
end
endfunction
function! elixir#indent#indent_keywords(ind, line)
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
end
endfunction
function! elixir#indent#indent_parenthesis(ind, line)
if s:pending_parenthesis(a:line) > 0
\ && 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_non_blank.text, '(')
else
return a:ind
end
endfunction
function! elixir#indent#indent_pipeline_assignment(ind, line)
if a:line.current.text =~ s:STARTS_WITH_PIPELINE
\ && 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_non_blank line is an attribution
" indents pipeline in same level as attribution
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_non_blank.text =~ s:STARTS_WITH_PIPELINE
\ && a:line.current.text =~ s:STARTS_WITH_PIPELINE
return indent(a:line.last_non_blank.num)
else
return a:ind
end
endfunction
function! elixir#indent#indent_square_brackets(ind, line)
if s:pending_square_brackets(a:line) > 0
if a:line.last_non_blank.text =~ '[\s*$'
return a:ind + &sw
" NOTE: @jbodah 2017-02-24: pos is the index of the match which is
" zero-indexed. Add one to make it the column number
if elixir#indent#is_string_or_comment(a:lnum, pos + 1)
return 0
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_non_blank.text, '[\s*')
return 1
end
else
return a:ind
end
endfunction
function! elixir#indent#indent_ecto_queries(ind, line)
if a:line.last_non_blank.text =~ s:QUERY_FROM
return a:ind + &sw
" Returns 0 or 1 based on whether or not the text ends with the given
" expression and is not a string or comment
function! elixir#indent#ends_with(text, expr, lnum)
let pos = match(a:text, a:expr.'\s*$')
if pos == -1
return 0
else
return a:ind
if elixir#indent#is_string_or_comment(a:lnum, pos)
return 0
else
return 1
end
end
endfunction
" Returns 0 or 1 based on whether or not the text matches the given expression
function! elixir#indent#contains(text, expr)
return a:text =~ a:expr
endfunction
" Returns 0 or 1 based on whether or not the given line number and column
" number pair is a string or comment
function! elixir#indent#is_string_or_comment(line, col)
return synIDattr(synID(a:line, a:col, 1), "name") =~ '\%(String\|Comment\)'
endfunction
" Skip expression for searchpair. Returns 0 or 1 based on whether the value
" under the cursor is a string or comment
function! elixir#indent#searchpair_back_skip()
" NOTE: @jbodah 2017-02-27: for some reason this function gets called with
" and index that doesn't exist in the line sometimes. Detect and account for
" that situation
let curr_col = col('.')
if getline('.')[curr_col-1] == ''
let curr_col = curr_col-1
endif
return elixir#indent#is_string_or_comment(line('.'), curr_col)
endfunction
" DRY up searchpair calls
function! elixir#indent#searchpair_back(start, mid, end)
let line = line('.')
return searchpair(a:start, a:mid, a:end, 'bnW', "line('.') == " . line . " || elixir#indent#searchpair_back_skip()")
endfunction
" DRY up searchpairpos calls
function! elixir#indent#searchpairpos_back(start, mid, end)
let line = line('.')
return searchpairpos(a:start, a:mid, a:end, 'bnW', "line('.') == " . line . " || elixir#indent#searchpair_back_skip()")
endfunction
" DRY up regex for keywords that 1) makes sure we only look at complete words
" and 2) ignores atoms
function! elixir#indent#keyword(expr)
return ':\@<!\<\C\%('.a:expr.'\)\>:\@!'
endfunction
function! elixir#indent#starts_with_comment(text)
return match(a:text, '^\s*#') != -1
endfunction
" Start at the end of text and search backwards looking for a match. Also peek
" ahead if we get a match to make sure we get a complete match. This means
" that the result should be the position of the start of the right-most match
function! elixir#indent#find_last_pos(lnum, text, match)
let last = len(a:text) - 1
let c = last
while c >= 0
let substr = strpart(a:text, c, last)
let peek = strpart(a:text, c - 1, last)
let ss_match = match(substr, a:match)
if ss_match != -1
let peek_match = match(peek, a:match)
if peek_match == ss_match + 1
let syng = synIDattr(synID(a:lnum, c + ss_match, 1), 'name')
if syng !~ '\%(String\|Comment\)'
return c + ss_match
end
end
end
let c -= 1
endwhile
return -1
endfunction
function! elixir#indent#handle_top_of_file(_lnum, _text, prev_nb_lnum, _prev_nb_text)
if a:prev_nb_lnum == 0
return 0
else
return -1
end
endfunction
" TODO: @jbodah 2017-03-31: remove
function! elixir#indent#handle_following_trailing_do(lnum, text, prev_nb_lnum, prev_nb_text)
if elixir#indent#ends_with(a:prev_nb_text, elixir#indent#keyword('do'), a:prev_nb_lnum)
if elixir#indent#starts_with(a:text, elixir#indent#keyword('end'), a:lnum)
return indent(a:prev_nb_lnum)
else
return indent(a:prev_nb_lnum) + &sw
end
else
return -1
endif
endfunction
function! elixir#indent#handle_following_trailing_binary_operator(lnum, text, prev_nb_lnum, prev_nb_text)
let binary_operator = '\%(=\|<>\|>>>\|<=\|||\|+\|\~\~\~\|-\|&&\|<<<\|/\|\^\^\^\|\*\)'
if elixir#indent#ends_with(a:prev_nb_text, binary_operator, a:prev_nb_lnum)
return indent(a:prev_nb_lnum) + &sw
else
return -1
endif
endfunction
function! elixir#indent#handle_starts_with_pipe(lnum, text, prev_nb_lnum, prev_nb_text)
if elixir#indent#starts_with(a:text, '|>', a:lnum)
let match_operator = '\%(!\|=\|<\|>\)\@<!=\%(=\|>\|\~\)\@!'
let pos = elixir#indent#find_last_pos(a:prev_nb_lnum, a:prev_nb_text, match_operator)
if pos == -1
return indent(a:prev_nb_lnum)
else
let next_word_pos = match(strpart(a:prev_nb_text, pos+1, len(a:prev_nb_text)-1), '\S')
if next_word_pos == -1
return indent(a:prev_nb_lnum) + &sw
else
return pos + 1 + next_word_pos
end
end
else
return -1
endif
endfunction
function! elixir#indent#handle_starts_with_comment(_lnum, text, prev_nb_lnum, _prev_nb_text)
if elixir#indent#starts_with_comment(a:text)
return indent(a:prev_nb_lnum)
else
return -1
endif
endfunction
function! elixir#indent#handle_starts_with_end(lnum, text, _prev_nb_lnum, _prev_nb_text)
if elixir#indent#starts_with(a:text, elixir#indent#keyword('end'), a:lnum)
let pair_lnum = elixir#indent#searchpair_back(elixir#indent#keyword('do\|fn'), '', elixir#indent#keyword('end').'\zs')
return indent(pair_lnum)
else
return -1
endif
endfunction
function! elixir#indent#handle_starts_with_mid_or_end_block_keyword(lnum, text, _prev_nb_lnum, _prev_nb_text)
if elixir#indent#starts_with(a:text, elixir#indent#keyword('catch\|rescue\|after\|else'), a:lnum)
let pair_lnum = elixir#indent#searchpair_back(elixir#indent#keyword('with\|receive\|try\|if\|fn'), elixir#indent#keyword('catch\|rescue\|after\|else').'\zs', elixir#indent#keyword('end'))
return indent(pair_lnum)
else
return -1
endif
endfunction
function! elixir#indent#handle_starts_with_close_bracket(lnum, text, _prev_nb_lnum, _prev_nb_text)
if elixir#indent#starts_with(a:text, '\%(\]\|}\|)\)', a:lnum)
let pair_lnum = elixir#indent#searchpair_back('\%(\[\|{\|(\)', '', '\%(\]\|}\|)\)')
return indent(pair_lnum)
else
return -1
endif
endfunction
function! elixir#indent#handle_starts_with_binary_operator(lnum, text, prev_nb_lnum, prev_nb_text)
let binary_operator = '\%(=\|<>\|>>>\|<=\|||\|+\|\~\~\~\|-\|&&\|<<<\|/\|\^\^\^\|\*\)'
if elixir#indent#starts_with(a:text, binary_operator, a:lnum)
let match_operator = '\%(!\|=\|<\|>\)\@<!=\%(=\|>\|\~\)\@!'
let pos = elixir#indent#find_last_pos(a:prev_nb_lnum, a:prev_nb_text, match_operator)
if pos == -1
return indent(a:prev_nb_lnum)
else
let next_word_pos = match(strpart(a:prev_nb_text, pos+1, len(a:prev_nb_text)-1), '\S')
if next_word_pos == -1
return indent(a:prev_nb_lnum) + &sw
else
return pos + 1 + next_word_pos
end
end
else
return -1
endif
endfunction
" To handle nested structures properly we need to find the innermost
" nested structure. For example, we might be in a function in a map in a
" function, etc... so we need to first figure out what the innermost structure
" is then forward execution to the proper handler
function! elixir#indent#handle_inside_nested_construct(lnum, text, prev_nb_lnum, prev_nb_text)
let start_pattern = '\C\%(\<if\>\|\<case\>\|\<cond\>\|\<try\>\|\<receive\>\|\<fn\>\|{\|\[\|(\)'
let end_pattern = '\C\%(\<end\>\|\]\|}\|)\)'
let pair_info = elixir#indent#searchpairpos_back(start_pattern, '', end_pattern)
let pair_lnum = pair_info[0]
let pair_col = pair_info[1]
if pair_lnum != 0 || pair_col != 0
let pair_text = getline(pair_lnum)
let pair_char = pair_text[pair_col - 1]
if pair_char == 'f'
call elixir#indent#debug("testing elixir#indent#do_handle_inside_fn")
return elixir#indent#do_handle_inside_fn(pair_lnum, pair_col, a:lnum, a:text, a:prev_nb_lnum, a:prev_nb_text)
elseif pair_char == '['
call elixir#indent#debug("testing elixir#indent#do_handle_inside_square_brace")
return elixir#indent#do_handle_inside_square_brace(pair_lnum, pair_col, a:lnum, a:text, a:prev_nb_lnum, a:prev_nb_text)
elseif pair_char == '{'
call elixir#indent#debug("testing elixir#indent#do_handle_inside_curly_brace")
return elixir#indent#do_handle_inside_curly_brace(pair_lnum, pair_col, a:lnum, a:text, a:prev_nb_lnum, a:prev_nb_text)
elseif pair_char == '('
call elixir#indent#debug("testing elixir#indent#do_handle_inside_parens")
return elixir#indent#do_handle_inside_parens(pair_lnum, pair_col, a:lnum, a:text, a:prev_nb_lnum, a:prev_nb_text)
else
call elixir#indent#debug("testing elixir#indent#do_handle_inside_keyword_block")
return elixir#indent#do_handle_inside_keyword_block(pair_lnum, pair_col, a:lnum, a:text, a:prev_nb_lnum, a:prev_nb_text)
end
else
return -1
end
endfunction
function! elixir#indent#do_handle_inside_keyword_block(pair_lnum, _pair_col, _lnum, text, prev_nb_lnum, prev_nb_text)
let keyword_pattern = '\C\%(\<case\>\|\<cond\>\|\<try\>\|\<receive\>\|\<after\>\|\<catch\>\|\<rescue\>\|\<else\>\)'
if a:pair_lnum
" last line is a "receive" or something
if elixir#indent#starts_with(a:prev_nb_text, keyword_pattern, a:prev_nb_lnum)
call elixir#indent#debug("prev nb line is keyword")
return indent(a:prev_nb_lnum) + &sw
elseif elixir#indent#contains(a:text, '->')
call elixir#indent#debug("contains ->")
" TODO: @jbodah 2017-03-31: test contains ignores str + comments
return indent(a:pair_lnum) + &sw
elseif elixir#indent#contains(a:prev_nb_text, '->')
call elixir#indent#debug("prev nb line contains ->")
return indent(a:prev_nb_lnum) + &sw
else
call elixir#indent#debug("doesnt start with comment or contain ->")
return indent(a:prev_nb_lnum)
end
else
return -1
endif
endfunction
function! elixir#indent#do_handle_inside_fn(pair_lnum, _pair_col, lnum, text, prev_nb_lnum, prev_nb_text)
if a:pair_lnum && a:pair_lnum != a:lnum
if elixir#indent#contains(a:text, '->')
return indent(a:pair_lnum) + &sw
else
if elixir#indent#ends_with(a:prev_nb_text, '->', a:prev_nb_lnum)
return indent(a:prev_nb_lnum) + &sw
else
return indent(a:prev_nb_lnum)
end
end
else
return -1
endif
endfunction
function! elixir#indent#do_handle_inside_square_brace(pair_lnum, pair_col, _lnum, _text, _prev_nb_lnum, _prev_nb_text)
" If in list...
if a:pair_lnum != 0 || a:pair_col != 0
let pair_text = getline(a:pair_lnum)
let substr = strpart(pair_text, a:pair_col, len(pair_text)-1)
let indent_pos = match(substr, '\S')
if indent_pos != -1
return indent_pos + a:pair_col
else
return indent(a:pair_lnum) + &sw
endif
else
return -1
end
endfunction
function! elixir#indent#do_handle_inside_curly_brace(pair_lnum, _pair_col, _lnum, _text, _prev_nb_lnum, _prev_nb_text)
return indent(a:pair_lnum) + &sw
endfunction
function! elixir#indent#do_handle_inside_parens(pair_lnum, pair_col, _lnum, _text, prev_nb_lnum, prev_nb_text)
if a:pair_lnum
if elixir#indent#ends_with(a:prev_nb_text, '(', a:prev_nb_lnum)
return indent(a:prev_nb_lnum) + &sw
elseif a:pair_lnum == a:prev_nb_lnum
" Align indent (e.g. "def add(a,")
let pos = elixir#indent#find_last_pos(a:prev_nb_lnum, a:prev_nb_text, '[^(]\+,')
if pos == -1
return 0
else
return pos
end
else
return indent(a:prev_nb_lnum)
end
else
return -1
endif
endfunction
function! elixir#indent#handle_inside_generic_block(lnum, _text, prev_nb_lnum, prev_nb_text)
let pair_lnum = searchpair(elixir#indent#keyword('do\|fn'), '', elixir#indent#keyword('end'), 'bW', "line('.') == ".a:lnum." || elixir#indent#is_string_or_comment(line('.'), col('.'))")
if pair_lnum
" TODO: @jbodah 2017-03-29: this should probably be the case in *all*
" blocks
if elixir#indent#ends_with(a:prev_nb_text, ',', a:prev_nb_lnum)
return indent(pair_lnum) + 2 * &sw
else
return indent(pair_lnum) + &sw
endif
else
return -1
endif
endfunction
endif

View File

@@ -1,52 +1,28 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1
let s:SKIP_SYNTAX = '\%(Comment\|String\)$'
function! elixir#util#get_filename(word) abort
let word = a:word
function! elixir#util#is_indentable_at(line, col)
if a:col == -1 " skip synID lookup for not found match
return 1
end
" TODO: Remove these 2 lines
" I don't know why, but for the test on spec/indent/lists_spec.rb:24.
" Vim is making some mess on parsing the syntax of 'end', it is being
" recognized as 'elixirString' when should be recognized as 'elixirBlock'.
call synID(a:line, a:col, 1)
" This forces vim to sync the syntax. Using fromstart is very slow on files
" over 1k lines
syntax sync minlines=20 maxlines=150
" get first thing that starts uppercase, until the first space or end of line
let word = substitute(word,'^\s*\(\u[^ ]\+\).*$','\1','g')
return synIDattr(synID(a:line, a:col, 1), "name")
\ !~ s:SKIP_SYNTAX
endfunction
" remove any trailing characters that don't look like a nested module
let word = substitute(word,'\.\U.*$','','g')
function! elixir#util#count_indentable_symbol_diff(line, open, close)
return
\ s:match_count(a:line, a:open)
\ - s:match_count(a:line, a:close)
endfunction
" replace module dots with slash
let word = substitute(word,'\.','/','g')
function! s:match_count(line, pattern)
let size = strlen(a:line.text)
let index = 0
let counter = 0
" remove any special chars
let word = substitute(word,'[^A-z0-9-_/]','','g')
while index < size
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
endwhile
" convert to snake_case
let word = substitute(word,'\(\u\+\)\(\u\l\)','\1_\2','g')
let word = substitute(word,'\(\u\+\)\(\u\l\)','\1_\2','g')
let word = substitute(word,'\(\l\|\d\)\(\u\)','\1_\2','g')
let word = substitute(word,'-','_','g')
let word = tolower(word)
return counter
endfunction
function elixir#util#is_blank(string)
return a:string =~ '^\s*$'
return word
endfunction
endif

View File

@@ -371,6 +371,7 @@ let linkreltypes = linkreltypes + ['pgpkey']
" a and button are special elements for interactive, some element can't be its descendent
let abutton_dec = 'details\\|embed\\|iframe\\|keygen\\|label\\|menu\\|select\\|textarea'
let crossorigin = ['anonymous', 'use-credentials']
let g:xmldata_html5 = {
@@ -582,7 +583,7 @@ let g:xmldata_html5 = {
\ ],
\ 'img': [
\ [],
\ extend(copy(global_attributes), {'src': [], 'alt': [], 'height': [], 'width': [], 'usemap': [], 'ismap': ['ismap', ''], 'referrerpolicy': ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'unsafe-url']})
\ extend(copy(global_attributes), {'src': [], 'alt': [], 'height': [], 'width': [], 'usemap': [], 'ismap': ['ismap', ''], 'referrerpolicy': ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'unsafe-url'], 'crossorigin': ['anonymous', 'use-credentials']})
\ ],
\ 'input': [
\ [],
@@ -614,7 +615,7 @@ let g:xmldata_html5 = {
\ ],
\ 'link': [
\ [],
\ extend(copy(global_attributes), {'href': [], 'rel': linkreltypes, 'hreflang': lang_tag, 'media': [], 'type': [], 'sizes': ['any'], 'referrerpolicy': ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'unsafe-url']})
\ extend(copy(global_attributes), {'href': [], 'rel': linkreltypes, 'hreflang': lang_tag, 'media': [], 'type': [], 'sizes': ['any'], 'referrerpolicy': ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'unsafe-url'], 'crossorigin': crossorigin, 'preload': ['preload', ''], 'prefetch': ['prefetch', '']})
\ ],
\ 'main': [
\ flow_elements + ['style'],
@@ -722,7 +723,7 @@ let g:xmldata_html5 = {
\ ],
\ 'script': [
\ [],
\ extend(copy(global_attributes), {'src': [], 'defer': ['defer', ''], 'async': ['async', ''], 'type': [], 'charset': charset, 'nonce': []})
\ extend(copy(global_attributes), {'src': [], 'defer': ['defer', ''], 'async': ['async', ''], 'type': [], 'charset': charset, 'nonce': [], 'crossorigin': crossorigin})
\ ],
\ 'section': [
\ flow_elements + ['style'],
@@ -834,7 +835,7 @@ let g:xmldata_html5 = {
\ ],
\ 'video': [
\ flow_elements + ['source', 'track'],
\ extend(copy(global_attributes), {'autoplay': ['autoplay', ''], 'preload': ['none', 'metadata', 'auto', ''], 'controls': ['controls', ''], 'loop': ['loop', ''], 'playsinline': ['playsinline', ''], 'poster': [], 'height': [], 'width': [], 'src': []})
\ extend(copy(global_attributes), {'autoplay': ['autoplay', ''], 'preload': ['none', 'metadata', 'auto', ''], 'controls': ['controls', ''], 'loop': ['loop', ''], 'playsinline': ['playsinline', ''], 'poster': [], 'height': [], 'width': [], 'src': [], 'crossorigin': crossorigin})
\ ],
\ 'wbr': [
\ [],

4
build
View File

@@ -109,6 +109,7 @@ EOF
PACKS="
apiblueprint:sheerun/apiblueprint.vim
applescript:vim-scripts/applescript.vim
asciidoc:asciidoc/vim-asciidoc
yaml:stephpy/vim-yaml
ansible:pearofducks/ansible-vim
arduino:sudar/vim-arduino-syntax
@@ -136,6 +137,7 @@ PACKS="
glsl:tikhomirov/vim-glsl
gnuplot:vim-scripts/gnuplot-syntax-highlighting
go:fatih/vim-go:_BASIC
graphql:jparise/vim-graphql
groovy:vim-scripts/groovy.vim
haml:sheerun/vim-haml
handlebars:mustache/vim-mustache-handlebars
@@ -158,7 +160,7 @@ PACKS="
mako:sophacles/vim-bundle-mako
markdown:plasticboy/vim-markdown:_SYNTAX
mathematica:rsmenon/vim-mathematica
nginx:othree/nginx-contrib-vim
nginx:chr4/nginx.vim
nim:zah/nim.vim:_BASIC
nix:spwhitt/vim-nix
objc:b4winckler/vim-objc

View File

@@ -1,5 +1,10 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1
" Vim compiler plugin
" Language: JavaScript
" Maintainer: vim-javascript community
" URL: https://github.com/pangloss/vim-javascript
if exists("current_compiler")
finish
endif

View File

@@ -24,10 +24,10 @@ CompilerSet errorformat=
\%D(in\ %f),
\%\\s%#from\ %f:%l:%m,
\%\\s%#from\ %f:%l:,
\%\\s%##\ %f:%l:%m,
\%\\s%##\ %f:%l,
\%\\s%#[%f:%l:\ %#%m,
\%\\s%#%f:%l:\ %#%m,
\%\\s%##\ %f:%l:%m%\\&%.%#%\\D:%.%#,
\%\\s%##\ %f:%l%\\&%.%#%\\D:%.%#,
\%\\s%#[%f:%l:\ %#%m%\\&%.%#%\\D:%.%#,
\%\\s%#%f:%l:\ %#%m%\\&%.%#%\\D:%.%#,
\%\\s%#%f:%l:,
\%m\ [%f:%l]:,
\%+Erake\ aborted!,

View File

@@ -20,6 +20,12 @@ augroup filetypedetect
" applescript:vim-scripts/applescript.vim
augroup END
augroup filetypedetect
" asciidoc:asciidoc/vim-asciidoc
autocmd BufNewFile,BufRead *.asciidoc,*.adoc
\ set ft=asciidoc
augroup END
augroup filetypedetect
" yaml:stephpy/vim-yaml
augroup END
@@ -165,8 +171,6 @@ au BufRead,BufNewFile *.ex,*.exs call s:setf('elixir')
au BufRead,BufNewFile *.eex call s:setf('eelixir')
au BufRead,BufNewFile * call s:DetectElixir()
au FileType elixir,eelixir setl sw=2 sts=2 et iskeyword+=!,?
function! s:setf(filetype) abort
let &filetype = a:filetype
endfunction
@@ -283,7 +287,9 @@ augroup filetypedetect
" Language: OpenGL Shading Language
" Maintainer: Sergey Tikhomirov <sergey@tikhomirov.io>
autocmd! BufNewFile,BufRead *.glsl,*.geom,*.vert,*.frag,*.gsh,*.vsh,*.fsh,*.vs,*.fs,*.gs,*.tcs,*.tes,*.tesc,*.tese,*.comp set filetype=glsl
" Extensions supported by Khronos reference compiler
" https://github.com/KhronosGroup/glslang
autocmd! BufNewFile,BufRead *.vert,*.tesc,*.tese,*.geom,*.frag,*.comp set filetype=glsl
" vim:set sts=2 sw=2 :
augroup END
@@ -327,6 +333,11 @@ au BufRead,BufNewFile *.tmpl set filetype=gohtmltmpl
" vim: sw=2 ts=2 et
augroup END
augroup filetypedetect
" graphql:jparise/vim-graphql
au BufRead,BufNewFile *.graphql,*.gql setfiletype graphql
augroup END
augroup filetypedetect
" groovy:vim-scripts/groovy.vim
augroup END
@@ -376,10 +387,16 @@ augroup END
augroup filetypedetect
" javascript:pangloss/vim-javascript:_JAVASCRIPT
au BufNewFile,BufRead *.js setf javascript
au BufNewFile,BufRead *.jsm setf javascript
au BufNewFile,BufRead Jakefile setf javascript
au BufNewFile,BufRead *.es6 setf javascript
au BufNewFile,BufRead *.{js,jsm,es,es6},Jakefile setf javascript
fun! s:SourceFlowSyntax()
if !exists('javascript_plugin_flow') && !exists('b:flow_active') &&
\ search('\v\C%^\_s*%(//\s*|/\*[ \t\n*]*)\@flow>','nw')
runtime extras/flow.vim
let b:flow_active = 1
endif
endfun
au FileType javascript au BufRead,BufWritePost <buffer> call s:SourceFlowSyntax()
fun! s:SelectJavascript()
if getline(1) =~# '^#!.*/bin/\%(env\s\+\)\?node\>'
@@ -522,11 +539,12 @@ augroup filetypedetect
augroup END
augroup filetypedetect
" nginx:othree/nginx-contrib-vim
" nginx:chr4/nginx.vim
au BufRead,BufNewFile *.nginx set ft=nginx
au BufRead,BufNewFile nginx*.conf set ft=nginx
au BufRead,BufNewFile *nginx.conf set ft=nginx
au BufRead,BufNewFile */etc/nginx/* set ft=nginx
au BufRead,BufNewFile */usr/local/nginx/conf/* set ft=nginx
au BufRead,BufNewFile nginx.conf set ft=nginx
augroup END
augroup filetypedetect
@@ -616,11 +634,6 @@ augroup END
augroup filetypedetect
" plantuml:aklt/plantuml-syntax
" Vim ftdetect file
" Language: PlantUML
" Maintainer: Aaron C. Meadows < language name at shadowguarddev dot com>
" Version: 0.1
if did_filetype()
finish
endif
@@ -975,6 +988,12 @@ augroup END
augroup filetypedetect
" twig:lumiliet/vim-twig
if !exists('g:vim_twig_filetype_detected') && has("autocmd")
au BufNewFile,BufRead *.twig set filetype=html.twig
au BufNewFile,BufRead *.html.twig set filetype=html.twig
au BufNewFile,BufRead *.xml.twig set filetype=xml.twig
endif
augroup END
augroup filetypedetect
@@ -1002,7 +1021,7 @@ augroup END
augroup filetypedetect
" vue:posva/vim-vue
au BufNewFile,BufRead *.vue setf vue.html.javascript.css
au BufNewFile,BufRead *.vue setf vue
augroup END
augroup filetypedetect

View File

@@ -16,7 +16,7 @@ if !exists("g:eelixir_default_subtype")
endif
if !exists("b:eelixir_subtype")
let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$")
let s:lines = join(getline(1, 5) + [getline('$')], "\n")
let b:eelixir_subtype = matchstr(s:lines,'eelixir_subtype=\zs\w\+')
if b:eelixir_subtype == ''
let b:eelixir_subtype = matchstr(&filetype,'^eex\.\zs\w\+')
@@ -100,7 +100,7 @@ endif
setlocal comments=:<%#
setlocal commentstring=<%#\ %s\ %>
let b:undo_ftplugin = "setl cms< "
let b:undo_ftplugin = "setl cms< " .
\ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
let &cpo = s:save_cpo

View File

@@ -17,45 +17,24 @@ if exists("loaded_matchit") && !exists("b:match_words")
\ ',{:},\[:\],(:)'
endif
setlocal shiftwidth=2 softtabstop=2 expandtab iskeyword+=!,?
setlocal comments=:#
setlocal commentstring=#\ %s
function! GetElixirFilename(word)
let word = a:word
" get first thing that starts uppercase, until the first space or end of line
let word = substitute(word,'^\s*\(\u[^ ]\+\).*$','\1','g')
" remove any trailing characters that don't look like a nested module
let word = substitute(word,'\.\U.*$','','g')
" replace module dots with slash
let word = substitute(word,'\.','/','g')
" remove any special chars
let word = substitute(word,'[^A-z0-9-_/]','','g')
" convert to snake_case
let word = substitute(word,'\(\u\+\)\(\u\l\)','\1_\2','g')
let word = substitute(word,'\(\u\+\)\(\u\l\)','\1_\2','g')
let word = substitute(word,'\(\l\|\d\)\(\u\)','\1_\2','g')
let word = substitute(word,'-','_','g')
let word = tolower(word)
return word
endfunction
let &l:path =
\ join([
\ getcwd().'/lib',
\ getcwd().'/src',
\ getcwd().'/deps/**/lib',
\ getcwd().'/deps/**/src',
\ 'lib',
\ 'src',
\ 'deps/**/lib',
\ 'deps/**/src',
\ &g:path
\ ], ',')
setlocal includeexpr=GetElixirFilename(v:fname)
setlocal includeexpr=elixir#util#get_filename(v:fname)
setlocal suffixesadd=.ex,.exs,.eex,.erl,.yrl,.hrl
silent! setlocal formatoptions-=t formatoptions+=croqlj
let b:undo_ftplugin = 'setlocal sw< sts< et< isk< com< cms< path< inex< sua< '.
\ '| unlet! b:match_ignorecase b:match_words'
endif

17
ftplugin/graphql.vim Normal file
View File

@@ -0,0 +1,17 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
" Vim filetype plugin
" Language: GraphQL
" Maintainer: Jon Parise <jon@indelible.org>
if (exists("b:did_ftplugin"))
finish
endif
let b:did_ftplugin = 1
setlocal comments=:#
setlocal commentstring=#\ %s
setlocal formatoptions-=t
setlocal iskeyword+=$,@-@
endif

View File

@@ -2,8 +2,4 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
setlocal commentstring=#\ %s
setlocal iskeyword+=.
setlocal iskeyword+=/
setlocal iskeyword+=:
endif

View File

@@ -1,22 +1,17 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plantuml') == -1
" Vim plugin file
" Language: PlantUML
" Maintainer: Aaron C. Meadows < language name at shadowguarddev dot com>
" Version: 0.1
if exists("b:loaded_plantuml_plugin")
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"
if !exists('g:plantuml_executable_script')
let g:plantuml_executable_script='plantuml'
endif
if exists("loaded_matchit")
if exists('loaded_matchit')
let b:match_ignorecase = 0
let b:match_words =
\ '\(\<ref\>\|\<box\>\|\<opt\>\|\<alt\>\|\<group\>\|\<loop\>\|\<note\>\|\<legend\>\):\<else\>:\<end\>' .
@@ -27,7 +22,7 @@ if exists("loaded_matchit")
\ ',\<\while\>:\<endwhile\>'
endif
let &l:makeprg=g:plantuml_executable_script . " " . fnameescape(expand("%"))
let &l:makeprg=g:plantuml_executable_script . ' ' . fnameescape(expand('%'))
setlocal comments=s1:/',mb:',ex:'/,:' commentstring=/'%s'/ formatoptions-=t formatoptions+=croql

View File

@@ -19,6 +19,8 @@ setlocal formatoptions=tcqro
" Enable autocompletion of hyphenated PowerShell commands,
" e.g. Get-Content or Get-ADUser
setlocal iskeyword+=-
" MS applications (including PowerShell) require a Byte Order Mark (BOM) for UTF-8.
setlocal bomb
" Change the browse dialog on Win32 to show mainly PowerShell-related files
if has("gui_win32")

View File

@@ -16,6 +16,8 @@ let b:did_ftplugin = 1
setlocal tw=0
setlocal commentstring=#%s
setlocal formatoptions=tcqro
" MS applications (including PowerShell) require a Byte Order Mark (BOM) for UTF-8.
setlocal bomb
" Change the browse dialog on Win32 to show mainly PowerShell-related files
if has("gui_win32")

View File

@@ -71,7 +71,7 @@ endif
function! s:query_path(root) abort
let code = "print $:.join %q{,}"
if &shell =~# 'sh'
if &shell =~# 'sh' && empty(&shellxquote)
let prefix = 'env PATH='.shellescape($PATH).' '
else
let prefix = ''
@@ -164,23 +164,23 @@ if !exists("g:no_plugin_maps") && !exists("g:no_ruby_maps")
nmap <buffer><script> <SID>: :<C-U>
nmap <buffer><script> <SID>c: :<C-U><C-R>=v:count ? v:count : ''<CR>
nnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','b','n')<CR>
nnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','','n')<CR>
nnoremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','b','n')<CR>
nnoremap <silent> <buffer> ]M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','','n')<CR>
xnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','b','v')<CR>
xnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>','rubyDefine','','v')<CR>
xnoremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','b','v')<CR>
xnoremap <silent> <buffer> ]M :<C-U>call <SID>searchsyn('\<end\>','rubyDefine','','v')<CR>
nnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'b','n')<CR>
nnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'','n')<CR>
nnoremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>',['rubyDefine'],'b','n')<CR>
nnoremap <silent> <buffer> ]M :<C-U>call <SID>searchsyn('\<end\>',['rubyDefine'],'','n')<CR>
xnoremap <silent> <buffer> [m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'b','v')<CR>
xnoremap <silent> <buffer> ]m :<C-U>call <SID>searchsyn('\<def\>',['rubyDefine'],'','v')<CR>
xnoremap <silent> <buffer> [M :<C-U>call <SID>searchsyn('\<end\>',['rubyDefine'],'b','v')<CR>
xnoremap <silent> <buffer> ]M :<C-U>call <SID>searchsyn('\<end\>',['rubyDefine'],'','v')<CR>
nnoremap <silent> <buffer> [[ :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','b','n')<CR>
nnoremap <silent> <buffer> ]] :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','','n')<CR>
nnoremap <silent> <buffer> [] :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','b','n')<CR>
nnoremap <silent> <buffer> ][ :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','','n')<CR>
xnoremap <silent> <buffer> [[ :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','b','v')<CR>
xnoremap <silent> <buffer> ]] :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>','rubyModule\<Bar>rubyClass','','v')<CR>
xnoremap <silent> <buffer> [] :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','b','v')<CR>
xnoremap <silent> <buffer> ][ :<C-U>call <SID>searchsyn('\<end\>','rubyModule\<Bar>rubyClass','','v')<CR>
nnoremap <silent> <buffer> [[ :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>',['rubyModule','rubyClass'],'b','n')<CR>
nnoremap <silent> <buffer> ]] :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>',['rubyModule','rubyClass'],'','n')<CR>
nnoremap <silent> <buffer> [] :<C-U>call <SID>searchsyn('\<end\>',['rubyModule','rubyClass'],'b','n')<CR>
nnoremap <silent> <buffer> ][ :<C-U>call <SID>searchsyn('\<end\>',['rubyModule','rubyClass'],'','n')<CR>
xnoremap <silent> <buffer> [[ :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>',['rubyModule','rubyClass'],'b','v')<CR>
xnoremap <silent> <buffer> ]] :<C-U>call <SID>searchsyn('\<\%(class\<Bar>module\)\>',['rubyModule','rubyClass'],'','v')<CR>
xnoremap <silent> <buffer> [] :<C-U>call <SID>searchsyn('\<end\>',['rubyModule','rubyClass'],'b','v')<CR>
xnoremap <silent> <buffer> ][ :<C-U>call <SID>searchsyn('\<end\>',['rubyModule','rubyClass'],'','v')<CR>
let b:undo_ftplugin = b:undo_ftplugin
\."| sil! exe 'unmap <buffer> [[' | sil! exe 'unmap <buffer> ]]' | sil! exe 'unmap <buffer> []' | sil! exe 'unmap <buffer> ]['"
@@ -290,12 +290,13 @@ function! s:searchsyn(pattern, syn, flags, mode) abort
norm! gv
endif
let i = 0
call map(a:syn, 'hlID(v:val)')
while i < cnt
let i = i + 1
let line = line('.')
let col = col('.')
let pos = search(a:pattern,'W'.a:flags)
while pos != 0 && s:synname() !~# a:syn
while pos != 0 && index(a:syn, s:synid()) < 0
let pos = search(a:pattern,'W'.a:flags)
endwhile
if pos == 0
@@ -305,8 +306,8 @@ function! s:searchsyn(pattern, syn, flags, mode) abort
endwhile
endfunction
function! s:synname() abort
return synIDattr(synID(line('.'),col('.'),0),'name')
function! s:synid() abort
return synID(line('.'),col('.'),0)
endfunction
function! s:wrap_i(back,forward) abort
@@ -362,7 +363,7 @@ function! RubyCursorFile() abort
let pre = matchstr(strpart(getline('.'), 0, col('.')-1), '.*\f\@<!')
let post = matchstr(strpart(getline('.'), col('.')), '\f\@!.*')
let ext = getline('.') =~# '^\s*\%(require\%(_relative\)\=\|autoload\)\>' && cfile !~# '\.rb$' ? '.rb' : ''
if s:synname() ==# 'rubyConstant'
if s:synid() ==# hlID('rubyConstant')
let cfile = substitute(cfile,'\.\w\+[?!=]\=$','','')
let cfile = substitute(cfile,'::','/','g')
let cfile = substitute(cfile,'\(\u\+\)\(\u\l\)','\1_\2', 'g')

View File

@@ -13,4 +13,11 @@ runtime! ftplugin/html.vim
setlocal suffixesadd+=.vue
if exists('g:loaded_ale')
let g:ale_linters = get(g:, 'ale_linters', {})
let g:ale_linters.vue = get(g:ale_linters, 'vue', ['eslint'])
let g:ale_linter_aliases = get(g:, 'ale_linter_aliases', {})
let g:ale_linter_aliases.vue = get(g:ale_linter_aliases, 'vue', 'javascript')
endif
endif

View File

@@ -27,7 +27,12 @@ endif
function GetAnsibleIndent(lnum)
if a:lnum == 1 || !prevnonblank(a:lnum-1)
return 0
endif
if exists("g:ansible_unindent_after_newline")
if (a:lnum -1) != prevnonblank(a:lnum - 1)
return 0
endif
endif
let prevlnum = prevnonblank(a:lnum - 1)
let maintain = indent(prevlnum)

View File

@@ -1,97 +1,48 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1
setlocal nosmartindent
setlocal indentexpr=elixir#indent()
setlocal indentkeys+=0),0],0=\|>,=->
setlocal indentkeys+=0=end,0=else,0=match,0=elsif,0=catch,0=after,0=rescue
if exists("b:did_indent") || exists("*elixir#indent")
if exists("b:did_indent")
finish
end
let b:did_indent = 1
let s:cpo_save = &cpo
set cpo&vim
setlocal indentexpr=elixir#indent(v:lnum)
function! elixir#indent()
" initiates the `old_ind` dictionary
let b:old_ind = get(b:, 'old_ind', {})
" initiates the `line` dictionary
let line = s:build_line(v:lnum)
setlocal indentkeys+=0=end,0=catch,0=rescue,0=after,0=else,=->,0},0],0),0=\|>,0=<>
" TODO: @jbodah 2017-02-27: all operators should cause reindent when typed
if s:is_beginning_of_file(line)
" Reset `old_ind` dictionary at the beginning of the file
let b:old_ind = {}
" At the start of the file use zero indent.
return 0
elseif !s:is_indentable_line(line)
" Keep last line indentation if the current line does not have an
" indentable syntax
return indent(line.last_non_blank.num)
else
" Calculates the indenation level based on the rules
" 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
function! elixir#indent(lnum)
let lnum = a:lnum
let text = getline(lnum)
let prev_nb_lnum = prevnonblank(lnum-1)
let prev_nb_text = getline(prev_nb_lnum)
call elixir#indent#debug("==> Indenting line " . lnum)
call elixir#indent#debug("text = '" . text . "'")
let handlers = [
\'top_of_file',
\'starts_with_end',
\'starts_with_mid_or_end_block_keyword',
\'following_trailing_do',
\'following_trailing_binary_operator',
\'starts_with_pipe',
\'starts_with_close_bracket',
\'starts_with_binary_operator',
\'inside_nested_construct',
\'starts_with_comment',
\'inside_generic_block'
\]
for handler in handlers
call elixir#indent#debug('testing handler elixir#indent#handle_'.handler)
let indent = function('elixir#indent#handle_'.handler)(lnum, text, prev_nb_lnum, prev_nb_text)
if indent != -1
call elixir#indent#debug('line '.lnum.': elixir#indent#handle_'.handler.' returned '.indent)
return indent
endif
endfor
call elixir#indent#debug("defaulting")
return 0
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_non_blank.num == 0
endfunction
function! s:is_indentable_line(line)
return elixir#util#is_indentable_at(a:line.current.num, 1)
endfunction
function! s:build_line(line)
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
endif

View File

@@ -13,11 +13,7 @@ if exists('b:did_indent')
finish
endif
if !exists('g:haskell_indent_disable')
let g:haskell_indent_disable = 0
endif
if g:haskell_indent_disable != 0
if get(g:, 'haskell_indent_disable', 0)
finish
endif
@@ -68,7 +64,7 @@ if !exists('g:haskell_indent_guard')
endif
setlocal indentexpr=GetHaskellIndent()
setlocal indentkeys=0},0),0],!^F,o,O,0\=,0=where,0=let,0=deriving,<space>
setlocal indentkeys=0},0),0],!^F,o,O,0=where,0=let,0=deriving,<space>
function! s:isInBlock(hlstack)
return index(a:hlstack, 'haskellDelimiter') > -1 || index(a:hlstack, 'haskellParens') > -1 || index(a:hlstack, 'haskellBrackets') > -1 || index(a:hlstack, 'haskellBlock') > -1 || index(a:hlstack, 'haskellBlockComment') > -1 || index(a:hlstack, 'haskellPragma') > -1
@@ -159,15 +155,6 @@ function! GetHaskellIndent()
return 0
endif
" " comment indentation
" if l:line =~ '^\s*--'
" let l:s = match(l:prevline, '-- ')
" if l:s > -1
" endif
" " if l:prevline =~ '^\s*--'
" " return match(l:prevline, '\S')
" " endif
" { foo :: Int
" >>,
"
@@ -258,12 +245,16 @@ function! GetHaskellIndent()
" where
" >>foo
"
if l:prevline =~ '\C\<where\>\s*$'
return match(l:prevline, '\S') + get(g:, 'haskell_indent_after_bare_where', &shiftwidth)
endif
" do
" >>foo
"
" foo =
" >>bar
if l:prevline =~ '\C\(\<where\>\|\<do\>\|=\)\s*$'
if l:prevline =~ '\C\(\<do\>\|=\)\s*$'
return match(l:prevline, '\S') + &shiftwidth
endif
@@ -279,7 +270,7 @@ function! GetHaskellIndent()
" case foo of
" >>bar -> quux
if l:prevline =~ '\C\<case\>.\+\<of\>\s*$'
if exists('g:haskell_indent_case_alternative') && g:haskell_indent_case_alternative
if get(g:,'haskell_indent_case_alternative', 0)
return match(l:prevline, '\S') + &shiftwidth
else
return match(l:prevline, '\C\<case\>') + g:haskell_indent_case
@@ -319,6 +310,14 @@ function! GetHaskellIndent()
endif
endif
" foo :: Int
" -> Int
" >>>>-> Int
"
" foo :: Monad m
" => Functor f
" >>>>=> Int
"
" foo :: Int
" -> Int
" foo x
@@ -327,32 +326,36 @@ function! GetHaskellIndent()
" :: Int
" -> Int
" foo x
if l:prevline =~ '^\s*[-=]>' && l:line !~ '^\s*[-=]>'
if s:isInBlock(l:hlstack)
return match(l:prevline, '[^\s-=>]')
if l:prevline =~ '^\s*[-=]>'
if l:line =~ '^\s*[-=]>'
return match(l:prevline, '[-=]')
else
let l:m = matchstr(l:line, '^\s*\zs\<\S\+\>\ze')
let l:l = l:prevline
let l:c = 1
if s:isInBlock(l:hlstack)
return match(l:prevline, '[^-=]')
else
let l:m = matchstr(l:line, '^\s*\zs\<\S\+\>\ze')
let l:l = l:prevline
let l:c = 1
while v:lnum != l:c
" fun decl
if l:l =~ ('^\s*' . l:m . '\(\s*::\|\n\s\+::\)')
let l:s = match(l:l, l:m)
if match(l:l, '\C^\s*\<default\>') > -1
return l:s - 8
else
return l:s
while v:lnum != l:c
" fun decl
if l:l =~ ('^\s*' . l:m . '\(\s*::\|\n\s\+::\)')
let l:s = match(l:l, l:m)
if match(l:l, '\C^\s*\<default\>') > -1
return l:s - 8
else
return l:s
endif
" empty line, stop looking
elseif l:l =~ '^$'
return 0
endif
" empty line, stop looking
elseif l:l =~ '^$'
return 0
endif
let l:c += 1
let l:l = getline(v:lnum - l:c)
endwhile
let l:c += 1
let l:l = getline(v:lnum - l:c)
endwhile
return 0
return 0
endif
endif
endif
@@ -403,12 +406,17 @@ function! GetHaskellIndent()
" in foo
" where bar
"
" or
"
" foo
" >>where
if l:line =~ '\C^\s*\<where\>'
if match(l:prevline, '\C^\s\+in\s\+') == 0
return match(l:prevline, 'in') - g:haskell_indent_in
endif
return match(l:prevline, '\S') + &shiftwidth
return match(l:prevline, '\S') + get(g:, 'haskell_indent_before_where', &shiftwidth)
endif
" let x = 1

View File

@@ -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: March 9, 2017
" Last Change: May 16, 2017
" Only load this indent file when no other was loaded.
if exists('b:did_indent')
@@ -12,6 +12,10 @@ if exists('b:did_indent')
endif
let b:did_indent = 1
" indent correctly if inside <script>
" vim/vim@690afe1 for the switch from cindent
let b:html_indent_script1 = 'inc'
" Now, set up our indentation expression and keys that trigger it.
setlocal indentexpr=GetJavascriptIndent()
setlocal autoindent nolisp nosmartindent
@@ -23,6 +27,13 @@ setlocal indentkeys+=0],0)
let b:undo_indent = 'setlocal indentexpr< smartindent< autoindent< indentkeys<'
" Regex of syntax group names that are or delimit string or are comments.
let b:syng_strcom = get(b:,'syng_strcom','string\|comment\|regex\|special\|doc\|template\%(braces\)\@!')
let b:syng_str = get(b:,'syng_str','string\|template\|special')
" template strings may want to be excluded when editing graphql:
" au! Filetype javascript let b:syng_str = '^\%(.*template\)\@!.*string\|special'
" au! Filetype javascript let b:syng_strcom = '^\%(.*template\)\@!.*string\|comment\|regex\|special\|doc'
" Only define the function once.
if exists('*GetJavascriptIndent')
finish
@@ -38,7 +49,7 @@ if exists('*shiftwidth')
endfunction
else
function s:sw()
return &l:shiftwidth == 0 ? &l:tabstop : &l:shiftwidth
return &l:shiftwidth ? &l:shiftwidth : &l:tabstop
endfunction
endif
@@ -46,6 +57,10 @@ endif
" matches before pos.
let s:z = has('patch-7.4.984') ? 'z' : ''
let s:syng_com = 'comment\|doc'
" Expression used to check whether we should skip a match with searchpair().
let s:skip_expr = "s:syn_at(line('.'),col('.')) =~? b:syng_strcom"
" searchpair() wrapper
if has('reltime')
function s:GetPair(start,end,flags,skip,time,...)
@@ -57,56 +72,80 @@ else
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\%(braces\)\@!'
let s:syng_str = 'string\|template\|special'
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:parse_cino(f) abort
return float2nr(eval(substitute(substitute(join(split(
\ matchstr(&cino,'\C.*'.a:f.'\zs[^,]*'), 's',1), '*'.s:W)
\ , '^-\=\zs\*','',''), '^-\=\zs\.','0.','')))
function s:syn_at(l,c)
let pos = join([a:l,a:c],',')
if has_key(s:synId_cache,pos)
return s:synId_cache[pos]
endif
let s:synId_cache[pos] = synIDattr(synID(a:l,a:c,0),'name')
return s:synId_cache[pos]
endfunction
function s:parse_cino(f)
let [cin, divider, n] = [strridx(&cino,a:f), 0, '']
if cin == -1
return
endif
let [sign, cstr] = &cino[cin+1] ==# '-' ? [-1, &cino[cin+2:]] : [1, &cino[cin+1:]]
for c in split(cstr,'\zs')
if c ==# '.' && !divider
let divider = 1
elseif c ==# 's'
if n is ''
let n = s:W
else
let n = str2nr(n) * s:W
endif
break
elseif c =~ '\d'
let [n, divider] .= [c, 0]
else
break
endif
endfor
return sign * str2nr(n) / max([str2nr(divider),1])
endfunction
" Optimized {skip} expr, used only once per GetJavascriptIndent() call
function s:skip_func()
if getline('.') =~ '\%<'.col('.').'c\/.\{-}\/\|\%>'.col('.').'c[''"]\|\\$'
return eval(s:skip_expr)
if s:topCol == 1 || line('.') < s:scriptTag
return {} " E728, used as limit condition for loops and searchpair()
endif
let s:topCol = col('.')
if getline('.') =~ '\%<'.s:topCol.'c\/.\{-}\/\|\%>'.s:topCol.'c[''"]\|\\$'
if eval(s:skip_expr)
let s:topCol = 0
endif
return !s:topCol
elseif s:checkIn || search('\m`\|\${\|\*\/','nW'.s:z,s:looksyn)
let s:checkIn = eval(s:skip_expr)
if s:checkIn
let s:topCol = 0
endif
endif
let s:looksyn = line('.')
return s:checkIn
endfunction
function s:alternatePair(stop)
let pos = getpos('.')[1:2]
let pat = '[][(){};]'
while search('\m'.pat,'bW',a:stop)
function s:alternatePair()
let [l:pos, pat, l:for] = [getpos('.'), '[][(){};]', 3]
while search('\m'.pat,'bW')
if s:skip_func() | continue | endif
let idx = stridx('])};',s:looking_at())
if idx is 3 | let pat = '[{}()]' | continue | endif
if idx + 1
if s:GetPair(['\[','(','{'][idx], '])}'[idx],'bW','s:skip_func()',2000,a:stop) <= 0
if idx is 3
if l:for is 1
return s:GetPair('{','}','bW','s:skip_func()',2000) > 0 || setpos('.',l:pos)
endif
let [pat, l:for] = ['[{}();]', l:for - 1]
elseif idx + 1
if s:GetPair(['\[','(','{'][idx], '])}'[idx],'bW','s:skip_func()',2000) < 1
break
endif
else
return
endif
endwhile
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)
return synIDattr(synID(a:l,a:c,0),'name')
call setpos('.',l:pos)
endfunction
function s:looking_at()
@@ -118,10 +157,10 @@ function s:token()
endfunction
function s:previous_token()
let l:pos = getpos('.')[1:2]
let l:pos = getpos('.')
if search('\m\k\{1,}\|\S','ebW')
if (getline('.')[col('.')-2:col('.')-1] == '*/' || line('.') != l:pos[0] &&
\ getline('.') =~ '\%<'.col('.').'c\/\/') && s:syn_at(line('.'),col('.')) =~? s:syng_com
if (strpart(getline('.'),col('.')-2,2) == '*/' || line('.') != l:pos[1] &&
\ getline('.')[:col('.')-1] =~ '\/\/') && s:syn_at(line('.'),col('.')) =~? s:syng_com
while search('\m\S\ze\_s*\/[/*]','bW')
if s:syn_at(line('.'),col('.')) !~? s:syng_com
return s:token()
@@ -130,51 +169,66 @@ function s:previous_token()
else
return s:token()
endif
call setpos('.',l:pos)
endif
call call('cursor',l:pos)
return ''
endfunction
for s:__ in ['__previous_token','__IsBlock']
function s:{s:__}(...)
let l:pos = getpos('.')
try
return call('s:'.matchstr(expand('<sfile>'),'.*__\zs\w\+'),a:000)
catch
finally
call setpos('.',l:pos)
endtry
endfunction
endfor
function s:expr_col()
if getline('.')[col('.')-2] == ':'
return 1
endif
let bal = 0
while search('\m[{}?:;]','bW')
if eval(s:skip_expr) | continue | endif
" switch (looking_at())
exe { '}': "if s:GetPair('{','}','bW',s:skip_expr,200) <= 0 | return | endif",
\ ';': "return",
\ '{': "return getpos('.')[1:2] != b:js_cache[1:] && !s:IsBlock()",
\ ':': "let bal -= getline('.')[max([col('.')-2,0]):col('.')] !~ '::'",
\ '?': "let bal += 1 | if bal > 0 | return 1 | endif" }[s:looking_at()]
let [bal, l:pos] = [0, getpos('.')]
while bal < 1 && search('\m[{}?:;]','bW',s:scriptTag)
if eval(s:skip_expr)
continue
elseif s:looking_at() == ':'
let bal -= strpart(getline('.'),col('.')-2,3) !~ '::'
elseif s:looking_at() == '?'
let bal += 1
elseif s:looking_at() == '{' && getpos('.')[1:2] != b:js_cache[1:] && !s:IsBlock()
let bal = 1
elseif s:looking_at() != '}' || s:GetPair('{','}','bW',s:skip_expr,200) < 1
break
endif
endwhile
call setpos('.',l:pos)
return max([bal,0])
endfunction
" configurable regexes that define continuation lines, not including (, {, or [.
let s:opfirst = '^' . get(g:,'javascript_opfirst',
\ '\C\%([<>=,?^%|*/&]\|\([-.:+]\)\1\@!\|!=\|in\%(stanceof\)\=\>\)')
let s:continuation = get(g:,'javascript_continuation',
\ '\C\%([-+<>=,.~!?/*^%|&:]\|\<\%(typeof\|new\|delete\|void\|in\|instanceof\|await\)\)') . '$'
\ '\C\%([<=,.~!?/*^%|&:]\|+\@<!+\|-\@<!-\|=\@<!>\|\<\%(typeof\|new\|delete\|void\|in\|instanceof\|await\)\)') . '$'
function s:continues(ln,con)
if !cursor(a:ln, match(' '.a:con,s:continuation))
let teol = s:looking_at()
if teol == '/'
return s:syn_at(line('.'),col('.')) !~? 'regex'
elseif teol =~ '[-+>]'
return getline('.')[col('.')-2] != tr(teol,'>','=')
elseif teol =~ '\l'
let token = matchstr(a:con[-15:],s:continuation)
if strlen(token)
call cursor(a:ln,strlen(a:con))
if token =~ '[/>]'
return s:syn_at(a:ln,col('.')) !~? (token == '>' ? 'jsflow\|^html' : 'regex')
elseif token =~ '\l'
return s:previous_token() != '.'
elseif teol == ':'
elseif token == ':'
return s:expr_col()
endif
return 1
endif
endfunction
" get the line of code stripped of comments and move cursor to the last
" non-comment char.
function s:Trim(ln)
let pline = substitute(getline(a:ln),'\s*$','','')
let l:max = max([strridx(pline,'//'), strridx(pline,'/*')])
@@ -183,24 +237,28 @@ function s:Trim(ln)
let l:max = max([strridx(pline,'//'), strridx(pline,'/*')])
let pline = substitute(pline[:-2],'\s*$','','')
endwhile
return pline is '' || cursor(a:ln,strlen(pline)) ? pline : pline
return pline
endfunction
" Find line above 'lnum' that isn't empty or in a comment
function s:PrevCodeLine(lnum)
let [l:pos, l:n] = [getpos('.')[1:2], prevnonblank(a:lnum)]
let l:n = prevnonblank(a:lnum)
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) =~? b:syng_str
break
endif
let l:n = prevnonblank(l:n-1)
elseif stridx(getline(l:n), '*/') + 1 && s:syn_at(l:n,1) =~? s:syng_com
let l:pos = getpos('.')
call cursor(l:n,1)
keepjumps norm! [*
let l:n = search('\m\S','nbW')
let l:n = search('\m\S\_s*\/\*','nbW')
call setpos('.',l:pos)
else
break
endif
endwhile
call call('cursor',l:pos)
return l:n
endfunction
@@ -210,7 +268,7 @@ function s:Balanced(lnum)
let l:line = getline(a:lnum)
let pos = match(l:line, '[][(){}]', 0)
while pos != -1
if s:syn_at(a:lnum,pos + 1) !~? s:syng_strcom
if s:syn_at(a:lnum,pos + 1) !~? b:syng_strcom
let l:open += match(' ' . l:line[pos],'[[({]')
if l:open < 0
return
@@ -225,6 +283,7 @@ endfunction
function s:OneScope(lnum)
let pline = s:Trim(a:lnum)
call cursor(a:lnum,strlen(pline))
let kw = 'else do'
if pline[-1:] == ')' && s:GetPair('(', ')', 'bW', s:skip_expr, 100) > 0
if s:previous_token() =~# '^\%(await\|each\)$'
@@ -235,7 +294,27 @@ function s:OneScope(lnum)
endif
endif
return pline[-2:] == '=>' || index(split(kw),s:token()) + 1 &&
\ s:save_pos('s:previous_token') != '.'
\ s:__previous_token() != '.' && !s:doWhile()
endfunction
function s:doWhile()
if expand('<cword>') ==# 'while'
let [bal, l:pos] = [0, getpos('.')]
call search('\m\<','cbW')
while bal < 1 && search('\m\C[{}]\|\<\%(do\|while\)\>','bW')
if eval(s:skip_expr)
continue
elseif s:looking_at() ==# 'd'
let bal += s:__IsBlock(1)
elseif s:looking_at() ==# 'w'
let bal -= s:__previous_token() != '.'
elseif s:looking_at() != '}' || s:GetPair('{','}','bW',s:skip_expr,200) < 1
break
endif
endwhile
call setpos('.',l:pos)
return max([bal,0])
endif
endfunction
" returns braceless levels started by 'i' and above lines * &sw. 'num' is the
@@ -259,32 +338,36 @@ function s:iscontOne(i,num,cont)
endfunction
" https://github.com/sweet-js/sweet.js/wiki/design#give-lookbehind-to-the-reader
function s:IsBlock()
if s:looking_at() == '{'
function s:IsBlock(...)
if a:0 || s:looking_at() == '{'
let l:n = line('.')
let char = s:previous_token()
if match(s:stack,'\cxml\|jsx') + 1 && s:syn_at(line('.'),col('.')-1) =~? 'xml\|jsx'
return char != '{'
elseif char =~ '\k'
if char ==# 'type'
return s:previous_token() !~# '^\%(im\|ex\)port$'
return s:__previous_token() !~# '^\%(im\|ex\)port$'
endif
return index(split('return const let import export extends yield default delete var await void typeof throw case new of in instanceof')
\ ,char) < (line('.') != l:n) || s:save_pos('s:previous_token') == '.'
\ ,char) < (line('.') != l:n) || s:__previous_token() == '.'
elseif char == '>'
return getline('.')[col('.')-2] == '=' || s:syn_at(line('.'),col('.')) =~? '^jsflow'
return getline('.')[col('.')-2] == '=' || s:syn_at(line('.'),col('.')) =~? 'jsflow\|^html'
elseif char == '*'
return s:__previous_token() == ':'
elseif char == ':'
return !s:save_pos('s:expr_col')
return !s:expr_col()
elseif char == '/'
return s:syn_at(line('.'),col('.')) =~? 'regex'
endif
return char !~ '[=~!<*,?^%|&([]' &&
return char !~ '[=~!<,.?^%|&([]' &&
\ (char !~ '[-+]' || l:n != line('.') && getline('.')[col('.')-2] == char)
endif
endfunction
function GetJavascriptIndent()
let b:js_cache = get(b:,'js_cache',[0,0,0])
let s:synId_cache = {}
" Get the current line.
call cursor(v:lnum,1)
let l:line = getline('.')
@@ -299,7 +382,7 @@ function GetJavascriptIndent()
elseif l:line !~ '^\s*\/[/*]'
return -1
endif
elseif syns =~? s:syng_str
elseif syns =~? b:syng_str
if b:js_cache[0] == v:lnum - 1 && s:Balanced(v:lnum-1)
let b:js_cache[0] = v:lnum
endif
@@ -319,37 +402,33 @@ function GetJavascriptIndent()
endif
" the containing paren, bracket, or curly. Many hacks for performance
let idx = index([']',')','}'],l:line[0])
let [ s:scriptTag, idx ] = [ get(get(b:,'hi_indent',{}),'blocklnr'),
\ 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:])
call call('cursor',b:js_cache[2] ? b:js_cache[1:] : [0,0])
else
let [s:looksyn, s:checkIn, top] = [v:lnum - 1, 0, (!indent(l:lnum) &&
\ s:syn_at(l:lnum,1) !~? s:syng_str) * l:lnum]
let [s:looksyn, s:checkIn, s:topCol] = [v:lnum - 1, 0, 0]
if idx + 1
call s:GetPair(['\[','(','{'][idx],'])}'[idx],'bW','s:skip_func()',2000,top)
call s:GetPair(['\[','(','{'][idx],'])}'[idx],'bW','s:skip_func()',2000)
elseif getline(v:lnum) !~ '^\S' && syns =~? 'block'
call s:GetPair('{','}','bW','s:skip_func()',2000,top)
call s:GetPair('{','}','bW','s:skip_func()',2000)
else
call s:alternatePair(top)
call s:alternatePair()
endif
endif
let b:js_cache = [v:lnum] + (line('.') == v:lnum ? [0,0] : getpos('.')[1:2])
let b:js_cache = [v:lnum] + (line('.') == v:lnum ? [s:scriptTag,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:IsBlock()
if !b:js_cache[2] || 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 pline = s:Trim(l:lnum)
if b:js_cache[2] && s:looking_at() == ')' && s:GetPair('(',')','bW',s:skip_expr,100) > 0
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 switch_offset = max([-indent(num),s:parse_cino(':')])
endif
let switch_offset = &cino !~ ':' ? s:W : max([-indent(num),s:parse_cino(':')])
if pline[-1:] != '.' && l:line =~# '^\%(default\|case\)\>'
return indent(num) + switch_offset
endif
@@ -362,12 +441,13 @@ function GetJavascriptIndent()
endif
elseif idx < 0 && getline(b:js_cache[1])[b:js_cache[2]-1] == '(' && &cino =~ '('
let pval = s:parse_cino('(')
return !pval ? (s:parse_cino('w') ? 0 : -(!!search('\m\S','W'.s:z,num))) + virtcol('.') :
\ max([indent('.') + pval + (s:GetPair('(',')','nbrmW',s:skip_expr,100,num) * s:W),0])
return !pval || !search('\m\S','nbW',num) && !s:parse_cino('U') ?
\ (s:parse_cino('w') ? 0 : -!!search('\m\S','W'.s:z,num)) + virtcol('.') :
\ max([indent('.') + pval + s:GetPair('(',')','nbrmW',s:skip_expr,100,num) * s:W,0])
endif
" main return
if l:line =~ '^\%([])}]\||}\)'
if l:line =~ '^[])}]\|^|}'
return max([indent(num),0])
elseif num
return indent(num) + s:W + switch_offset + bL + isOp

View File

@@ -1,6 +1,6 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plantuml') == -1
if exists("b:did_indent")
if exists('b:did_indent')
finish
endif
let b:did_indent = 1
@@ -9,7 +9,7 @@ setlocal indentexpr=GetPlantUMLIndent()
setlocal indentkeys=o,O,<CR>,<:>,!^F,0end,0else,}
" only define the indent code once
if exists("*GetPlantUMLIndent")
if exists('*GetPlantUMLIndent')
finish
endif

View File

@@ -49,22 +49,21 @@ set cpo&vim
" 1. Variables {{{1
" ============
" Regex of syntax group names that are or delimit strings/symbols or are comments.
let s:syng_strcom = '\<ruby\%(Regexp\|RegexpDelimiter\|RegexpEscape' .
\ '\|Symbol\|String\|StringDelimiter\|StringEscape\|ASCIICode' .
\ '\|Interpolation\|InterpolationDelimiter\|NoInterpolation\|Comment\|Documentation\)\>'
" Regex of syntax group names that are strings.
" Syntax group names that are strings.
let s:syng_string =
\ '\<ruby\%(String\|Interpolation\|InterpolationDelimiter\|NoInterpolation\|StringEscape\)\>'
\ ['String', 'Interpolation', 'InterpolationDelimiter', 'NoInterpolation', 'StringEscape']
" Regex of syntax group names that are strings or documentation.
let s:syng_stringdoc =
\ '\<ruby\%(String\|Interpolation\|InterpolationDelimiter\|NoInterpolation\|StringEscape\|Documentation\)\>'
" Syntax group names that are strings or documentation.
let s:syng_stringdoc = s:syng_string + ['Documentation']
" Syntax group names that are or delimit strings/symbols/regexes or are comments.
let s:syng_strcom = s:syng_stringdoc +
\ ['Regexp', 'RegexpDelimiter', 'RegexpEscape',
\ 'Symbol', 'StringDelimiter', 'ASCIICode', 'Comment']
" Expression used to check whether we should skip a match with searchpair().
let s:skip_expr =
\ "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_strcom."'"
\ 'index(map('.string(s:syng_strcom).',"hlID(''ruby''.v:val)"), synID(line("."),col("."),1)) >= 0'
" Regex used for words that, at the start of a line, add a level of indent.
let s:ruby_indent_keywords =
@@ -152,7 +151,7 @@ let s:leading_operator_regex = '^\s*[.]'
" 2. GetRubyIndent Function {{{1
" =========================
function GetRubyIndent(...)
function! GetRubyIndent(...) abort
" 2.1. Setup {{{2
" ----------
@@ -255,7 +254,7 @@ endfunction
" 3. Indenting Logic Callbacks {{{1
" ============================
function! s:AccessModifier(cline_info)
function! s:AccessModifier(cline_info) abort
let info = a:cline_info
" If this line is an access modifier keyword, align according to the closest
@@ -279,7 +278,7 @@ function! s:AccessModifier(cline_info)
return -1
endfunction
function! s:ClosingBracketOnEmptyLine(cline_info)
function! s:ClosingBracketOnEmptyLine(cline_info) abort
let info = a:cline_info
" If we got a closing bracket on an empty line, find its match and indent
@@ -308,7 +307,7 @@ function! s:ClosingBracketOnEmptyLine(cline_info)
return -1
endfunction
function! s:BlockComment(cline_info)
function! s:BlockComment(cline_info) abort
" If we have a =begin or =end set indent to first column.
if match(a:cline_info.cline, '^\s*\%(=begin\|=end\)$') != -1
return 0
@@ -316,7 +315,7 @@ function! s:BlockComment(cline_info)
return -1
endfunction
function! s:DeindentingKeyword(cline_info)
function! s:DeindentingKeyword(cline_info) abort
let info = a:cline_info
" If we have a deindenting keyword, find its match and indent to its level.
@@ -357,7 +356,7 @@ function! s:DeindentingKeyword(cline_info)
return -1
endfunction
function! s:MultilineStringOrLineComment(cline_info)
function! s:MultilineStringOrLineComment(cline_info) abort
let info = a:cline_info
" If we are in a multi-line string or line-comment, don't do anything to it.
@@ -367,7 +366,7 @@ function! s:MultilineStringOrLineComment(cline_info)
return -1
endfunction
function! s:ClosingHeredocDelimiter(cline_info)
function! s:ClosingHeredocDelimiter(cline_info) abort
let info = a:cline_info
" If we are at the closing delimiter of a "<<" heredoc-style string, set the
@@ -381,7 +380,7 @@ function! s:ClosingHeredocDelimiter(cline_info)
return -1
endfunction
function! s:LeadingOperator(cline_info)
function! s:LeadingOperator(cline_info) abort
" If the current line starts with a leading operator, add a level of indent.
if s:Match(a:cline_info.clnum, s:leading_operator_regex)
return indent(s:GetMSL(a:cline_info.clnum)) + a:cline_info.sw
@@ -389,7 +388,7 @@ function! s:LeadingOperator(cline_info)
return -1
endfunction
function! s:EmptyInsideString(pline_info)
function! s:EmptyInsideString(pline_info) abort
" If the line is empty and inside a string (plnum would not be the real
" prevnonblank in that case), use the previous line's indent
let info = a:pline_info
@@ -400,7 +399,7 @@ function! s:EmptyInsideString(pline_info)
return -1
endfunction
function! s:StartOfFile(pline_info)
function! s:StartOfFile(pline_info) abort
" At the start of the file use zero indent.
if a:pline_info.plnum == 0
return 0
@@ -408,7 +407,7 @@ function! s:StartOfFile(pline_info)
return -1
endfunction
function! s:AfterAccessModifier(pline_info)
function! s:AfterAccessModifier(pline_info) abort
let info = a:pline_info
if g:ruby_indent_access_modifier_style == 'indent'
@@ -434,7 +433,7 @@ endfunction
" puts "foo"
" end
"
function! s:ContinuedLine(pline_info)
function! s:ContinuedLine(pline_info) abort
let info = a:pline_info
let col = s:Match(info.plnum, s:ruby_indent_keywords)
@@ -456,7 +455,7 @@ function! s:ContinuedLine(pline_info)
return -1
endfunction
function! s:AfterBlockOpening(pline_info)
function! s:AfterBlockOpening(pline_info) abort
let info = a:pline_info
" If the previous line ended with a block opening, add a level of indent.
@@ -482,7 +481,7 @@ function! s:AfterBlockOpening(pline_info)
return -1
endfunction
function! s:AfterLeadingOperator(pline_info)
function! s:AfterLeadingOperator(pline_info) abort
" If the previous line started with a leading operator, use its MSL's level
" of indent
if s:Match(a:pline_info.plnum, s:leading_operator_regex)
@@ -491,7 +490,7 @@ function! s:AfterLeadingOperator(pline_info)
return -1
endfunction
function! s:AfterHangingSplat(pline_info)
function! s:AfterHangingSplat(pline_info) abort
let info = a:pline_info
" If the previous line ended with the "*" of a splat, add a level of indent
@@ -501,7 +500,7 @@ function! s:AfterHangingSplat(pline_info)
return -1
endfunction
function! s:AfterUnbalancedBracket(pline_info)
function! s:AfterUnbalancedBracket(pline_info) abort
let info = a:pline_info
" If the previous line contained unclosed opening brackets and we are still
@@ -541,7 +540,7 @@ function! s:AfterUnbalancedBracket(pline_info)
return -1
endfunction
function! s:AfterEndKeyword(pline_info)
function! s:AfterEndKeyword(pline_info) abort
let info = a:pline_info
" If the previous line ended with an "end", match that "end"s beginning's
" indent.
@@ -562,7 +561,7 @@ function! s:AfterEndKeyword(pline_info)
return -1
endfunction
function! s:AfterIndentKeyword(pline_info)
function! s:AfterIndentKeyword(pline_info) abort
let info = a:pline_info
let col = s:Match(info.plnum, s:ruby_indent_keywords)
@@ -589,7 +588,7 @@ function! s:AfterIndentKeyword(pline_info)
return -1
endfunction
function! s:PreviousNotMSL(msl_info)
function! s:PreviousNotMSL(msl_info) abort
let info = a:msl_info
" If the previous line wasn't a MSL
@@ -608,7 +607,7 @@ function! s:PreviousNotMSL(msl_info)
return -1
endfunction
function! s:IndentingKeywordInMSL(msl_info)
function! s:IndentingKeywordInMSL(msl_info) abort
let info = a:msl_info
" If the MSL line had an indenting keyword in it, add a level of indent.
" TODO: this does not take into account contrived things such as
@@ -632,7 +631,7 @@ function! s:IndentingKeywordInMSL(msl_info)
return -1
endfunction
function! s:ContinuedHangingOperator(msl_info)
function! s:ContinuedHangingOperator(msl_info) abort
let info = a:msl_info
" If the previous line ended with [*+/.,-=], but wasn't a block ending or a
@@ -652,32 +651,37 @@ endfunction
" 4. Auxiliary Functions {{{1
" ======================
function! s:IsInRubyGroup(groups, lnum, col) abort
let ids = map(copy(a:groups), 'hlID("ruby".v:val)')
return index(ids, synID(a:lnum, a:col, 1)) >= 0
endfunction
" Check if the character at lnum:col is inside a string, comment, or is ascii.
function s:IsInStringOrComment(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_strcom
function! s:IsInStringOrComment(lnum, col) abort
return s:IsInRubyGroup(s:syng_strcom, a:lnum, a:col)
endfunction
" Check if the character at lnum:col is inside a string.
function s:IsInString(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_string
function! s:IsInString(lnum, col) abort
return s:IsInRubyGroup(s:syng_string, a:lnum, a:col)
endfunction
" Check if the character at lnum:col is inside a string or documentation.
function s:IsInStringOrDocumentation(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') =~ s:syng_stringdoc
function! s:IsInStringOrDocumentation(lnum, col) abort
return s:IsInRubyGroup(s:syng_stringdoc, a:lnum, a:col)
endfunction
" Check if the character at lnum:col is inside a string delimiter
function s:IsInStringDelimiter(lnum, col)
return synIDattr(synID(a:lnum, a:col, 1), 'name') == 'rubyStringDelimiter'
function! s:IsInStringDelimiter(lnum, col) abort
return s:IsInRubyGroup(['StringDelimiter'], a:lnum, a:col)
endfunction
function s:IsAssignment(str, pos)
function! s:IsAssignment(str, pos) abort
return strpart(a:str, 0, a:pos - 1) =~ '=\s*$'
endfunction
" Find line above 'lnum' that isn't empty, in a comment, or in a string.
function s:PrevNonBlankNonString(lnum)
function! s:PrevNonBlankNonString(lnum) abort
let in_block = 0
let lnum = prevnonblank(a:lnum)
while lnum > 0
@@ -702,7 +706,7 @@ function s:PrevNonBlankNonString(lnum)
endfunction
" Find line above 'lnum' that started the continuation 'lnum' may be part of.
function s:GetMSL(lnum)
function! s:GetMSL(lnum) abort
" Start on the line we're at and use its indent.
let msl = a:lnum
let lnum = s:PrevNonBlankNonString(a:lnum - 1)
@@ -807,7 +811,7 @@ function s:GetMSL(lnum)
endfunction
" Check if line 'lnum' has more opening brackets than closing ones.
function s:ExtraBrackets(lnum)
function! s:ExtraBrackets(lnum) abort
let opening = {'parentheses': [], 'braces': [], 'brackets': []}
let closing = {'parentheses': [], 'braces': [], 'brackets': []}
@@ -869,7 +873,7 @@ function s:ExtraBrackets(lnum)
return [rightmost_opening, rightmost_closing]
endfunction
function s:Match(lnum, regex)
function! s:Match(lnum, regex) abort
let line = getline(a:lnum)
let offset = match(line, '\C'.a:regex)
let col = offset + 1
@@ -889,7 +893,7 @@ endfunction
" Locates the containing class/module's definition line, ignoring nested classes
" along the way.
"
function! s:FindContainingClass()
function! s:FindContainingClass() abort
let saved_position = getpos('.')
while searchpair(s:end_start_regex, s:end_middle_regex, s:end_end_regex, 'bW',

View File

@@ -5,41 +5,64 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vue') == -1
" Maintainer: Eduardo San Martin Morote
" Author: Adriaan Zonnenberg
if exists("b:did_indent")
if exists('b:did_indent')
finish
endif
" Load indent files for required languages
for language in ['stylus', 'pug', 'css', 'javascript', 'html', 'coffee']
function! s:get_indentexpr(language)
unlet! b:did_indent
exe "runtime! indent/".language.".vim"
exe "let s:".language."indent = &indentexpr"
execute 'runtime! indent/' . a:language . '.vim'
return &indentexpr
endfunction
" The order is important here, tags without attributes go last.
" HTML is left out, it will be used when there is no match.
let s:languages = [
\ { 'name': 'pug', 'pairs': ['<template lang="pug"', '</template>'] },
\ { 'name': 'stylus', 'pairs': ['<style lang="stylus"', '</style>'] },
\ { 'name': 'css', 'pairs': ['<style', '</style>'] },
\ { 'name': 'coffee', 'pairs': ['<script lang="coffee"', '</script>'] },
\ { 'name': 'javascript', 'pairs': ['<script', '</script>'] },
\ ]
for language in s:languages
" Set 'indentexpr' if the user has an indent file installed for the language
if strlen(globpath(&rtp, 'indent/'. language.name .'.vim'))
let language.indentexpr = s:get_indentexpr(language.name)
endif
endfor
let s:html_indent = s:get_indentexpr('html')
let b:did_indent = 1
setlocal indentexpr=GetVueIndent()
if exists("*GetVueIndent")
if exists('*GetVueIndent')
finish
endif
function! GetVueIndent()
if searchpair('<template lang="pug"', '', '</template>', 'bWr')
exe "let indent = ".s:pugindent
elseif searchpair('<style lang="stylus"', '', '</style>', 'bWr')
exe "let indent = ".s:stylusindent
elseif searchpair('<style', '', '</style>', 'bWr')
exe "let indent = ".s:cssindent
elseif searchpair('<script lang="coffee"', '', '</script>', 'bWr')
exe "let indent = ".s:coffeeindent
elseif searchpair('<script', '', '</script>', 'bWr')
exe "let indent = ".s:javascriptindent
for language in s:languages
let opening_tag_line = searchpair(language.pairs[0], '', language.pairs[1], 'bWr')
if opening_tag_line
execute 'let indent = ' . get(language, 'indentexpr', -1)
break
endif
endfor
if exists('l:indent')
if (opening_tag_line == prevnonblank(v:lnum - 1) || opening_tag_line == v:lnum)
\ || getline(v:lnum) =~ '\v^\s*\</(script|style|template)'
return 0
endif
else
exe "let indent = ".s:htmlindent
" Couldn't find language, fall back to html
execute 'let indent = ' . s:html_indent
endif
return indent > -1 ? indent : s:htmlindent
return indent
endfunction
endif

187
syntax/asciidoc.vim Normal file
View File

@@ -0,0 +1,187 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'asciidoc') == -1
" Vim syntax file
" Language: AsciiDoc
" Author: Stuart Rackham <srackham@gmail.com> (inspired by Felix
" Obenhuber's original asciidoc.vim script).
" URL: http://asciidoc.org/
" Licence: GPL (http://www.gnu.org)
" Remarks: Vim 6 or greater
" Limitations:
"
" - Nested quoted text formatting is highlighted according to the outer
" format.
" - If a closing Example Block delimiter may be mistaken for a title
" underline. A workaround is to insert a blank line before the closing
" delimiter.
" - Lines within a paragraph starting with equals characters are
" highlighted as single-line titles.
" - Lines within a paragraph beginning with a period are highlighted as
" block titles.
if exists("b:current_syntax")
finish
endif
syn clear
syn sync fromstart
syn sync linebreaks=100
" Run :help syn-priority to review syntax matching priority.
syn keyword asciidocToDo TODO FIXME CHECK TEST XXX ZZZ DEPRECATED
syn match asciidocBackslash /\\/
syn region asciidocIdMarker start=/^\$Id:\s/ end=/\s\$$/
syn match asciidocCallout /\\\@<!<\d\{1,2}>/
syn match asciidocOpenBlockDelimiter /^--$/
syn match asciidocLineBreak /[ \t]+$/ containedin=asciidocList
syn match asciidocRuler /^'\{3,}$/
syn match asciidocPagebreak /^<\{3,}$/
syn match asciidocEntityRef /\\\@<!&[#a-zA-Z]\S\{-};/
syn region asciidocLiteralParagraph start=/\(\%^\|\_^\s*\n\)\@<=\s\+\S\+/ end=/\(^\(+\|--\)\?\s*$\)\@=/ contains=asciidocToDo
syn match asciidocURL /\\\@<!\<\(http\|https\|ftp\|file\|irc\):\/\/[^| \t]*\(\w\|\/\)/
syn match asciidocEmail /[\\.:]\@<!\(\<\|<\)\w\(\w\|[.-]\)*@\(\w\|[.-]\)*\w>\?[0-9A-Za-z_]\@!/
syn match asciidocAttributeRef /\\\@<!{\w\(\w\|[-,+]\)*\([=!@#$%?:].*\)\?}/
" As a damage control measure quoted patterns always terminate at a blank
" line (see 'Limitations' above).
syn match asciidocQuotedAttributeList /\\\@<!\[[a-zA-Z0-9_-][a-zA-Z0-9 _-]*\][+_'`#*]\@=/
syn match asciidocQuotedSubscript /\\\@<!\~\S\_.\{-}\(\~\|\n\s*\n\)/ contains=asciidocEntityRef
syn match asciidocQuotedSuperscript /\\\@<!\^\S\_.\{-}\(\^\|\n\s*\n\)/ contains=asciidocEntityRef
syn match asciidocQuotedMonospaced /\(^\|[| \t([.,=\]]\)\@<=+\([+ \n\t]\)\@!\(.\|\n\(\s*\n\)\@!\)\{-}\S\(+\([| \t)[\],.?!;:=]\|$\)\@=\)/ contains=asciidocEntityRef
syn match asciidocQuotedMonospaced2 /\(^\|[| \t([.,=\]]\)\@<=`\([` \n\t]\)\@!\(.\|\n\(\s*\n\)\@!\)\{-}\S\(`\([| \t)[\],.?!;:=]\|$\)\@=\)/
syn match asciidocQuotedUnconstrainedMonospaced /[\\+]\@<!++\S\_.\{-}\(++\|\n\s*\n\)/ contains=asciidocEntityRef
syn match asciidocQuotedEmphasized /\(^\|[| \t([.,=\]]\)\@<=_\([_ \n\t]\)\@!\(.\|\n\(\s*\n\)\@!\)\{-}\S\(_\([| \t)[\],.?!;:=]\|$\)\@=\)/ contains=asciidocEntityRef
syn match asciidocQuotedEmphasized2 /\(^\|[| \t([.,=\]]\)\@<='\([' \n\t]\)\@!\(.\|\n\(\s*\n\)\@!\)\{-}\S\('\([| \t)[\],.?!;:=]\|$\)\@=\)/ contains=asciidocEntityRef
syn match asciidocQuotedUnconstrainedEmphasized /\\\@<!__\S\_.\{-}\(__\|\n\s*\n\)/ contains=asciidocEntityRef
syn match asciidocQuotedBold /\(^\|[| \t([.,=\]]\)\@<=\*\([* \n\t]\)\@!\(.\|\n\(\s*\n\)\@!\)\{-}\S\(\*\([| \t)[\],.?!;:=]\|$\)\@=\)/ contains=asciidocEntityRef
syn match asciidocQuotedUnconstrainedBold /\\\@<!\*\*\S\_.\{-}\(\*\*\|\n\s*\n\)/ contains=asciidocEntityRef
" Don't allow ` in single quoted (a kludge to stop confusion with `monospaced`).
syn match asciidocQuotedSingleQuoted /\(^\|[| \t([.,=\]]\)\@<=`\([` \n\t]\)\@!\([^`]\|\n\(\s*\n\)\@!\)\{-}[^` \t]\('\([| \t)[\],.?!;:=]\|$\)\@=\)/ contains=asciidocEntityRef
syn match asciidocQuotedDoubleQuoted /\(^\|[| \t([.,=\]]\)\@<=``\([` \n\t]\)\@!\(.\|\n\(\s*\n\)\@!\)\{-}\S\(''\([| \t)[\],.?!;:=]\|$\)\@=\)/ contains=asciidocEntityRef
syn match asciidocDoubleDollarPassthrough /\\\@<!\(^\|[^0-9a-zA-Z$]\)\@<=\$\$..\{-}\(\$\$\([^0-9a-zA-Z$]\|$\)\@=\|^$\)/
syn match asciidocTriplePlusPassthrough /\\\@<!\(^\|[^0-9a-zA-Z$]\)\@<=+++..\{-}\(+++\([^0-9a-zA-Z$]\|$\)\@=\|^$\)/
syn match asciidocAdmonition /^\u\{3,15}:\(\s\+.*\)\@=/
syn region asciidocTable_OLD start=/^\([`.']\d*[-~_]*\)\+[-~_]\+\d*$/ end=/^$/
syn match asciidocBlockTitle /^\.[^. \t].*[^-~_]$/ contains=asciidocQuoted.*,asciidocAttributeRef
syn match asciidocTitleUnderline /[-=~^+]\{2,}$/ transparent contained contains=NONE
syn match asciidocOneLineTitle /^=\{1,5}\s\+\S.*$/ contains=asciidocQuoted.*,asciidocMacroAttributes,asciidocAttributeRef,asciidocEntityRef,asciidocEmail,asciidocURL,asciidocBackslash
syn match asciidocTwoLineTitle /^[^. +/].*[^.]\n[-=~^+]\{3,}$/ contains=asciidocQuoted.*,asciidocMacroAttributes,asciidocAttributeRef,asciidocEntityRef,asciidocEmail,asciidocURL,asciidocBackslash,asciidocTitleUnderline
syn match asciidocAttributeList /^\[[^[ \t].*\]$/
syn match asciidocQuoteBlockDelimiter /^_\{4,}$/
syn match asciidocExampleBlockDelimiter /^=\{4,}$/
syn match asciidocSidebarDelimiter /^*\{4,}$/
" See http://vimdoc.sourceforge.net/htmldoc/usr_44.html for excluding region
" contents from highlighting.
syn match asciidocTablePrefix /\(\S\@<!\(\([0-9.]\+\)\([*+]\)\)\?\([<\^>.]\{,3}\)\?\([a-z]\)\?\)\?|/ containedin=asciidocTableBlock contained
syn region asciidocTableBlock matchgroup=asciidocTableDelimiter start=/^|=\{3,}$/ end=/^|=\{3,}$/ keepend contains=ALL
syn match asciidocTablePrefix /\(\S\@<!\(\([0-9.]\+\)\([*+]\)\)\?\([<\^>.]\{,3}\)\?\([a-z]\)\?\)\?!/ containedin=asciidocTableBlock contained
syn region asciidocTableBlock2 matchgroup=asciidocTableDelimiter2 start=/^!=\{3,}$/ end=/^!=\{3,}$/ keepend contains=ALL
syn match asciidocListContinuation /^+$/
syn region asciidocLiteralBlock start=/^\.\{4,}$/ end=/^\.\{4,}$/ contains=asciidocCallout,asciidocToDo keepend
syn region asciidocListingBlock start=/^-\{4,}$/ end=/^-\{4,}$/ contains=asciidocCallout,asciidocToDo keepend
syn region asciidocCommentBlock start="^/\{4,}$" end="^/\{4,}$" contains=asciidocToDo
syn region asciidocPassthroughBlock start="^+\{4,}$" end="^+\{4,}$"
" Allowing leading \w characters in the filter delimiter is to accomodate
" the pre version 8.2.7 syntax and may be removed in future releases.
syn region asciidocFilterBlock start=/^\w*\~\{4,}$/ end=/^\w*\~\{4,}$/
syn region asciidocMacroAttributes matchgroup=asciidocRefMacro start=/\\\@<!<<"\{-}\(\w\|-\|_\|:\|\.\)\+"\?,\?/ end=/\(>>\)\|^$/ contains=asciidocQuoted.* keepend
syn region asciidocMacroAttributes matchgroup=asciidocAnchorMacro start=/\\\@<!\[\{2}\(\w\|-\|_\|:\|\.\)\+,\?/ end=/\]\{2}/ keepend
syn region asciidocMacroAttributes matchgroup=asciidocAnchorMacro start=/\\\@<!\[\{3}\(\w\|-\|_\|:\|\.\)\+/ end=/\]\{3}/ keepend
syn region asciidocMacroAttributes matchgroup=asciidocMacro start=/[\\0-9a-zA-Z]\@<!\w\(\w\|-\)*:\S\{-}\[/ skip=/\\\]/ end=/\]\|^$/ contains=asciidocQuoted.*,asciidocAttributeRef,asciidocEntityRef keepend
" Highlight macro that starts with an attribute reference (a common idiom).
syn region asciidocMacroAttributes matchgroup=asciidocMacro start=/\(\\\@<!{\w\(\w\|[-,+]\)*\([=!@#$%?:].*\)\?}\)\@<=\S\{-}\[/ skip=/\\\]/ end=/\]\|^$/ contains=asciidocQuoted.*,asciidocAttributeRef keepend
syn region asciidocMacroAttributes matchgroup=asciidocIndexTerm start=/\\\@<!(\{2,3}/ end=/)\{2,3}/ contains=asciidocQuoted.*,asciidocAttributeRef keepend
syn match asciidocCommentLine "^//\([^/].*\|\)$" contains=asciidocToDo
syn region asciidocAttributeEntry start=/^:\w/ end=/:\(\s\|$\)/ oneline
" Lists.
syn match asciidocListBullet /^\s*\zs\(-\|\*\{1,5}\)\ze\s/
syn match asciidocListNumber /^\s*\zs\(\(\d\+\.\)\|\.\{1,5}\|\(\a\.\)\|\([ivxIVX]\+)\)\)\ze\s\+/
syn region asciidocListLabel start=/^\s*/ end=/\(:\{2,4}\|;;\)$/ oneline contains=asciidocQuoted.*,asciidocMacroAttributes,asciidocAttributeRef,asciidocEntityRef,asciidocEmail,asciidocURL,asciidocBackslash,asciidocToDo keepend
" DEPRECATED: Horizontal label.
syn region asciidocHLabel start=/^\s*/ end=/\(::\|;;\)\(\s\+\|\\$\)/ oneline contains=asciidocQuoted.*,asciidocMacroAttributes keepend
" Starts with any of the above.
syn region asciidocList start=/^\s*\(-\|\*\{1,5}\)\s/ start=/^\s*\(\(\d\+\.\)\|\.\{1,5}\|\(\a\.\)\|\([ivxIVX]\+)\)\)\s\+/ start=/.\+\(:\{2,4}\|;;\)$/ end=/\(^[=*]\{4,}$\)\@=/ end=/\(^\(+\|--\)\?\s*$\)\@=/ contains=asciidocList.\+,asciidocQuoted.*,asciidocMacroAttributes,asciidocAttributeRef,asciidocEntityRef,asciidocEmail,asciidocURL,asciidocBackslash,asciidocCommentLine,asciidocAttributeList,asciidocToDo
hi def link asciidocAdmonition Special
hi def link asciidocAnchorMacro Macro
hi def link asciidocAttributeEntry Special
hi def link asciidocAttributeList Special
hi def link asciidocAttributeMacro Macro
hi def link asciidocAttributeRef Special
hi def link asciidocBackslash Special
hi def link asciidocBlockTitle Title
hi def link asciidocCallout Label
hi def link asciidocCommentBlock Comment
hi def link asciidocCommentLine Comment
hi def link asciidocDoubleDollarPassthrough Special
hi def link asciidocEmail Macro
hi def link asciidocEntityRef Special
hi def link asciidocExampleBlockDelimiter Type
hi def link asciidocFilterBlock Type
hi def link asciidocHLabel Label
hi def link asciidocIdMarker Special
hi def link asciidocIndexTerm Macro
hi def link asciidocLineBreak Special
hi def link asciidocOpenBlockDelimiter Label
hi def link asciidocListBullet Label
hi def link asciidocListContinuation Label
hi def link asciidocListingBlock Identifier
hi def link asciidocListLabel Label
hi def link asciidocListNumber Label
hi def link asciidocLiteralBlock Identifier
hi def link asciidocLiteralParagraph Identifier
hi def link asciidocMacroAttributes Label
hi def link asciidocMacro Macro
hi def link asciidocOneLineTitle Title
hi def link asciidocPagebreak Type
hi def link asciidocPassthroughBlock Identifier
hi def link asciidocQuoteBlockDelimiter Type
hi def link asciidocQuotedAttributeList Special
hi def link asciidocQuotedBold Special
hi def link asciidocQuotedDoubleQuoted Label
hi def link asciidocQuotedEmphasized2 Type
hi def link asciidocQuotedEmphasized Type
hi def link asciidocQuotedMonospaced2 Identifier
hi def link asciidocQuotedMonospaced Identifier
hi def link asciidocQuotedSingleQuoted Label
hi def link asciidocQuotedSubscript Type
hi def link asciidocQuotedSuperscript Type
hi def link asciidocQuotedUnconstrainedBold Special
hi def link asciidocQuotedUnconstrainedEmphasized Type
hi def link asciidocQuotedUnconstrainedMonospaced Identifier
hi def link asciidocRefMacro Macro
hi def link asciidocRuler Type
hi def link asciidocSidebarDelimiter Type
hi def link asciidocTableBlock2 NONE
hi def link asciidocTableBlock NONE
hi def link asciidocTableDelimiter2 Label
hi def link asciidocTableDelimiter Label
hi def link asciidocTable_OLD Type
hi def link asciidocTablePrefix2 Label
hi def link asciidocTablePrefix Label
hi def link asciidocToDo Todo
hi def link asciidocTriplePlusPassthrough Special
hi def link asciidocTwoLineTitle Title
hi def link asciidocURL Macro
let b:current_syntax = "asciidoc"
" vim: wrap et sw=2 sts=2:
endif

View File

@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'c/c++') == -1
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2016 Nov 17
" Last Change: 2016 Nov 18
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
@@ -365,7 +365,7 @@ syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>"
if !exists("c_no_if0")
syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip
syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse
if !exists("c_no_if0_fold")
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold
else

View File

@@ -177,7 +177,7 @@ end
syn match crystalAliasDeclaration "[^[:space:];#.()]\+" contained contains=crystalSymbol,crystalGlobalVariable,crystalPredefinedVariable nextgroup=crystalAliasDeclaration2 skipwhite
syn match crystalAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=crystalSymbol,crystalGlobalVariable,crystalPredefinedVariable
syn match crystalMethodDeclaration "[^[:space:];#(]\+" contained contains=crystalConstant,crystalBoolean,crystalPseudoVariable,crystalInstanceVariable,crystalClassVariable,crystalGlobalVariable
syn match crystalFunctionDeclaration "[^[:space:];#=]\+" contained contains=crystalConstant
syn match crystalFunctionDeclaration "[^[:space:];#(=]\+" contained contains=crystalConstant
syn match crystalTypeDeclaration "[^[:space:];#=]\+" contained contains=crystalConstant
syn match crystalClassDeclaration "[^[:space:];#<]\+" contained contains=crystalConstant,crystalOperator
syn match crystalModuleDeclaration "[^[:space:];#<]\+" contained contains=crystalConstant,crystalOperator

View File

@@ -28,15 +28,15 @@ syn region glslPreProc start="^\s*#\s*\(error\|pragma\|extension\|versi
syn keyword glslBoolean true false
" Integer Numbers
syn match glslDecimalInt display "\(0\|[1-9]\d*\)"
syn match glslOctalInt display "0\o\+"
syn match glslHexInt display "0[xX]\x\+"
syn match glslDecimalInt display "\(0\|[1-9]\d*\)[uU]\?"
syn match glslOctalInt display "0\o\+[uU]\?"
syn match glslHexInt display "0[xX]\x\+[uU]\?"
" Float Numbers
syn match glslFloat display "\d\+\.\([eE][+-]\=\d\+\)\="
syn match glslFloat display "\.\d\+\([eE][+-]\=\d\+\)\="
syn match glslFloat display "\d\+[eE][+-]\=\d\+"
syn match glslFloat display "\d\+\.\d\+\([eE][+-]\=\d\+\)\="
syn match glslFloat display "\d\+\.\([eE][+-]\=\d\+\)\=\(lf\|LF\|f\|F\)\="
syn match glslFloat display "\.\d\+\([eE][+-]\=\d\+\)\=\(lf\|LF\|f\|F\)\="
syn match glslFloat display "\d\+[eE][+-]\=\d\+\(lf\|LF\|f\|F\)\="
syn match glslFloat display "\d\+\.\d\+\([eE][+-]\=\d\+\)\=\(lf\|LF\|f\|F\)\="
" Swizzles
syn match glslSwizzle display /\.[xyzw]\{1,4\}\>/

View File

@@ -76,8 +76,8 @@ hi def link goTplVariable Special
syn region gotplAction start="{{" end="}}" contains=@gotplLiteral,gotplControl,gotplFunctions,gotplVariable,goTplIdentifier display
syn region gotplAction start="\[\[" end="\]\]" contains=@gotplLiteral,gotplControl,gotplFunctions,gotplVariable display
syn region goTplComment start="{{/\*" end="\*/}}" display
syn region goTplComment start="\[\[/\*" end="\*/\]\]" display
syn region goTplComment start="{{\(- \)\?/\*" end="\*/\( -\)\?}}" display
syn region goTplComment start="\[\[\(- \)\?/\*" end="\*/\( -\)\?\]\]" display
hi def link gotplAction PreProc
hi def link goTplComment Comment

64
syntax/graphql.vim Normal file
View File

@@ -0,0 +1,64 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
" Vim syntax file
" Language: GraphQL
" Maintainer: Jon Parise <jon@indelible.org>
if exists("b:current_syntax")
finish
endif
syn match graphqlComment "#.*$" contains=@Spell
syn match graphqlOperator "="
syn match graphqlOperator "!"
syn match graphqlOperator "|"
syn match graphqlOperator "\M..."
syn keyword graphqlBoolean true false
syn keyword graphqlNull null
syn match graphqlNumber "-\=\<\%(0\|[1-9]\d*\)\%(\.\d\+\)\=\%([eE][-+]\=\d\+\)\=\>"
syn region graphqlString start=+"+ skip=+\\\\\|\\"+ end=+"\|$+
syn keyword graphqlStructure enum scalar type union nextgroup=graphqlType skipwhite
syn keyword graphqlStructure input interface subscription nextgroup=graphqlType skipwhite
syn keyword graphqlStructure implements on nextgroup=graphqlType skipwhite
syn keyword graphqlStructure query mutation fragment nextgroup=graphqlIdentifier skipwhite
syn keyword graphqlStructure directive nextgroup=graphqlDirective skipwhite
syn keyword graphqlStructure extend nextgroup=graphqlStructure skipwhite
syn match graphqlDirective "\<@\h\w*\>" display
syn match graphqlVariable "\<\$\h\w*\>" display
syn match graphqlIdentifier "\<\h\w*\>" display contained
syn match graphqlType "\<_*\u\w*\>" display contained
syn match graphqlConstant "\<[A-Z_]\+\>" display contained
syn keyword graphqlMetaFields __schema __type __typename
syn region graphqlFold matchgroup=graphqlBraces start="{" end=/}\(\_s\+\ze\("\|{\)\)\@!/ transparent fold contains=ALLBUT,graphqlStructure
syn region graphqlList matchgroup=graphqlBraces start="\[" end=/]\(\_s\+\ze"\)\@!/ transparent contains=ALLBUT,graphqlDirective,graphqlStructure
hi def link graphqlComment Comment
hi def link graphqlOperator Operator
hi def link graphqlBraces Delimiter
hi def link graphqlBoolean Boolean
hi def link graphqlNull Keyword
hi def link graphqlNumber Number
hi def link graphqlString String
hi def link graphqlConstant Constant
hi def link graphqlDirective PreProc
hi def link graphqlIdentifier Identifier
hi def link graphqlMetaFields Special
hi def link graphqlStructure Structure
hi def link graphqlType Type
hi def link graphqlVariable Identifier
syn sync minlines=500
let b:current_syntax = "graphql"
endif

View File

@@ -13,11 +13,7 @@ elseif exists("b:current_syntax")
finish
endif
if !exists('g:haskell_disable_TH')
let g:haskell_disable_TH = 0
endif
if exists('g:haskell_backpack') && g:haskell_backpack == 1
if get(g:, 'haskell_backpack', 0)
syn keyword haskellBackpackStructure unit signature
syn keyword haskellBackpackDependency dependency
endif
@@ -63,7 +59,7 @@ syn match haskellImport "^\s*\<import\>\s\+\(\<safe\>\s\+\)\?\(\<qualified\>\s\+
\ haskellBlockComment,
\ haskellPragma
syn keyword haskellKeyword do case of
if exists('g:haskell_enable_static_pointers') && g:haskell_enable_static_pointers == 1
if get(g:, 'haskell_enable_static_pointers', 0)
syn keyword haskellStatic static
endif
syn keyword haskellConditional if then else
@@ -107,29 +103,29 @@ syn match haskellPreProc "^#.*$"
syn keyword haskellTodo TODO FIXME contained
" Treat a shebang line at the start of the file as a comment
syn match haskellShebang "\%^#!.*$"
if exists('g:haskell_disable_TH') && g:haskell_disable_TH == 0
if !get(g:, 'haskell_disable_TH', 0)
syn match haskellQuasiQuoted "." containedin=haskellQuasiQuote contained
syn region haskellQuasiQuote matchgroup=haskellTH start="\[[_a-zA-Z][a-zA-z0-9._']*|" end="|\]"
syn region haskellTHBlock matchgroup=haskellTH start="\[\(d\|t\|p\)\?|" end="|]" contains=TOP
syn region haskellTHDoubleBlock matchgroup=haskellTH start="\[||" end="||]" contains=TOP
endif
if exists('g:haskell_enable_typeroles') && g:haskell_enable_typeroles == 1
if get(g:, 'haskell_enable_typeroles', 0)
syn keyword haskellTypeRoles phantom representational nominal contained
syn region haskellTypeRoleBlock matchgroup=haskellTypeRoles start="type\s\+role" end="$" keepend
\ contains=
\ haskellType,
\ haskellTypeRoles
endif
if exists('g:haskell_enable_quantification') && g:haskell_enable_quantification == 1
if get(g:, 'haskell_enable_quantification', 0)
syn keyword haskellForall forall
endif
if exists('g:haskell_enable_recursivedo') && g:haskell_enable_recursivedo == 1
if get(g:, 'haskell_enable_recursivedo', 0)
syn keyword haskellRecursiveDo mdo rec
endif
if exists('g:haskell_enable_arrowsyntax') && g:haskell_enable_arrowsyntax == 1
if get(g:, 'haskell_enable_arrowsyntax', 0)
syn keyword haskellArrowSyntax proc
endif
if exists('g:haskell_enable_pattern_synonyms') && g:haskell_enable_pattern_synonyms == 1
if get(g:, 'haskell_enable_pattern_synonyms', 0)
syn keyword haskellPatternKeyword pattern
endif
@@ -161,7 +157,7 @@ highlight def link haskellAssocType Type
highlight def link haskellQuotedType Type
highlight def link haskellType Type
highlight def link haskellImportKeywords Include
if exists('g:haskell_classic_highlighting') && g:haskell_classic_highlighting == 1
if get(g:, 'haskell_classic_highlighting', 0)
highlight def link haskellDeclKeyword Keyword
highlight def link haskellDecl Keyword
highlight def link haskellWhere Keyword
@@ -173,35 +169,35 @@ else
highlight def link haskellLet Structure
endif
if exists('g:haskell_enable_quantification') && g:haskell_enable_quantification == 1
if get(g:, 'haskell_enable_quantification', 0)
highlight def link haskellForall Operator
endif
if exists('g:haskell_enable_recursivedo') && g:haskell_enable_recursivedo == 1
if get(g:, 'haskell_enable_recursivedo', 0)
highlight def link haskellRecursiveDo Keyword
endif
if exists('g:haskell_enable_arrowsyntax') && g:haskell_enable_arrowsyntax == 1
if get(g:, 'haskell_enable_arrowsyntax', 0)
highlight def link haskellArrowSyntax Keyword
endif
if exists('g:haskell_enable_static_pointers') && g:haskell_enable_static_pointers == 1
if get(g:, 'haskell_enable_static_pointers', 0)
highlight def link haskellStatic Keyword
endif
if exists('g:haskell_classic_highlighting') && g:haskell_classic_highlighting == 1
if exists('g:haskell_enable_pattern_synonyms') && g:haskell_enable_pattern_synonyms == 1
if get(g:, 'haskell_classic_highlighting', 0)
if get(g:, 'haskell_enable_pattern_synonyms', 0)
highlight def link haskellPatternKeyword Keyword
endif
if exists('g:haskell_enable_typeroles') && g:haskell_enable_typeroles == 1
if get(g:, 'haskell_enable_typeroles', 0)
highlight def link haskellTypeRoles Keyword
endif
else
if exists('g:haskell_enable_pattern_synonyms') && g:haskell_enable_pattern_synonyms == 1
if get(g:, 'haskell_enable_pattern_synonyms', 0)
highlight def link haskellPatternKeyword Structure
endif
if exists('g:haskell_enable_typeroles') && g:haskell_enable_typeroles == 1
if get(g:, 'haskell_enable_typeroles', 0)
highlight def link haskellTypeRoles Structure
endif
endif
if exists('g:haskell_backpack') && g:haskell_backpack == 1
if get(g:, 'haskell_backpack', 0)
highlight def link haskellBackpackStructure Structure
highlight def link haskellBackpackDependency Include
endif

View File

@@ -121,9 +121,11 @@ syn keyword htmlArg contained download media
syn keyword htmlArg contained nonce
" <area>, <a>, <img>, <iframe>, <link>
syn keyword htmlArg contained referrerpolicy
" <script>
" https://w3c.github.io/webappsec-subresource-integrity/#the-integrity-attribute
syn keyword htmlArg contained integrity crossorigin
" <link>
syn keyword htmlArg contained prefetch
" syn keyword htmlArg contained preload
" Custom Data Attributes
" http://w3c.github.io/html/single-page.html#embedding-custom-non-visible-data-with-the-data-attributes

View File

@@ -27,7 +27,7 @@ syntax sync fromstart
syntax case match
syntax match jsNoise /[:,\;]\{1}/
syntax match jsNoise /[\.]\{1}/ skipwhite skipempty nextgroup=jsObjectProp,jsFuncCall
syntax match jsNoise /[\.]\{1}/ skipwhite skipempty nextgroup=jsObjectProp,jsFuncCall,jsPrototype
syntax match jsObjectProp contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*\>/
syntax match jsFuncCall /\k\+\%(\s*(\)\@=/
syntax match jsParensError /[)}\]]/
@@ -239,8 +239,8 @@ if exists("javascript_plugin_flow")
runtime extras/flow.vim
endif
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
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,jsForAwait
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
@@ -384,7 +384,7 @@ if version >= 508 || !exists("did_javascript_syn_inits")
endif
" Define the htmlJavaScript for HTML syntax html.vim
syntax cluster htmlJavaScript contains=@jsAll
syntax cluster htmlJavaScript contains=@jsAll,jsImport,jsExport
syntax cluster javaScriptExpression contains=@jsAll
" Vim's default html.vim highlights all javascript as 'Special'

View File

@@ -1,706 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Vim syntax file
" Language: nginx.conf
if exists("b:current_syntax")
finish
end
" Patch 7.4.1142
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
endif
syn match ngxVariable '\$\(\w\+\|{\w\+}\)'
syn match ngxVariableString '\$\(\w\+\|{\w\+}\)' contained
syn match ngxComment ' *#.*$'
syn match ngxLocationPath /\S\+/ contained
syn region ngxString start=+[^:a-zA-Z>!\\@]\z(["']\)+lc=1 end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString
syn keyword ngxBoolean on
syn keyword ngxBoolean off
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 skipempty
syn match ngxLocationNamedLoc /@\w\+/
syn keyword ngxDirectiveBlock location nextgroup=ngxLocationNamedLoc,ngxLocationOperator,ngxLocationPath,ngxString skipwhite skipempty
syn keyword ngxDirectiveBlock upstream
syn keyword ngxDirectiveBlock charset_map
syn keyword ngxDirectiveBlock limit_except
syn keyword ngxDirectiveBlock if
syn keyword ngxDirectiveBlock geo
syn keyword ngxDirectiveBlock map
syn keyword ngxDirectiveBlock split_clients
syn keyword ngxDirectiveImportant include
syn keyword ngxDirectiveImportant root
syn keyword ngxDirectiveImportant server
syn keyword ngxDirectiveImportant server_name
syn keyword ngxDirectiveImportant listen contained
syn region ngxDirectiveImportantListen matchgroup=ngxDirectiveImportant start=+listen+ skip=+\\\\\|\\\;+ end=+;+he=e-1 contains=ngxListenOptions,ngxString
syn keyword ngxDirectiveImportant internal
syn keyword ngxDirectiveImportant proxy_pass
syn keyword ngxDirectiveImportant memcached_pass
syn keyword ngxDirectiveImportant fastcgi_pass
syn keyword ngxDirectiveImportant scgi_pass
syn keyword ngxDirectiveImportant uwsgi_pass
syn keyword ngxDirectiveImportant try_files
syn keyword ngxListenOptions default_server contained
syn keyword ngxListenOptions ssl contained
syn keyword ngxListenOptions http2 contained
syn keyword ngxListenOptions spdy contained
syn keyword ngxListenOptions proxy_protocol contained
syn keyword ngxListenOptions setfib contained
syn keyword ngxListenOptions fastopen contained
syn keyword ngxListenOptions backlog contained
syn keyword ngxListenOptions rcvbuf contained
syn keyword ngxListenOptions sndbuf contained
syn keyword ngxListenOptions accept_filter contained
syn keyword ngxListenOptions deferred contained
syn keyword ngxListenOptions bind contained
syn keyword ngxListenOptions ipv6only contained
syn keyword ngxListenOptions reuseport contained
syn keyword ngxListenOptions so_keepalive contained
syn keyword ngxListenOptions keepidle contained
syn keyword ngxDirectiveControl break
syn keyword ngxDirectiveControl return nextgroup=ngxStatusCode skipwhite skipempty
syn keyword ngxDirectiveControl rewrite nextgroup=ngxRewriteURI skipwhite skipempty
syn keyword ngxDirectiveControl set
syn match ngxStatusCode /\d\d\d/ contained
syn match ngxStatusCodes /\d\d\d/ contained contains=ngxStatusCode nextgroup=ngxStatusCode skipwhite skipempty
syn match ngxRewriteURI /\S\+/ contained contains=ngxVariableString nextgroup=ngxRewritedURI skipwhite skipempty
syn region ngxRewriteURI start=+[^:a-zA-Z>!\\@]\z(["']\)+lc=1 end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString nextgroup=ngxRewritedURI skipwhite skipempty
syn match ngxRewritedURI /\S\+/ contained contains=ngxVariableString nextgroup=ngxRewriteFlag skipwhite skipempty
syn region ngxRewritedURI start=+[^:a-zA-Z>!\\@]\z(["']\)+lc=1 end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString nextgroup=ngxRewriteFlag skipwhite skipempty
syn keyword ngxRewriteFlag last contained
syn keyword ngxRewriteFlag break contained
syn keyword ngxRewriteFlag redirect contained
syn keyword ngxRewriteFlag permanent contained
syn keyword ngxDirectiveError error_page nextgroup=ngxErrorStatusCode skipwhite skipempty
syn keyword ngxDirectiveError post_action
syn match ngxErrorStatusCode /\d\d\d/ contained contains=ngxStatusCode nextgroup=ngxErrorResponseCode skipwhite skipempty
syn match ngxErrorResponseCode /=\d\d\d/ contained contains=ngxStatusCode
syn keyword ngxDirectiveDeprecated connections
syn keyword ngxDirectiveDeprecated imap
syn keyword ngxDirectiveDeprecated limit_zone
syn keyword ngxDirectiveDeprecated mysql_test
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 ngxDirective absolute_redirect
syn keyword ngxDirective accept_mutex
syn keyword ngxDirective accept_mutex_delay
syn keyword ngxDirective acceptex_read
syn keyword ngxDirective access_log
syn keyword ngxDirective add_after_body
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
syn keyword ngxDirective ancient_browser_value
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
syn keyword ngxDirective client_body_in_file_only
syn keyword ngxDirective client_body_in_single_buffer
syn keyword ngxDirective client_body_temp_path
syn keyword ngxDirective client_body_timeout
syn keyword ngxDirective client_header_buffer_size
syn keyword ngxDirective client_header_timeout
syn keyword ngxDirective client_max_body_size
syn keyword ngxDirective connection_pool_size
syn keyword ngxDirective create_full_put_path
syn keyword ngxDirective daemon
syn keyword ngxDirective dav_access
syn keyword ngxDirective dav_methods
syn keyword ngxDirective debug_connection
syn keyword ngxDirective debug_points
syn keyword ngxDirective default_type
syn keyword ngxDirective degradation
syn keyword ngxDirective degrade
syn keyword ngxDirective deny
syn keyword ngxDirective devpoll_changes
syn keyword ngxDirective devpoll_events
syn keyword ngxDirective directio
syn keyword ngxDirective directio_alignment
syn keyword ngxDirective disable_symlinks
syn keyword ngxDirective empty_gif
syn keyword ngxDirective env
syn keyword ngxDirective epoll_events
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
syn keyword ngxDirective fastcgi_buffers
syn keyword ngxDirective fastcgi_busy_buffers_size
syn keyword ngxDirective fastcgi_cache
syn keyword ngxDirective fastcgi_cache_bypass
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
syn keyword ngxDirective fastcgi_cache_purge
syn keyword ngxDirective fastcgi_cache_revalidate
syn keyword ngxDirective fastcgi_cache_use_stale
syn keyword ngxDirective fastcgi_cache_valid
syn keyword ngxDirective fastcgi_catch_stderr
syn keyword ngxDirective fastcgi_connect_timeout
syn keyword ngxDirective fastcgi_force_ranges
syn keyword ngxDirective fastcgi_hide_header
syn keyword ngxDirective fastcgi_ignore_client_abort
syn keyword ngxDirective fastcgi_ignore_headers
syn keyword ngxDirective fastcgi_index
syn keyword ngxDirective fastcgi_intercept_errors
syn keyword ngxDirective fastcgi_keep_conn
syn keyword ngxDirective fastcgi_limit_rate
syn keyword ngxDirective fastcgi_max_temp_file_size
syn keyword ngxDirective fastcgi_next_upstream
syn keyword ngxDirective fastcgi_next_upstream_timeout
syn keyword ngxDirective fastcgi_next_upstream_tries
syn keyword ngxDirective fastcgi_no_cache
syn keyword ngxDirective fastcgi_param
syn keyword ngxDirective fastcgi_pass_header
syn keyword ngxDirective fastcgi_pass_request_body
syn keyword ngxDirective fastcgi_pass_request_headers
syn keyword ngxDirective fastcgi_read_timeout
syn keyword ngxDirective fastcgi_request_buffering
syn keyword ngxDirective fastcgi_send_lowat
syn keyword ngxDirective fastcgi_send_timeout
syn keyword ngxDirective fastcgi_split_path_info
syn keyword ngxDirective fastcgi_store
syn keyword ngxDirective fastcgi_store_access
syn keyword ngxDirective fastcgi_temp_file_write_size
syn keyword ngxDirective fastcgi_temp_path
syn keyword ngxDirective flv
syn keyword ngxDirective geoip_city
syn keyword ngxDirective geoip_country
syn keyword ngxDirective geoip_org
syn keyword ngxDirective geoip_proxy
syn keyword ngxDirective geoip_proxy_recursive
syn keyword ngxDirective google_perftools_profiles
syn keyword ngxDirective gunzip
syn keyword ngxDirective gunzip_buffers
syn keyword ngxDirective gzip
syn keyword ngxDirective gzip_buffers
syn keyword ngxDirective gzip_comp_level
syn keyword ngxDirective gzip_disable
syn keyword ngxDirective gzip_hash
syn keyword ngxDirective gzip_http_version
syn keyword ngxDirective gzip_min_length
syn keyword ngxDirective gzip_no_buffer
syn keyword ngxDirective gzip_proxied
syn keyword ngxDirective gzip_static
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_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
syn keyword ngxDirective image_filter_buffer
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_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
syn keyword ngxDirective keepalive_requests
syn keyword ngxDirective keepalive_timeout
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 nextgroup=ngxStatusCode skipwhite skipempty
syn keyword ngxDirective limit_conn_zone
syn keyword ngxDirective limit_rate
syn keyword ngxDirective limit_rate_after
syn keyword ngxDirective limit_req
syn keyword ngxDirective limit_req_log_level
syn keyword ngxDirective limit_req_status nextgroup=ngxStatusCode skipwhite skipempty
syn keyword ngxDirective limit_req_zone
syn keyword ngxDirective lingering_close
syn keyword ngxDirective lingering_time
syn keyword ngxDirective lingering_timeout
syn keyword ngxDirective load_module
syn keyword ngxDirective lock_file
syn keyword ngxDirective log_format
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
syn keyword ngxDirective memcached_next_upstream_tries
syn keyword ngxDirective memcached_read_timeout
syn keyword ngxDirective memcached_send_timeout
syn keyword ngxDirective merge_slashes
syn keyword ngxDirective min_delete_depth
syn keyword ngxDirective modern_browser
syn keyword ngxDirective modern_browser_value
syn keyword ngxDirective mp4
syn keyword ngxDirective mp4_buffer_size
syn keyword ngxDirective mp4_max_buffer_size
syn keyword ngxDirective mp4_limit_rate
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
syn keyword ngxDirective open_file_cache_min_uses
syn keyword ngxDirective open_file_cache_valid
syn keyword ngxDirective open_log_file_cache
syn keyword ngxDirective output_buffers
syn keyword ngxDirective override_charset
syn keyword ngxDirective pcre_jit
syn keyword ngxDirective perl
syn keyword ngxDirective perl_modules
syn keyword ngxDirective perl_require
syn keyword ngxDirective perl_set
syn keyword ngxDirective pid
syn keyword ngxDirective pop3_auth
syn keyword ngxDirective pop3_capabilities
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 skipempty
syn keyword ngxMailProtocol imap pop3 smtp contained
syn keyword ngxDirective proxy
syn keyword ngxDirective proxy_bind
syn keyword ngxDirective proxy_buffer
syn keyword ngxDirective proxy_buffer_size
syn keyword ngxDirective proxy_buffering
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 nextgroup=ngxStatusCodes skipwhite skipempty
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
syn keyword ngxDirective proxy_hide_header
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
syn keyword ngxDirective proxy_next_upstream_timeout
syn keyword ngxDirective proxy_next_upstream_tries
syn keyword ngxDirective proxy_no_cache
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_password_file
syn keyword ngxDirective proxy_ssl_protocols nextgroup=ngxSSLProtocol skipwhite skipempty
syn keyword ngxDirective proxy_ssl_server_name
syn keyword ngxDirective proxy_ssl_session_reuse
syn keyword ngxDirective proxy_ssl_trusted_certificate
syn keyword ngxDirective proxy_ssl_verify
syn keyword ngxDirective proxy_ssl_verify_depth
syn keyword ngxDirective proxy_store
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
syn keyword ngxDirective real_ip_recursive
syn keyword ngxDirective recursive_error_pages
syn keyword ngxDirective referer_hash_bucket_size
syn keyword ngxDirective referer_hash_max_size
syn keyword ngxDirective request_pool_size
syn keyword ngxDirective reset_timedout_connection
syn keyword ngxDirective resolver
syn keyword ngxDirective resolver_timeout
syn keyword ngxDirective rewrite_log
syn keyword ngxDirective rtsig_overflow_events
syn keyword ngxDirective rtsig_overflow_test
syn keyword ngxDirective rtsig_overflow_threshold
syn keyword ngxDirective rtsig_signo
syn keyword ngxDirective satisfy
syn keyword ngxDirective scgi_bind
syn keyword ngxDirective scgi_buffer_size
syn keyword ngxDirective scgi_buffering
syn keyword ngxDirective scgi_buffers
syn keyword ngxDirective scgi_busy_buffers_size
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
syn keyword ngxDirective scgi_connect_timeout
syn keyword ngxDirective scgi_force_ranges
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
syn keyword ngxDirective scgi_next_upstream_tries
syn keyword ngxDirective scgi_no_cache
syn keyword ngxDirective scgi_param
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
syn keyword ngxDirective scgi_temp_file_write_size
syn keyword ngxDirective scgi_temp_path
syn keyword ngxDirective secure_link
syn keyword ngxDirective secure_link_md5
syn keyword ngxDirective secure_link_secret
syn keyword ngxDirective send_lowat
syn keyword ngxDirective send_timeout
syn keyword ngxDirective sendfile
syn keyword ngxDirective sendfile_max_chunk
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
syn keyword ngxDirective ssi_min_file_chunk
syn keyword ngxDirective ssi_silent_errors
syn keyword ngxDirective ssi_types
syn keyword ngxDirective ssi_value_length
syn keyword ngxDirective ssl
syn keyword ngxDirective ssl_buffer_size
syn keyword ngxDirective ssl_certificate
syn keyword ngxDirective ssl_certificate_key
syn keyword ngxDirective ssl_ciphers
syn keyword ngxDirective ssl_client_certificate
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_preread
syn keyword ngxDirective ssl_protocols nextgroup=ngxSSLProtocol skipwhite skipempty
syn keyword ngxSSLProtocol SSLv2 SSLv3 TLSv1 TLSv1.1 TLSv1.2 contained nextgroup=ngxSSLProtocol skipwhite skipempty
syn keyword ngxDirective ssl_session_cache
syn keyword ngxDirective ssl_session_ticket_key
syn keyword ngxDirective ssl_session_tickets
syn keyword ngxDirective ssl_session_timeout
syn keyword ngxDirective ssl_stapling
syn keyword ngxDirective ssl_stapling_file
syn keyword ngxDirective ssl_stapling_responder
syn keyword ngxDirective ssl_stapling_verify
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
syn keyword ngxDirective sub_filter_once
syn keyword ngxDirective sub_filter_types
syn keyword ngxDirective tcp_nodelay
syn keyword ngxDirective tcp_nopush
syn keyword ngxDirective thread_pool
syn keyword ngxDirective thread_stack_size
syn keyword ngxDirective timeout
syn keyword ngxDirective timer_resolution
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
syn keyword ngxDirective userid_domain
syn keyword ngxDirective userid_expires
syn keyword ngxDirective userid_mark
syn keyword ngxDirective userid_name
syn keyword ngxDirective userid_p3p
syn keyword ngxDirective userid_path
syn keyword ngxDirective userid_service
syn keyword ngxDirective uwsgi_bind
syn keyword ngxDirective uwsgi_buffer_size
syn keyword ngxDirective uwsgi_buffering
syn keyword ngxDirective uwsgi_buffers
syn keyword ngxDirective uwsgi_busy_buffers_size
syn keyword ngxDirective uwsgi_cache
syn keyword ngxDirective uwsgi_cache_bypass
syn keyword ngxDirective uwsgi_cache_key
syn keyword ngxDirective uwsgi_cache_lock
syn keyword ngxDirective uwsgi_cache_lock_age
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
syn keyword ngxDirective uwsgi_connect_timeout
syn keyword ngxDirective uwsgi_force_ranges
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
syn keyword ngxDirective uwsgi_next_upstream
syn keyword ngxDirective uwsgi_next_upstream_timeout
syn keyword ngxDirective uwsgi_next_upstream_tries
syn keyword ngxDirective uwsgi_no_cache
syn keyword ngxDirective uwsgi_param
syn keyword ngxDirective uwsgi_pass
syn keyword ngxDirective uwsgi_pass_header
syn keyword ngxDirective uwsgi_pass_request_body
syn keyword ngxDirective uwsgi_pass_request_headers
syn keyword ngxDirective uwsgi_read_timeout
syn keyword ngxDirective uwsgi_request_buffering
syn keyword ngxDirective uwsgi_send_timeout
syn keyword ngxDirective uwsgi_ssl_certificate
syn keyword ngxDirective uwsgi_ssl_certificate_key
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 nextgroup=ngxSSLProtocol skipwhite skipempty
syn keyword ngxDirective uwsgi_ssl_server_name
syn keyword ngxDirective uwsgi_ssl_session_reuse
syn keyword ngxDirective uwsgi_ssl_trusted_certificate
syn keyword ngxDirective uwsgi_ssl_verify
syn keyword ngxDirective uwsgi_ssl_verify_depth
syn keyword ngxDirective uwsgi_store
syn keyword ngxDirective uwsgi_store_access
syn keyword ngxDirective uwsgi_string
syn keyword ngxDirective uwsgi_temp_file_write_size
syn keyword ngxDirective uwsgi_temp_path
syn keyword ngxDirective valid_referers
syn keyword ngxDirective variables_hash_bucket_size
syn keyword ngxDirective variables_hash_max_size
syn keyword ngxDirective worker_aio_requests
syn keyword ngxDirective worker_connections
syn keyword ngxDirective worker_cpu_affinity
syn keyword ngxDirective worker_priority
syn keyword ngxDirective worker_processes
syn keyword ngxDirective worker_rlimit_core
syn keyword ngxDirective worker_rlimit_nofile
syn keyword ngxDirective worker_rlimit_sigpending
syn keyword ngxDirective worker_threads
syn keyword ngxDirective working_directory
syn keyword ngxDirective xclient
syn keyword ngxDirective xml_entities
syn keyword ngxDirective xslt_last_modified
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 ngxStatusCode Number
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
hi link ngxListenOptions Keyword
hi link ngxMailProtocol Keyword
hi link ngxSSLProtocol Keyword
hi link ngxThirdPartyKeyword keyword
let b:current_syntax = "nginx"
endif

View File

@@ -145,8 +145,8 @@ endif
if get(g:, 'vim_markdown_math', 0)
syn include @tex syntax/tex.vim
syn region mkdMath start="\\\@<!\$" end="\$" contains=@tex keepend
syn region mkdMath start="\\\@<!\$\$" end="\$\$" contains=@tex keepend
syn region mkdMath start="\\\@<!\$" end="\$" skip="\\\$" contains=@tex keepend
syn region mkdMath start="\\\@<!\$\$" end="\$\$" skip="\\\$" contains=@tex keepend
endif
syn cluster mkdNonListItem contains=@htmlTop,htmlItalic,htmlBold,htmlBoldItalic,mkdFootnotes,mkdInlineURL,mkdLink,mkdLinkDef,mkdLineBreak,mkdBlockquote,mkdCode,mkdRule,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6,mkdMath

View File

@@ -1,8 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Accept Language Module <https://www.nginx.com/resources/wiki/modules/accept_language/>
" Parses the Accept-Language header and gives the most suitable locale from a list of supported locales.
syn keyword ngxDirectiveThirdParty set_from_accept_language
endif

View File

@@ -1,11 +0,0 @@
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 ngxDirectiveDeprecated accesskey
syn keyword ngxDirectiveDeprecated accesskey_arg
syn keyword ngxDirectiveDeprecated accesskey_hashmethod
syn keyword ngxDirectiveDeprecated accesskey_signature
endif

View File

@@ -1,42 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Asynchronous FastCGI Module <https://github.com/rsms/afcgi>
" Primarily a modified version of the Nginx FastCGI module which implements multiplexing of connections, allowing a single FastCGI server to handle many concurrent requests.
" syn keyword ngxDirectiveThirdParty fastcgi_bind
" syn keyword ngxDirectiveThirdParty fastcgi_buffer_size
" syn keyword ngxDirectiveThirdParty fastcgi_buffers
" syn keyword ngxDirectiveThirdParty fastcgi_busy_buffers_size
" syn keyword ngxDirectiveThirdParty fastcgi_cache
" syn keyword ngxDirectiveThirdParty fastcgi_cache_key
" syn keyword ngxDirectiveThirdParty fastcgi_cache_methods
" syn keyword ngxDirectiveThirdParty fastcgi_cache_min_uses
" syn keyword ngxDirectiveThirdParty fastcgi_cache_path
" syn keyword ngxDirectiveThirdParty fastcgi_cache_use_stale
" syn keyword ngxDirectiveThirdParty fastcgi_cache_valid
" syn keyword ngxDirectiveThirdParty fastcgi_catch_stderr
" syn keyword ngxDirectiveThirdParty fastcgi_connect_timeout
" syn keyword ngxDirectiveThirdParty fastcgi_hide_header
" syn keyword ngxDirectiveThirdParty fastcgi_ignore_client_abort
" syn keyword ngxDirectiveThirdParty fastcgi_ignore_headers
" syn keyword ngxDirectiveThirdParty fastcgi_index
" syn keyword ngxDirectiveThirdParty fastcgi_intercept_errors
" syn keyword ngxDirectiveThirdParty fastcgi_max_temp_file_size
" syn keyword ngxDirectiveThirdParty fastcgi_next_upstream
" syn keyword ngxDirectiveThirdParty fastcgi_param
" syn keyword ngxDirectiveThirdParty fastcgi_pass
" syn keyword ngxDirectiveThirdParty fastcgi_pass_header
" syn keyword ngxDirectiveThirdParty fastcgi_pass_request_body
" syn keyword ngxDirectiveThirdParty fastcgi_pass_request_headers
" syn keyword ngxDirectiveThirdParty fastcgi_read_timeout
" syn keyword ngxDirectiveThirdParty fastcgi_send_lowat
" syn keyword ngxDirectiveThirdParty fastcgi_send_timeout
" syn keyword ngxDirectiveThirdParty fastcgi_split_path_info
" syn keyword ngxDirectiveThirdParty fastcgi_store
" syn keyword ngxDirectiveThirdParty fastcgi_store_access
" syn keyword ngxDirectiveThirdParty fastcgi_temp_file_write_size
" syn keyword ngxDirectiveThirdParty fastcgi_temp_path
syn keyword ngxDirectiveDeprecated fastcgi_upstream_fail_timeout
syn keyword ngxDirectiveDeprecated fastcgi_upstream_max_fails
endif

View File

@@ -1,10 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Akamai G2O Module <https://github.com/kaltura/nginx_mod_akamai_g2o>
" Nginx Module for Authenticating Akamai G2O requests
syn keyword ngxDirectiveThirdParty g2o
syn keyword ngxDirectiveThirdParty g2o_nonce
syn keyword ngxDirectiveThirdParty g2o_key
endif

View File

@@ -1,8 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Lua Module <https://github.com/alacner/nginx_lua_module>
" You can be very simple to execute lua code for nginx
syn keyword ngxDirectiveThirdParty lua_file
endif

View File

@@ -1,11 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Array Variable Module <https://github.com/openresty/array-var-nginx-module>
" Add support for array-typed variables to nginx config files
syn keyword ngxDirectiveThirdParty array_split
syn keyword ngxDirectiveThirdParty array_join
syn keyword ngxDirectiveThirdParty array_map
syn keyword ngxDirectiveThirdParty array_map_op
endif

View File

@@ -1,11 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Nginx Audio Track for HTTP Live Streaming <https://github.com/flavioribeiro/nginx-audio-track-for-hls-module>
" This nginx module generates audio track for hls streams on the fly.
syn keyword ngxDirectiveThirdParty ngx_hls_audio_track
syn keyword ngxDirectiveThirdParty ngx_hls_audio_track_rootpath
syn keyword ngxDirectiveThirdParty ngx_hls_audio_track_output_format
syn keyword ngxDirectiveThirdParty ngx_hls_audio_track_output_header
endif

View File

@@ -1,13 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" AWS Proxy Module <https://github.com/anomalizer/ngx_aws_auth>
" Nginx module to proxy to authenticated AWS services
syn keyword ngxDirectiveThirdParty aws_access_key
syn keyword ngxDirectiveThirdParty aws_key_scope
syn keyword ngxDirectiveThirdParty aws_signing_key
syn keyword ngxDirectiveThirdParty aws_endpoint
syn keyword ngxDirectiveThirdParty aws_s3_bucket
syn keyword ngxDirectiveThirdParty aws_sign
endif

View File

@@ -1,9 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Backtrace module <https://github.com/alibaba/nginx-backtrace>
" A Nginx module to dump backtrace when a worker process exits abnormally
syn keyword ngxDirectiveThirdParty backtrace_log
syn keyword ngxDirectiveThirdParty backtrace_max_stack_size
endif

View File

@@ -1,14 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Brotli Module <https://github.com/google/ngx_brotli>
" Nginx module for Brotli compression
syn keyword ngxDirectiveThirdParty brotli_static
syn keyword ngxDirectiveThirdParty brotli
syn keyword ngxDirectiveThirdParty brotli_types
syn keyword ngxDirectiveThirdParty brotli_buffers
syn keyword ngxDirectiveThirdParty brotli_comp_level
syn keyword ngxDirectiveThirdParty brotli_window
syn keyword ngxDirectiveThirdParty brotli_min_length
endif

View File

@@ -1,11 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Cache Purge Module <https://github.com/FRiCKLE/ngx_cache_purge>
" 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

View File

@@ -1,11 +0,0 @@
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 ngxDirectiveDeprecated chunkin
syn keyword ngxDirectiveDeprecated chunkin_keepalive
syn keyword ngxDirectiveDeprecated chunkin_max_chunks_per_buf
syn keyword ngxDirectiveDeprecated chunkin_resume
endif

View File

@@ -1,11 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Circle GIF Module <https://github.com/evanmiller/nginx_circle_gif>
" Generates simple circle images with the colors and size specified in the URL.
syn keyword ngxDirectiveThirdParty circle_gif
syn keyword ngxDirectiveThirdParty circle_gif_max_radius
syn keyword ngxDirectiveThirdParty circle_gif_min_radius
syn keyword ngxDirectiveThirdParty circle_gif_step_radius
endif

View File

@@ -1,39 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" 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
syn keyword ngxDirectiveThirdParty jvm_classpath
syn keyword ngxDirectiveThirdParty jvm_classpath_check
syn keyword ngxDirectiveThirdParty jvm_workers
syn keyword ngxDirectiveThirdParty jvm_options
syn keyword ngxDirectiveThirdParty jvm_handler_type
syn keyword ngxDirectiveThirdParty jvm_init_handler_name
syn keyword ngxDirectiveThirdParty jvm_init_handler_code
syn keyword ngxDirectiveThirdParty jvm_exit_handler_name
syn keyword ngxDirectiveThirdParty jvm_exit_handler_code
syn keyword ngxDirectiveThirdParty handlers_lazy_init
syn keyword ngxDirectiveThirdParty auto_upgrade_ws
syn keyword ngxDirectiveThirdParty content_handler_type
syn keyword ngxDirectiveThirdParty content_handler_name
syn keyword ngxDirectiveThirdParty content_handler_code
syn keyword ngxDirectiveThirdParty rewrite_handler_type
syn keyword ngxDirectiveThirdParty rewrite_handler_name
syn keyword ngxDirectiveThirdParty rewrite_handler_code
syn keyword ngxDirectiveThirdParty access_handler_type
syn keyword ngxDirectiveThirdParty access_handler_name
syn keyword ngxDirectiveThirdParty access_handler_code
syn keyword ngxDirectiveThirdParty header_filter_type
syn keyword ngxDirectiveThirdParty header_filter_name
syn keyword ngxDirectiveThirdParty header_filter_code
syn keyword ngxDirectiveThirdParty content_handler_property
syn keyword ngxDirectiveThirdParty rewrite_handler_property
syn keyword ngxDirectiveThirdParty access_handler_property
syn keyword ngxDirectiveThirdParty header_filter_property
syn keyword ngxDirectiveThirdParty always_read_body
syn keyword ngxDirectiveThirdParty shared_map
syn keyword ngxDirectiveThirdParty write_page_size
endif

View File

@@ -1,8 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Upstream Consistent Hash <https://www.nginx.com/resources/wiki/modules/consistent_hash/>
" A load balancer that uses an internal consistent hash ring to select the right backend node.
syn keyword ngxDirectiveThirdParty consistent_hash
endif

View File

@@ -1,10 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Nginx Development Kit <https://github.com/simpl/ngx_devel_kit>
" The NDK is an Nginx module that is designed to extend the core functionality of the excellent Nginx webserver in a way that can be used as a basis of other Nginx modules.
" NDK_UPSTREAM_LIST
" This submodule provides a directive that creates a list of upstreams, with optional weighting. This list can then be used by other modules to hash over the upstreams however they choose.
syn keyword ngxDirectiveThirdParty upstream_list
endif

View File

@@ -1,18 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" 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_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_buffer_size
syn keyword ngxDirectiveThirdParty drizzle_module_header
syn keyword ngxDirectiveThirdParty drizzle_status
endif

View File

@@ -1,8 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Dynamic ETags Module <https://github.com/kali/nginx-dynamic-etags>
" Attempt at handling ETag / If-None-Match on proxied content.
syn keyword ngxDirectiveThirdParty dynamic_etags
endif

View File

@@ -1,25 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" 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_duplicate
syn keyword ngxDirectiveThirdParty echo_flush
syn keyword ngxDirectiveThirdParty echo_sleep
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

View File

@@ -1,12 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Encrypted Session Module <https://github.com/openresty/encrypted-session-nginx-module>
" Encrypt and decrypt nginx variable values
syn keyword ngxDirectiveThirdParty encrypted_session_key
syn keyword ngxDirectiveThirdParty encrypted_session_iv
syn keyword ngxDirectiveThirdParty encrypted_session_expires
syn keyword ngxDirectiveThirdParty set_encrypt_session
syn keyword ngxDirectiveThirdParty set_decrypt_session
endif

View File

@@ -1,19 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Enhanced Memcached Module <https://github.com/bpaquet/ngx_http_enhanced_memcached_module>
" This module is based on the standard Nginx Memcached module, with some additonal features
syn keyword ngxDirectiveThirdParty enhanced_memcached_pass
syn keyword ngxDirectiveThirdParty enhanced_memcached_hash_keys_with_md5
syn keyword ngxDirectiveThirdParty enhanced_memcached_allow_put
syn keyword ngxDirectiveThirdParty enhanced_memcached_allow_delete
syn keyword ngxDirectiveThirdParty enhanced_memcached_stats
syn keyword ngxDirectiveThirdParty enhanced_memcached_flush
syn keyword ngxDirectiveThirdParty enhanced_memcached_flush_namespace
syn keyword ngxDirectiveThirdParty enhanced_memcached_bind
syn keyword ngxDirectiveThirdParty enhanced_memcached_connect_timeout
syn keyword ngxDirectiveThirdParty enhanced_memcached_send_timeout
syn keyword ngxDirectiveThirdParty enhanced_memcached_buffer_size
syn keyword ngxDirectiveThirdParty enhanced_memcached_read_timeout
endif

View File

@@ -1,9 +0,0 @@
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 ngxDirectiveDeprecated on_start
syn keyword ngxDirectiveDeprecated on_stop
endif

View File

@@ -1,10 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" EY Balancer Module <https://github.com/ezmobius/nginx-ey-balancer>
" Adds a request queue to Nginx that allows the limiting of concurrent requests passed to the upstream.
syn keyword ngxDirectiveThirdParty max_connections
syn keyword ngxDirectiveThirdParty max_connections_max_queue_length
syn keyword ngxDirectiveThirdParty max_connections_queue_timeout
endif

View File

@@ -1,9 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Upstream Fair Balancer <https://www.nginx.com/resources/wiki/modules/fair_balancer/>
" Sends an incoming request to the least-busy backend server, rather than distributing requests round-robin.
syn keyword ngxDirectiveThirdParty fair
syn keyword ngxDirectiveThirdParty upstream_fair_shm_size
endif

View File

@@ -1,20 +0,0 @@
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_time_format
endif

View File

@@ -1,12 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Form Auth Module <https://github.com/veruu/ngx_form_auth>
" Provides authentication and authorization with credentials submitted via POST request
syn keyword ngxDirectiveThirdParty form_auth
syn keyword ngxDirectiveThirdParty form_auth_pam_service
syn keyword ngxDirectiveThirdParty form_auth_login
syn keyword ngxDirectiveThirdParty form_auth_password
syn keyword ngxDirectiveThirdParty form_auth_remote_user
endif

View File

@@ -1,9 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Form Input Module <https://github.com/calio/form-input-nginx-module>
" Reads HTTP POST and PUT request body encoded in "application/x-www-form-urlencoded" and parses the arguments into nginx variables.
syn keyword ngxDirectiveThirdParty set_form_input
syn keyword ngxDirectiveThirdParty set_form_input_multi
endif

View File

@@ -1,8 +0,0 @@
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 ngxDirectiveDeprecated geoip_country_file
endif

View File

@@ -1,49 +0,0 @@
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 nextgroup=ngxThirdPartyGeoIP2Database skipwhite skipempty
syn match ngxThirdPartyGeoIP2Database /\S\+/ contained nextgroup=ngxThirdPartyGeoIP2Block skipwhite skipempty
syn region ngxThirdPartyGeoIP2Block start=/{/ end=/}/ contained contains=ngxThirdPartyGeoIP2Keyword,ngxVariable
syn keyword ngxThirdPartyGeoIP2Keyword de en es fr ja pt-BR ru zh-CN contained
syn match ngxThirdPartyGeoIP2Keyword /pt-BR|zh-CN/ contained
syn keyword ngxThirdPartyGeoIP2Keyword default source contained
" Common Keys
syn keyword ngxThirdPartyGeoIP2Keyword code confidence geoname_id names iso_code contained
" /Common Keys
syn keyword ngxThirdPartyGeoIP2Keyword city contained
syn keyword ngxThirdPartyGeoIP2Keyword continent contained
syn keyword ngxThirdPartyGeoIP2Keyword country contained
syn keyword ngxThirdPartyGeoIP2Keyword location contained
" Location Keys
syn keyword ngxThirdPartyGeoIP2Keyword accuracy_radius contained
syn keyword ngxThirdPartyGeoIP2Keyword average_income contained
syn keyword ngxThirdPartyGeoIP2Keyword latitude contained
syn keyword ngxThirdPartyGeoIP2Keyword longitude contained
syn keyword ngxThirdPartyGeoIP2Keyword metro_code contained
syn keyword ngxThirdPartyGeoIP2Keyword population_density contained
syn keyword ngxThirdPartyGeoIP2Keyword time_zone contained
syn keyword ngxThirdPartyGeoIP2Keyword postal contained
" /Location Keys
syn keyword ngxThirdPartyGeoIP2Keyword registered_country contained
syn keyword ngxThirdPartyGeoIP2Keyword represented_country contained
" Represented Country Keys
syn keyword ngxThirdPartyGeoIP2Keyword type contained
" /Represented Country Keys
syn keyword ngxThirdPartyGeoIP2Keyword subdivisions contained
syn keyword ngxThirdPartyGeoIP2Keyword traits contained
" Traits Keys
syn keyword ngxThirdPartyGeoIP2Keyword autonomous_system_number contained
syn keyword ngxThirdPartyGeoIP2Keyword autonomous_system_organization contained
syn keyword ngxThirdPartyGeoIP2Keyword domain contained
syn keyword ngxThirdPartyGeoIP2Keyword ip_address contained
syn keyword ngxThirdPartyGeoIP2Keyword is_anonymous_proxy contained
syn keyword ngxThirdPartyGeoIP2Keyword is_satellite_provider contained
syn keyword ngxThirdPartyGeoIP2Keyword isp contained
syn keyword ngxThirdPartyGeoIP2Keyword organization contained
syn keyword ngxThirdPartyGeoIP2Keyword user_type contained
" /Traits Keys
hi link ngxThirdPartyGeoIP2Keyword ngxThirdPartyKeyword
endif

View File

@@ -1,8 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" GridFS Module <https://github.com/mdirolf/nginx-gridfs>
" Nginx module for serving files from MongoDB's GridFS
syn keyword ngxDirectiveThirdParty gridfs
endif

View File

@@ -1,11 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Headers More Module <https://github.com/openresty/headers-more-nginx-module>
" Set and clear input and output headers...more than "add"!
syn keyword ngxDirectiveThirdParty more_clear_headers
syn keyword ngxDirectiveThirdParty more_clear_input_headers
syn keyword ngxDirectiveThirdParty more_set_headers
syn keyword ngxDirectiveThirdParty more_set_input_headers
endif

View File

@@ -1,15 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Health Checks Upstreams Module <https://www.nginx.com/resources/wiki/modules/healthcheck/>
" Polls backends and if they respond with HTTP 200 + an optional request body, they are marked good. Otherwise, they are marked bad.
syn keyword ngxDirectiveThirdParty healthcheck_enabled
syn keyword ngxDirectiveThirdParty healthcheck_delay
syn keyword ngxDirectiveThirdParty healthcheck_timeout
syn keyword ngxDirectiveThirdParty healthcheck_failcount
syn keyword ngxDirectiveThirdParty healthcheck_send
syn keyword ngxDirectiveThirdParty healthcheck_expected
syn keyword ngxDirectiveThirdParty healthcheck_buffer
syn keyword ngxDirectiveThirdParty healthcheck_status
endif

View File

@@ -1,12 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" HTTP Accounting Module <https://github.com/Lax/ngx_http_accounting_module>
" Add traffic stat function to nginx. Useful for http accounting based on nginx configuration logic
syn keyword ngxDirectiveThirdParty http_accounting
syn keyword ngxDirectiveThirdParty http_accounting_log
syn keyword ngxDirectiveThirdParty http_accounting_id
syn keyword ngxDirectiveThirdParty http_accounting_interval
syn keyword ngxDirectiveThirdParty http_accounting_perturb
endif

View File

@@ -1,13 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Nginx Digest Authentication module <https://github.com/atomx/nginx-http-auth-digest>
" Digest Authentication for Nginx
syn keyword ngxDirectiveThirdParty auth_digest
syn keyword ngxDirectiveThirdParty auth_digest_user_file
syn keyword ngxDirectiveThirdParty auth_digest_timeout
syn keyword ngxDirectiveThirdParty auth_digest_expires
syn keyword ngxDirectiveThirdParty auth_digest_replays
syn keyword ngxDirectiveThirdParty auth_digest_shm_size
endif

View File

@@ -1,9 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Auth PAM Module <https://github.com/sto/ngx_http_auth_pam_module>
" HTTP Basic Authentication using PAM.
syn keyword ngxDirectiveThirdParty auth_pam
syn keyword ngxDirectiveThirdParty auth_pam_service_name
endif

View File

@@ -1,9 +0,0 @@
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
endif

View File

@@ -1,13 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" HTTP Concatenation module for Nginx <https://github.com/alibaba/nginx-http-concat>
" A Nginx module for concatenating files in a given context: CSS and JS files usually
syn keyword ngxDirectiveThirdParty concat
syn keyword ngxDirectiveThirdParty concat_types
syn keyword ngxDirectiveThirdParty concat_unique
syn keyword ngxDirectiveThirdParty concat_max_files
syn keyword ngxDirectiveThirdParty concat_delimiter
syn keyword ngxDirectiveThirdParty concat_ignore_file_error
endif

View File

@@ -1,12 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" HTTP Dynamic Upstream Module <https://github.com/yzprofile/ngx_http_dyups_module>
" Update upstreams' config by restful interface
syn keyword ngxDirectiveThirdParty dyups_interface
syn keyword ngxDirectiveThirdParty dyups_read_msg_timeout
syn keyword ngxDirectiveThirdParty dyups_shm_zone_size
syn keyword ngxDirectiveThirdParty dyups_upstream_conf
syn keyword ngxDirectiveThirdParty dyups_trylock
endif

View File

@@ -1,8 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" HTTP Footer If Filter Module <https://github.com/flygoast/ngx_http_footer_if_filter>
" The ngx_http_footer_if_filter_module is used to add given content to the end of the response according to the condition specified.
syn keyword ngxDirectiveThirdParty footer_if
endif

View File

@@ -1,9 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" HTTP Footer Filter Module <https://github.com/alibaba/nginx-http-footer-filter>
" This module implements a body filter that adds a given string to the page footer.
syn keyword ngxDirectiveThirdParty footer
syn keyword ngxDirectiveThirdParty footer_types
endif

View File

@@ -1,9 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" HTTP Internal Redirect Module <https://github.com/flygoast/ngx_http_internal_redirect>
" Make an internal redirect to the uri specified according to the condition specified.
syn keyword ngxDirectiveThirdParty internal_redirect_if
syn keyword ngxDirectiveThirdParty internal_redirect_if_no_postponed
endif

View File

@@ -1,15 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" HTTP JavaScript Module <https://github.com/peter-leonov/ngx_http_js_module>
" Embedding SpiderMonkey. Nearly full port on Perl module.
syn keyword ngxDirectiveThirdParty js
syn keyword ngxDirectiveThirdParty js_filter
syn keyword ngxDirectiveThirdParty js_filter_types
syn keyword ngxDirectiveThirdParty js_load
syn keyword ngxDirectiveThirdParty js_maxmem
syn keyword ngxDirectiveThirdParty js_require
syn keyword ngxDirectiveThirdParty js_set
syn keyword ngxDirectiveThirdParty js_utf8
endif

View File

@@ -1,12 +0,0 @@
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 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

View File

@@ -1,14 +0,0 @@
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.
syn keyword ngxDirectiveThirdParty redis_bind
syn keyword ngxDirectiveThirdParty redis_buffer_size
syn keyword ngxDirectiveThirdParty redis_connect_timeout
syn keyword ngxDirectiveThirdParty redis_next_upstream
syn keyword ngxDirectiveThirdParty redis_pass
syn keyword ngxDirectiveThirdParty redis_read_timeout
syn keyword ngxDirectiveThirdParty redis_send_timeout
endif

View File

@@ -1,10 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Iconv Module <https://github.com/calio/iconv-nginx-module>
" A character conversion nginx module using libiconv
syn keyword ngxDirectiveThirdParty set_iconv
syn keyword ngxDirectiveThirdParty iconv_buffer_size
syn keyword ngxDirectiveThirdParty iconv_filter
endif

View File

@@ -1,8 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" IP Blocker Module <https://github.com/tmthrgd/nginx-ip-blocker>
" An efficient shared memory IP blocking system for nginx.
syn keyword ngxDirectiveThirdParty ip_blocker
endif

View File

@@ -1,8 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" IP2Location Module <https://github.com/chrislim2888/ip2location-nginx>
" Allows user to lookup for geolocation information using IP2Location database
syn keyword ngxDirectiveThirdParty ip2location_database
endif

View File

@@ -1,11 +0,0 @@
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

View File

@@ -1,9 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Limit Upload Rate Module <https://github.com/cfsego/limit_upload_rate>
" Limit client-upload rate when they are sending request bodies to you
syn keyword ngxDirectiveThirdParty limit_upload_rate
syn keyword ngxDirectiveThirdParty limit_upload_rate_after
endif

View File

@@ -1,10 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Limit Upstream Module <https://github.com/cfsego/nginx-limit-upstream>
" Limit the number of connections to upstream for NGINX
syn keyword ngxDirectiveThirdParty limit_upstream_zone
syn keyword ngxDirectiveThirdParty limit_upstream_conn
syn keyword ngxDirectiveThirdParty limit_upstream_log_level
endif

View File

@@ -1,8 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Log If Module <https://github.com/cfsego/ngx_log_if>
" Conditional accesslog for nginx
syn keyword ngxDirectiveThirdParty access_log_bypass_if
endif

View File

@@ -1,9 +0,0 @@
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 ngxDirectiveDeprecated log_request_speed_filter
syn keyword ngxDirectiveDeprecated log_request_speed_filter_timeout
endif

View File

@@ -1,11 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Log ZeroMQ Module <https://github.com/alticelabs/nginx-log-zmq>
" ZeroMQ logger module for nginx
syn keyword ngxDirectiveThirdParty log_zmq_server
syn keyword ngxDirectiveThirdParty log_zmq_endpoint
syn keyword ngxDirectiveThirdParty log_zmq_format
syn keyword ngxDirectiveThirdParty log_zmq_off
endif

View File

@@ -1,9 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Lower/UpperCase Module <https://github.com/replay/ngx_http_lower_upper_case>
" This module simply uppercases or lowercases a string and saves it into a new variable.
syn keyword ngxDirectiveThirdParty lower
syn keyword ngxDirectiveThirdParty upper
endif

View File

@@ -1,7 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Lua Upstream Module <https://github.com/openresty/lua-upstream-nginx-module>
" Nginx C module to expose Lua API to ngx_lua for Nginx upstreams
endif

View File

@@ -1,71 +0,0 @@
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
syn keyword ngxDirectiveThirdParty lua_package_path
syn keyword ngxDirectiveThirdParty lua_package_cpath
syn keyword ngxDirectiveThirdParty init_by_lua
syn keyword ngxDirectiveThirdParty init_by_lua_block
syn keyword ngxDirectiveThirdParty init_by_lua_file
syn keyword ngxDirectiveThirdParty init_worker_by_lua
syn keyword ngxDirectiveThirdParty init_worker_by_lua_block
syn keyword ngxDirectiveThirdParty init_worker_by_lua_file
syn keyword ngxDirectiveThirdParty set_by_lua
syn keyword ngxDirectiveThirdParty set_by_lua_block
syn keyword ngxDirectiveThirdParty set_by_lua_file
syn keyword ngxDirectiveThirdParty content_by_lua
syn keyword ngxDirectiveThirdParty content_by_lua_block
syn keyword ngxDirectiveThirdParty content_by_lua_file
syn keyword ngxDirectiveThirdParty rewrite_by_lua
syn keyword ngxDirectiveThirdParty rewrite_by_lua_block
syn keyword ngxDirectiveThirdParty rewrite_by_lua_file
syn keyword ngxDirectiveThirdParty access_by_lua
syn keyword ngxDirectiveThirdParty access_by_lua_block
syn keyword ngxDirectiveThirdParty access_by_lua_file
syn keyword ngxDirectiveThirdParty header_filter_by_lua
syn keyword ngxDirectiveThirdParty header_filter_by_lua_block
syn keyword ngxDirectiveThirdParty header_filter_by_lua_file
syn keyword ngxDirectiveThirdParty body_filter_by_lua
syn keyword ngxDirectiveThirdParty body_filter_by_lua_block
syn keyword ngxDirectiveThirdParty body_filter_by_lua_file
syn keyword ngxDirectiveThirdParty log_by_lua
syn keyword ngxDirectiveThirdParty log_by_lua_block
syn keyword ngxDirectiveThirdParty log_by_lua_file
syn keyword ngxDirectiveThirdParty balancer_by_lua_block
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
syn keyword ngxDirectiveThirdParty lua_socket_send_lowat
syn keyword ngxDirectiveThirdParty lua_socket_read_timeout
syn keyword ngxDirectiveThirdParty lua_socket_buffer_size
syn keyword ngxDirectiveThirdParty lua_socket_pool_size
syn keyword ngxDirectiveThirdParty lua_socket_keepalive_timeout
syn keyword ngxDirectiveThirdParty lua_socket_log_errors
syn keyword ngxDirectiveThirdParty lua_ssl_ciphers
syn keyword ngxDirectiveThirdParty lua_ssl_crl
syn keyword ngxDirectiveThirdParty lua_ssl_protocols
syn keyword ngxDirectiveThirdParty lua_ssl_trusted_certificate
syn keyword ngxDirectiveThirdParty lua_ssl_verify_depth
syn keyword ngxDirectiveThirdParty lua_http10_buffering
syn keyword ngxDirectiveThirdParty rewrite_by_lua_no_postpone
syn keyword ngxDirectiveThirdParty access_by_lua_no_postpone
syn keyword ngxDirectiveThirdParty lua_transform_underscores_in_response_headers
syn keyword ngxDirectiveThirdParty lua_check_client_abort
syn keyword ngxDirectiveThirdParty lua_max_pending_timers
syn keyword ngxDirectiveThirdParty lua_max_running_timers
endif

View File

@@ -1,8 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" MD5 Filter Module <https://github.com/kainswor/nginx_md5_filter>
" A content filter for nginx, which returns the md5 hash of the content otherwise returned.
syn keyword ngxDirectiveThirdParty md5_filter
endif

View File

@@ -1,17 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Memc Module <https://github.com/openresty/memc-nginx-module>
" An extended version of the standard memcached module that supports set, add, delete, and many more memcached commands.
syn keyword ngxDirectiveThirdParty memc_buffer_size
syn keyword ngxDirectiveThirdParty memc_cmds_allowed
syn keyword ngxDirectiveThirdParty memc_connect_timeout
syn keyword ngxDirectiveThirdParty memc_flags_to_last_modified
syn keyword ngxDirectiveThirdParty memc_next_upstream
syn keyword ngxDirectiveThirdParty memc_pass
syn keyword ngxDirectiveThirdParty memc_read_timeout
syn keyword ngxDirectiveThirdParty memc_send_timeout
syn keyword ngxDirectiveThirdParty memc_upstream_fail_timeout
syn keyword ngxDirectiveThirdParty memc_upstream_max_fails
endif

View File

@@ -1,11 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Mod Security Module <https://github.com/SpiderLabs/ModSecurity>
" ModSecurity is an open source, cross platform web application firewall (WAF) engine
syn keyword ngxDirectiveThirdParty ModSecurityConfig
syn keyword ngxDirectiveThirdParty ModSecurityEnabled
syn keyword ngxDirectiveThirdParty pool_context
syn keyword ngxDirectiveThirdParty pool_context_hash_size
endif

View File

@@ -1,16 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Mogilefs Module <http://www.grid.net.ru/nginx/mogilefs.en.html>
" MogileFS client for nginx web server.
syn keyword ngxDirectiveThirdParty mogilefs_pass
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

View File

@@ -1,20 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" Mongo Module <https://github.com/simpl/ngx_mongo>
" Upstream module that allows nginx to communicate directly with MongoDB database.
syn keyword ngxDirectiveThirdParty mongo_auth
syn keyword ngxDirectiveThirdParty mongo_pass
syn keyword ngxDirectiveThirdParty mongo_query
syn keyword ngxDirectiveThirdParty mongo_json
syn keyword ngxDirectiveThirdParty mongo_bind
syn keyword ngxDirectiveThirdParty mongo_connect_timeout
syn keyword ngxDirectiveThirdParty mongo_send_timeout
syn keyword ngxDirectiveThirdParty mongo_read_timeout
syn keyword ngxDirectiveThirdParty mongo_buffering
syn keyword ngxDirectiveThirdParty mongo_buffer_size
syn keyword ngxDirectiveThirdParty mongo_buffers
syn keyword ngxDirectiveThirdParty mongo_busy_buffers_size
syn keyword ngxDirectiveThirdParty mongo_next_upstream
endif

View File

@@ -1,8 +0,0 @@
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
endif

View File

@@ -1,16 +0,0 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1
" NAXSI Module <https://github.com/nbs-system/naxsi>
" NAXSI is an open-source, high performance, low rules maintenance WAF for NGINX
syn keyword ngxDirectiveThirdParty DeniedUrl denied_url
syn keyword ngxDirectiveThirdParty LearningMode learning_mode
syn keyword ngxDirectiveThirdParty SecRulesEnabled rules_enabled
syn keyword ngxDirectiveThirdParty SecRulesDisabled rules_disabled
syn keyword ngxDirectiveThirdParty CheckRule check_rule
syn keyword ngxDirectiveThirdParty BasicRule basic_rule
syn keyword ngxDirectiveThirdParty MainRule main_rule
syn keyword ngxDirectiveThirdParty LibInjectionSql libinjection_sql
syn keyword ngxDirectiveThirdParty LibInjectionXss libinjection_xss
endif

Some files were not shown because too many files have changed in this diff Show More