diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-16 13:41:54 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-16 13:41:54 +0200 |
commit | 3ee6ab9d13767aacceea51e72ecf9646206b7163 (patch) | |
tree | 0d4ff5e447f262d709c18ef0e95622bb7b1c13f2 /syntax | |
parent | cd919c003992d5868b2b6e254ca265f82a45933f (diff) | |
download | vim-polyglot-3ee6ab9d13767aacceea51e72ecf9646206b7163.tar.gz vim-polyglot-3ee6ab9d13767aacceea51e72ecf9646206b7163.zip |
Update
Diffstat (limited to 'syntax')
-rw-r--r-- | syntax/apache.vim | 4 | ||||
-rw-r--r-- | syntax/asterisk.vim | 4 | ||||
-rw-r--r-- | syntax/cabal-2.vim | 7 | ||||
-rw-r--r-- | syntax/crystal.vim | 2 | ||||
-rw-r--r-- | syntax/css.vim | 2 | ||||
-rw-r--r-- | syntax/fortran.vim | 30 | ||||
-rw-r--r-- | syntax/julia.vim | 39 | ||||
-rw-r--r-- | syntax/less.vim | 3 | ||||
-rw-r--r-- | syntax/qml.vim | 2 |
9 files changed, 62 insertions, 31 deletions
diff --git a/syntax/apache.vim b/syntax/apache.vim index b515c411..737f478f 100644 --- a/syntax/apache.vim +++ b/syntax/apache.vim @@ -5,7 +5,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'apache') == -1 " Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> " License: This file can be redistribued and/or modified under the same terms " as Vim itself. -" Last Change: 2018-12-06 +" Last Change: 2020 Oct 07 " Notes: Last synced with apache-2.2.3, version 1.x is no longer supported " TODO: see particular FIXME's scattered through the file " make it really linewise? @@ -44,6 +44,8 @@ syn keyword apacheOption user group syn match apacheOption "\<valid-user\>" syn case match syn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK contained +" Added as suggested by Mikko Koivunalho +syn keyword apacheMethodOption BASELINE-CONTROL CHECKIN CHECKOUT LABEL MERGE MKACTIVITY MKWORKSPACE REPORT UNCHECKOUT UPDATE VERSION-CONTROL contained syn case ignore syn match apacheSection "<\/\=\(Directory\|DirectoryMatch\|Files\|FilesMatch\|IfModule\|IfDefine\|Location\|LocationMatch\|VirtualHost\)[^>]*>" contains=apacheAnything syn match apacheLimitSection "<\/\=\(Limit\|LimitExcept\)[^>]*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheError diff --git a/syntax/asterisk.vim b/syntax/asterisk.vim index f29ae119..e065fb4a 100644 --- a/syntax/asterisk.vim +++ b/syntax/asterisk.vim @@ -21,7 +21,7 @@ syn match asteriskComment ";.*" contains=asteriskTodo syn match asteriskContext "\[.\{-}\]" syn match asteriskExten "^\s*\zsexten\s*=>\?\s*[^,]\+\ze," contains=asteriskPattern nextgroup=asteriskPriority syn match asteriskExten "^\s*\zssame\s*=>\?\s*\ze" nextgroup=asteriskPriority -syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|\(no\)\?load\)\s*=>\?" +syn match asteriskExten "^\s*\(register\|channel\|ignorepat\|include\|l\?e\?switch\|\(no\)\?load\)\s*=>\?" syn match asteriskPattern "_\(\[[[:alnum:]#*\-]\+\]\|[[:alnum:]#*]\)*\.\?" contained syn match asteriskPattern "[^A-Za-z0-9,]\zs[[:alnum:]#*]\+\ze" contained syn match asteriskApp ",\zs[a-zA-Z]\+\ze$" @@ -41,7 +41,7 @@ syn match asteriskVarLen "\${_\{0,2}[[:alpha:]][[:alnum:]_]*(.*)} syn match asteriskVarLen "(\zs[[:alpha:]][[:alnum:]_]*(.\{-})\ze=" contains=asteriskVar,asteriskVarLen,asteriskExp syn match asteriskExp "\$\[.\{-}\]" contains=asteriskVar,asteriskVarLen,asteriskExp syn match asteriskCodecsPermit "^\s*\(allow\|disallow\)\s*=\s*.*$" contains=asteriskCodecs -syn match asteriskCodecs "\(g723\|gsm\|ulaw\|alaw\|g726\|adpcm\|slin\|lpc10\|g729\|speex\|ilbc\|all\s*$\)" +syn match asteriskCodecs "\(vp9\|vp8\|h264\|h263p\|h263\|h261\|jpeg\|opus\|g722\|g723\|gsm\|ulaw\|alaw\|g719\|g726\|g726aal2\|siren7\|siren14\|adpcm\|slin\|lpc10\|g729\|speex\|ilbc\|wav\|all\s*$\)" syn match asteriskError "^\(type\|auth\|permit\|deny\|bindaddr\|host\)\s*=.*$" syn match asteriskType "^\zstype=\ze\<\(peer\|user\|friend\)\>$" contains=asteriskTypeType syn match asteriskTypeType "\<\(peer\|user\|friend\)\>" contained diff --git a/syntax/cabal-2.vim b/syntax/cabal-2.vim index c4ef829f..e297a9bc 100644 --- a/syntax/cabal-2.vim +++ b/syntax/cabal-2.vim @@ -6,7 +6,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cabal') == -1 " Maintainer: Marcin Szamotulski <profunctor@pm.me> " Previous Maintainer: Vincent Berthoux <twinside@gmail.com> " File Types: .cabal -" Last Change: 15 May 2018 +" Last Change: 3 Oct 2020 " v1.5: Incorporated changes from " https://github.com/sdiehl/haskell-vim-proto/blob/master/vim/syntax/cabal.vim " Use `syn keyword` instead of `syn match`. @@ -64,11 +64,12 @@ syn keyword cabalCategory contained \ source-repository \ flag \ custom-setup + \ common syn match cabalCategoryTitle contained /[^{]*\ze{\?/ syn match cabalCategoryRegion \ contains=cabalCategory,cabalCategoryTitle \ nextgroup=cabalCategory skipwhite - \ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|custom-setup\)\+\s*\%(.*$\|$\)/ + \ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|custom-setup\|common\)\+\s*\%(.*$\|$\)/ syn keyword cabalTruth true false " cabalStatementRegion which limits the scope of cabalStatement keywords, this @@ -78,6 +79,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion \ default-language \ default-extensions \ author + \ autogen-modules \ branch \ bug-reports \ build-depends @@ -112,6 +114,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion \ homepage \ hs-source-dirs \ hugs-options + \ import \ include-dirs \ includes \ install-includes diff --git a/syntax/crystal.vim b/syntax/crystal.vim index fb1b200f..147bd050 100644 --- a/syntax/crystal.vim +++ b/syntax/crystal.vim @@ -141,7 +141,7 @@ syn match crystalFloat "\<\d[[:digit:]_]*\%(\.\d[[:digit:]_]*\)\=\%([eE][-+] syn match crystalInvalidInteger "\%(\.\|[eE][+-]\)\@2<!\<0\d\+\>" contained containedin=crystalFloat,crystalInteger display " Identifiers -syn match crystalLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent +syn match crystalLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display syn match crystalBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent syn match crystalTypeName "\%(\%([.@$]\@1<!\.\)\@1<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=" contained diff --git a/syntax/css.vim b/syntax/css.vim index 8cac40ec..df65677d 100644 --- a/syntax/css.vim +++ b/syntax/css.vim @@ -651,7 +651,7 @@ endif let &cpo = s:cpo_save unlet s:cpo_save -" vim: ts=8 +" vim: ts=8 endif diff --git a/syntax/fortran.vim b/syntax/fortran.vim index 4fddcef3..96b0fbe8 100644 --- a/syntax/fortran.vim +++ b/syntax/fortran.vim @@ -2,19 +2,18 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fortran') == -1 " Vim syntax file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77) -" Version: 102 -" Last Change: 2020 Apr 20 -" Patched By: Eisuke Kawashima +" Version: (v103) 2020 October 07 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/> " Usage: For instructions, do :help fortran-syntax from Vim " Credits: -" Version 0.1 for Fortran 95 was created (April 2000) by Ajit Thakkar from the -" Fortran 77 syntax file by Mario Eusebio and Preben Guldberg. +" Version 0.1 for Fortran 95 was created in April 2000 by Ajit Thakkar from an +" older Fortran 77 syntax file by Mario Eusebio and Preben Guldberg. " Since then, useful suggestions and contributions have been made, in order, by: " Andrej Panjkov, Bram Moolenaar, Thomas Olsen, Michael Sternberg, Christian Reile, " Walter Dieudonné, Alexander Wagner, Roman Bertle, Charles Rendleman, " Andrew Griffiths, Joe Krahn, Hendrik Merx, Matt Thompson, Jan Hermann, -" Stefano Zaghi, Vishnu V. Krishnan, Judicaël Grasset, and Takuma Yoshida +" Stefano Zaghi, Vishnu V. Krishnan, Judicaël Grasset, Takuma Yoshida, +" Eisuke Kawashima, and André Chalella.` if exists("b:current_syntax") finish @@ -104,6 +103,8 @@ syn match fortranUnitHeader "\<end\>" syn match fortranType "\<character\>" syn match fortranType "\<complex\>" syn match fortranType "\<integer\>" +syn match fortranType "\<real\>" +syn match fortranType "\<logical\>" syn keyword fortranType intrinsic syn match fortranType "\<implicit\>" syn keyword fortranStructure dimension @@ -151,11 +152,9 @@ syn keyword fortranExtraIntrinsic algama cdabs cdcos cdexp cdlog cdsin cdsqrt cq syn keyword fortranIntrinsic abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh syn match fortranIntrinsic "\<len\s*[(,]"me=s+3 syn match fortranIntrinsic "\<real\s*("me=s+4 -syn match fortranType "\<implicit\s\+real" -syn match fortranType "^\s*real\>" syn match fortranIntrinsic "\<logical\s*("me=s+7 -syn match fortranType "\<implicit\s\+logical" -syn match fortranType "^\s*logical\>" +syn match fortranType "\<implicit\s\+real\>" +syn match fortranType "\<implicit\s\+logical\>" "Numbers of various sorts " Integers @@ -170,6 +169,12 @@ syn match fortranFloatIll display "\<\d\+\.\([deq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" syn match fortranFloatIll display "\<\d\+\.\d\+\([dq][-+]\=\d\+\)\=\(_\a\w*\)\=\>" " floating point number syn match fortranFloat display "\<\d\+\.\d\+\(e[-+]\=\d\+\)\=\(_\a\w*\)\=\>" +" binary number +syn match fortranBinary display "b["'][01]\+["']" +" octal number +syn match fortranOctal display "o["'][0-7]\+["']" +" hexadecimal number +syn match fortranHex display "z["'][0-9A-F]\+["']" " Numbers in formats syn match fortranFormatSpec display "\d*f\d\+\.\d\+" syn match fortranFormatSpec display "\d*e[sn]\=\d\+\.\d\+\(e\d+\>\)\=" @@ -217,7 +222,6 @@ syn match fortranUnitHeader "\<submodule\>" syn keyword fortranUnitHeader use only contains syn keyword fortranUnitHeader result operator assignment syn match fortranUnitHeader "\<interface\>" -syn match fortranUnitHeader "\<recursive\>" syn keyword fortranKeyword allocate deallocate nullify cycle exit syn match fortranConditional "\<select\>" syn keyword fortranConditional case default where elsewhere @@ -276,6 +280,7 @@ syn keyword fortranIntrinsic null cpu_time syn match fortranType "\<elemental\>" syn match fortranType "\<pure\>" syn match fortranType "\<impure\>" +syn match fortranType "\<recursive\>" if exists("fortran_more_precise") syn match fortranConstructName "\(\<end\s*forall\s\+\)\@15<=\a\w*\>" endif @@ -455,6 +460,9 @@ hi def link fortranTodo Todo hi def link fortranContinueMark Special hi def link fortranString String hi def link fortranNumber Number +hi def link fortranBinary Number +hi def link fortranOctal Number +hi def link fortranHex Number hi def link fortranOperator Operator hi def link fortranBoolean Boolean hi def link fortranLabelError Error diff --git a/syntax/julia.vim b/syntax/julia.vim index be4f9680..c2f36b7e 100644 --- a/syntax/julia.vim +++ b/syntax/julia.vim @@ -76,7 +76,7 @@ syntax cluster juliaExpressions contains=@juliaParItems,@juliaStringItems,@juli syntax cluster juliaExprsPrintf contains=@juliaExpressions,@juliaPrintfItems syntax cluster juliaParItems contains=juliaParBlock,juliaSqBraIdxBlock,juliaSqBraBlock,juliaCurBraBlock,juliaQuotedParBlock,juliaQuotedQMarkPar -syntax cluster juliaKeywordItems contains=juliaKeyword,juliaInfixKeyword,juliaRepKeyword,juliaTypedef +syntax cluster juliaKeywordItems contains=juliaKeyword,juliaImportLine,juliaInfixKeyword,juliaRepKeyword syntax cluster juliaBlocksItems contains=juliaConditionalBlock,juliaWhileBlock,juliaForBlock,juliaBeginBlock,juliaFunctionBlock,juliaMacroBlock,juliaQuoteBlock,juliaTypeBlock,juliaImmutableBlock,juliaExceptionBlock,juliaLetBlock,juliaDoBlock,juliaModuleBlock,juliaStructBlock,juliaMutableStructBlock,juliaAbstractBlock,juliaPrimitiveBlock syntax cluster juliaTypesItems contains=juliaBaseTypeBasic,juliaBaseTypeNum,juliaBaseTypeC,juliaBaseTypeError,juliaBaseTypeIter,juliaBaseTypeString,juliaBaseTypeArray,juliaBaseTypeDict,juliaBaseTypeSet,juliaBaseTypeIO,juliaBaseTypeProcess,juliaBaseTypeRange,juliaBaseTypeRegex,juliaBaseTypeFact,juliaBaseTypeFact,juliaBaseTypeSort,juliaBaseTypeRound,juliaBaseTypeSpecial,juliaBaseTypeRandom,juliaBaseTypeDisplay,juliaBaseTypeTime,juliaBaseTypeOther @@ -126,8 +126,14 @@ syntax region juliaSqBraIdxBlock matchgroup=juliaParDelim start="\[" end="\]" c exec 'syntax region juliaSqBraBlock matchgroup=juliaParDelim start="\%(^\|\s\|' . s:operators . '\)\@'.s:d(3).'<=\[" end="\]" contains=@juliaExpressions,juliaComprehensionFor,juliaSymbolS,juliaQuotedParBlockS,juliaQuotedQMarkParS' syntax region juliaCurBraBlock matchgroup=juliaParDelim start="{" end="}" contains=@juliaExpressions -exec 'syntax match juliaKeyword display "'.s:nodot.'\<\%(return\|local\|global\|import\%(all\)\?\|export\|using\|const\|where\)\>"' +exec 'syntax match juliaKeyword display "'.s:nodot.'\<\%(return\|local\|global\|const\|where\)\>"' syntax match juliaInfixKeyword display "\%(=\s*\)\@<!\<\%(in\|isa\)\>\S\@!\%(\s*=\)\@!" + +" The import/export/using keywords introduce a sort of special parsing +" environment with its own rules +exec 'syntax region juliaImportLine matchgroup=juliaKeyword excludenl start="'.s:nodot.'\<\%(import\|using\|export\)\>" skip="\%(\%(\<\%(import\|using\|export\)\>\)\|^\)\@'.s:d(6).'<=$" end="$" end="\%([])}]\)\@=" contains=@juliaExpressions,juliaAsKeyword,@juliaContinuationItems,juliaMacroName' +syntax match juliaAsKeyword display contained "\<as\>" + exec 'syntax match juliaRepKeyword display "'.s:nodot.'\<\%(break\|continue\)\>"' exec 'syntax region juliaConditionalBlock matchgroup=juliaConditional start="'.s:nodot.'\<if\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock fold' exec 'syntax region juliaConditionalEIBlock matchgroup=juliaConditional transparent contained start="'.s:nodot.'\<elseif\>" end="'.s:nodot.'\<\%(end\|else\|elseif\)\>"me=s-1 contains=@juliaExpressions,juliaConditionalEIBlock,juliaConditionalEBlock' @@ -139,17 +145,16 @@ exec 'syntax region juliaFunctionBlock matchgroup=juliaBlKeyword start="'.s:nod exec 'syntax region juliaMacroBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<macro\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold' exec 'syntax region juliaQuoteBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<quote\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold' exec 'syntax region juliaStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<struct\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold' -exec 'syntax region juliaMutableStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<mutable struct\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold' +exec 'syntax region juliaMutableStructBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<mutable\s\+struct\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold' exec 'syntax region juliaLetBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<let\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold' exec 'syntax region juliaDoBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<do\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions fold' exec 'syntax region juliaModuleBlock matchgroup=juliaBlKeyword start="\%(\%(\.\s*\)\@'.s:d(6).'<!\|\%(@\s*\.\s*\)\@'.s:d(6).'<=\)\<\%(bare\)\?module\>" end="\<end\>" contains=@juliaExpressions fold' exec 'syntax region juliaExceptionBlock matchgroup=juliaException start="'.s:nodot.'\<try\>" end="'.s:nodot.'\<end\>" contains=@juliaExpressions,juliaCatchBlock,juliaFinallyBlock fold' exec 'syntax region juliaCatchBlock matchgroup=juliaException transparent contained start="'.s:nodot.'\<catch\>" end="'.s:nodot.'\<end\>"me=s-1 contains=@juliaExpressions,juliaFinallyBlock' exec 'syntax region juliaFinallyBlock matchgroup=juliaException transparent contained start="'.s:nodot.'\<finally\>" end="'.s:nodot.'\<end\>"me=s-1 contains=@juliaExpressions' -exec 'syntax match juliaTypedef "'.s:nodot.'\<\%(abstract\|typealias\|bitstype\)\>"' " AbstractBlock needs to come after to take precedence -exec 'syntax region juliaAbstractBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<abstract type\>" end="'.s:nodot.'\<end\>" fold contains=@juliaExpressions' -exec 'syntax region juliaPrimitiveBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<primitive type\>" end="'.s:nodot.'\<end\>" fold contains=@juliaExpressions' +exec 'syntax region juliaAbstractBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<abstract\s\+type\>" end="'.s:nodot.'\<end\>" fold contains=@juliaExpressions' +exec 'syntax region juliaPrimitiveBlock matchgroup=juliaBlKeyword start="'.s:nodot.'\<primitive\s\+type\>" end="'.s:nodot.'\<end\>" fold contains=@juliaExpressions' exec 'syntax region juliaComprehensionFor matchgroup=juliaComprehensionFor transparent contained start="\%([^[:space:],;:({[]\_s*\)\@'.s:d(80).'<=\<for\>" end="\ze[]);]" contains=@juliaExpressions,juliaComprehensionIf,juliaComprehensionFor' exec 'syntax match juliaComprehensionIf contained "'.s:nodot.'\<if\>"' @@ -275,7 +280,7 @@ syntax region juliatextString matchgroup=juliaStringDelim start=+\<text\z("\(" syntax region juliahtmlString matchgroup=juliaStringDelim start=+\<html\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw syntax region juliaint128String matchgroup=juliaStringDelim start=+\<u\?int128\z("\(""\)\?\)+ skip=+\%(\\\\\)*\\"+ end=+\z1+ contains=@juliaSpecialCharsRaw -syntax region juliaDocString matchgroup=juliaDocStringDelim start=+^"""+ skip=+\%(\\\\\)*\\"+ end=+"""+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings +syntax region juliaDocString matchgroup=juliaDocStringDelim fold start=+^"""+ skip=+\%(\\\\\)*\\"+ end=+"""+ contains=@juliaStringVars,@juliaSpecialChars,@juliaSpellcheckDocStrings exec 'syntax region juliaPrintfMacro contained transparent start="@s\?printf(" end=")\@'.s:d(1).'<=" contains=juliaMacro,juliaPrintfParBlock' syntax region juliaPrintfMacro contained transparent start="@s\?printf\s\+" end="\ze\%([])};#]\|$\|\<for\>\)" contains=@juliaExprsPrintf,juliaMacro,juliaSymbolS,juliaQuotedParBlockS @@ -333,13 +338,25 @@ exec 'syntax region juliaQuotedParBlock matchgroup=juliaQParDelim start="' . s exec 'syntax match juliaQuotedQMarkPar "' . s:quoting_colon . '(\s*?\s*)" contains=juliaQuotedQMark' exec 'syntax region juliaQuotedParBlockS matchgroup=juliaQParDelim contained start="' . s:quoting_colonS . '(" end=")" contains=@juliaExpressions' + " force precedence over Symbols syntax match juliaOperator display "::" -syntax region juliaCommentL matchgroup=juliaCommentDelim start="#\ze\%([^=]\|$\)" end="$" keepend contains=juliaTodo,@juliaSpellcheckComments -syntax region juliaCommentM matchgroup=juliaCommentDelim start="#=\ze\%([^#]\|$\)" end="=#" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments +syntax region juliaCommentL matchgroup=juliaCommentDelim excludenl start="#\ze\%([^=]\|$\)" end="$" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments +syntax region juliaCommentM matchgroup=juliaCommentDelim fold start="#=\ze\%([^#]\|$\)" end="=#" contains=juliaTodo,juliaCommentM,@juliaSpellcheckComments syntax keyword juliaTodo contained TODO FIXME XXX +" detect an end-of-line with only whitespace or comments before it +let s:eol = '\s*\%(\%(\%(#=\%(=#\@!\|[^=]\|\n\)\{-}=#\)\s*\)\+\)\?\%(#=\@!.*\)\?\n' + +" a trailing comma, or colon, or an empty line in an import/using/export +" multi-line command. Used to recognize the as keyword, and for indentation +" (this needs to take precedence over normal commas and colons, and comments) +syntax cluster juliaContinuationItems contains=juliaContinuationComma,juliaContinuationColon,juliaContinuationNone +exec 'syntax region juliaContinuationComma matchgroup=juliaComma contained start=",\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems' +exec 'syntax region juliaContinuationColon matchgroup=juliaColon contained start=":\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems' +exec 'syntax region juliaContinuationNone matchgroup=NONE contained start="\%(\<\%(import\|using\|export\)\>\|^\)\@'.s:d(6).'<=\ze'.s:eol.'" end="\n\+\ze." contains=@juliaCommentItems,juliaAsKeyword' +exec 'syntax match juliaMacroName "@' . s:idregex . '\%(\.' . s:idregex . '\)*"' " the following are disabled by default, but " can be enabled by entering e.g. @@ -350,15 +367,17 @@ hi def link juliaComma juliaNone hi def link juliaColon juliaOperator +hi def link juliaMacroName juliaMacro + hi def link juliaKeyword Keyword hi def link juliaInfixKeyword Keyword +hi def link juliaAsKeyword Keyword hi def link juliaRepKeyword Keyword hi def link juliaBlKeyword Keyword hi def link juliaConditional Conditional hi def link juliaRepeat Repeat hi def link juliaException Exception -hi def link juliaTypedef Keyword hi def link juliaOuter Keyword hi def link juliaBaseTypeBasic Type hi def link juliaBaseTypeNum Type diff --git a/syntax/less.vim b/syntax/less.vim index 0b0c5373..82feb454 100644 --- a/syntax/less.vim +++ b/syntax/less.vim @@ -4,14 +4,13 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'less') == -1 " Language: less " Maintainer: Alessandro Vioni <jenoma@gmail.com> " URL: https://github.com/genoma/vim-less -" Last Change: 2014 November 24 +" Last Change: 2020 Sep 29 if exists("b:current_syntax") finish endif runtime! syntax/css.vim -runtime! after/syntax/css.vim syn case ignore diff --git a/syntax/qml.vim b/syntax/qml.vim index 760a5dea..268c9f8e 100644 --- a/syntax/qml.vim +++ b/syntax/qml.vim @@ -63,7 +63,7 @@ syn keyword qmlLabel case default syn keyword qmlException try catch finally throw syn keyword qmlMessage alert confirm prompt status syn keyword qmlGlobal self -syn keyword qmlDeclaration property signal readonly +syn keyword qmlDeclaration property signal component readonly required syn keyword qmlReserved abstract boolean byte char class const debugger enum export extends final float goto implements import interface long native package pragma private protected public short static super synchronized throws transient volatile if get(g:, 'qml_fold', 0) |