mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 03:23:51 -05:00
Update
This commit is contained in:
@@ -108,7 +108,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
|
||||
- [idris](https://github.com/idris-hackers/idris-vim) (Idris syntax highlighting for idr and lidr files)
|
||||
- [ion](https://github.com/vmchale/ion-vim) (Syntax highlighting for ion files)
|
||||
- [javascript-sql](https://github.com/statico/vim-javascript-sql)
|
||||
- [javascript](https://github.com/pangloss/vim-javascript) (JavaScript syntax highlighting for js, bones, cjs, es, es6 and 17 more files)
|
||||
- [javascript](https://github.com/pangloss/vim-javascript) (JavaScript syntax highlighting for js, bones, cjs, es, es6 and 18 more files)
|
||||
- [jenkins](https://github.com/martinda/Jenkinsfile-vim-syntax) (Syntax highlighting for jenkinsfile and Jenkinsfile files)
|
||||
- [jq](https://github.com/vito-c/jq.vim) (JSONiq syntax highlighting for jq files)
|
||||
- [json5](https://github.com/GutenYe/json5.vim) (JSON5 syntax highlighting for json5 files)
|
||||
@@ -116,7 +116,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
|
||||
- [jsonc](https://github.com/neoclide/jsonc.vim) (Syntax highlighting for cjson and jsonc files)
|
||||
- [jsonnet](https://github.com/google/vim-jsonnet) (Jsonnet syntax highlighting for jsonnet and libsonnet files)
|
||||
- [jst](https://github.com/briancollins/vim-jst) (EJS syntax highlighting for ejs, ect and jst files)
|
||||
- [jsx](https://github.com/MaxMEllon/vim-jsx-pretty) (JSX syntax highlighting for jsx files)
|
||||
- [jsx](https://github.com/MaxMEllon/vim-jsx-pretty) (Syntax highlighting for jsx files)
|
||||
- [julia](https://github.com/JuliaEditorSupport/julia-vim) (Julia syntax highlighting for jl files)
|
||||
- [kotlin](https://github.com/udalov/kotlin-vim) (Kotlin syntax highlighting for kt, ktm and kts files)
|
||||
- [ledger](https://github.com/ledger/vim-ledger) (Syntax highlighting for ldg, ledger and journal files)
|
||||
|
||||
@@ -15,7 +15,7 @@ endif
|
||||
if exists("loaded_matchit")
|
||||
let b:match_ignorecase = 0
|
||||
let b:match_words = '(:),\[:\],{:},<:>,' .
|
||||
\ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
|
||||
\ '<\@<=\([A-z0-9.]\+\):\(</\)\@<=\1'
|
||||
endif
|
||||
|
||||
" For andymass/vim-matchup plugin
|
||||
|
||||
28
after/syntax/puppet.vim
Normal file
28
after/syntax/puppet.vim
Normal file
@@ -0,0 +1,28 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'yard', 'after/syntax/puppet.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Puppet syntax extensions for highlighting YARD documentation.
|
||||
"
|
||||
" Author: Gabriel Filion <gabster@lelutin.ca>
|
||||
" URI: https://github.com/noprompt/vim-yardoc
|
||||
" Version: 0.0.1
|
||||
"
|
||||
" This file reuses the main yardoc syntax definitions and glues them together
|
||||
" with puppet syntax groups from vim-puppet
|
||||
|
||||
runtime! after/syntax/yardoc_support.vim
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Yard glue to puppet
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
syn match puppetComment "\s*#.*$" contains=puppetTodo,@Spell,yardComment
|
||||
syn region puppetComment start="/\*" end="\*/" contains=puppetTodo,@Spell,yardComment extend fold keepend
|
||||
syn cluster puppetNotTop add=@yardTags,@yardDirectives,@yardTypes,@yardLists,@yardHashes
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Tacking on Yard to puppet syntax classes
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
hi def link yardComment puppetComment
|
||||
hi def link yardGenericTag puppetKeyword
|
||||
hi def link yardGenericDirective puppetKeyword
|
||||
@@ -7,125 +7,22 @@ endif
|
||||
" Author: Joel Holdbrooks <https://github.com/noprompt>
|
||||
" URI: https://github.com/noprompt/vim-yardoc
|
||||
" Version: 0.0.1
|
||||
"
|
||||
" This file reuses the main yardoc syntax definitions and glues them together
|
||||
" with Vim's builtin ruby syntax groups
|
||||
|
||||
runtime! after/syntax/yardoc_support.vim
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Tags
|
||||
" Yard glue to ruby
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
syn match yardGenericTag "@\h\+" contained
|
||||
syn match yardAbstract "@abstract" contained
|
||||
syn match yardApi "@api" contained
|
||||
syn match yardAttr "@attr" contained
|
||||
syn match yardAttrReader "@attr_reader" contained
|
||||
syn match yardAttrWriter "@attr_writer" contained
|
||||
syn match yardAuthor "@author" contained
|
||||
syn match yardDeprecated "@deprecated" contained
|
||||
syn match yardExample "@example" contained
|
||||
syn match yardNote "@note" contained
|
||||
syn match yardOption "@option" contained
|
||||
syn match yardOverload "@overload" contained
|
||||
syn match yardParam "@param" contained
|
||||
syn match yardParamName /@param \h\+/hs=s+7 contained contains=yardParam
|
||||
syn match yardPrivate "@private" contained
|
||||
syn match yardRaise "@raise" contained
|
||||
syn match yardReturn "@return" contained
|
||||
syn match yardSee "@see" contained
|
||||
syn match yardSince "@since" contained
|
||||
syn match yardTodo "@todo" contained
|
||||
syn match yardVersion "@version" contained
|
||||
syn match yardYield "@yield" contained
|
||||
syn match yardYieldParam "@yieldparam" contained
|
||||
syn match yardYieldReturn "@yieldreturn" contained
|
||||
syn cluster yardTags contains=yardGenericTag,yardAbstract,yardApi,yardAttr,yardAttrReader,yardAttrWriter,yardAuthor,yardDeprecated,yardExample,yardNote,yardOption,yardOverload,yardParam,yardParamName,yardPrivate,yardRaise,yardReturn,yardSee,yardSince,yardTodo,yardVersion,yardYield,yardYieldParam,yardYieldReturn
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Directives
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
syn match yardGenericDirective "@!\h\+" contained
|
||||
syn match yardAttribute "@!attribute" contained
|
||||
syn match yardEndGroup "@!endgroup" contained
|
||||
syn match yardGroup "@!group" contained
|
||||
syn match yardMacro "@!macro" contained
|
||||
syn match yardMethod "@!method" contained
|
||||
syn match yardParse "@!parse" contained
|
||||
syn match yardScope "@!scope" contained
|
||||
syn match yardVisibility "@!visibility" contained
|
||||
|
||||
syn cluster yardDirectives contains=yardGenericDirective,yardAttribute,yardEndGroup,yardGroup,yardMacro,yardMethod,yardParse,yardScope,yardVisibility
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Types, Lists, and Hashes
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
syn match yardDuckType "#\h\+" contained
|
||||
syn match yardType "[A-Z]\h\+" contained
|
||||
syn match yardLiteral "\(true\|false\|nil\|self\|void\)" contained
|
||||
syn match yardComma "," nextgroup=@yardTypes contained
|
||||
syn match yardArrow "=>" nextgroup=@yardTypes contained
|
||||
|
||||
syn region yardParametricType start="[A-Z]\+\h\+<" end=">" contains=yardType,yardOrderDependentList,yardComma skipwhite contained
|
||||
syn region yardOrderDependentList start="(" end=")" contains=@yardTypes,yardComma skipwhite contained
|
||||
syn region yardTypeList start="\[" end="]" contains=@yardTypes,yardOrderDependentList,@yardHashes skipwhite contained
|
||||
syn region yardHashAngle start="Hash<" end=">" contains=yardDuckType,yardType,yardLiteral,yardArrow,yardComma skipwhite contained
|
||||
syn region yardHashCurly start="Hash{" end="}" contains=@yardTypes,yardArrow,yardComma skipwhite contained
|
||||
|
||||
syn cluster yardTypes contains=yardDuckType,yardType,yardLiteral,yardParametricType
|
||||
syn cluster yardHashes contains=yardArrow,yardHashAngle,yardHashCurly
|
||||
syn cluster yardLists contains=yardComma,yardTypeList,yardOrderDependentList
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Yard
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
syn match yardComment "#\s*@!\{,1}\h\+.*" contains=@yardTags,@yardDirectives,yardTypeList
|
||||
syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell,yardComment
|
||||
syn region rubyMultilineComment start="\%(\%(^\s*#.*\n\)\@<!\%(^\s*#.*\n\)\)\%(\(^\s*#.*\n\)\{1,}\)\@=" end="\%(^\s*#.*\n\)\@<=\%(^\s*#.*\n\)\%(^\s*#\)\@!" contains=rubyComment transparent fold keepend
|
||||
syn cluster rubyNotTop add=@yardTags,@yardDirectives,@yardTypes,@yardLists,@yardHashes
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Links
|
||||
" Tacking on Yard to ruby syntax classes
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
hi def link yardComment rubyComment
|
||||
" Tags
|
||||
hi def link yardGenericTag rubyKeyword
|
||||
hi def link yardAbstract yardGenericTag
|
||||
hi def link yardApi yardGenericTag
|
||||
hi def link yardAttr yardGenericTag
|
||||
hi def link yardAttrReader yardGenericTag
|
||||
hi def link yardAttrWriter yardGenericTag
|
||||
hi def link yardAuthor yardGenericTag
|
||||
hi def link yardDeprecated yardGenericTag
|
||||
hi def link yardExample yardGenericTag
|
||||
hi def link yardNote yardGenericTag
|
||||
hi def link yardOption yardGenericTag
|
||||
hi def link yardOverload yardGenericTag
|
||||
hi def link yardParam yardGenericTag
|
||||
hi def link yardPrivate yardGenericTag
|
||||
hi def link yardRaise yardGenericTag
|
||||
hi def link yardReturn yardGenericTag
|
||||
hi def link yardSee yardGenericTag
|
||||
hi def link yardSince yardGenericTag
|
||||
hi def link yardTodo yardGenericTag
|
||||
hi def link yardVersion yardGenericTag
|
||||
hi def link yardYield yardGenericTag
|
||||
hi def link yardYieldParam yardGenericTag
|
||||
hi def link yardYieldReturn yardGenericTag
|
||||
" Directives
|
||||
hi def link yardGenericDirective rubyKeyword
|
||||
hi def link yardAttribute yardGenericDirective
|
||||
hi def link yardEndGroup yardGenericDirective
|
||||
hi def link yardGroup yardGenericDirective
|
||||
hi def link yardMacro yardGenericDirective
|
||||
hi def link yardMethod yardGenericDirective
|
||||
hi def link yardParse yardGenericDirective
|
||||
hi def link yardScope yardGenericDirective
|
||||
hi def link yardVisibility yardGenericDirective
|
||||
" Types
|
||||
hi def link yardComma yardComment
|
||||
hi def link yardType yardComment
|
||||
hi def link yardDuckType yardComment
|
||||
hi def link yardLiteral yardComment
|
||||
" Lists
|
||||
hi def link yardTypeList yardComment
|
||||
hi def link yardParametricType yardComment
|
||||
" Hashes
|
||||
hi def link yardArrow yardComment
|
||||
hi def link yardHashAngle yardComment
|
||||
hi def link yardHashCurly yardComment
|
||||
|
||||
128
after/syntax/yardoc_support.vim
Normal file
128
after/syntax/yardoc_support.vim
Normal file
@@ -0,0 +1,128 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'yard', 'after/syntax/yardoc_support.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Generic syntax extensions for highlighting YARD documentation.
|
||||
"
|
||||
" Author: Joel Holdbrooks <https://github.com/noprompt>
|
||||
" URI: https://github.com/noprompt/vim-yardoc
|
||||
" Version: 0.0.1
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Tags
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
syn match yardGenericTag "@\h\+" contained
|
||||
syn match yardAbstract "@abstract" contained
|
||||
syn match yardApi "@api" contained
|
||||
syn match yardAttr "@attr" contained
|
||||
syn match yardAttrReader "@attr_reader" contained
|
||||
syn match yardAttrWriter "@attr_writer" contained
|
||||
syn match yardAuthor "@author" contained
|
||||
syn match yardDeprecated "@deprecated" contained
|
||||
syn match yardExample "@example" contained
|
||||
syn match yardNote "@note" contained
|
||||
syn match yardOption "@option" contained
|
||||
syn match yardOverload "@overload" contained
|
||||
syn match yardParam "@param" contained
|
||||
syn match yardParamName /@param \h\+/hs=s+7 contained contains=yardParam
|
||||
syn match yardPrivate "@private" contained
|
||||
syn match yardRaise "@raise" contained
|
||||
syn match yardReturn "@return" contained
|
||||
syn match yardSee "@see" contained
|
||||
syn match yardSince "@since" contained
|
||||
syn match yardTodo "@todo" contained
|
||||
syn match yardVersion "@version" contained
|
||||
syn match yardYield "@yield" contained
|
||||
syn match yardYieldParam "@yieldparam" contained
|
||||
syn match yardYieldReturn "@yieldreturn" contained
|
||||
syn cluster yardTags contains=yardGenericTag,yardAbstract,yardApi,yardAttr,yardAttrReader,yardAttrWriter,yardAuthor,yardDeprecated,yardExample,yardNote,yardOption,yardOverload,yardParam,yardParamName,yardPrivate,yardRaise,yardReturn,yardSee,yardSince,yardTodo,yardVersion,yardYield,yardYieldParam,yardYieldReturn
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Directives
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
syn match yardGenericDirective "@!\h\+" contained
|
||||
syn match yardAttribute "@!attribute" contained
|
||||
syn match yardEndGroup "@!endgroup" contained
|
||||
syn match yardGroup "@!group" contained
|
||||
syn match yardMacro "@!macro" contained
|
||||
syn match yardMethod "@!method" contained
|
||||
syn match yardParse "@!parse" contained
|
||||
syn match yardScope "@!scope" contained
|
||||
syn match yardVisibility "@!visibility" contained
|
||||
|
||||
syn cluster yardDirectives contains=yardGenericDirective,yardAttribute,yardEndGroup,yardGroup,yardMacro,yardMethod,yardParse,yardScope,yardVisibility
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Types, Lists, and Hashes
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
syn match yardDuckType "#\h\+" contained
|
||||
syn match yardType "[A-Z]\h\+" contained
|
||||
syn match yardLiteral "\(true\|false\|nil\|self\|void\)" contained
|
||||
syn match yardComma "," nextgroup=@yardTypes contained
|
||||
syn match yardArrow "=>" nextgroup=@yardTypes contained
|
||||
|
||||
syn region yardParametricType start="[A-Z]\+\h\+<" end=">" contains=yardType,yardOrderDependentList,yardComma skipwhite contained
|
||||
syn region yardOrderDependentList start="(" end=")" contains=@yardTypes,yardComma skipwhite contained
|
||||
syn region yardTypeList start="\[" end="]" contains=@yardTypes,yardOrderDependentList,@yardHashes skipwhite contained
|
||||
syn region yardHashAngle start="Hash<" end=">" contains=yardDuckType,yardType,yardLiteral,yardArrow,yardComma skipwhite contained
|
||||
syn region yardHashCurly start="Hash{" end="}" contains=@yardTypes,yardArrow,yardComma skipwhite contained
|
||||
|
||||
syn cluster yardTypes contains=yardDuckType,yardType,yardLiteral,yardParametricType
|
||||
syn cluster yardHashes contains=yardArrow,yardHashAngle,yardHashCurly
|
||||
syn cluster yardLists contains=yardComma,yardTypeList,yardOrderDependentList
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Yard
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
syn match yardComment "#\s*@!\{,1}\h\+.*" contains=@yardTags,@yardDirectives,yardTypeList
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Links
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" @note The links to language syntax classes is done in each language syntax
|
||||
" script.
|
||||
"
|
||||
" Tags
|
||||
hi def link yardAbstract yardGenericTag
|
||||
hi def link yardApi yardGenericTag
|
||||
hi def link yardAttr yardGenericTag
|
||||
hi def link yardAttrReader yardGenericTag
|
||||
hi def link yardAttrWriter yardGenericTag
|
||||
hi def link yardAuthor yardGenericTag
|
||||
hi def link yardDeprecated yardGenericTag
|
||||
hi def link yardExample yardGenericTag
|
||||
hi def link yardNote yardGenericTag
|
||||
hi def link yardOption yardGenericTag
|
||||
hi def link yardOverload yardGenericTag
|
||||
hi def link yardParam yardGenericTag
|
||||
hi def link yardPrivate yardGenericTag
|
||||
hi def link yardRaise yardGenericTag
|
||||
hi def link yardReturn yardGenericTag
|
||||
hi def link yardSee yardGenericTag
|
||||
hi def link yardSince yardGenericTag
|
||||
hi def link yardTodo yardGenericTag
|
||||
hi def link yardVersion yardGenericTag
|
||||
hi def link yardYield yardGenericTag
|
||||
hi def link yardYieldParam yardGenericTag
|
||||
hi def link yardYieldReturn yardGenericTag
|
||||
" Directives
|
||||
hi def link yardAttribute yardGenericDirective
|
||||
hi def link yardEndGroup yardGenericDirective
|
||||
hi def link yardGroup yardGenericDirective
|
||||
hi def link yardMacro yardGenericDirective
|
||||
hi def link yardMethod yardGenericDirective
|
||||
hi def link yardParse yardGenericDirective
|
||||
hi def link yardScope yardGenericDirective
|
||||
hi def link yardVisibility yardGenericDirective
|
||||
" Types
|
||||
hi def link yardComma yardComment
|
||||
hi def link yardType yardComment
|
||||
hi def link yardDuckType yardComment
|
||||
hi def link yardLiteral yardComment
|
||||
" Lists
|
||||
hi def link yardTypeList yardComment
|
||||
hi def link yardParametricType yardComment
|
||||
" Hashes
|
||||
hi def link yardArrow yardComment
|
||||
hi def link yardHashAngle yardComment
|
||||
hi def link yardHashCurly yardComment
|
||||
@@ -263,13 +263,14 @@ function! go#config#SetTemplateAutocreate(value) abort
|
||||
let g:go_template_autocreate = a:value
|
||||
endfunction
|
||||
|
||||
let s:default_metalinter = 'staticcheck'
|
||||
function! go#config#MetalinterCommand() abort
|
||||
return get(g:, 'go_metalinter_command', 'golangci-lint')
|
||||
return get(g:, 'go_metalinter_command', s:default_metalinter)
|
||||
endfunction
|
||||
|
||||
function! go#config#MetalinterAutosaveEnabled() abort
|
||||
let l:default = []
|
||||
if get(g:, 'go_metalinter_command', 'golangci-lint') == 'golangci-lint'
|
||||
if get(g:, 'go_metalinter_command', s:default_metalinter) == 'golangci-lint'
|
||||
let l:default = ['govet', 'golint']
|
||||
endif
|
||||
|
||||
@@ -278,7 +279,7 @@ endfunction
|
||||
|
||||
function! go#config#MetalinterEnabled() abort
|
||||
let l:default = []
|
||||
if get(g:, 'go_metalinter_command', 'golangci-lint') == 'golangci-lint'
|
||||
if get(g:, 'go_metalinter_command', s:default_metalinter) == 'golangci-lint'
|
||||
let l:default = ['vet', 'golint', 'errcheck']
|
||||
endif
|
||||
|
||||
|
||||
@@ -362,6 +362,10 @@ func polyglot#ft#FTinc()
|
||||
setf aspvbs
|
||||
elseif lines =~ "<?"
|
||||
setf php
|
||||
" Pascal supports // comments but they're vary rarely used for file
|
||||
" headers so assume POV-Ray
|
||||
elseif lines =~ '^\s*\%({\|(\*\)' || lines =~? s:ft_pascal_keywords
|
||||
setf pascal
|
||||
else
|
||||
call polyglot#ft#FTasmsyntax()
|
||||
if exists("b:asmsyntax")
|
||||
@@ -408,6 +412,9 @@ func polyglot#ft#FTprogress_asm()
|
||||
setf progress
|
||||
endfunc
|
||||
|
||||
let s:ft_pascal_comments = '^\s*\%({\|(\*\|//\)'
|
||||
let s:ft_pascal_keywords = '^\s*\%(program\|unit\|library\|uses\|begin\|procedure\|function\|const\|type\|var\)\>'
|
||||
|
||||
func polyglot#ft#FTprogress_pascal()
|
||||
if exists("g:filetype_p")
|
||||
exe "setf " . g:filetype_p
|
||||
@@ -419,8 +426,7 @@ func polyglot#ft#FTprogress_pascal()
|
||||
let lnum = 1
|
||||
while lnum <= 10 && lnum < line('$')
|
||||
let line = getline(lnum)
|
||||
if line =~ '^\s*\(program\|unit\|procedure\|function\|const\|type\|var\)\>'
|
||||
\ || line =~ '^\s*{' || line =~ '^\s*(\*'
|
||||
if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords
|
||||
setf pascal
|
||||
return
|
||||
elseif line !~ '^\s*$' || line =~ '^/\*'
|
||||
@@ -433,6 +439,19 @@ func polyglot#ft#FTprogress_pascal()
|
||||
setf progress
|
||||
endfunc
|
||||
|
||||
func polyglot#ft#FTpp()
|
||||
if exists("g:filetype_pp")
|
||||
exe "setf " . g:filetype_pp
|
||||
else
|
||||
let line = getline(nextnonblank(1))
|
||||
if line =~ s:ft_pascal_comments || line =~? s:ft_pascal_keywords
|
||||
setf pascal
|
||||
else
|
||||
setf puppet
|
||||
endif
|
||||
endif
|
||||
endfunc
|
||||
|
||||
func polyglot#ft#FTr()
|
||||
let max = line("$") > 50 ? 50 : line("$")
|
||||
|
||||
|
||||
@@ -2336,7 +2336,7 @@ if !has_key(g:polyglot_is_disabled, 'jsx')
|
||||
endif
|
||||
|
||||
if !has_key(g:polyglot_is_disabled, 'javascript')
|
||||
au BufNewFile,BufRead *._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.javascript,*.js,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,Jakefile setf javascript
|
||||
au BufNewFile,BufRead *._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.javascript,*.js,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.jsx,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,Jakefile setf javascript
|
||||
au BufNewFile,BufRead *.flow setf flow
|
||||
endif
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ let s:globs = {
|
||||
\ 'jam': '*.jpl,*.jpr,Prl*.*,JAM*.*',
|
||||
\ 'java': '*.java,*.jav',
|
||||
\ 'javacc': '*.jj,*.jjt',
|
||||
\ 'javascript': '*.js,*._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,*.javascript,Jakefile',
|
||||
\ 'javascript': '*.js,*._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.jsx,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,*.javascript,Jakefile',
|
||||
\ 'javascriptreact': '*.jsx',
|
||||
\ 'jess': '*.clp',
|
||||
\ 'jgraph': '*.jgr',
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'lilypond', 'compiler/lilypond.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" LilyPond compiler file
|
||||
" Language: LilyPond
|
||||
" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
|
||||
" Last Change: 2004 Mar 01
|
||||
"
|
||||
" Installed As: vim/compiler/lilypond.vim
|
||||
"
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "lilypond"
|
||||
|
||||
" default make
|
||||
setlocal makeprg=lilypond\ $*
|
||||
" errorformat for lily (with columns) and gcc
|
||||
" (how to see multiple-line error messages?)
|
||||
setlocal errorformat=%f:%l:%c:\ %m,%f:%l:\ %m,In\ file\ included\ from\ %f:%l:,\^I\^Ifrom\ %f:%l%m
|
||||
"
|
||||
@@ -1,10 +1,11 @@
|
||||
--langdef=puppet
|
||||
--langmap=puppet:.pp
|
||||
--regex-puppet=/^[[:space:]]*class[[:space:]]*([a-z][a-zA-Z0-9_:\-]+)/::\1/c,class/
|
||||
--regex-puppet=/^[[:space:]]*class[[:space:]]*([a-z][a-zA-Z0-9_:\-]+)/\1/c,class/
|
||||
--regex-puppet=/^[[:space:]]*site[[:space:]]*([a-zA-Z0-9_\-]+)/\1/s,site/
|
||||
--regex-puppet=/^[[:space:]]*node[[:space:]]*[\'|\"]*([a-zA-Z0-9_\.\-]+)[\'|\"]*/\1/n,node/
|
||||
--regex-puppet=/^[[:space:]]*define[[:space:]]*([a-z][a-zA-Z0-9_:\-]+)/\1/d,definition/
|
||||
--regex-puppet=/^[[:space:]]*(include|require)[[:space:]]*([a-zA-Z0-9_:]+)/\1 \2/i,include/
|
||||
--regex-puppet=/^[[:space:]]*(include|require)[[:space:]]*:{0,2}([a-zA-Z0-9_:]+)/\1 ::\2/i,include/
|
||||
--regex-puppet=/^[[:space:]]*([\$][a-zA-Z0-9_:]+)[[:space:]]*=/\1/v,variable/
|
||||
--regex-puppet=/^[[:space:]]*[~|\-]?>?[[:space:]]*([a-z][a-zA-Z0-9_:]+)[[:space:]]*\{ *(.*):/\1[\2]/r,resource/
|
||||
--regex-puppet=/([A-Z][a-zA-Z0-9_:]+)[[:space:]]*\{/\1/f,default/
|
||||
|
||||
@@ -1174,7 +1174,9 @@ au BufNewFile,BufRead *.papp,*.pxml,*.pxsl setf papp
|
||||
au BufNewFile,BufRead */etc/passwd,*/etc/passwd-,*/etc/passwd.edit,*/etc/shadow,*/etc/shadow-,*/etc/shadow.edit,*/var/backups/passwd.bak,*/var/backups/shadow.bak setf passwd
|
||||
|
||||
" Pascal (also *.p)
|
||||
au BufNewFile,BufRead *.pas,*.pp setf pascal
|
||||
au BufNewFile,BufRead *.pas setf pascal
|
||||
|
||||
au BufNewFile,BufRead *.pp call polyglot#ft#FTpp()
|
||||
|
||||
" Delphi or Lazarus program file
|
||||
au BufNewFile,BufRead *.dpr,*.lpr setf pascal
|
||||
|
||||
@@ -3,14 +3,15 @@ if polyglot#init#is_disabled(expand('<sfile>:p'), 'erlang', 'ftplugin/erlang.vim
|
||||
endif
|
||||
|
||||
" Vim ftplugin file
|
||||
" Language: Erlang
|
||||
" Language: Erlang (http://www.erlang.org)
|
||||
" Maintainer: Csaba Hoch <csaba.hoch@gmail.com>
|
||||
" Author: Oscar Hellström <oscar@oscarh.net>
|
||||
" Contributors: Ricardo Catalinas Jiménez <jimenezrick@gmail.com>
|
||||
" Eduardo Lopez (http://github.com/tapichu)
|
||||
" Arvid Bjurklint (http://github.com/slarwise)
|
||||
" Last Update: 2021-Jan-08
|
||||
" License: Vim license
|
||||
" Version: 2012/01/25
|
||||
" URL: https://github.com/vim-erlang/vim-erlang-runtime
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
|
||||
@@ -6,7 +6,7 @@ endif
|
||||
" Language: fstab file
|
||||
" Maintainer: Radu Dineiu <radu.dineiu@gmail.com>
|
||||
" URL: https://raw.github.com/rid9/vim-fstab/master/ftplugin/fstab.vim
|
||||
" Last Change: 2020 Dec 29
|
||||
" Last Change: 2021 Jan 02
|
||||
" Version: 1.0
|
||||
"
|
||||
" Credits:
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'lilypond', 'ftplugin/lilypond.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" LilyPond filetype plugin
|
||||
" Language: LilyPond (ft=ly)
|
||||
" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
|
||||
" Last Change: 2010 Jul 26
|
||||
"
|
||||
" Installed As: vim/ftplugin/lilypond.vim
|
||||
" Uses Generated File: vim/syntax/lilypond-words.vim
|
||||
"
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Don't load another plugin for this buffer
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setlocal autoindent
|
||||
setlocal shiftwidth=2
|
||||
"
|
||||
" some handy key mappings
|
||||
"
|
||||
" <F4> save & make and play midi with timidity
|
||||
map <buffer> <F4> :w<Return>:se makeprg=lilypond\ \"%<\"<Return>:make<Return>:!timidity "%<.midi"<Return>
|
||||
"
|
||||
" <F5> save & make
|
||||
map <buffer> <F5> :w<Return>:se makeprg=lilypond\ \"%<\"<Return>:make<Return>
|
||||
"
|
||||
" <F6> view ps with ghostview
|
||||
map <buffer> <F6> :!gv --watch "%<.ps" &<Return>
|
||||
"
|
||||
" <F7> prev error
|
||||
map <buffer> <F7> :cp<Return>
|
||||
"
|
||||
" <F8> next error
|
||||
map <buffer> <F8> :cn<Return>
|
||||
"
|
||||
" <F9> make
|
||||
map <buffer> <F9> :w<Return>:se makeprg=make\ -k<Return>:make<Return>
|
||||
"
|
||||
" <F10> menu
|
||||
source $VIMRUNTIME/menu.vim
|
||||
setlocal wildmenu
|
||||
setlocal cpo-=<
|
||||
setlocal wcm=<C-Z>
|
||||
map <buffer> <F10> :emenu <C-Z>
|
||||
"
|
||||
" <F12> comment region
|
||||
map <buffer> <F12> :g!/%.*/normal 0i%<Return>
|
||||
"
|
||||
" <S-F12> remove comments in region
|
||||
map <buffer> <S-F12> :g/%.*/normal 0x<Return>
|
||||
"
|
||||
" Completions in Insert/Replace-mode with <Ctrl-N>
|
||||
setlocal dictionary-=$VIM/syntax/lilypond-words dictionary+=$VIM/syntax/lilypond-words
|
||||
setlocal complete-=k complete+=k
|
||||
"
|
||||
setlocal showmatch
|
||||
@@ -1,64 +0,0 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'lilypond', 'indent/lilypond.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" LilyPond indent file
|
||||
" Language: LilyPond
|
||||
" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
|
||||
" Last Change: 2010 Jul 26
|
||||
"
|
||||
" Installed As: vim/indent/lilypond.vim
|
||||
"
|
||||
" Only load this indent file when no other was loaded.
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=GetLilyPondIndent()
|
||||
setlocal indentkeys=o,O,},>>,!^F
|
||||
|
||||
" Only define the function once.
|
||||
if exists("*GetLilyPondIndent")
|
||||
finish
|
||||
endif
|
||||
|
||||
function GetLilyPondIndent()
|
||||
if v:lnum == 1
|
||||
return 0
|
||||
endif
|
||||
|
||||
"Find a non-blank line above the current line.
|
||||
let lnum = prevnonblank(v:lnum - 1)
|
||||
"Check if a block was started: '{' or '<<' is the last non-blank character of the previous line.
|
||||
if getline(lnum) =~ '^.*\({\|<<\)\s*$'
|
||||
let ind = indent(lnum) + &sw
|
||||
else
|
||||
let ind = indent(lnum)
|
||||
endif
|
||||
|
||||
"Check if a block was ended: '}' or '>>' is the first non-blank character of the current line.
|
||||
if getline(v:lnum) =~ '^\s*\(}\|>>\)'
|
||||
let ind = ind - &sw
|
||||
endif
|
||||
|
||||
" Check if the first character from the previous line is within
|
||||
" a `lilyScheme' region, and if so, use lisp-style indentation
|
||||
" for the current line.
|
||||
"
|
||||
" TODO:
|
||||
" - Only works in version 7.1.215 or later, though it should
|
||||
" silently fail in older versions.
|
||||
" - We should support `lilyScheme' regions that begin in the
|
||||
" middle of the line, too.
|
||||
for id in synstack(lnum, 1)
|
||||
if synIDattr(id, "name") == "lilyScheme"
|
||||
let ind = lispindent(v:lnum)
|
||||
endif
|
||||
endfor
|
||||
|
||||
return ind
|
||||
endfunction
|
||||
"
|
||||
"
|
||||
"
|
||||
@@ -942,7 +942,9 @@ remote: MaxMEllon/vim-jsx-pretty
|
||||
dependencies: javascript
|
||||
filetypes:
|
||||
- name: javascriptreact
|
||||
linguist: JSX
|
||||
patterns:
|
||||
- pattern: '*.jsx'
|
||||
description: Syntax Extension to JavaScript
|
||||
---
|
||||
name: julia
|
||||
remote: JuliaEditorSupport/julia-vim
|
||||
|
||||
@@ -5,7 +5,7 @@ endif
|
||||
" Vim ABAP syntax file
|
||||
" Language: SAP - ABAP/R4
|
||||
" Maintainer: Marius Piedallu van Wyk <lailoken@gmail.com>
|
||||
" Last Change: 2018 Dec 12
|
||||
" Last Change: 2021 Jan 02
|
||||
" Comment: Thanks to EPI-USE Labs for all your assistance. :)
|
||||
|
||||
" Quit when a syntax file was already loaded
|
||||
|
||||
@@ -93,10 +93,6 @@ syn match crystalStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}"
|
||||
syn match crystalStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display
|
||||
|
||||
syn region crystalInterpolation matchgroup=crystalInterpolationDelim start="#{" end="}" contained contains=TOP
|
||||
syn match crystalInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=crystalInterpolationDelim,crystalInstanceVariable,crystalClassVariable,crystalGlobalVariable,crystalPredefinedVariable
|
||||
syn match crystalInterpolationDelim "#\ze\%(\$\|@@\=\)\w\+" display contained
|
||||
syn match crystalInterpolation "#\$\%(-\w\|\W\)" display contained contains=crystalInterpolationDelim,crystalPredefinedVariable,crystalInvalidVariable
|
||||
syn match crystalInterpolationDelim "#\ze\$\%(-\w\|\W\)" display contained
|
||||
syn region crystalNoInterpolation start="\\#{" end="}" contained
|
||||
syn match crystalNoInterpolation "\\#{" display contained
|
||||
syn match crystalNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained
|
||||
@@ -156,7 +152,6 @@ syn match crystalAnnotationName "\%(\%([.@$]\@1<!\.\)\@1<!\<\|::\)\_s*\zs\u\w
|
||||
syn match crystalConstant "\%(\%([.@$]\@1<!\.\)\@1<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@="
|
||||
syn match crystalClassVariable "@@\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display
|
||||
syn match crystalInstanceVariable "@\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display
|
||||
syn match crystalGlobalVariable "$\%(\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*\|-.\)"
|
||||
syn match crystalFreshVariable "\%(\h\|[^\x00-\x7F]\)\@1<!%\%(\h\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" display
|
||||
syn match crystalSymbol "[]})\"':]\@1<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[][=?]\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)"
|
||||
syn match crystalSymbol "[]})\"':]\@1<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)"
|
||||
@@ -172,17 +167,11 @@ SynFold ':' syn region crystalSymbol start="[]})\"':]\@1<!:\"" end="\"" skip="\\
|
||||
syn match crystalBlockParameter "\%(\h\|%\|[^\x00-\x7F]\)\%(\w\|%\|[^\x00-\x7F]\)*" contained
|
||||
syn region crystalBlockParameterList start="\%(\%(\<do\>\|{\)\s*\)\@<=|" end="|" oneline display contains=crystalBlockParameter
|
||||
|
||||
syn match crystalInvalidVariable "$[^ %A-Za-z_-]"
|
||||
syn match crystalPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]#
|
||||
syn match crystalPredefinedVariable "$\d\+" display
|
||||
syn match crystalPredefinedVariable "$_\>" display
|
||||
syn match crystalPredefinedVariable "$-[0FIKadilpvw]\>" display
|
||||
syn match crystalPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display
|
||||
syn match crystalPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display
|
||||
syn match crystalPredefinedConstant "\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!"
|
||||
syn match crystalPredefinedConstant "\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\)\>\%(\s*(\)\@!"
|
||||
syn match crystalPredefinedConstant "\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!"
|
||||
syn match crystalPredefinedConstant "\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(crystal_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!"
|
||||
" In Crystal, almost all special variables were removed and global variables
|
||||
" are not supported https://github.com/crystal-lang/crystal/commit/e872c716d0e936557b34c614efc5a4c24d845f79
|
||||
" NOTE: Only $~ and $? are supported since they are actually not global.
|
||||
syn match crystalPredefinedVariable "$[~?]"
|
||||
syn match crystalPredefinedConstant "\%(\%(\.\@1<!\.\)\@2<!\|::\)\_s*\zs\%(ARGF\|ARGV\|ENV\|STDERR\|STDIN\|STDOUT\)\>\%(\s*(\)\@!"
|
||||
|
||||
" Normal Regular Expression
|
||||
SynFold '/' syn region crystalRegexp matchgroup=crystalRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|ifdef\|when\|in\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[imx]*" skip="\\\\\|\\/" contains=@crystalRegexpSpecial
|
||||
@@ -250,9 +239,9 @@ SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\
|
||||
SynFold '<<' syn region crystalString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=crystalStringDelimiter end=+^\s*\zs\z1$+ contains=crystalHeredocStart,@crystalStringSpecial keepend
|
||||
|
||||
" Module, Class, Method, and Alias Declarations
|
||||
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,crystalFunction,crystalBoolean,crystalPseudoVariable,crystalInstanceVariable,crystalClassVariable,crystalGlobalVariable
|
||||
syn match crystalAliasDeclaration "[^[:space:];#.()]\+" contained contains=crystalSymbol,crystalPredefinedVariable nextgroup=crystalAliasDeclaration2 skipwhite
|
||||
syn match crystalAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=crystalSymbol,crystalPredefinedVariable
|
||||
syn match crystalMethodDeclaration "[^[:space:];#(]\+" contained contains=crystalConstant,crystalFunction,crystalBoolean,crystalPseudoVariable,crystalInstanceVariable,crystalClassVariable
|
||||
syn match crystalFunctionDeclaration "[^[:space:];#(=]\+" contained contains=crystalFunction
|
||||
syn match crystalTypeDeclaration "[^[:space:];#=]\+" contained contains=crystalTypeName
|
||||
syn match crystalClassDeclaration "[^[:space:];#<]\+" contained contains=crystalClassName,crystalOperator
|
||||
@@ -283,7 +272,6 @@ if !exists('b:crystal_no_expensive') && !exists('g:crystal_no_expensive')
|
||||
syn match crystalDefine "\<alias\>" nextgroup=crystalAliasDeclaration skipwhite skipnl
|
||||
syn match crystalDefine "\<def\>" nextgroup=crystalMethodDeclaration skipwhite skipnl
|
||||
syn match crystalDefine "\<fun\>" nextgroup=crystalFunctionDeclaration skipwhite skipnl
|
||||
syn match crystalDefine "\<undef\>" nextgroup=crystalFunction skipwhite skipnl
|
||||
syn match crystalDefine "\<\%(type\|alias\)\>\%(\s*\h\w*\s*=\)\@=" nextgroup=crystalTypeDeclaration skipwhite skipnl
|
||||
syn match crystalClass "\<class\>" nextgroup=crystalClassDeclaration skipwhite skipnl
|
||||
syn match crystalModule "\<module\>" nextgroup=crystalModuleDeclaration skipwhite skipnl
|
||||
@@ -293,7 +281,8 @@ if !exists('b:crystal_no_expensive') && !exists('g:crystal_no_expensive')
|
||||
syn match crystalEnum "\<enum\>" nextgroup=crystalEnumDeclaration skipwhite skipnl
|
||||
syn match crystalAnnotation "\<annotation\>" nextgroup=crystalAnnotationDeclaration skipwhite skipnl
|
||||
|
||||
SynFold 'def' syn region crystalMethodBlock start="\<\%(def\|macro\)\>" matchgroup=crystalDefine end="\%(\<\%(def\|macro\)\_s\+\)\@<!\<end\>" contains=TOP
|
||||
SynFold 'def' syn region crystalMethodBlock start="\<def\>" matchgroup=crystalDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=TOP,crystalForallKeyword
|
||||
SynFold 'macro' syn region crystalMethodBlock start="\<macro\>" matchgroup=crystalDefine end="\%(\<macro\_s\+\)\@<!\<end\>" contains=TOP
|
||||
SynFold 'class' syn region crystalBlock start="\<class\>" matchgroup=crystalClass end="\<end\>" contains=TOP
|
||||
SynFold 'module' syn region crystalBlock start="\<module\>" matchgroup=crystalModule end="\<end\>" contains=TOP
|
||||
SynFold 'struct' syn region crystalBlock start="\<struct\>" matchgroup=crystalStruct end="\<end\>" contains=TOP
|
||||
@@ -301,6 +290,9 @@ if !exists('b:crystal_no_expensive') && !exists('g:crystal_no_expensive')
|
||||
SynFold 'enum' syn region crystalBlock start="\<enum\>" matchgroup=crystalEnum end="\<end\>" contains=TOP
|
||||
SynFold 'annotation' syn region crystalBlock start="\<annotation\>" matchgroup=crystalAnnotation end="\<end\>" contains=TOP
|
||||
|
||||
" keywords in method declaration
|
||||
syn match crystalForallKeyword "\<forall\>[?!]\@!" contained containedin=crystalMethodBlock
|
||||
|
||||
" modifiers
|
||||
syn match crystalConditionalModifier "\<\%(if\|unless\|ifdef\)\>" display
|
||||
|
||||
@@ -341,8 +333,9 @@ else
|
||||
syn match crystalControl "\<macro\>[?!]\@!" nextgroup=crystalMacroDeclaration skipwhite skipnl
|
||||
syn match crystalControl "\<enum\>[?!]\@!" nextgroup=crystalEnumDeclaration skipwhite skipnl
|
||||
syn match crystalControl "\<annotation\>[?!]\@!" nextgroup=crystalAnnotationDeclaration skipwhite skipnl
|
||||
syn match crystalControl "\<\%(case\|begin\|do\|if\|ifdef\|unless\|while\|until\|else\|elsif\|ensure\|then\|when\|in\|end\)\>[?!]\@!"
|
||||
syn match crystalKeyword "\<\%(alias\|undef\)\>[?!]\@!"
|
||||
syn match crystalControl "\<\%(case\|begin\|do\|if\|ifdef\|unless\|while\|select\|until\|else\|elsif\|ensure\|then\|when\|in\|end\)\>[?!]\@!"
|
||||
syn match crystalKeyword "\<alias\>[?!]\@!"
|
||||
syn match crystalForallKeyword "\<forall\>[?!]\@!"
|
||||
endif
|
||||
|
||||
" Link attribute
|
||||
@@ -353,13 +346,13 @@ if !exists('g:crystal_no_special_methods')
|
||||
syn keyword crystalAccess protected private
|
||||
" attr is a common variable name
|
||||
syn keyword crystalAttribute abstract
|
||||
syn match crystalAttribute "\<\%(class_\)\=\%(getter\|setter\|property\)[!?]\=\s" display
|
||||
syn match crystalAttribute "\<\%(\%(class_\)\=\%(getter\|setter\|property\)[!?]\=\|def_\%(clone\|equals\|equals_and_hash\|hash\)\|delegate\|forward_missing_to\)\s" display
|
||||
syn match crystalControl "\<\%(abort\|at_exit\|exit\|fork\|loop\)\>[?!]\@!" display
|
||||
syn keyword crystalException raise
|
||||
" false positive with 'include?'
|
||||
syn match crystalInclude "\<include\>[?!]\@!" display
|
||||
syn keyword crystalInclude extend require
|
||||
syn keyword crystalKeyword caller typeof pointerof sizeof instance_sizeof
|
||||
syn keyword crystalKeyword caller typeof pointerof sizeof instance_sizeof offsetof
|
||||
syn match crystalRecord "\<record\%(\s\+\u\w*\)\@=" display
|
||||
endif
|
||||
|
||||
@@ -404,16 +397,16 @@ SynFold '#' syn region crystalMultilineComment start="\%(\%(^\s*#.*\n\)\@<!\%(^\
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(alias\|begin\|break\|case\|class\|def\|defined\|do\|else\|select\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|ifdef\|in\|module\|next\|nil\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(rescue\|return\|self\|super\|previous_def\|then\|true\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|in\|while\|yield\|with\|__FILE__\|__LINE__\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(unless\|until\|when\|in\|while\|yield\|with\|__FILE__\|__LINE__\)\>" transparent contains=NONE
|
||||
|
||||
syn match crystalKeywordAsMethod "\<\%(alias\|begin\|case\|class\|def\|do\|end\)[?!]" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\<\%(if\|ifdef\|module\|undef\|unless\|until\|while\)[?!]" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\<\%(if\|ifdef\|module\|unless\|until\|while\)[?!]" transparent contains=NONE
|
||||
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(abort\|at_exit\|caller\|exit\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(extend\|fork\|include\|asm\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(loop\|private\|protected\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(require\|raise\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(typeof\|pointerof\|sizeof\|instance_sizeof\|\)\>" transparent contains=NONE
|
||||
syn match crystalKeywordAsMethod "\%(\%(\.\@1<!\.\)\|::\)\_s*\%(typeof\|pointerof\|sizeof\|instance_sizeof\|offsetof\|\)\>" transparent contains=NONE
|
||||
|
||||
hi def link crystalClass crystalDefine
|
||||
hi def link crystalModule crystalDefine
|
||||
@@ -450,7 +443,6 @@ hi def link crystalStructName crystalConstant
|
||||
hi def link crystalLibName crystalConstant
|
||||
hi def link crystalEnumName crystalConstant
|
||||
hi def link crystalAnnotationName crystalConstant
|
||||
hi def link crystalGlobalVariable crystalIdentifier
|
||||
hi def link crystalBlockParameter crystalIdentifier
|
||||
hi def link crystalInstanceVariable crystalIdentifier
|
||||
hi def link crystalFreshVariable crystalIdentifier
|
||||
@@ -486,9 +478,9 @@ hi def link crystalRegexp crystalString
|
||||
hi def link crystalMacro PreProc
|
||||
hi def link crystalMacroDelim crystalMacro
|
||||
hi def link crystalMacroKeyword crystalKeyword
|
||||
hi def link crystalForallKeyword crystalDefine
|
||||
hi def link crystalLinkAttrDelim crystalMacroDelim
|
||||
hi def link crystalError Error
|
||||
hi def link crystalInvalidVariable crystalError
|
||||
hi def link crystalSpaceError crystalError
|
||||
hi def link crystalInvalidInteger crystalError
|
||||
|
||||
|
||||
@@ -344,7 +344,7 @@ exec 'syntax region juliaQuotedParBlockS matchgroup=juliaQParDelim contained s
|
||||
" force precedence over Symbols
|
||||
syntax match juliaOperator display "::"
|
||||
|
||||
syntax region juliaCommentL matchgroup=juliaCommentDelim excludenl start="#\ze\%([^=]\|$\)" end="$" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments
|
||||
syntax region juliaCommentL matchgroup=juliaCommentDelim excludenl start="#\ze\%([^=]\|$\)" end="$" contains=juliaTodo,@juliaSpellcheckComments
|
||||
syntax region juliaCommentM matchgroup=juliaCommentDelim fold start="#=\ze\%([^#]\|$\)" end="=#" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments
|
||||
syntax keyword juliaTodo contained TODO FIXME XXX
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,91 +0,0 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'lilypond', 'syntax/lilypond.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" LilyPond syntax file
|
||||
" Language: LilyPond
|
||||
" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
|
||||
" Last Change: 2010 Jul 26
|
||||
"
|
||||
" Installed As: vim/syntax/lilypond.vim
|
||||
" Uses Generated File: vim/syntax/lilypond-words.vim
|
||||
"
|
||||
" 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
|
||||
|
||||
" Read the LilyPond syntax match groups:
|
||||
" lilyKeyword, lilyReservedWord, lilyNote
|
||||
if version < 600
|
||||
so <sfile>:p:h/lilypond-words.vim
|
||||
else
|
||||
runtime! syntax/lilypond-words.vim
|
||||
if exists("b:current_syntax")
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
endif
|
||||
|
||||
" Match also parethesis of angle type
|
||||
setlocal mps+=<:>
|
||||
|
||||
" Case matters
|
||||
syn case match
|
||||
|
||||
syn cluster lilyMatchGroup contains=lilyMatcher,lilyString,lilyComment,lilyStatement,lilyNumber,lilySlur,lilySpecial,lilyNote,lilyKeyword,lilyArticulation,lilyReservedWord,lilyScheme
|
||||
|
||||
syn region lilyMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[<>]" end="}" contains=@lilyMatchGroup fold
|
||||
syn region lilyMatcher matchgroup=Delimiter start="\[" end="]" contains=@lilyMatchGroup fold
|
||||
syn region lilyMatcher matchgroup=Delimiter start="<" skip="\\\\\|\\[{<>}]" end=">" contains=@lilyMatchGroup fold
|
||||
|
||||
syn region lilyString start=/"/ end=/"/ skip=/\\"/
|
||||
syn region lilyComment start="%{" skip="%$" end="%}"
|
||||
syn region lilyComment start="%\([^{]\|$\)" end="$"
|
||||
|
||||
syn match lilyNumber "[-_^.]\?\d\+[.]\?"
|
||||
syn match lilySlur "[(~)]"
|
||||
syn match lilySlur "\\[()]"
|
||||
syn match lilySpecial "\\[<!>\\]"
|
||||
" avoid highlighting the extra character in situations like
|
||||
" c--\mf c^^\mf c__\mf
|
||||
syn match lilyArticulation "[-_^][-_^+|>.]"
|
||||
|
||||
" Include Scheme syntax highlighting, where appropriate
|
||||
syn include @embeddedScheme syntax/scheme.vim
|
||||
unlet b:current_syntax
|
||||
syn region lilyScheme matchgroup=Delimiter start="#['`]\?(" matchgroup=Delimiter end=")" contains=@embeddedScheme
|
||||
|
||||
" Rest of syntax highlighting rules start here
|
||||
"
|
||||
" " Define the default highlighting.
|
||||
" " For version 5.7 and earlier: only when not done already
|
||||
" " For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_lily_syn_inits")
|
||||
if version < 508
|
||||
let did_lily_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink Delimiter Identifier
|
||||
|
||||
HiLink lilyString String
|
||||
HiLink lilyComment Comment
|
||||
|
||||
HiLink lilyNote Identifier
|
||||
HiLink lilyArticulation PreProc
|
||||
HiLink lilyKeyword Keyword
|
||||
HiLink lilyReservedWord Type
|
||||
|
||||
HiLink lilyNumber Constant
|
||||
HiLink lilySpecial Special
|
||||
HiLink lilySlur ModeMsg
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "lilypond"
|
||||
@@ -27,6 +27,9 @@ if exists("b:current_syntax") && b:current_syntax == "ocaml"
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:keepcpo = &cpo
|
||||
set cpo&vim
|
||||
|
||||
" ' can be used in OCaml identifiers
|
||||
setlocal iskeyword+='
|
||||
|
||||
@@ -388,4 +391,7 @@ hi def link ocamlPpxEncl ocamlEncl
|
||||
|
||||
let b:current_syntax = "ocaml"
|
||||
|
||||
let &cpo = s:keepcpo
|
||||
unlet s:keepcpo
|
||||
|
||||
" vim: ts=8
|
||||
|
||||
@@ -8,6 +8,7 @@ endif
|
||||
|
||||
syntax keyword odinUsing using
|
||||
syntax keyword odinTransmute transmute
|
||||
syntax keyword odinCast cast
|
||||
syntax keyword odinDistinct distinct
|
||||
syntax keyword odinOpaque opaque
|
||||
|
||||
@@ -68,7 +69,6 @@ syntax match odinFunction "\v<\w*>(\s*::\s*proc)@="
|
||||
|
||||
syntax match odinTagNote "@\<\w\+\>" display
|
||||
|
||||
syntax match odinClass "\v<[A-Z]\w+>" display
|
||||
syntax match odinConstant "\v<[A-Z0-9,_]+>" display
|
||||
syntax match odinRange "\.\." display
|
||||
syntax match odinHalfRange "\.\.\<" display
|
||||
@@ -79,7 +79,11 @@ syntax match odinReturnOp "->" display
|
||||
|
||||
syntax match odinInteger "\-\?\<\d\+\>" display
|
||||
syntax match odinFloat "\-\?\<[0-9][0-9_]*\%(\.[0-9][0-9_]*\)\%([eE][+-]\=[0-9_]\+\)\=" display
|
||||
syntax match odinHex "\-\?\<0x[0-9A-Fa-f]\+\>" display
|
||||
syntax match odinHex "\<0[xX][0-9A-Fa-f]\+\>" display
|
||||
syntax match odinDoz "\<0[zZ][0-9a-bA-B]\+\>" display
|
||||
syntax match odinOct "\<0[oO][0-7]\+\>" display
|
||||
syntax match odinBin "\<0[bB][01]\+\>" display
|
||||
|
||||
syntax match odinAddressOf "&" display
|
||||
syntax match odinDeref "\^" display
|
||||
|
||||
@@ -93,6 +97,7 @@ syntax region odinBlockComment start=/\v\/\*/ end=/\v\*\// contains=odinBlockCom
|
||||
|
||||
highlight link odinUsing Keyword
|
||||
highlight link odinTransmute Keyword
|
||||
highlight link odinCast Keyword
|
||||
highlight link odinDistinct Keyword
|
||||
highlight link odinOpaque Keyword
|
||||
highlight link odinReturn Keyword
|
||||
@@ -162,8 +167,6 @@ highlight link odinFixMe Todo
|
||||
highlight link odinNoCheckin Todo
|
||||
highlight link odinHack Todo
|
||||
|
||||
highlight link odinClass Type
|
||||
|
||||
highlight link odinTemplate Constant
|
||||
|
||||
highlight link odinTagNote Identifier
|
||||
@@ -174,5 +177,8 @@ highlight link odinNull Type
|
||||
highlight link odinInteger Number
|
||||
highlight link odinFloat Float
|
||||
highlight link odinHex Number
|
||||
highlight link odinOct Number
|
||||
highlight link odinBin Number
|
||||
highlight link odinDoz Number
|
||||
|
||||
let b:current_syntax = "odin"
|
||||
|
||||
@@ -9,7 +9,7 @@ endif
|
||||
" License: Vim license (see `:help license`)
|
||||
|
||||
" Based on PostgreSQL 13.1
|
||||
" Automatically generated on 2020-12-30 at 10:21:40
|
||||
" Automatically generated on 2021-01-13 at 20:54:21
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@@ -2010,20 +2010,26 @@ else
|
||||
\ contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlPlpgsqlKeyword,sqlPlpgsqlVariable,sqlPlpgsqlOperator,sqlNumber,sqlIsOperator,sqlString,sqlTodo
|
||||
endif
|
||||
|
||||
" Folding
|
||||
syn region sqlFold start='^\s*\zs\c\(create\|update\|alter\|select\|insert\|do\)\>' end=';$' transparent fold contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlIdentifier,sqlNumber,sqlOperator,sqlSpecial,sqlString,sqlTodo,plpgsql
|
||||
let s:plgroups = 'plpgsql'
|
||||
|
||||
" PL/<any other language>
|
||||
fun! s:add_syntax(s)
|
||||
execute 'syn include @PL' . a:s . ' syntax/' . a:s . '.vim'
|
||||
execute 'syn include @PL' .. a:s .. ' syntax/' .. a:s .. '.vim'
|
||||
unlet b:current_syntax
|
||||
execute 'syn region pgsqlpl' . a:s . ' matchgroup=sqlString start=+\$' . a:s . '\$+ end=+\$' . a:s . '\$+ keepend contains=@PL' . a:s
|
||||
execute 'syn region pgsqlpl' .. a:s .. ' matchgroup=sqlString start=+\$' .. a:s .. '\$+ end=+\$' .. a:s .. '\$+ keepend contains=@PL' .. a:s
|
||||
let s:plgroups .= ',pgsqlpl' .. a:s
|
||||
endf
|
||||
|
||||
for pl in get(b:, 'pgsql_pl', get(g:, 'pgsql_pl', []))
|
||||
call s:add_syntax(pl)
|
||||
endfor
|
||||
|
||||
" Folding
|
||||
execute "syn region sqlFold start='^\s*\zs\c\(create\|update\|alter\|select\|insert\|do\)\>' end=';$' transparent fold "
|
||||
\ .. "contains=sqlIsKeyword,sqlIsFunction,sqlComment,sqlIdentifier,sqlNumber,sqlOperator,sqlSpecial,sqlString,sqlTodo," .. s:plgroups
|
||||
|
||||
unlet s:plgroups
|
||||
|
||||
" Default highlighting
|
||||
hi def link sqlCatalog Constant
|
||||
hi def link sqlComment Comment
|
||||
|
||||
@@ -5,7 +5,7 @@ endif
|
||||
" Vim syntax file
|
||||
" Language: PROLOG
|
||||
" Maintainer: Anton Kochkov <anton.kochkov@gmail.com>
|
||||
" Last Change: 2019 Aug 29
|
||||
" Last Change: 2021 Jan 05
|
||||
|
||||
" There are two sets of highlighting in here:
|
||||
" If the "prolog_highlighting_clean" variable exists, it is rather sparse.
|
||||
@@ -25,16 +25,16 @@ syn case match
|
||||
" Very simple highlighting for comments, clause heads and
|
||||
" character codes. It respects prolog strings and atoms.
|
||||
|
||||
syn region prologCComment start=+/\*+ end=+\*/+
|
||||
syn match prologComment +%.*+
|
||||
syn region prologCComment start=+/\*+ end=+\*/+ contains=@Spell
|
||||
syn match prologComment +%.*+ contains=@Spell
|
||||
|
||||
if !exists("prolog_highlighting_no_keyword")
|
||||
syn keyword prologKeyword module meta_predicate multifile dynamic
|
||||
endif
|
||||
syn match prologCharCode +0'\\\=.+
|
||||
syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn region prologString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@Spell
|
||||
syn region prologAtom start=+'+ skip=+\\\\\|\\'+ end=+'+
|
||||
syn region prologClause matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause
|
||||
syn region prologClause matchgroup=prologClauseHead start=+^\s*[a-z]\w*+ matchgroup=Normal end=+\.\s\|\.$+ contains=ALLBUT,prologClause contains=@NoSpell
|
||||
|
||||
if !exists("prolog_highlighting_clean")
|
||||
|
||||
|
||||
@@ -111,13 +111,13 @@ syntax match tsxEqual +=+ display contained
|
||||
|
||||
" <tag id="sample">
|
||||
" s~~~~~~e
|
||||
syntax region tsxString contained start=+"+ end=+"+ contains=tsxEntity,@Spell display
|
||||
syntax region tsxString contained start=+["']+ end=+["']+ contains=tsxEntity,@Spell display
|
||||
|
||||
" <tag key={this.props.key}>
|
||||
" s~~~~~~~~~~~~~~e
|
||||
syntax region tsxEscJs
|
||||
\ contained
|
||||
\ contains=@typescriptValue,@tsxComment
|
||||
\ contains=@typescriptValue,@tsxComment,typescriptObjectSpread
|
||||
\ matchgroup=typescriptBraces
|
||||
\ start=+{+
|
||||
\ end=+}+
|
||||
|
||||
Reference in New Issue
Block a user