mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Update
This commit is contained in:
@@ -166,7 +166,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [smt2](https://github.com/bohlender/vim-smt2) (syntax, autoload, ftplugin)
|
||||
- [solidity](https://github.com/tomlion/vim-solidity) (syntax, indent, ftplugin)
|
||||
- [stylus](https://github.com/wavded/vim-stylus) (syntax, indent, ftplugin)
|
||||
- [svelte](https://github.com/evanleck/vim-svelte) (syntax, indent, ftplugin)
|
||||
- [svelte](https://github.com/evanleck/vim-svelte) ()
|
||||
- [svg-indent](https://github.com/jasonshell/vim-svg-indent) (indent)
|
||||
- [svg](https://github.com/vim-scripts/svg.vim) (syntax)
|
||||
- [swift](https://github.com/keith/swift.vim) (syntax, indent, compiler, ftplugin, ctags)
|
||||
|
||||
@@ -1956,8 +1956,12 @@ fu! csv#CheckHeaderLine() "{{{3
|
||||
endfu
|
||||
fu! csv#AnalyzeColumn(...) "{{{3
|
||||
let maxcolnr = csv#MaxColumns()
|
||||
if len(a:000) == 1
|
||||
let topn = 5
|
||||
if len(a:000) > 0
|
||||
let colnr = a:1
|
||||
if len(a:000) == 2
|
||||
let topn = a:2
|
||||
endif
|
||||
else
|
||||
let colnr = csv#WColumn()
|
||||
endif
|
||||
@@ -1985,8 +1989,8 @@ fu! csv#AnalyzeColumn(...) "{{{3
|
||||
let max_items = reverse(sort(values(res), s:csv_numeric_sort ? 'n' : 'csv#CSVSortValues'))
|
||||
" What about the minimum 5 items?
|
||||
let count_items = keys(res)
|
||||
if len(max_items) > 5
|
||||
call remove(max_items, 5, -1)
|
||||
if len(max_items) > topn
|
||||
call remove(max_items, topn, -1)
|
||||
call map(max_items, 'printf(''\V%s\m'', escape(v:val, ''\\''))')
|
||||
call filter(res, 'v:val =~ ''^''.join(max_items, ''\|'').''$''')
|
||||
endif
|
||||
@@ -2311,8 +2315,8 @@ fu! csv#CommandDefinitions() "{{{3
|
||||
\ '-bang -nargs=? -range=%')
|
||||
call csv#LocalCmd("Filters", ':call csv#OutputFilters(<bang>0)',
|
||||
\ '-nargs=0 -bang')
|
||||
call csv#LocalCmd("Analyze", ':call csv#AnalyzeColumn(<args>)',
|
||||
\ '-nargs=?')
|
||||
call csv#LocalCmd("Analyze", ':call csv#AnalyzeColumn(<f-args>)',
|
||||
\ '-nargs=*' )
|
||||
call csv#LocalCmd("VertFold", ':call csv#Vertfold(<bang>0,<q-args>)',
|
||||
\ '-bang -nargs=? -range=% -complete=custom,csv#SortComplete')
|
||||
call csv#LocalCmd("CSVFixed", ':call csv#InitCSVFixedWidth()', '')
|
||||
|
||||
@@ -496,6 +496,10 @@ function! go#config#CodeCompletionEnabled() abort
|
||||
return get(g:, "go_code_completion_enabled", 1)
|
||||
endfunction
|
||||
|
||||
function! go#config#CodeCompletionIcase() abort
|
||||
return get(g:, "go_code_completion_icase", 0)
|
||||
endfunction
|
||||
|
||||
function! go#config#Updatetime() abort
|
||||
let go_updatetime = get(g:, 'go_updatetime', 800)
|
||||
return go_updatetime == 0 ? &updatetime : go_updatetime
|
||||
|
||||
@@ -55,6 +55,8 @@ function! terraform#commands(ArgLead, CmdLine, CursorPos) abort
|
||||
\ 'graph',
|
||||
\ 'import',
|
||||
\ 'init',
|
||||
\ 'login',
|
||||
\ 'logout',
|
||||
\ 'output',
|
||||
\ 'plan',
|
||||
\ 'providers',
|
||||
|
||||
@@ -131,6 +131,7 @@ let attributes_value = {
|
||||
\ 'label': ['Text', ''],
|
||||
\ 'lang': ['Lang Tag', ''],
|
||||
\ 'list': ['ID', ''],
|
||||
\ 'loading': ['eager/lazy', ''],
|
||||
\ 'loop': ['Bool', ''],
|
||||
\ 'low': ['Number', ''],
|
||||
\ 'manifest': ['URL', ''],
|
||||
@@ -588,11 +589,11 @@ let g:xmldata_html5 = {
|
||||
\ ],
|
||||
\ 'iframe': [
|
||||
\ [],
|
||||
\ extend(copy(global_attributes), {'src': [], 'srcdoc': [], 'name': [], 'width': [], 'height': [], 'sandbox': ['allow-same-origin', 'allow-forms', 'allow-scripts'], 'seamless': ['seamless', ''], 'referrerpolicy': referrerpolicy, 'allowfullscreen': [], 'allowpaymentrequest': [], 'allowpresentation': [], 'allowusermedia': []})
|
||||
\ extend(copy(global_attributes), {'src': [], 'srcdoc': [], 'name': [], 'width': [], 'height': [], 'sandbox': ['allow-same-origin', 'allow-forms', 'allow-scripts'], 'seamless': ['seamless', ''], 'referrerpolicy': referrerpolicy, 'allowfullscreen': [], 'allowpaymentrequest': [], 'allowpresentation': [], 'allowusermedia': [], 'loading': ['eager', 'lazy']})
|
||||
\ ],
|
||||
\ 'img': [
|
||||
\ [],
|
||||
\ extend(copy(global_attributes), {'src': [], 'alt': [], 'height': [], 'width': [], 'decoding': ['async', 'sync', 'auto'], 'usemap': [], 'ismap': ['ismap', ''], 'referrerpolicy': referrerpolicy, 'crossorigin': ['anonymous', 'use-credentials']})
|
||||
\ extend(copy(global_attributes), {'src': [], 'alt': [], 'height': [], 'width': [], 'decoding': ['async', 'sync', 'auto'], 'usemap': [], 'ismap': ['ismap', ''], 'referrerpolicy': referrerpolicy, 'crossorigin': ['anonymous', 'use-credentials'], 'loading': ['eager', 'lazy']})
|
||||
\ ],
|
||||
\ 'input': [
|
||||
\ [],
|
||||
|
||||
@@ -9,6 +9,8 @@ setlocal commentstring=--\ %s
|
||||
|
||||
set smarttab
|
||||
|
||||
autocmd! dhall
|
||||
|
||||
if exists('g:dhall_use_ctags')
|
||||
if g:dhall_use_ctags == 1
|
||||
augroup dhall
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Vim filetype plugin
|
||||
" Language: generic git output
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2016 Aug 29
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if (exists("b:did_ftplugin"))
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Vim filetype plugin
|
||||
" Language: git commit file
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2016 Aug 29
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if (exists("b:did_ftplugin"))
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Vim filetype plugin
|
||||
" Language: git rebase --interactive
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2016 Aug 29
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if (exists("b:did_ftplugin"))
|
||||
|
||||
@@ -790,7 +790,7 @@ function! s:MarkdownHighlightSources(force)
|
||||
" Look for code blocks in the current file
|
||||
let filetypes = {}
|
||||
for line in getline(1, '$')
|
||||
let ft = matchstr(line, '```\s*\zs[0-9A-Za-z_+-]*')
|
||||
let ft = matchstr(line, '```\s*\zs[0-9A-Za-z_+-]*\ze.*')
|
||||
if !empty(ft) && ft !~ '^\d*$' | let filetypes[ft] = 1 | endif
|
||||
endfor
|
||||
if !exists('b:mkd_known_filetypes')
|
||||
@@ -821,7 +821,7 @@ function! s:MarkdownHighlightSources(force)
|
||||
else
|
||||
let include = '@' . toupper(filetype)
|
||||
endif
|
||||
let command = 'syntax region %s matchgroup=%s start="^\s*```\s*%s$" matchgroup=%s end="\s*```$" keepend contains=%s%s'
|
||||
let command = 'syntax region %s matchgroup=%s start="^\s*```\s*%s.*$" matchgroup=%s end="\s*```$" keepend contains=%s%s'
|
||||
execute printf(command, group, startgroup, ft, endgroup, include, has('conceal') && get(g:, 'vim_markdown_conceal', 1) && get(g:, 'vim_markdown_conceal_code_blocks', 1) ? ' concealends' : '')
|
||||
execute printf('syntax cluster mkdNonListItem add=%s', group)
|
||||
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svelte') == -1
|
||||
|
||||
" Vim filetype plugin
|
||||
" Language: Svelte 3 (HTML/JavaScript)
|
||||
" Author: Evan Lecklider <evan@lecklider.com>
|
||||
" Maintainer: Evan Lecklide <evan@lecklider.com>
|
||||
" URL: https://github.com/evanleck/vim-svelte
|
||||
if (exists('b:did_ftplugin'))
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
" Matchit support
|
||||
if exists('loaded_matchit') && !exists('b:match_words')
|
||||
let b:match_ignorecase = 0
|
||||
|
||||
" In order:
|
||||
"
|
||||
" 1. Svelte control flow keywords.
|
||||
" 2. Parens.
|
||||
" 3-5. HTML tags pulled from Vim itself.
|
||||
"
|
||||
" https://github.com/vim/vim/blob/5259275347667a90fb88d8ea74331f88ad68edfc/runtime/ftplugin/html.vim#L29-L35
|
||||
let b:match_words =
|
||||
\ '#\%(if\|await\|each\)\>:\:\%(else\|catch\|then\)\>:\/\%(if\|await\|each\)\>,' .
|
||||
\ '{:},' .
|
||||
\ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' .
|
||||
\ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' .
|
||||
\ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
|
||||
endif
|
||||
|
||||
" ALE fixing and linting.
|
||||
if exists('g:loaded_ale')
|
||||
if !exists('b:ale_fixers')
|
||||
let b:ale_fixers = ['eslint', 'prettier', 'prettier_standard']
|
||||
endif
|
||||
|
||||
if !exists('b:ale_linter_aliases')
|
||||
let b:ale_linter_aliases = ['css', 'javascript']
|
||||
endif
|
||||
|
||||
if !exists('b:ale_linters')
|
||||
let b:ale_linters = ['stylelint', 'eslint']
|
||||
endif
|
||||
endif
|
||||
|
||||
endif
|
||||
@@ -270,6 +270,12 @@ function IsInBrackets(lnum, c)
|
||||
return len(stack) > 0
|
||||
endfunction
|
||||
|
||||
function IsInDocString(lnum)
|
||||
let stack = map(synstack(a:lnum, 1), 'synIDattr(v:val, "name")')
|
||||
call filter(stack, 'v:val =~# "\\<juliaDocString\\>"')
|
||||
return len(stack) > 0
|
||||
endfunction
|
||||
|
||||
" Auxiliary function to find a line which does not start in the middle of a
|
||||
" multiline bracketed expression, to be used as reference for block
|
||||
" indentation.
|
||||
@@ -290,6 +296,11 @@ function LastBlockIndent(lnum)
|
||||
endfunction
|
||||
|
||||
function GetJuliaIndent()
|
||||
" Do not alter doctrings indentation
|
||||
if IsInDocString(v:lnum)
|
||||
return -1
|
||||
endif
|
||||
|
||||
" Find a non-blank line above the current line.
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ endif
|
||||
|
||||
if !exists('g:ruby_indent_block_style')
|
||||
" Possible values: "expression", "do"
|
||||
let g:ruby_indent_block_style = 'expression'
|
||||
let g:ruby_indent_block_style = 'do'
|
||||
endif
|
||||
|
||||
setlocal nosmartindent
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svelte') == -1
|
||||
|
||||
" Vim indent file
|
||||
" Language: Svelte 3 (HTML/JavaScript)
|
||||
" Author: Evan Lecklider <evan@lecklider.com>
|
||||
" Maintainer: Evan Lecklide <evan@lecklider.com>
|
||||
" URL: https://github.com/evanleck/vim-svelte
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
|
||||
runtime! indent/html.vim
|
||||
unlet! b:did_indent
|
||||
|
||||
let s:html_indent = &l:indentexpr
|
||||
let b:did_indent = 1
|
||||
|
||||
if !exists('g:svelte_indent_script')
|
||||
let g:svelte_indent_script = 1
|
||||
endif
|
||||
|
||||
if !exists('g:svelte_indent_style')
|
||||
let g:svelte_indent_style = 1
|
||||
endif
|
||||
|
||||
setlocal indentexpr=GetSvelteIndent()
|
||||
setlocal indentkeys=o,O,*<Return>,<>>,{,},0),0],!^F,;,=:else,=:then,=:catch,=/if,=/each,=/await
|
||||
|
||||
" Only define the function once.
|
||||
if exists('*GetSvelteIndent')
|
||||
finish
|
||||
endif
|
||||
|
||||
function! GetSvelteIndent()
|
||||
let current_line_number = v:lnum
|
||||
|
||||
if current_line_number == 0
|
||||
return 0
|
||||
endif
|
||||
|
||||
let current_line = getline(current_line_number)
|
||||
|
||||
" Opening script and style tags should be all the way outdented.
|
||||
if current_line =~ '^\s*</\?\(script\|style\)'
|
||||
return 0
|
||||
endif
|
||||
|
||||
let previous_line_number = prevnonblank(current_line_number - 1)
|
||||
let previous_line = getline(previous_line_number)
|
||||
let previous_line_indent = indent(previous_line_number)
|
||||
|
||||
" The inside of scripts an styles should be indented unless disabled.
|
||||
if previous_line =~ '^\s*<script'
|
||||
if g:svelte_indent_script
|
||||
return previous_line_indent + shiftwidth()
|
||||
else
|
||||
return previous_line_indent
|
||||
endif
|
||||
endif
|
||||
|
||||
if previous_line =~ '^\s*<style'
|
||||
if g:svelte_indent_style
|
||||
return previous_line_indent + shiftwidth()
|
||||
else
|
||||
return previous_line_indent
|
||||
endif
|
||||
endif
|
||||
|
||||
execute "let indent = " . s:html_indent
|
||||
|
||||
" For some reason, the HTML CSS indentation keeps indenting the next line over
|
||||
" and over after each style declaration.
|
||||
if searchpair('<style>', '', '</style>', 'bW') && previous_line =~ ';$' && current_line !~ '}'
|
||||
return previous_line_indent
|
||||
endif
|
||||
|
||||
" "/await" or ":catch" or ":then"
|
||||
if current_line =~ '^\s*{\s*\/await' || current_line =~ '^\s*{\s*:\(catch\|then\)'
|
||||
let await_start = searchpair('{\s*#await\>', '', '{\s*\/await\>', 'bW')
|
||||
|
||||
if await_start
|
||||
return indent(await_start)
|
||||
endif
|
||||
endif
|
||||
|
||||
" "/each"
|
||||
if current_line =~ '^\s*{\s*\/each'
|
||||
let each_start = searchpair('{\s*#each\>', '', '{\s*\/each\>', 'bW')
|
||||
|
||||
if each_start
|
||||
return indent(each_start)
|
||||
endif
|
||||
endif
|
||||
|
||||
" "/if"
|
||||
if current_line =~ '^\s*{\s*\/if'
|
||||
let if_start = searchpair('{\s*#if\>', '', '{\s*\/if\>', 'bW')
|
||||
|
||||
if if_start
|
||||
return indent(if_start)
|
||||
endif
|
||||
endif
|
||||
|
||||
" ":else" is tricky because it can match an opening "#each" _or_ an opening
|
||||
" "#if", so we try to be smart and look for the closest of the two.
|
||||
if current_line =~ '^\s*{\s*:else'
|
||||
let if_start = searchpair('{\s*#if\>', '', '{\s*\/if\>', 'bW')
|
||||
|
||||
" If it's an "else if" then we know to look for an "#if"
|
||||
if current_line =~ '^\s*{\s*:else if' && if_start
|
||||
return indent(if_start)
|
||||
else
|
||||
" The greater line number will be closer to the cursor position because
|
||||
" we're searching backward.
|
||||
return indent(max([if_start, searchpair('{\s*#each\>', '', '{\s*\/each\>', 'bW')]))
|
||||
endif
|
||||
endif
|
||||
|
||||
" "#if" or "#each"
|
||||
if previous_line =~ '^\s*{\s*#\(if\|each\|await\)'
|
||||
return previous_line_indent + shiftwidth()
|
||||
endif
|
||||
|
||||
" ":else" or ":then"
|
||||
if previous_line =~ '^\s*{\s*:\(else\|catch\|then\)'
|
||||
return previous_line_indent + shiftwidth()
|
||||
endif
|
||||
|
||||
" Custom element juggling for abnormal self-closing tags (<Widget />),
|
||||
" capitalized component tags (<Widget></Widget>), and custom svelte tags
|
||||
" (<svelte:head></svelte:head>).
|
||||
if synID(previous_line_number, match(previous_line, '\S') + 1, 0) == hlID('htmlTag')
|
||||
\ && synID(current_line_number, match(current_line, '\S') + 1, 0) != hlID('htmlEndTag')
|
||||
let indents_match = indent == previous_line_indent
|
||||
let previous_closes = previous_line =~ '/>$'
|
||||
|
||||
if indents_match && !previous_closes && previous_line =~ '<\(\u\|\l\+:\l\+\)'
|
||||
return previous_line_indent + shiftwidth()
|
||||
elseif !indents_match && previous_closes
|
||||
return previous_line_indent
|
||||
endif
|
||||
endif
|
||||
|
||||
return indent
|
||||
endfunction
|
||||
|
||||
endif
|
||||
@@ -51,7 +51,7 @@ let s:skip_expr = "synIDattr(synID(line('.'),col('.'),1),'name') =~ '".s:syng_st
|
||||
let s:line_term = '\s*\%(\%(\/\/\).*\)\=$'
|
||||
|
||||
" Regex that defines continuation lines, not including (, {, or [.
|
||||
let s:continuation_regex = '\%([\\*+/.:]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\|[^=]=[^=].*,\)' . s:line_term
|
||||
let s:continuation_regex = '\%([\\*+/.:]\|\%(<%\)\@<![=-]\|\W[|&?]\|||\|&&\|[^=]=[^=]\)' . s:line_term
|
||||
|
||||
" Regex that defines continuation lines.
|
||||
" TODO: this needs to deal with if ...: and so on
|
||||
|
||||
@@ -103,6 +103,13 @@ else
|
||||
highlight default link ansible_with_keywords Statement
|
||||
endif
|
||||
|
||||
execute 'syn keyword ansible_with_keywords loop containedin='.s:yamlKey.' contained'
|
||||
if exists("g:ansible_with_keywords_highlight")
|
||||
execute 'highlight link ansible_with_keywords '.g:ansible_with_keywords_highlight
|
||||
else
|
||||
highlight default link ansible_with_keywords Statement
|
||||
endif
|
||||
|
||||
let b:current_syntax = "ansible"
|
||||
|
||||
endif
|
||||
|
||||
@@ -6,7 +6,7 @@ if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
syntax match dhallInterpolation "\v\$\{([^\}]|\\n)*\}"
|
||||
syntax match dhallInterpolation "\v\$\{([^\}]|\n)*\}"
|
||||
syntax keyword dhallTodo TODO FIXME
|
||||
syntax match dhallBrackets "[<>|]"
|
||||
syntax match dhallOperator "+\|*\|#"
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Vim syntax file
|
||||
" Language: generic git output
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2010 May 21
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -27,9 +27,9 @@ syn region gitDiff start=/^\%(@@ -\)\@=/ end=/^\%(diff --\%(git\|cc\|combined\)
|
||||
syn region gitDiffMerge start=/^\%(diff --\%(cc\|combined\) \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff
|
||||
syn region gitDiffMerge start=/^\%(@@@@* -\)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff
|
||||
syn match gitDiffAdded "^ \++.*" contained containedin=gitDiffMerge
|
||||
syn match gitDiffAdded "{+.*+}" contained containedin=gitDiff
|
||||
syn match gitDiffAdded "{+[^}]*+}" contained containedin=gitDiff
|
||||
syn match gitDiffRemoved "^ \+-.*" contained containedin=gitDiffMerge
|
||||
syn match gitDiffRemoved "\[-.*-\]" contained containedin=gitDiff
|
||||
syn match gitDiffRemoved "\[-[^]]*-\]" contained containedin=gitDiff
|
||||
|
||||
syn match gitKeyword /^\%(object\|type\|tag\|commit\|tree\|parent\|encoding\)\>/ contained containedin=gitHead nextgroup=gitHash,gitType skipwhite
|
||||
syn match gitKeyword /^\%(tag\>\|ref:\)/ contained containedin=gitHead nextgroup=gitReference skipwhite
|
||||
|
||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Language: git commit file
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: *.git/COMMIT_EDITMSG
|
||||
" Last Change: 2016 Aug 29
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -32,6 +32,7 @@ else
|
||||
syn match gitcommitComment "^#.*"
|
||||
endif
|
||||
|
||||
syn match gitcommitHash "\<\x\{40,}\>" contains=@NoSpell display
|
||||
syn match gitcommitHead "^\%(# .*\n\)\+#$" contained transparent
|
||||
syn match gitcommitOnBranch "\%(^# \)\@<=On branch" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite
|
||||
syn match gitcommitOnBranch "\%(^# \)\@<=Your branch .\{-\} '" contained containedin=gitcommitComment nextgroup=gitcommitBranch skipwhite
|
||||
@@ -69,6 +70,7 @@ hi def link gitcommitUntracked gitcommitComment
|
||||
hi def link gitcommitDiscarded gitcommitComment
|
||||
hi def link gitcommitSelected gitcommitComment
|
||||
hi def link gitcommitUnmerged gitcommitComment
|
||||
hi def link gitcommitHash Identifier
|
||||
hi def link gitcommitOnBranch Comment
|
||||
hi def link gitcommitBranch Special
|
||||
hi def link gitcommitNoBranch gitCommitBranch
|
||||
|
||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Language: git config file
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: gitconfig, .gitconfig, *.git/config
|
||||
" Last Change: 2019 Sep 27
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
|
||||
@@ -4,7 +4,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1
|
||||
" Language: git rebase --interactive
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: git-rebase-todo
|
||||
" Last Change: 2016 Aug 29
|
||||
" Last Change: 2019 Dec 06
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -25,7 +25,7 @@ syn match gitrebaseDrop "\v^d%(rop)=>" nextgroup=gitrebaseCommit skipwhite
|
||||
syn match gitrebaseNoop "\v^noop>"
|
||||
syn match gitrebaseMerge "\v^m(erge)=>" nextgroup=gitrebaseMergeOption,gitrebaseName skipwhite
|
||||
syn match gitrebaseLabel "\v^l(abel)=>" nextgroup=gitrebaseName skipwhite
|
||||
syn match gitrebaseReset "\v^r(eset)=>" nextgroup=gitrebaseName skipwhite
|
||||
syn match gitrebaseReset "\v^(t|reset)=>" nextgroup=gitrebaseName skipwhite
|
||||
syn match gitrebaseSummary ".*" contains=gitrebaseHash contained
|
||||
syn match gitrebaseCommand ".*" contained
|
||||
syn match gitrebaseComment "^\s*#.*" contains=gitrebaseHash
|
||||
|
||||
@@ -131,6 +131,8 @@ syn keyword htmlArg contained prefetch
|
||||
syn keyword htmlArg contained decoding
|
||||
" https://w3c.github.io/selection-api/#extensions-to-globaleventhandlers
|
||||
syn keyword htmlArg contained onselectstart onselectionchange
|
||||
" https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading
|
||||
syn keyword htmlArg contained loading
|
||||
|
||||
" Custom Data Attributes
|
||||
" http://w3c.github.io/html/single-page.html#embedding-custom-non-visible-data-with-the-data-attributes
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kotlin') == -1
|
||||
" Vim syntax file
|
||||
" Language: Kotlin
|
||||
" Maintainer: Alexander Udalov
|
||||
" Latest Revision: 26 May 2019
|
||||
" Latest Revision: 13 July 2020
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
@@ -18,7 +18,33 @@ syn keyword ktException try catch finally throw
|
||||
|
||||
syn keyword ktInclude import package
|
||||
|
||||
syn keyword ktType Any Boolean Byte Char Double Float Int Long Nothing Short Unit
|
||||
" The following is generated by generate-stdlib-class-names.main.kts
|
||||
syn keyword ktType AbstractCollection AbstractCoroutineContextElement AbstractCoroutineContextKey AbstractDoubleTimeSource AbstractIterator AbstractList AbstractLongTimeSource
|
||||
syn keyword ktType AbstractMap AbstractMutableCollection AbstractMutableList AbstractMutableMap AbstractMutableSet AbstractSet AccessDeniedException Accessor Annotation
|
||||
syn keyword ktType AnnotationRetention AnnotationTarget Any Appendable ArithmeticException Array ArrayDeque ArrayList AssertionError Boolean BooleanArray BooleanIterator
|
||||
syn keyword ktType BuilderInference Byte ByteArray ByteIterator CallsInPlace CancellationException Char CharArray CharCategory CharDirectionality CharIterator CharProgression
|
||||
syn keyword ktType CharRange CharSequence CharacterCodingException Charsets ClassCastException Cloneable ClosedFloatingPointRange ClosedRange Collection Comparable Comparator
|
||||
syn keyword ktType ConcurrentModificationException ConditionalEffect Continuation ContinuationInterceptor ContractBuilder CoroutineContext DeepRecursiveFunction DeepRecursiveScope
|
||||
syn keyword ktType Delegates Deprecated DeprecatedSinceKotlin DeprecationLevel Destructured Double DoubleArray DoubleIterator DslMarker Duration DurationUnit Effect Element
|
||||
syn keyword ktType EmptyCoroutineContext Entry Enum Error Exception Experimental ExperimentalContracts ExperimentalJsExport ExperimentalMultiplatform ExperimentalStdlibApi
|
||||
syn keyword ktType ExperimentalTime ExperimentalTypeInference ExperimentalUnsignedTypes ExtensionFunctionType FileAlreadyExistsException FileSystemException FileTreeWalk
|
||||
syn keyword ktType FileWalkDirection Float FloatArray FloatIterator Function Function0 Function1 Function10 Function11 Function12 Function13 Function14 Function15 Function16
|
||||
syn keyword ktType Function17 Function18 Function19 Function2 Function20 Function21 Function22 Function3 Function4 Function5 Function6 Function7 Function8 Function9 FunctionN
|
||||
syn keyword ktType Getter Grouping HashMap HashSet IllegalArgumentException IllegalStateException IndexOutOfBoundsException IndexedValue Int IntArray IntIterator IntProgression
|
||||
syn keyword ktType IntRange InvocationKind Iterable Iterator JsExport JsName JvmDefault JvmDefaultWithoutCompatibility JvmField JvmMultifileClass JvmName JvmOverloads JvmStatic
|
||||
syn keyword ktType JvmSuppressWildcards JvmSynthetic JvmWildcard KAnnotatedElement KCallable KClass KClassifier KDeclarationContainer KFunction KMutableProperty KMutableProperty0
|
||||
syn keyword ktType KMutableProperty1 KMutableProperty2 KParameter KProperty KProperty0 KProperty1 KProperty2 KType KTypeParameter KTypeProjection KVariance KVisibility Key Kind
|
||||
syn keyword ktType KotlinNullPointerException KotlinReflectionNotSupportedError KotlinVersion Lazy LazyThreadSafetyMode Level LinkedHashMap LinkedHashSet List ListIterator Long
|
||||
syn keyword ktType LongArray LongIterator LongProgression LongRange Map MatchGroup MatchGroupCollection MatchNamedGroupCollection MatchResult Metadata Monotonic MustBeDocumented
|
||||
syn keyword ktType MutableCollection MutableEntry MutableIterable MutableIterator MutableList MutableListIterator MutableMap MutableSet NoSuchElementException NoSuchFileException
|
||||
syn keyword ktType NoWhenBranchMatchedException NotImplementedError Nothing NullPointerException Number NumberFormatException ObservableProperty OnErrorAction OptIn
|
||||
syn keyword ktType OptionalExpectation OverloadResolutionByLambdaReturnType Pair ParameterName PropertyDelegateProvider PublishedApi PurelyImplements Random RandomAccess
|
||||
syn keyword ktType ReadOnlyProperty ReadWriteProperty Regex RegexOption Repeatable ReplaceWith RequiresOptIn RestrictsSuspension Result Retention Returns ReturnsNotNull
|
||||
syn keyword ktType RuntimeException Sequence SequenceScope Set Setter SharedImmutable Short ShortArray ShortIterator SimpleEffect SinceKotlin Strictfp String StringBuilder Suppress
|
||||
syn keyword ktType Synchronized Target TestTimeSource ThreadLocal Throwable Throws TimeMark TimeSource TimedValue Transient Triple TypeCastException Typography UByte UByteArray
|
||||
syn keyword ktType UByteIterator UInt UIntArray UIntIterator UIntProgression UIntRange ULong ULongArray ULongIterator ULongProgression ULongRange UShort UShortArray UShortIterator
|
||||
syn keyword ktType UninitializedPropertyAccessException Unit UnsafeVariance UnsupportedOperationException UseExperimental Volatile
|
||||
|
||||
syn keyword ktModifier annotation companion enum inner internal private protected public abstract final open override sealed vararg dynamic expect actual
|
||||
syn keyword ktStructure class object interface typealias fun val var constructor init
|
||||
|
||||
|
||||
@@ -105,8 +105,8 @@ execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\
|
||||
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/^\s*\z(`\{3,}\)[^`]*$/ end=/^\s*\z1`*\s*$/' . s:concealcode
|
||||
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/\(\([^\\]\|^\)\\\)\@<!\~\~/ end=/\(\([^\\]\|^\)\\\)\@<!\~\~/' . s:concealcode
|
||||
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start=/^\s*\z(\~\{3,}\)\s*[0-9A-Za-z_+-]*\s*$/ end=/^\s*\z1\~*\s*$/' . s:concealcode
|
||||
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start="<pre[^>]*\\\@<!>" end="</pre>"' . s:concealcode
|
||||
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start="<code[^>]*\\\@<!>" end="</code>"' . s:concealcode
|
||||
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start="<pre\(\|\_s[^>]*\)\\\@<!>" end="</pre>"' . s:concealcode
|
||||
execute 'syn region mkdCode matchgroup=mkdCodeDelimiter start="<code\(\|\_s[^>]*\)\\\@<!>" end="</code>"' . s:concealcode
|
||||
syn region mkdFootnote start="\[^" end="\]"
|
||||
syn match mkdCode /^\s*\n\(\(\s\{8,}[^ ]\|\t\t\+[^\t]\).*\n\)\+/
|
||||
syn match mkdCode /\%^\(\(\s\{4,}[^ ]\|\t\+[^\t]\).*\n\)\+/
|
||||
|
||||
@@ -34,8 +34,9 @@ set cpo&vim
|
||||
|
||||
" http://mesonbuild.com/Syntax.html
|
||||
syn keyword mesonConditional elif else if endif
|
||||
syn keyword mesonRepeat foreach endforeach
|
||||
syn keyword mesonRepeat foreach endforeach
|
||||
syn keyword mesonOperator and not or in
|
||||
syn keyword mesonStatement continue break
|
||||
|
||||
syn match mesonComment "#.*$" contains=mesonTodo,@Spell
|
||||
syn keyword mesonTodo FIXME NOTE NOTES TODO XXX contained
|
||||
|
||||
@@ -43,7 +43,7 @@ syn match slimTag "\w\+[><]*" contained contains=htmlTagName n
|
||||
syn match slimIdChar "#{\@!" contained nextgroup=slimId
|
||||
syn match slimId "\%(\w\|-\)\+" contained nextgroup=@slimComponent
|
||||
syn match slimClassChar "\." contained nextgroup=slimClass
|
||||
syn match slimClass "\%(\w\|-\)\+" contained nextgroup=@slimComponent
|
||||
syn match slimClass "\%(\w\|-\|\/\d+\|:\(\w\|-\)\+\)\+" contained nextgroup=@slimComponent
|
||||
syn match slimInlineTagChar "\s*:\s*" contained nextgroup=slimTag,slimClassChar,slimIdChar
|
||||
|
||||
syn region slimWrappedAttrs matchgroup=slimWrappedAttrsDelimiter start="\s*{\s*" skip="}\s*\"" end="\s*}\s*" contained contains=slimAttr nextgroup=slimRuby
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svelte') == -1
|
||||
|
||||
" Vim syntax file
|
||||
" Language: Svelte 3 (HTML/JavaScript)
|
||||
" Author: Evan Lecklider <evan@lecklider.com>
|
||||
" Maintainer: Evan Lecklide <evan@lecklider.com>
|
||||
" Depends: pangloss/vim-javascript
|
||||
" URL: https://github.com/evanleck/vim-svelte
|
||||
"
|
||||
" Like vim-jsx, this depends on the pangloss/vim-javascript syntax package (and
|
||||
" is tested against it exclusively). If you're using vim-polyglot, then you're
|
||||
" all set.
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Read HTML to begin with.
|
||||
runtime! syntax/html.vim
|
||||
unlet! b:current_syntax
|
||||
|
||||
" Expand HTML tag names to include mixed case, periods, and colons.
|
||||
syntax match htmlTagName contained "\<[a-zA-Z:\.]*\>"
|
||||
|
||||
" Special attributes that include some kind of binding e.g. "on:click",
|
||||
" "bind:something", etc.
|
||||
syntax match svelteKeyword "\<[a-z]\+:[a-zA-Z|]\+=" contained containedin=htmlTag
|
||||
|
||||
" Mixed-case attributes are likely props.
|
||||
syntax match svelteKeyword "\<[a-z]\+:[a-zA-Z|]\+=" contained containedin=htmlTag
|
||||
|
||||
" The "slot" attribute has special meaning.
|
||||
syntax keyword svelteKeyword slot contained containedin=htmlTag
|
||||
|
||||
" According to vim-jsx, you can let jsBlock take care of ending the region.
|
||||
" https://github.com/mxw/vim-jsx/blob/master/after/syntax/jsx.vim
|
||||
syntax region svelteExpression start="{" end="" contains=jsBlock,javascriptBlock containedin=htmlString,htmlTag,htmlArg,htmlValue,htmlH1,htmlH2,htmlH3,htmlH4,htmlH5,htmlH6,htmlHead,htmlTitle,htmlBoldItalicUnderline,htmlUnderlineBold,htmlUnderlineItalicBold,htmlUnderlineBoldItalic,htmlItalicUnderline,htmlItalicBold,htmlItalicBoldUnderline,htmlItalicUnderlineBold,htmlLink,htmlLeadingSpace,htmlBold,htmlBoldUnderline,htmlBoldItalic,htmlBoldUnderlineItalic,htmlUnderline,htmlUnderlineItalic,htmlItalic,htmlStrike,javaScript
|
||||
|
||||
syntax region svelteSurroundingTag contained start=+<\(script\|style\|template\)+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
|
||||
|
||||
" Block conditionals.
|
||||
syntax match svelteConditional "#if" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteConditional "/if" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteConditional ":else if" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteConditional ":else" contained containedin=jsBlock,javascriptBlock
|
||||
|
||||
" Block keywords.
|
||||
syntax match svelteKeyword "#await" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteKeyword "/await" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteKeyword ":catch" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteKeyword ":then" contained containedin=jsBlock,javascriptBlock
|
||||
|
||||
" Inline keywords.
|
||||
syntax match svelteKeyword "@html" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteKeyword "@debug" contained containedin=jsBlock,javascriptBlock
|
||||
|
||||
" Repeat functions.
|
||||
syntax match svelteRepeat "#each" contained containedin=jsBlock,javascriptBlock
|
||||
syntax match svelteRepeat "/each" contained containedin=jsBlock,javascriptBlock
|
||||
|
||||
highlight def link svelteConditional Conditional
|
||||
highlight def link svelteKeyword Keyword
|
||||
highlight def link svelteRepeat Repeat
|
||||
|
||||
" Preprocessed languages that aren't supported out of the box by Svelte require
|
||||
" additional syntax files to be pulled in and can slow Vim down a bit. For that
|
||||
" reason, preprocessed languages must be enabled manually. Note that some may
|
||||
" require additional plugins that contain the actual syntax definitions.
|
||||
"
|
||||
" Heavily cribbed from https://github.com/posva/vim-vue and largely completed by
|
||||
" @davidroeca (thank you!).
|
||||
|
||||
" A syntax should be registered if there's a valid syntax definition known to
|
||||
" Vim and it is enabled for the Svelte plugin.
|
||||
function! s:enabled(language)
|
||||
" Check whether a syntax file for {language} exists
|
||||
if empty(globpath(&runtimepath, 'syntax/' . a:language . '.vim'))
|
||||
return 0
|
||||
endif
|
||||
|
||||
" If g:svelte_preprocessors is set, check for it there, otherwise return 0.
|
||||
if exists('g:svelte_preprocessors') && type(g:svelte_preprocessors) == v:t_list
|
||||
return index(g:svelte_preprocessors, a:language) != -1
|
||||
else
|
||||
return 0
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Default tag definitions.
|
||||
let s:languages = [
|
||||
\ { 'name': 'less', 'tag': 'style' },
|
||||
\ { 'name': 'scss', 'tag': 'style' },
|
||||
\ { 'name': 'sass', 'tag': 'style' },
|
||||
\ { 'name': 'stylus', 'tag': 'style' },
|
||||
\ { 'name': 'typescript', 'tag': 'script' },
|
||||
\ ]
|
||||
|
||||
" Add global tag definitions to our defaults.
|
||||
if exists('g:svelte_preprocessor_tags') && type('g:svelte_preprocessor_tags') == v:t_list
|
||||
let s:languages += g:svelte_preprocessor_tags
|
||||
endif
|
||||
|
||||
for s:language in s:languages
|
||||
let s:attr = '\(lang\|type\)=\("\|''\)[^\2]*' . s:language.name . '[^\2]*\2'
|
||||
let s:start = '<' . s:language.tag . '\>\_[^>]*' . s:attr . '\_[^>]*>'
|
||||
|
||||
if s:enabled(s:language.name)
|
||||
execute 'syntax include @' . s:language.name . ' syntax/' . get(s:language, 'as', s:language.name) . '.vim'
|
||||
unlet! b:current_syntax
|
||||
|
||||
execute 'syntax region svelte_' . s:language.name
|
||||
\ 'keepend'
|
||||
\ 'start=/' . s:start . '/'
|
||||
\ 'end="</' . s:language.tag . '>"me=s-1'
|
||||
\ 'contains=@' . s:language.name . ',svelteSurroundingTag'
|
||||
\ 'fold'
|
||||
endif
|
||||
endfor
|
||||
|
||||
" Cybernetically enhanced web apps.
|
||||
let b:current_syntax = "svelte"
|
||||
|
||||
" Sync from start because of the wacky nesting.
|
||||
syntax sync fromstart
|
||||
|
||||
endif
|
||||
5458
syntax/terraform.vim
5458
syntax/terraform.vim
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'toml') == -1
|
||||
" URL: https://github.com/cespare/vim-toml
|
||||
" LICENSE: MIT
|
||||
|
||||
if exists("b:current_syntax")
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
@@ -75,6 +75,6 @@ hi def link tomlComment Comment
|
||||
|
||||
syn sync minlines=500
|
||||
|
||||
let b:current_syntax = "toml"
|
||||
let b:current_syntax = 'toml'
|
||||
|
||||
endif
|
||||
|
||||
@@ -10,7 +10,7 @@ if exists("b:current_syntax")
|
||||
endif
|
||||
let b:current_syntax = "zig"
|
||||
|
||||
syn keyword zigStorage const var extern packed export pub noalias inline noinline comptime callconv volatile allowzero align linksection threadlocal
|
||||
syn keyword zigStorage const var extern packed export pub noalias inline noinline comptime callconv volatile allowzero align linksection threadlocal anytype
|
||||
syn keyword zigStructure struct enum union error
|
||||
syn keyword zigStatement break return continue asm defer errdefer unreachable try catch async nosuspend await suspend resume
|
||||
syn keyword zigConditional if else switch and or orelse
|
||||
@@ -26,8 +26,8 @@ syn keyword zigBoolean true false
|
||||
|
||||
syn match zigType "\v<[iu][1-9]\d*>"
|
||||
|
||||
syn match zigOperator display "\%(+%\?\|-%\?\|/\|*%\?\|=\|\^\|&\|?\||\|!\|>\|<\|%\|<<%\?\|>>\)=\?"
|
||||
syn match zigArrowCharacter display "->"
|
||||
syn match zigOperator display "\V\[-+/*=^&?|!><%~]"
|
||||
syn match zigArrowCharacter display "\V->"
|
||||
|
||||
syn match zigBuiltinFn "\v\@(addWithOverflow|as|atomicLoad|atomicStore|bitCast|breakpoint)>"
|
||||
syn match zigBuiltinFn "\v\@(alignCast|alignOf|cDefine|cImport|cInclude)>"
|
||||
|
||||
Reference in New Issue
Block a user