mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-11 04:53:51 -05:00
Run a build and commit the results
This commit is contained in:
@@ -21,7 +21,7 @@ endif
|
||||
" u_allow_hash_operator - Don't highlight seemingly incorrect C
|
||||
" preprocessor directives but assume them to be
|
||||
" operators
|
||||
"
|
||||
" 2023 Jan 6: Update for current syntax (dt)
|
||||
" 2018 Aug 23: Adapt Haskell highlighting to Unison, cleanup.
|
||||
" 2004 Feb 19: Added C preprocessor directive handling, corrected eol comments
|
||||
" cleaned away literate unison support (should be entirely in
|
||||
@@ -38,20 +38,12 @@ elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" (Qualified) identifiers (no default highlighting)
|
||||
syn match ConId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[A-Z][a-zA-Z0-9_']*\>"
|
||||
syn match VarId "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[a-z][a-zA-Z0-9_']*\>"
|
||||
syntax include @markdown $VIMRUNTIME/syntax/markdown.vim
|
||||
|
||||
" Infix operators--most punctuation characters and any (qualified) identifier
|
||||
" enclosed in `backquotes`. An operator starting with : is a constructor,
|
||||
" others are variables (e.g. functions).
|
||||
syn match uVarSym "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[-!#$%&\*\+/<=>\?@\\^|~.][-!#$%&\*\+/<=>\?@\\^|~:.]*"
|
||||
syn match uConSym "\(\<[A-Z][a-zA-Z0-9_']*\.\)\=:[-!#$%&\*\+./<=>\?@\\^|~:]*"
|
||||
syn match uVarSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[a-z][a-zA-Z0-9_']*`"
|
||||
syn match uConSym "`\(\<[A-Z][a-zA-Z0-9_']*\.\)\=[A-Z][a-zA-Z0-9_']*`"
|
||||
syn cluster markdownLikeDocs contains=markdownBold,markdownItalic,markdownLinkText,markdownListMarker,markdownOrderedListMarker,markdownH1,markdownH2,markdownH3,markdownH4,markdownH5,markdownH6
|
||||
|
||||
" Reserved symbols--cannot be overloaded.
|
||||
syn match uDelimiter "(\|)\|\[\|\]\|,\|_\|{\|}"
|
||||
syn match uOperator "[-!#$%&\*\+/<=>\?@\\^|~]"
|
||||
syn match uDelimiter "[\[\](){},.]"
|
||||
|
||||
" Strings and constants
|
||||
syn match uSpecialChar contained "\\\([0-9]\+\|o[0-7]\+\|x[0-9a-fA-F]\+\|[\"\\'&\\abfnrtv]\|^[A-Z^_\[\\\]]\)"
|
||||
@@ -66,45 +58,42 @@ syn match uFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>"
|
||||
" Keyword definitions. These must be patterns instead of keywords
|
||||
" because otherwise they would match as keywords at the start of a
|
||||
" "literate" comment (see lu.vim).
|
||||
syn match uModule "\<module\>"
|
||||
syn match uModule "\<namespace\>"
|
||||
syn match uImport "\<use\>"
|
||||
syn match uInfix "\<\(infix\|infixl\|infixr\)\>"
|
||||
syn match uTypedef "\<\(∀\|forall\)\>"
|
||||
syn match uStatement "\<\(unique\|ability\|type\|where\|match\|cases\|;\|let\|with\|handle\)\>"
|
||||
syn match uTypedef "\<\(unique\|structural\|∀\|forall\)\>"
|
||||
syn match uStatement "\<\(ability\|do\|type\|where\|match\|cases\|;\|let\|with\|handle\)\>"
|
||||
syn match uConditional "\<\(if\|else\|then\)\>"
|
||||
|
||||
" Not real keywords, but close.
|
||||
if exists("u_highlight_boolean")
|
||||
" Boolean constants from the standard prelude.
|
||||
syn match uBoolean "\<\(true\|false\)\>"
|
||||
endif
|
||||
if exists("u_highlight_types")
|
||||
" Primitive types from the standard prelude and libraries.
|
||||
syn match uType "\<\(Float\|Nat\|Int\|Boolean\|Remote\|Text\)\>"
|
||||
endif
|
||||
if exists("u_highlight_more_types")
|
||||
" Types from the standard prelude libraries.
|
||||
syn match uType "\<\(Optional\|Either\|Sequence\|Effect\)\>"
|
||||
syn match uMaybe "\<None\>"
|
||||
syn match uExitCode "\<\(ExitSuccess\)\>"
|
||||
syn match uOrdering "\<\(GT\|LT\|EQ\)\>"
|
||||
endif
|
||||
if exists("u_highlight_debug")
|
||||
" Debugging functions from the standard prelude.
|
||||
syn match uDebug "\<\(undefined\|error\|trace\)\>"
|
||||
endif
|
||||
syn match uBoolean "\<\(true\|false\)\>"
|
||||
|
||||
syn match uType "\<\C[A-Z][0-9A-Za-z_'!]*\>"
|
||||
syn match uName "\<\C[a-z_][0-9A-Za-z_'!]*\>"
|
||||
|
||||
" Comments
|
||||
syn match uLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$"
|
||||
syn region uBlockComment start="{-" end="-}" contains=uBlockComment
|
||||
syn region uPragma start="{-#" end="#-}"
|
||||
syn region uBelowFold start="^---" skip="." end="." contains=uBelowFold
|
||||
syn region uPragma start="{-#" end="#-}"
|
||||
syn region uBelowFold start="^---" skip="." end="." contains=uBelowFold
|
||||
|
||||
" Docs
|
||||
syn region uDocBlock start="\[:" end=":]" contains=uLink,uDocDirective
|
||||
syn match uLink contained "@\([A-Z][a-zA-Z0-9_']*\.\)\=\<[a-z][a-zA-Z0-9_'.]*\>"
|
||||
syn match uDocDirective contained "@\[\([A-Z][a-zA-Z0-9_']*\.\)\=\<[a-z][a-zA-Z0-9_'.]*\>] \(\<[A-Z][a-zA-Z0-9_']*\.\)\=\<[a-z][a-zA-Z0-9_'.]*\>"
|
||||
syn region uDocBlock matchgroup=unisonDoc start="{{" end="}}" contains=uDocTypecheck,uDocQuasiquote,uDocDirective,uDocCode,uDocCodeInline,uDocCodeRaw,uDocMono,@markdownLikeDocs
|
||||
syn region uDocQuasiquote contained matchgroup=unisonDocQuote start="{{" end= "}}" contains=TOP
|
||||
syn region uDocCode contained matchgroup=unisonDocCode start="^\s*```\s*$" end="^\s*```\s*$" contains=TOP
|
||||
syn region uDocTypecheck contained matchgroup=unisonDocCode start="^\s*@typecheck\s*```\s*$" end="^\s*```\s*$" contains=TOP
|
||||
syn region uDocCodeRaw contained matchgroup=unisonDocCode start="^\s*```\s*raw\s*$" end="^\s*```\s*$" contains=NoSyntax
|
||||
syn region uDocCodeInline contained matchgroup=unisonDocCode start="`\@<!``" end="`\@<!``" contains=TOP
|
||||
syn match uDocMono "''[^']*''"
|
||||
syn region uDocDirective contained matchgroup=unisonDocDirective start="\(@\([a-zA-Z0-9_']*\)\)\?{{\@!" end="}" contains=TOP
|
||||
|
||||
syn match uDebug "\<\(todo\|bug\|Debug.trace\)\>"
|
||||
|
||||
" things like
|
||||
" > my_func 1 3
|
||||
" test> Function.tap.tests.t1 = check let
|
||||
" use Nat == +
|
||||
" ( 99, 100 ) === (withInitialValue 0 do
|
||||
" : : :
|
||||
syn match uWatch "^[A-Za-z]*>"
|
||||
|
||||
" Define the default highlighting.
|
||||
" For version 5.7 and earlier: only when not done already
|
||||
@@ -116,40 +105,41 @@ if version >= 508 || !exists("did_u_syntax_inits")
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink uWatch Debug
|
||||
HiLink uDocMono Delimiter
|
||||
HiLink unisonDocDirective Import
|
||||
HiLink unisonDocQuote Delimiter
|
||||
HiLink unisonDocCode Delimiter
|
||||
HiLink unisonDoc String
|
||||
HiLink uBelowFold Comment
|
||||
HiLink uBlockComment Comment
|
||||
HiLink uBoolean Boolean
|
||||
HiLink uCharacter Character
|
||||
HiLink uComment Comment
|
||||
HiLink uConditional Conditional
|
||||
HiLink uConditional Conditional
|
||||
HiLink uDebug Debug
|
||||
HiLink uDelimiter Delimiter
|
||||
HiLink uDocBlock String
|
||||
HiLink uDocDirective Import
|
||||
HiLink uDocIncluded Import
|
||||
HiLink uFloat Float
|
||||
HiLink uImport Include
|
||||
HiLink uLineComment Comment
|
||||
HiLink uLink Type
|
||||
HiLink uName Identifier
|
||||
HiLink uNumber Number
|
||||
HiLink uOperator Operator
|
||||
HiLink uPragma SpecialComment
|
||||
HiLink uSpecialChar SpecialChar
|
||||
HiLink uSpecialCharError Error
|
||||
HiLink uStatement Statement
|
||||
HiLink uString String
|
||||
HiLink uType Type
|
||||
HiLink uTypedef Typedef
|
||||
|
||||
HiLink uImport Include
|
||||
HiLink uInfix PreProc
|
||||
HiLink uStatement Statement
|
||||
HiLink uConditional Conditional
|
||||
HiLink uSpecialChar SpecialChar
|
||||
HiLink uTypedef Typedef
|
||||
HiLink uVarSym uOperator
|
||||
HiLink uConSym uOperator
|
||||
HiLink uOperator Operator
|
||||
HiLink uDelimiter Delimiter
|
||||
HiLink uSpecialCharError Error
|
||||
HiLink uString String
|
||||
HiLink uCharacter Character
|
||||
HiLink uNumber Number
|
||||
HiLink uFloat Float
|
||||
HiLink uConditional Conditional
|
||||
HiLink uLiterateComment uComment
|
||||
HiLink uBlockComment uComment
|
||||
HiLink uLineComment uComment
|
||||
HiLink uComment Comment
|
||||
HiLink uBelowFold Comment
|
||||
HiLink uDocBlock String
|
||||
HiLink uLink uType
|
||||
HiLink uDocDirective uImport
|
||||
HiLink uPragma SpecialComment
|
||||
HiLink uBoolean Boolean
|
||||
HiLink uType Type
|
||||
HiLink uMaybe uEnumConst
|
||||
HiLink uOrdering uEnumConst
|
||||
HiLink uEnumConst Constant
|
||||
HiLink uDebug Debug
|
||||
|
||||
delcommand HiLink
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user