mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Update
This commit is contained in:
@@ -89,7 +89,7 @@ let g:crystal#indent#non_bracket_continuation_regex =
|
||||
\ '\|' .
|
||||
\ '\%(\%(\<do\>\|%\@1<!{\)\s*|[^|]*\)\@<!|' .
|
||||
\ '\|' .
|
||||
\ '\W?' .
|
||||
\ '\%(]\|\w\)\@1<!?' .
|
||||
\ '\|' .
|
||||
\ '\<\%(if\|unless\)\>' .
|
||||
\ '\|' .
|
||||
|
||||
@@ -553,7 +553,7 @@ function! go#config#DiagnosticsEnabled() abort
|
||||
endfunction
|
||||
|
||||
function! go#config#GoplsOptions() abort
|
||||
return get(g:, 'go_gopls_options', [])
|
||||
return get(g:, 'go_gopls_options', ['-remote=auto'])
|
||||
endfunction
|
||||
|
||||
" Set the default value. A value of "1" is a shortcut for this, for
|
||||
|
||||
@@ -25,6 +25,8 @@ let b:julia_vim_loaded = 1
|
||||
|
||||
let b:undo_ftplugin = "setlocal include< suffixesadd< comments< commentstring<"
|
||||
\ . " define< fo< shiftwidth< expandtab< indentexpr< indentkeys< cinoptions< omnifunc<"
|
||||
\ . " | unlet! b:commentary_format"
|
||||
\ . " | unlet! b:smartcomment_force_linemode"
|
||||
\ . " | unlet! b:julia_vim_loaded"
|
||||
|
||||
" MatchIt plugin support
|
||||
@@ -94,6 +96,10 @@ if exists("loaded_matchit")
|
||||
|
||||
endif
|
||||
|
||||
" Some plugin-specific tweaks for commenting
|
||||
let b:commentary_format = "# %s" " for tpope/vim-commentary
|
||||
let b:smartcomment_force_linemode = 1 " for carlobaldassi/vim-smartcomment
|
||||
|
||||
if has("gui_win32")
|
||||
let b:browsefilter = "Julia Source Files (*.jl)\t*.jl\n"
|
||||
let b:undo_ftplugin = b:undo_ftplugin . " | unlet! b:browsefilter"
|
||||
|
||||
@@ -15,6 +15,7 @@ setlocal nolisp
|
||||
setlocal autoindent
|
||||
setlocal indentexpr=VlangIndent(v:lnum)
|
||||
setlocal indentkeys+=<:>,0=},0=)
|
||||
setlocal noexpandtab
|
||||
|
||||
if exists("*VlangIndent")
|
||||
finish
|
||||
|
||||
@@ -3,7 +3,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jenkins') == -1
|
||||
runtime syntax/groovy.vim
|
||||
syn keyword jenkinsfileBuiltInVariable currentBuild
|
||||
|
||||
syn keyword jenkinsfileSection pipeline agent stages steps
|
||||
syn keyword jenkinsfileSection pipeline agent stages steps post
|
||||
|
||||
syn keyword jenkinsfileDirective environment options parameters triggers stage tools input when libraries
|
||||
|
||||
@@ -13,7 +13,7 @@ syn region jenkinsfileOptionParams contained start='(' end=')' transparent cont
|
||||
syn match jenkinsfileOptionO /[a-zA-Z]\+([^)]*)/ contains=jenkinsfileOption,jenkinsfileOptionParams transparent containedin=groovyParenT1
|
||||
|
||||
syn keyword jenkinsfileCoreStep checkout
|
||||
syn keyword jenkinsfileCoreStep docker skipwhite nextgroup=jenkinsFileDockerConfigBlock
|
||||
syn keyword jenkinsfileCoreStep docker dockerfile skipwhite nextgroup=jenkinsFileDockerConfigBlock
|
||||
syn keyword jenkinsfileCoreStep node
|
||||
syn keyword jenkinsfileCoreStep scm
|
||||
syn keyword jenkinsfileCoreStep sh
|
||||
@@ -24,10 +24,10 @@ syn keyword jenkinsfileCoreStep step
|
||||
syn keyword jenkinsfileCoreStep tool
|
||||
|
||||
" TODO: These should probably be broken out.
|
||||
syn keyword jenkinsfileCoreStep post always changed failure success unstable aborted
|
||||
syn keyword jenkinsfileCoreStep always changed failure success unstable aborted unsuccessful regression fixed cleanup
|
||||
|
||||
syn region jenkinsFileDockerConfigBlock contained start='{' end='}' contains=groovyString,jenkinsfileDockerKeyword transparent
|
||||
syn keyword jenkinsFileDockerKeyword contained image args dockerfile additionalBuildArgs
|
||||
syn keyword jenkinsFileDockerKeyword contained image args additionalBuildArgs label registryUrl registryCredentialsId alwaysPull filename dir
|
||||
|
||||
syn keyword jenkinsfilePipelineStep Applitools ArtifactoryGradleBuild Consul MavenDescriptorStep OneSky VersionNumber
|
||||
syn keyword jenkinsfilePipelineStep ViolationsToBitbucketServer ViolationsToGitHub ViolationsToGitLab _OcAction _OcContextInit
|
||||
@@ -112,8 +112,8 @@ syn keyword jenkinsfilePipelineStep walk waptProReport warnings whitesource winR
|
||||
syn keyword jenkinsfilePipelineStep withCredentials withDockerContainer withDockerRegistry withDockerServer withEnv withKafkaLog
|
||||
syn keyword jenkinsfilePipelineStep withKubeConfig withMaven withNPM withPod withPythonEnv withSCM withSandbox withSonarQubeEnv
|
||||
syn keyword jenkinsfilePipelineStep withTypetalk wrap writeFile writeJSON writeMavenPom writeProperties writeXml writeYaml
|
||||
syn keyword jenkinsfilePipelineStep ws xUnitImporter xUnitUploader xldCreatePackage xldDeploy xldPublishPackage xlrCreateRelease
|
||||
syn keyword jenkinsfilePipelineStep xrayScanBuild zip
|
||||
syn keyword jenkinsfilePipelineStep ws xUnitImporter xUnitUploader xunit xldCreatePackage xldDeploy xldPublishPackage
|
||||
syn keyword jenkinsfilePipelineStep xlrCreateRelease xrayScanBuild zip
|
||||
|
||||
hi link jenkinsfileSection Statement
|
||||
hi link jenkinsfileDirective jenkinsfileSection
|
||||
|
||||
@@ -84,7 +84,7 @@ syn match ps1Type /\[[a-z_][a-z0-9_.,\[\]]\+\]/
|
||||
" Variable references
|
||||
syn match ps1ScopeModifier /\(global:\|local:\|private:\|script:\)/ contained
|
||||
syn match ps1Variable /\$\w\+\(:\w\+\)\?/ contains=ps1ScopeModifier
|
||||
syn match ps1Variable /\${\w\+\(:\w\+\)\?}/ contains=ps1ScopeModifier
|
||||
syn match ps1Variable /\${\w\+\(:\?[[:alnum:]_()]\+\)\?}/ contains=ps1ScopeModifier
|
||||
|
||||
" Operators
|
||||
syn keyword ps1Operator -eq -ne -ge -gt -lt -le -like -notlike -match -notmatch -replace -split -contains -notcontains
|
||||
|
||||
@@ -86,6 +86,7 @@ function! s:enabled(language)
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Default tag definitions.
|
||||
let s:languages = [
|
||||
\ { 'name': 'less', 'tag': 'style' },
|
||||
\ { 'name': 'scss', 'tag': 'style' },
|
||||
@@ -94,12 +95,17 @@ let s:languages = [
|
||||
\ { '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/' . s:language.name . '.vim'
|
||||
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
|
||||
|
||||
134
syntax/vlang.vim
134
syntax/vlang.vim
@@ -51,126 +51,126 @@ endif
|
||||
|
||||
syn case match
|
||||
|
||||
syn match vDeclType "\<\(struct\|interface\)\>"
|
||||
syn match vDeclType "\<\(struct\|interface\|type\|enum\)\>"
|
||||
syn keyword vDeclaration pub mut var const
|
||||
hi def link vDeclType Keyword
|
||||
hi def link vDeclaration Keyword
|
||||
|
||||
syn keyword vDirective module import
|
||||
syn keyword vDeclaration pub mut const type enum
|
||||
hi def link vDirective Statement
|
||||
|
||||
syn region vIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+
|
||||
syn match vIncluded display contained "<[^>]*>"
|
||||
syn match vFlagDefinition display contained "\s\i[^\n]*"
|
||||
hi def link vIncluded vString
|
||||
hi def link vFlagDefinition vString
|
||||
|
||||
syn match vInclude display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=vIncluded
|
||||
syn match vFlag display "^\s*\zs\(%:\|#\)\s*flag\>\s*[^\n]*" contains=vFlagDefinition
|
||||
syn region vShebang display start=/^#!/ end=/$/
|
||||
|
||||
hi def link vDirective Statement
|
||||
hi def link vDeclaration Keyword
|
||||
hi def link vDeclType Keyword
|
||||
hi def link vInclude Include
|
||||
hi def link vFlag Include
|
||||
hi def link vIncluded vString
|
||||
hi def link vFlagDefinition vString
|
||||
hi def link vShebang Include
|
||||
|
||||
" Keywords within functions
|
||||
syn keyword vStatement defer go goto return break continue fallthrough
|
||||
syn keyword vConditional if else switch match or
|
||||
syn keyword vLabel case default
|
||||
syn keyword vRepeat for in
|
||||
syn match vCodeGen /$if\>/
|
||||
syn match vCodeGen /\.fields\>/
|
||||
syn match vCodeGen /\.$\i*\>/
|
||||
|
||||
syn keyword vStatement defer go goto return break continue
|
||||
hi def link vStatement Statement
|
||||
|
||||
syn keyword vConditional if else match or
|
||||
hi def link vConditional Conditional
|
||||
hi def link vLabel Label
|
||||
|
||||
syn keyword vRepeat for in
|
||||
hi def link vRepeat Repeat
|
||||
|
||||
syn match vCodeGen /$if\>/
|
||||
" XXX Enable when compile-time code-gen is implemented in V
|
||||
" syn match vCodeGen /\.fields\>/
|
||||
" syn match vCodeGen /\.$\i*\>/
|
||||
hi def link vCodeGen Identifier
|
||||
|
||||
" Predefined types
|
||||
syn keyword vType chan map bool string error voidptr
|
||||
syn keyword vSignedInts int i8 i16 i32 i64 rune intptr
|
||||
syn keyword vUnsignedInts byte uint u8 u16 u32 u64 byteptr
|
||||
syn keyword vSignedInts int i8 i16 i64 rune intptr
|
||||
syn keyword vUnsignedInts byte u16 u32 u64 byteptr
|
||||
syn keyword vFloats f32 f64 floatptr
|
||||
syn keyword vComplexes complex64 complex128
|
||||
" XXX Enable when complex numbers are implemented in V
|
||||
" syn keyword vComplexes complex64 complex128
|
||||
|
||||
hi def link vType Type
|
||||
hi def link vSignedInts Type
|
||||
hi def link vUnsignedInts Type
|
||||
hi def link vFloats Type
|
||||
hi def link vComplexes Type
|
||||
" XXX Enable when complex numbers implemented in V
|
||||
" hi def link vComplexes Type
|
||||
|
||||
" Treat fn specially: it's a declaration at the start of a line, but a type
|
||||
" elsewhere. Order matters here.
|
||||
" syn match vType /\<fn\>/
|
||||
syn match vDeclaration /\<fn\>/
|
||||
syn match vDeclaration contained /\<fn\>/
|
||||
|
||||
" Predefined functions and values
|
||||
syn keyword vBuiltins assert C cap complex copy delete exit imag
|
||||
syn keyword vBuiltins print println eprint eprintln print_backtrace
|
||||
syn keyword vBuiltins float_calloc ok memdup range_int real recover
|
||||
syn keyword vBuiltins malloc byte_calloc float_calloc
|
||||
syn keyword vBuiltins isok isnil panic on_panic
|
||||
syn keyword vConstants iota true false
|
||||
syn keyword vBuiltins assert C
|
||||
syn keyword vBuiltins complex exit imag
|
||||
syn keyword vBuiltins print println eprint eprintln
|
||||
syn keyword vBuiltins malloc copy memdup isnil
|
||||
syn keyword vBuiltins panic recover
|
||||
syn match vBuiltins /\<json\.\(encode\|decode\)\>/
|
||||
|
||||
hi def link vBuiltins Keyword
|
||||
|
||||
syn keyword vConstants true false
|
||||
hi def link vConstants Keyword
|
||||
|
||||
" Comments; their contents
|
||||
syn keyword vTodo contained TODO FIXME XXX BUG
|
||||
hi def link vTodo Todo
|
||||
|
||||
syn cluster vCommentGroup contains=vTodo
|
||||
syn region vComment start="/\*" end="\*/" contains=@vCommentGroup,@Spell
|
||||
syn region vComment start="//" end="$" contains=@vCommentGroup,@Spell
|
||||
|
||||
hi def link vComment Comment
|
||||
hi def link vTodo Todo
|
||||
|
||||
" Go escapes
|
||||
syn match vEscapeOctal display contained "\\[0-7]\{3}"
|
||||
syn match vEscapeVar display contained "\$[0-9A-Za-z\.]*"
|
||||
syn match vEscapeVar display contained "\${[^}]*}"
|
||||
syn match vEscapeC display contained +\\[abfnrtv\\'"]+
|
||||
syn match vEscapeX display contained "\\x\x\{2}"
|
||||
syn match vEscapeU display contained "\\u\x\{4}"
|
||||
syn match vEscapeBigU display contained "\\U\x\{8}"
|
||||
syn match vEscapeError display contained +\\[^0-7xuUabfnrtv\\'"]+
|
||||
" V escapes
|
||||
syn match vStringVar display contained +\$[0-9A-Za-z\._]*\([(][^)]*[)]\)\?+
|
||||
syn match vStringVar display contained "\${[^}]*}"
|
||||
syn match vStringSpeChar display contained +\\[abfnrtv\\'"]+
|
||||
syn match vStringX display contained "\\x\x\{1,2}"
|
||||
syn match vStringU display contained "\\u\x\{4}"
|
||||
syn match vStringBigU display contained "\\U\x\{8}"
|
||||
syn match vStringError display contained +\\[^0-7xuUabfnrtv\\'"]+
|
||||
|
||||
hi def link vEscapeOctal vSpecialString
|
||||
hi def link vEscapeVar vSpecialString
|
||||
hi def link vEscapeC vSpecialString
|
||||
hi def link vEscapeX vSpecialString
|
||||
hi def link vEscapeU vSpecialString
|
||||
hi def link vEscapeBigU vSpecialString
|
||||
hi def link vSpecialString Special
|
||||
hi def link vEscapeError Error
|
||||
hi def link vStringVar Special
|
||||
hi def link vStringSpeChar Special
|
||||
hi def link vStringX Special
|
||||
hi def link vStringU Special
|
||||
hi def link vStringBigU Special
|
||||
hi def link vStringError Error
|
||||
|
||||
" Characters and their contents
|
||||
syn cluster vCharacterGroup contains=vStringSpeChar,vStringVar,vStringX,vStringU,vStringBigU
|
||||
syn region vCharacter start=+`+ end=+`+ contains=@vCharacterGroup
|
||||
hi def link vCharacter Character
|
||||
|
||||
" Strings and their contents
|
||||
syn cluster vStringGroup contains=vEscapeOctal,vEscapeVar,vEscapeC,vEscapeX,vEscapeU,vEscapeBigU,vEscapeError
|
||||
syn cluster vStringGroup contains=@vCharacterGroup,vStringError
|
||||
|
||||
syn region vString start=+"+ skip=+\\\\\|\\'+ end=+"+ contains=@vStringGroup
|
||||
syn region vRawString start=+`+ end=+`+
|
||||
syn region vString start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@vStringGroup
|
||||
|
||||
syn region vRawString start=+r"+ skip=+\\\\\|\\'+ end=+"+
|
||||
syn region vRawString start=+r'+ skip=+\\\\\|\\'+ end=+'+
|
||||
|
||||
hi def link vString String
|
||||
hi def link vRawString String
|
||||
|
||||
" Characters; their contents
|
||||
syn cluster vCharacterGroup contains=vEscapeOctal,vEscapeC,vEscapeVar,vEscapeX,vEscapeU,vEscapeBigU
|
||||
syn region vCharacter start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@vCharacterGroup
|
||||
|
||||
hi def link vCharacter Character
|
||||
|
||||
" Regions
|
||||
syn region vBlock start="{" end="}" transparent fold
|
||||
syn region vParen start='(' end=')' transparent
|
||||
|
||||
" Integers
|
||||
syn match vDecimalInt "\<\d\+\([Ee]\d\+\)\?\>"
|
||||
syn match vHexadecimalInt "\<0x\x\+\>"
|
||||
syn match vOctalInt "\<0\o\+\>"
|
||||
syn match vOctalError "\<0\o*[89]\d*\>"
|
||||
syn match vOctalInt "\<0o\o\+\>"
|
||||
|
||||
hi def link vDecimalInt Integer
|
||||
hi def link vHexadecimalInt Integer
|
||||
hi def link vOctalInt Integer
|
||||
hi def link Integer Number
|
||||
|
||||
@@ -180,14 +180,16 @@ syn match vFloat "\<\.\d\+\([Ee][-+]\d\+\)\?\>"
|
||||
syn match vFloat "\<\d\+[Ee][-+]\d\+\>"
|
||||
|
||||
hi def link vFloat Float
|
||||
hi def link Float Number
|
||||
|
||||
" Imaginary literals
|
||||
syn match vImaginary "\<\d\+i\>"
|
||||
syn match vImaginary "\<\d\+\.\d*\([Ee][-+]\d\+\)\?i\>"
|
||||
syn match vImaginary "\<\.\d\+\([Ee][-+]\d\+\)\?i\>"
|
||||
syn match vImaginary "\<\d\+[Ee][-+]\d\+i\>"
|
||||
|
||||
hi def link vImaginary Number
|
||||
" XXX Enable when complex numbers are implemented in V
|
||||
" syn match vImaginary "\<\d\+i\>"
|
||||
" syn match vImaginary "\<\d\+\.\d*\([Ee][-+]\d\+\)\?i\>"
|
||||
" syn match vImaginary "\<\.\d\+\([Ee][-+]\d\+\)\?i\>"
|
||||
" syn match vImaginary "\<\d\+[Ee][-+]\d\+i\>"
|
||||
"
|
||||
" hi def link vImaginary Number
|
||||
|
||||
" Generics
|
||||
syn match vGenericBrackets display contained "[<>]"
|
||||
|
||||
Reference in New Issue
Block a user