mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 19:43:52 -05:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5a65ffe66d | ||
|
|
b9dae8fbab | ||
|
|
84593f2d7f | ||
|
|
22f6f3b6d3 |
@@ -1,4 +1,4 @@
|
||||
# vim-polyglot [![Build Status][travis-img-url]][travis-url]
|
||||
# vim-polyglot [![Build Status][travis-img-url]][travis-url] []()
|
||||
|
||||
[travis-img-url]: https://travis-ci.org/sheerun/vim-polyglot.svg
|
||||
[travis-url]: https://travis-ci.org/sheerun/vim-polyglot
|
||||
@@ -65,8 +65,9 @@ Optionally download one of the [releases](https://github.com/sheerun/vim-polyglo
|
||||
- [latex](https://github.com/LaTeX-Box-Team/LaTeX-Box) (syntax, indent, ftplugin)
|
||||
- [less](https://github.com/groenewege/vim-less) (syntax, indent, ftplugin, ftdetect)
|
||||
- [liquid](https://github.com/tpope/vim-liquid) (syntax, indent, ftplugin, ftdetect)
|
||||
- [mako](https://github.com/sophacles/vim-bundle-mako) (syntax, indent, ftplugin, ftdetect)
|
||||
- [markdown](https://github.com/tpope/vim-markdown) (syntax, ftplugin, ftdetect)
|
||||
- [nginx](https://github.com/nginx/nginx) (syntax, indent, ftdetect)
|
||||
- [nginx](https://github.com/othree/nginx-contrib-vim) (syntax, indent, ftdetect)
|
||||
- [nim](https://github.com/zah/nim.vim) (syntax, compiler, indent, ftdetect)
|
||||
- [nix](https://github.com/spwhitt/vim-nix) (syntax, ftplugin, ftdetect)
|
||||
- [objc](https://github.com/b4winckler/vim-objc) (ftplugin, syntax, indent)
|
||||
|
||||
3
build
3
build
@@ -136,8 +136,9 @@ PACKS="
|
||||
latex:LaTeX-Box-Team/LaTeX-Box
|
||||
less:groenewege/vim-less
|
||||
liquid:tpope/vim-liquid
|
||||
mako:sophacles/vim-bundle-mako
|
||||
markdown:tpope/vim-markdown
|
||||
nginx:nginx/nginx::/contrib/vim/
|
||||
nginx:othree/nginx-contrib-vim
|
||||
nim:zah/nim.vim:_BASIC
|
||||
nix:spwhitt/vim-nix
|
||||
objc:b4winckler/vim-objc
|
||||
|
||||
@@ -270,6 +270,10 @@ au BufNewFile,BufRead */templates/**.liquid,*/layout/**.liquid,*/snippets/**.liq
|
||||
\ let b:liquid_subtype = 'html' |
|
||||
\ set ft=liquid |
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mako') == -1
|
||||
|
||||
au BufRead,BufNewFile *.mako set filetype=mako
|
||||
endif
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'markdown') == -1
|
||||
|
||||
autocmd BufNewFile,BufRead *.markdown,*.md,*.mdown,*.mkd,*.mkdn
|
||||
|
||||
15
ftplugin/mako.vim
Normal file
15
ftplugin/mako.vim
Normal file
@@ -0,0 +1,15 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mako') == -1
|
||||
|
||||
" Vim filetype plugin file
|
||||
" Language: Mako
|
||||
" Maintainer: Randy Stauner <randy@magnificent-tears.com>
|
||||
" Last Change: 2014-02-07
|
||||
" Version: 0.1
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal comments=:##
|
||||
setlocal commentstring=##%s
|
||||
|
||||
endif
|
||||
@@ -319,7 +319,10 @@ function! GetHaskellIndent()
|
||||
" foo
|
||||
" >>{
|
||||
if l:line =~ '^\s*{' && l:prevline !~ '^{'
|
||||
return match(l:prevline, '\S') + &shiftwidth
|
||||
let l:s = match(l:prevline, '\S')
|
||||
if l:s >= 0
|
||||
return l:s + &shiftwidth
|
||||
endif
|
||||
endif
|
||||
|
||||
" in foo
|
||||
|
||||
358
indent/mako.vim
Normal file
358
indent/mako.vim
Normal file
@@ -0,0 +1,358 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mako') == -1
|
||||
|
||||
" Vim indent file
|
||||
" Language: Mako
|
||||
" Author: Scott Torborg <storborg@mit.edu>
|
||||
" Version: 0.4
|
||||
" License: Do What The Fuck You Want To Public License (WTFPL)
|
||||
"
|
||||
" ---------------------------------------------------------------------------
|
||||
"
|
||||
" DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
" Version 2, December 2004
|
||||
"
|
||||
" Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
"
|
||||
" Everyone is permitted to copy and distribute verbatim or modified
|
||||
" copies of this license document, and changing it is allowed as long
|
||||
" as the name is changed.
|
||||
"
|
||||
" DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
" TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
"
|
||||
" 0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||
"
|
||||
" ---------------------------------------------------------------------------
|
||||
"
|
||||
" This script does more useful indenting for Mako HTML templates. It indents
|
||||
" inside of control blocks, defs, etc. Note that this indenting style will
|
||||
" sacrifice readability of the output text for the sake of readability of the
|
||||
" template.
|
||||
"
|
||||
" We'll use HTML indenting globally, python inside <% %> blocks. Inspired by
|
||||
" the excellent PHP + HTML indentation files such as php.vim by Pim Snel.
|
||||
"
|
||||
" Changelog:
|
||||
" 0.4 - 5 March 2010
|
||||
" - Added license information
|
||||
" 0.3 - 15 September 2009
|
||||
" - Added explicit indenting for ## comments, fixed unindenting count,
|
||||
" thanks to Mike Lewis (@MikeRLewis) for this
|
||||
" 0.2 - 15 June 2009
|
||||
" - Fixed issue where opening and closing mako tags on the same line
|
||||
" would cause incorrect indenting
|
||||
" 0.1 - 06 June 2009
|
||||
" - Initial public release of mako indent file
|
||||
|
||||
let sw=2 " default shiftwidth of 2 spaces
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal nosmartindent
|
||||
setlocal noautoindent
|
||||
setlocal nocindent
|
||||
setlocal nolisp
|
||||
|
||||
setlocal indentexpr=GetMakoIndent()
|
||||
setlocal indentkeys+=*<Return>,<>>,<bs>,end,:
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetMakoIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
if exists('g:html_indent_tags')
|
||||
unlet g:html_indent_tags
|
||||
endif
|
||||
|
||||
function IsInsidePythonBlock(startline)
|
||||
" Loop until we get a line that's either <% or %>
|
||||
let lnum = a:startline
|
||||
while getline(lnum) !~ '\(%>\|<%\)$' && lnum > 0
|
||||
let lnum = lnum - 1
|
||||
endwhile
|
||||
|
||||
" lnum points to the last control. If it's a <% then we're inside an
|
||||
" embedded python block, otherwise we're not.
|
||||
return getline(lnum) =~ '<%$'
|
||||
endfunction
|
||||
|
||||
function GetMakoIndent()
|
||||
" Find a non-empty line above the current line
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
" Hit the start of the file, use zero indent.
|
||||
if lnum == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let line = getline(lnum) " last line
|
||||
let cline = getline(v:lnum) " current line
|
||||
let pline = getline(lnum - 1) " previous to last line
|
||||
let ind = indent(lnum)
|
||||
if line =~ '^\s*##'
|
||||
return indent(lnum)
|
||||
end
|
||||
|
||||
let restore_ic=&ic
|
||||
let &ic=1 " ignore case
|
||||
|
||||
let ind = <SID>HtmlIndentSum(lnum, -1)
|
||||
let ind = <SID>HtmlIndentSum(lnum, -1)
|
||||
let ind = ind + <SID>HtmlIndentSum(v:lnum, 0)
|
||||
|
||||
let &ic=restore_ic
|
||||
|
||||
let ind = indent(lnum) + (&sw * ind)
|
||||
|
||||
" Indent after %anything: or <%anything NOT ending in />
|
||||
if line =~ '^\s*%.*:\s*$'
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
|
||||
" Unindent before %end* or </%anything
|
||||
if cline =~ '^\s*%\s*end'
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
"
|
||||
" Unindent before %else, %except, and %elif
|
||||
if cline =~ '^\s*%\s*else' || cline =~ '^\s*%\s*except' || cline =~ '^\s*%\s*elif'
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
|
||||
" Indent at the beginning of a python control block
|
||||
if line =~ '<%$'
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
"
|
||||
" Unindent at the end of the python block.
|
||||
if cline =~ '^\s*%>$'
|
||||
let scanlnum = lnum
|
||||
" Scan backwards until we find the beginning of this python block.
|
||||
while getline(scanlnum) !~ '<%$' && scanlnum > 0
|
||||
let scanlnum = scanlnum - 1
|
||||
endwhile
|
||||
let ind = indent(scanlnum)
|
||||
endif
|
||||
|
||||
" If we're inside a python block and the previous line ends in a colon,
|
||||
" indent.
|
||||
if IsInsidePythonBlock(lnum - 1)
|
||||
" Indent after :
|
||||
if line =~ '\:$'
|
||||
let ind = ind + &sw
|
||||
endif
|
||||
endif
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
|
||||
|
||||
" [-- helper function to assemble tag list --]
|
||||
fun! <SID>HtmlIndentPush(tag)
|
||||
if exists('g:html_indent_tags')
|
||||
let g:html_indent_tags = g:html_indent_tags.'\|'.a:tag
|
||||
else
|
||||
let g:html_indent_tags = a:tag
|
||||
endif
|
||||
endfun
|
||||
|
||||
fun! <SID>MakoIndentPush(tag)
|
||||
if exists('g:mako_indent_tags')
|
||||
let g:mako_indent_tags = g:mako_indent_tags.'\|'.a:tag
|
||||
else
|
||||
let g:mako_indent_tags = a:tag
|
||||
endif
|
||||
endfun
|
||||
|
||||
" [-- <ELEMENT ? - - ...> --]
|
||||
call <SID>HtmlIndentPush('a')
|
||||
call <SID>HtmlIndentPush('abbr')
|
||||
call <SID>HtmlIndentPush('acronym')
|
||||
call <SID>HtmlIndentPush('address')
|
||||
call <SID>HtmlIndentPush('b')
|
||||
call <SID>HtmlIndentPush('bdo')
|
||||
call <SID>HtmlIndentPush('big')
|
||||
call <SID>HtmlIndentPush('blockquote')
|
||||
call <SID>HtmlIndentPush('button')
|
||||
call <SID>HtmlIndentPush('caption')
|
||||
call <SID>HtmlIndentPush('center')
|
||||
call <SID>HtmlIndentPush('cite')
|
||||
call <SID>HtmlIndentPush('code')
|
||||
call <SID>HtmlIndentPush('colgroup')
|
||||
call <SID>HtmlIndentPush('del')
|
||||
call <SID>HtmlIndentPush('dfn')
|
||||
call <SID>HtmlIndentPush('dir')
|
||||
call <SID>HtmlIndentPush('div')
|
||||
call <SID>HtmlIndentPush('dl')
|
||||
call <SID>HtmlIndentPush('em')
|
||||
call <SID>HtmlIndentPush('fieldset')
|
||||
call <SID>HtmlIndentPush('font')
|
||||
call <SID>HtmlIndentPush('form')
|
||||
call <SID>HtmlIndentPush('frameset')
|
||||
call <SID>HtmlIndentPush('h1')
|
||||
call <SID>HtmlIndentPush('h2')
|
||||
call <SID>HtmlIndentPush('h3')
|
||||
call <SID>HtmlIndentPush('h4')
|
||||
call <SID>HtmlIndentPush('h5')
|
||||
call <SID>HtmlIndentPush('h6')
|
||||
call <SID>HtmlIndentPush('i')
|
||||
call <SID>HtmlIndentPush('iframe')
|
||||
call <SID>HtmlIndentPush('ins')
|
||||
call <SID>HtmlIndentPush('kbd')
|
||||
call <SID>HtmlIndentPush('label')
|
||||
call <SID>HtmlIndentPush('legend')
|
||||
call <SID>HtmlIndentPush('map')
|
||||
call <SID>HtmlIndentPush('menu')
|
||||
call <SID>HtmlIndentPush('noframes')
|
||||
call <SID>HtmlIndentPush('noscript')
|
||||
call <SID>HtmlIndentPush('object')
|
||||
call <SID>HtmlIndentPush('ol')
|
||||
call <SID>HtmlIndentPush('optgroup')
|
||||
call <SID>HtmlIndentPush('pre')
|
||||
call <SID>HtmlIndentPush('q')
|
||||
call <SID>HtmlIndentPush('s')
|
||||
call <SID>HtmlIndentPush('samp')
|
||||
call <SID>HtmlIndentPush('script')
|
||||
call <SID>HtmlIndentPush('select')
|
||||
call <SID>HtmlIndentPush('small')
|
||||
call <SID>HtmlIndentPush('span')
|
||||
call <SID>HtmlIndentPush('strong')
|
||||
call <SID>HtmlIndentPush('style')
|
||||
call <SID>HtmlIndentPush('sub')
|
||||
call <SID>HtmlIndentPush('sup')
|
||||
call <SID>HtmlIndentPush('table')
|
||||
call <SID>HtmlIndentPush('textarea')
|
||||
call <SID>HtmlIndentPush('title')
|
||||
call <SID>HtmlIndentPush('tt')
|
||||
call <SID>HtmlIndentPush('u')
|
||||
call <SID>HtmlIndentPush('ul')
|
||||
call <SID>HtmlIndentPush('var')
|
||||
|
||||
" For some reason the default HTML indentation script doesn't consider these
|
||||
" elements to be worthy of indentation.
|
||||
call <SID>HtmlIndentPush('p')
|
||||
call <SID>HtmlIndentPush('dt')
|
||||
call <SID>HtmlIndentPush('dd')
|
||||
|
||||
|
||||
" [-- <ELEMENT ? O O ...> --]
|
||||
if !exists('g:html_indent_strict')
|
||||
call <SID>HtmlIndentPush('body')
|
||||
call <SID>HtmlIndentPush('head')
|
||||
call <SID>HtmlIndentPush('html')
|
||||
call <SID>HtmlIndentPush('tbody')
|
||||
endif
|
||||
|
||||
|
||||
" [-- <ELEMENT ? O - ...> --]
|
||||
if !exists('g:html_indent_strict_table')
|
||||
call <SID>HtmlIndentPush('th')
|
||||
call <SID>HtmlIndentPush('td')
|
||||
call <SID>HtmlIndentPush('tr')
|
||||
call <SID>HtmlIndentPush('tfoot')
|
||||
call <SID>HtmlIndentPush('thead')
|
||||
endif
|
||||
|
||||
" [-- <Mako Elements> --]
|
||||
call <SID>MakoIndentPush('%def')
|
||||
call <SID>MakoIndentPush('%block')
|
||||
call <SID>MakoIndentPush('%call')
|
||||
call <SID>MakoIndentPush('%doc')
|
||||
call <SID>MakoIndentPush('%text')
|
||||
call <SID>MakoIndentPush('%.\+:.\+')
|
||||
|
||||
delfun <SID>HtmlIndentPush
|
||||
delfun <SID>MakoIndentPush
|
||||
|
||||
set cpo-=C
|
||||
|
||||
" [-- get number of regex matches in a string --]
|
||||
fun! <SID>MatchCount(expr, pat)
|
||||
let mpos = 0
|
||||
let mcount = 0
|
||||
let expr = a:expr
|
||||
while (mpos > -1)
|
||||
let mend = matchend(expr, a:pat)
|
||||
if mend > -1
|
||||
let mcount = mcount + 1
|
||||
endif
|
||||
if mend == mpos
|
||||
let mpos = mpos + 1
|
||||
else
|
||||
let mpos = mend
|
||||
endif
|
||||
let expr = strpart(expr, mpos)
|
||||
endwhile
|
||||
return mcount
|
||||
endfun
|
||||
|
||||
" [-- count indent-increasing tags of line a:lnum --]
|
||||
fun! <SID>HtmlIndentOpen(lnum)
|
||||
let s = substitute('x'.getline(a:lnum),
|
||||
\ '.\{-}\(\(<\)\('.g:html_indent_tags.'\)\>\)', "\1", 'g')
|
||||
let s = substitute(s, "[^\1].*$", '', '')
|
||||
return strlen(s)
|
||||
endfun
|
||||
|
||||
" [-- count indent-decreasing tags of line a:lnum --]
|
||||
fun! <SID>HtmlIndentClose(lnum)
|
||||
let s = substitute('x'.getline(a:lnum),
|
||||
\ '.\{-}\(\(<\)/\('.g:html_indent_tags.'\)\>>\)', "\1", 'g')
|
||||
let s = substitute(s, "[^\1].*$", '', '')
|
||||
return strlen(s)
|
||||
endfun
|
||||
|
||||
" [-- count indent-increasing mako tags of line a:lnum --]
|
||||
fun! <SID>MakoIndentOpen(lnum)
|
||||
let s = substitute('x'.getline(a:lnum),
|
||||
\ '.\{-}\(\(<\)\('.g:mako_indent_tags.'\)\>\)', "\1", 'g')
|
||||
let s = substitute(s, "[^\1].*$", '', '')
|
||||
return strlen(s)
|
||||
endfun
|
||||
|
||||
" [-- count indent-decreasing mako tags of line a:lnum --]
|
||||
fun! <SID>MakoIndentClose(lnum)
|
||||
let mcount = <SID>MatchCount(getline(a:lnum), '</\('.g:mako_indent_tags.'\)>')
|
||||
let mcount = mcount + <SID>MatchCount(getline(a:lnum), '<\('.g:mako_indent_tags.'\)[^>]*/>')
|
||||
return mcount
|
||||
endfun
|
||||
|
||||
" [-- count indent-increasing '{' of (java|css) line a:lnum --]
|
||||
fun! <SID>HtmlIndentOpenAlt(lnum)
|
||||
return strlen(substitute(getline(a:lnum), '[^{]\+', '', 'g'))
|
||||
endfun
|
||||
|
||||
" [-- count indent-decreasing '}' of (java|css) line a:lnum --]
|
||||
fun! <SID>HtmlIndentCloseAlt(lnum)
|
||||
return strlen(substitute(getline(a:lnum), '[^}]\+', '', 'g'))
|
||||
endfun
|
||||
|
||||
" [-- return the sum of indents respecting the syntax of a:lnum --]
|
||||
fun! <SID>HtmlIndentSum(lnum, style)
|
||||
let open = <SID>HtmlIndentOpen(a:lnum) + <SID>MakoIndentOpen(a:lnum)
|
||||
let close = <SID>HtmlIndentClose(a:lnum) + <SID>MakoIndentClose(a:lnum)
|
||||
if a:style == match(getline(a:lnum), '^\s*</')
|
||||
if a:style == match(getline(a:lnum), '^\s*</\('.g:html_indent_tags.'\|'.g:mako_indent_tags.'\)')
|
||||
if 0 != open || 0 != close
|
||||
return open - close
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if '' != &syntax &&
|
||||
\ synIDattr(synID(a:lnum, 1, 1), 'name') =~ '\(css\|java\).*' &&
|
||||
\ synIDattr(synID(a:lnum, strlen(getline(a:lnum)) - 1, 1), 'name')
|
||||
\ =~ '\(css\|java\).*'
|
||||
if a:style == match(getline(a:lnum), '^\s*}')
|
||||
return <SID>HtmlIndentOpenAlt(a:lnum) - <SID>HtmlIndentCloseAlt(a:lnum)
|
||||
endif
|
||||
endif
|
||||
return 0
|
||||
endfun
|
||||
|
||||
" vim: set ts=4 sw=4:
|
||||
|
||||
endif
|
||||
@@ -42,7 +42,7 @@ syn region cryString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=crySpecial
|
||||
syn region cryString start=+``+ skip=+\\\\\|\\"+ end=+``+ contains=hsSpecialChar
|
||||
syn match cryCharacter "[^a-zA-Z0-9_']'\([^\\]\|\\[^']\+\|\\'\)'"lc=1 contains=crySpecialChar,crySpecialCharError
|
||||
syn match cryCharacter "^'\([^\\]\|\\[^']\+\|\\'\)'" contains=crySpecialChar,crySpecialCharError
|
||||
syn match cryNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>"
|
||||
syn match cryNumber "\<[0-9]\+\>\|\<0[b][01]\+\>\|\<0[x][0-9a-fA-F]\+\>\|\<0[o][0-7]\+\>"
|
||||
|
||||
" Keyword definitions.
|
||||
|
||||
@@ -61,10 +61,12 @@ syn keyword cryPrimitive error parity lg2 pmod pdiv pmult format
|
||||
syn keyword cryPrimitive join split groupBy take drop min max negate reverse
|
||||
syn keyword cryPrimitive project tail width
|
||||
syn keyword cryPrimitive ASSERT
|
||||
syn keyword cryPrimitive module import private
|
||||
|
||||
" Comments
|
||||
syn match cryLineComment "//.*"
|
||||
syn region cryBlockComment start="/\*" end="\*/" contains=cryBlockComment
|
||||
syn keyword cryTodo contained TODO FIXME XXX
|
||||
syn match cryLineComment "//.*" contains=cryTodo
|
||||
syn region cryBlockComment start="/\*" end="\*/" contains=cryBlockComment,cryTodo
|
||||
|
||||
if !exists("cry_minlines")
|
||||
let cry_minlines = 50
|
||||
@@ -103,6 +105,7 @@ if version >= 508 || !exists("did_cry_syntax_inits")
|
||||
hi link cryBoolean Boolean
|
||||
hi link cryType Type
|
||||
hi link cryProp Keyword
|
||||
hi link cryTodo Todo
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
96
syntax/mako.vim
Normal file
96
syntax/mako.vim
Normal file
@@ -0,0 +1,96 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mako') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Mako
|
||||
" Maintainer: Armin Ronacher <armin.ronacher@active-4.com>
|
||||
" URL: http://lucumr.pocoo.org/
|
||||
" Last Change: 2013-05-01
|
||||
" Version: 0.6.1+
|
||||
"
|
||||
" Thanks to Brine Rue <brian@lolapps.com> who noticed a bug in the
|
||||
" delimiter handling.
|
||||
"
|
||||
" Known Limitations
|
||||
" the <%text> block does not have correct attributes
|
||||
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
if !exists("main_syntax")
|
||||
let main_syntax = "html"
|
||||
endif
|
||||
|
||||
"Source the html syntax file
|
||||
ru! syntax/html.vim
|
||||
unlet b:current_syntax
|
||||
|
||||
" tell html.vim what syntax groups should take precedence (see :help html.vim)
|
||||
syn cluster htmlPreproc add=makoLine,makoVariable,makoTag,makoDocComment,makoDefEnd,makoText,makoDelim,makoEnd,makoComment,makoEscape
|
||||
|
||||
"Put the python syntax file in @pythonTop
|
||||
syn include @pythonTop syntax/python.vim
|
||||
|
||||
" End keywords
|
||||
syn keyword makoEnd contained endfor endwhile endif endtry enddef
|
||||
|
||||
" Block rules
|
||||
syn region makoLine matchgroup=makoDelim start=#^\s*%# end=#$# keepend contains=@pythonTop,makoEnd
|
||||
syn region makoBlock matchgroup=makoDelim start=#<%!\?# end=#%># keepend contains=@pythonTop,makoEnd
|
||||
|
||||
" Variables
|
||||
syn region makoNested start="{" end="}" transparent display contained contains=makoNested,@pythonTop
|
||||
syn region makoVariable matchgroup=makoDelim start=#\${# end=#}# contains=makoNested,@pythonTop
|
||||
|
||||
" Comments
|
||||
syn region makoComment start="^\s*##" end="$"
|
||||
syn region makoDocComment matchgroup=makoDelim start="<%doc>" end="</%doc>" keepend
|
||||
|
||||
" Literal Blocks
|
||||
syn region makoText matchgroup=makoDelim start="<%text[^>]*>" end="</%text>"
|
||||
|
||||
" Attribute Sublexing
|
||||
syn match makoAttributeKey containedin=makoTag contained "[a-zA-Z_][a-zA-Z0-9_]*="
|
||||
syn region makoAttributeValue containedin=makoTag contained start=/"/ skip=/\\"/ end=/"/
|
||||
syn region makoAttributeValue containedin=MakoTag contained start=/'/ skip=/\\'/ end=/'/
|
||||
|
||||
" Tags
|
||||
syn region makoTag matchgroup=makoDelim start="<%\(def\|call\|page\|include\|namespace\|inherit\|block\|[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*\)\>" end="/\?>"
|
||||
syn match makoDelim "</%\(def\|call\|namespace\|block\|[a-zA-Z_][a-zA-Z0-9_]*:[a-zA-Z_][a-zA-Z0-9_]*\)>"
|
||||
|
||||
syn region makoJavaScript matchgroup=makoDelim start=+<%block .*js.*>+ keepend end=+</%block>+ contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc,makoLine,makoBlock,makoVariable
|
||||
syn region makoCssStyle matchgroup=makoDelim start=+<%block .*css.*>+ keepend end=+</%block>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc,makoLine,makoBlock,makoVariable
|
||||
|
||||
" Newline Escapes
|
||||
syn match makoEscape /\\$/
|
||||
|
||||
" Default highlighting links
|
||||
if version >= 508 || !exists("did_mako_syn_inits")
|
||||
if version < 508
|
||||
let did_mako_syn_inits = 1
|
||||
com -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
com -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink makoDocComment makoComment
|
||||
HiLink makoDefEnd makoDelim
|
||||
|
||||
HiLink makoAttributeKey Type
|
||||
HiLink makoAttributeValue String
|
||||
HiLink makoText Normal
|
||||
HiLink makoDelim Preproc
|
||||
HiLink makoEnd Keyword
|
||||
HiLink makoComment Comment
|
||||
HiLink makoEscape Special
|
||||
|
||||
delc HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "html"
|
||||
|
||||
endif
|
||||
@@ -83,7 +83,10 @@ syn region markdownLink matchgroup=markdownLinkDelimiter start="(" end=")" conta
|
||||
syn region markdownId matchgroup=markdownIdDelimiter start="\[" end="\]" keepend contained
|
||||
syn region markdownAutomaticLink matchgroup=markdownUrlDelimiter start="<\%(\w\+:\|[[:alnum:]_+-]\+@\)\@=" end=">" keepend oneline
|
||||
|
||||
let s:concealends = has('conceal') ? ' concealends' : ''
|
||||
let s:concealends = ''
|
||||
if has('conceal') && get(g:, 'markdown_syntax_conceal', 1) == 1
|
||||
let s:concealends = ' concealends'
|
||||
endif
|
||||
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=\*\|\*\S\@=" end="\S\@<=\*\|\*\S\@=" keepend contains=markdownLineStart' . s:concealends
|
||||
exe 'syn region markdownItalic matchgroup=markdownItalicDelimiter start="\S\@<=_\|_\S\@=" end="\S\@<=_\|_\S\@=" keepend contains=markdownLineStart' . s:concealends
|
||||
exe 'syn region markdownBold matchgroup=markdownBoldDelimiter start="\S\@<=\*\*\|\*\*\S\@=" end="\S\@<=\*\*\|\*\*\S\@=" keepend contains=markdownLineStart,markdownItalic' . s:concealends
|
||||
|
||||
141
syntax/nginx.vim
141
syntax/nginx.vim
@@ -12,28 +12,32 @@ setlocal iskeyword+=/
|
||||
setlocal iskeyword+=:
|
||||
|
||||
syn match ngxVariable '\$\(\w\+\|{\w\+}\)'
|
||||
syn match ngxVariableBlock '\$\(\w\+\|{\w\+}\)' contained
|
||||
syn match ngxVariableString '\$\(\w\+\|{\w\+}\)' contained
|
||||
syn region ngxBlock start=+^+ end=+{+ skip=+\${+ contains=ngxComment,ngxDirectiveBlock,ngxVariableBlock,ngxString oneline
|
||||
syn region ngxString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString
|
||||
syn match ngxComment ' *#.*$'
|
||||
syn match ngxRewriteURI /\S\+/ contained contains=ngxVariableString nextgroup=ngxURI skipwhite
|
||||
syn match ngxURI /\S\+/ contained contains=ngxVariableString skipwhite
|
||||
syn match ngxLocationPath /[^ {]\+/ contained
|
||||
syn region ngxString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString
|
||||
|
||||
syn keyword ngxBoolean on
|
||||
syn keyword ngxBoolean off
|
||||
|
||||
syn keyword ngxDirectiveBlock http contained
|
||||
syn keyword ngxDirectiveBlock mail contained
|
||||
syn keyword ngxDirectiveBlock events contained
|
||||
syn keyword ngxDirectiveBlock server contained
|
||||
syn keyword ngxDirectiveBlock types contained
|
||||
syn keyword ngxDirectiveBlock location contained
|
||||
syn keyword ngxDirectiveBlock upstream contained
|
||||
syn keyword ngxDirectiveBlock charset_map contained
|
||||
syn keyword ngxDirectiveBlock limit_except contained
|
||||
syn keyword ngxDirectiveBlock if contained
|
||||
syn keyword ngxDirectiveBlock geo contained
|
||||
syn keyword ngxDirectiveBlock map contained
|
||||
syn keyword ngxDirectiveBlock split_clients contained
|
||||
|
||||
syn keyword ngxDirectiveBlock http
|
||||
syn keyword ngxDirectiveBlock mail
|
||||
syn keyword ngxDirectiveBlock events
|
||||
syn keyword ngxDirectiveBlock server
|
||||
syn keyword ngxDirectiveBlock types
|
||||
syn match ngxLocationOperator /\(=\|\~\*\|\^\~\|\~\)/ contained nextgroup=ngxLocationPath,ngxString skipwhite
|
||||
syn match ngxLocationNamedLoc /@\w\+/
|
||||
syn keyword ngxDirectiveBlock location nextgroup=ngxLocationNamedLoc,ngxLocationOperator,ngxLocationPath,ngxString skipwhite
|
||||
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
|
||||
@@ -50,16 +54,17 @@ syn keyword ngxDirectiveImportant try_files
|
||||
|
||||
syn keyword ngxDirectiveControl break
|
||||
syn keyword ngxDirectiveControl return
|
||||
syn keyword ngxDirectiveControl rewrite
|
||||
syn keyword ngxDirectiveControl rewrite nextgroup=ngxRewriteURI skipwhite
|
||||
syn keyword ngxDirectiveControl set
|
||||
|
||||
syn keyword ngxRewriteFlag last break redirect permanent
|
||||
|
||||
syn keyword ngxDirectiveError error_page
|
||||
syn keyword ngxDirectiveError post_action
|
||||
|
||||
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
|
||||
@@ -131,10 +136,12 @@ 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_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
|
||||
@@ -147,6 +154,7 @@ 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
|
||||
@@ -157,6 +165,7 @@ 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
|
||||
@@ -187,6 +196,7 @@ syn keyword ngxDirective gzip_types
|
||||
syn keyword ngxDirective gzip_vary
|
||||
syn keyword ngxDirective gzip_window
|
||||
syn keyword ngxDirective hash
|
||||
syn keyword ngxDirective http2 " Not a real directive
|
||||
syn keyword ngxDirective if_modified_since
|
||||
syn keyword ngxDirective ignore_invalid_headers
|
||||
syn keyword ngxDirective image_filter
|
||||
@@ -201,6 +211,8 @@ syn keyword ngxDirective imap_client_buffer
|
||||
syn keyword ngxDirective index
|
||||
syn keyword ngxDirective iocp_threads
|
||||
syn keyword ngxDirective ip_hash
|
||||
syn keyword ngxDirective js_run
|
||||
syn keyword ngxDirective js_set
|
||||
syn keyword ngxDirective keepalive
|
||||
syn keyword ngxDirective keepalive_disable
|
||||
syn keyword ngxDirective keepalive_requests
|
||||
@@ -246,9 +258,12 @@ 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 mysql_test
|
||||
syn keyword ngxDirective open_file_cache
|
||||
syn keyword ngxDirective open_file_cache_errors
|
||||
syn keyword ngxDirective open_file_cache_events
|
||||
@@ -269,7 +284,8 @@ syn keyword ngxDirective port_in_redirect
|
||||
syn keyword ngxDirective post_acceptex
|
||||
syn keyword ngxDirective postpone_gzipping
|
||||
syn keyword ngxDirective postpone_output
|
||||
syn keyword ngxDirective protocol
|
||||
syn keyword ngxDirective protocol nextgroup=ngxMailProtocol skipwhite
|
||||
syn keyword ngxMailProtocol imap pop3 smtp
|
||||
syn keyword ngxDirective proxy
|
||||
syn keyword ngxDirective proxy_bind
|
||||
syn keyword ngxDirective proxy_buffer
|
||||
@@ -473,6 +489,7 @@ 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
|
||||
@@ -494,14 +511,19 @@ 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
|
||||
syn keyword ngxDirective uwsgi_ssl_server_name
|
||||
syn keyword ngxDirective uwsgi_ssl_session_reuse
|
||||
@@ -553,6 +575,16 @@ syn keyword ngxDirectiveThirdParty accesskey_signature
|
||||
syn keyword ngxDirectiveThirdParty auth_pam
|
||||
syn keyword ngxDirectiveThirdParty auth_pam_service_name
|
||||
|
||||
" 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
|
||||
|
||||
" Cache Purge Module <http://labs.frickle.com/nginx_ngx_cache_purge/>
|
||||
" Module adding ability to purge content from FastCGI and proxy caches.
|
||||
syn keyword ngxDirectiveThirdParty fastcgi_cache_purge
|
||||
@@ -606,7 +638,7 @@ syn keyword ngxDirectiveThirdParty echo_subrequest
|
||||
syn keyword ngxDirectiveThirdParty echo_subrequest_async
|
||||
|
||||
" Events Module <http://docs.dutov.org/nginx_modules_events_en.html>
|
||||
" Provides options for start/stop events.
|
||||
" Privides options for start/stop events.
|
||||
syn keyword ngxDirectiveThirdParty on_start
|
||||
syn keyword ngxDirectiveThirdParty on_stop
|
||||
|
||||
@@ -671,6 +703,70 @@ syn keyword ngxDirectiveThirdParty js_utf8
|
||||
syn keyword ngxDirectiveThirdParty log_request_speed_filter
|
||||
syn keyword ngxDirectiveThirdParty log_request_speed_filter_timeout
|
||||
|
||||
|
||||
" 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_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 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
|
||||
|
||||
|
||||
" Memc Module <http://wiki.nginx.org/NginxHttpMemcModule>
|
||||
" An extended version of the standard memcached module that supports set, add, delete, and many more memcached commands.
|
||||
syn keyword ngxDirectiveThirdParty memc_buffer_size
|
||||
@@ -821,12 +917,13 @@ syn keyword ngxDirectiveThirdParty xss_output_type
|
||||
|
||||
hi link ngxComment Comment
|
||||
hi link ngxVariable Identifier
|
||||
hi link ngxVariableBlock Identifier
|
||||
hi link ngxVariableString PreProc
|
||||
hi link ngxBlock Normal
|
||||
hi link ngxString String
|
||||
hi link ngxLocationPath String
|
||||
hi link ngxLocationNamedLoc Identifier
|
||||
|
||||
hi link ngxBoolean Boolean
|
||||
hi link ngxRewriteFlag Boolean
|
||||
hi link ngxDirectiveBlock Statement
|
||||
hi link ngxDirectiveImportant Type
|
||||
hi link ngxDirectiveControl Keyword
|
||||
|
||||
@@ -64,9 +64,9 @@ syntax match swiftNumber "\v<\d+>"
|
||||
syntax match swiftNumber "\v<(\d+_+)+\d+(\.\d+(_+\d+)*)?>"
|
||||
syntax match swiftNumber "\v<\d+\.\d+>"
|
||||
syntax match swiftNumber "\v<\d*\.?\d+([Ee]-?)?\d+>"
|
||||
syntax match swiftNumber "\v<0x\x+([Pp]-?)?\x+>"
|
||||
syntax match swiftNumber "\v<0b[01]+>"
|
||||
syntax match swiftNumber "\v<0o\o+>"
|
||||
syntax match swiftNumber "\v<0x[[:xdigit:]_]+([Pp]-?)?\x+>"
|
||||
syntax match swiftNumber "\v<0b[01_]+>"
|
||||
syntax match swiftNumber "\v<0o[0-7_]+>"
|
||||
|
||||
" BOOLs
|
||||
syntax keyword swiftBoolean
|
||||
|
||||
Reference in New Issue
Block a user