mirror of
https://github.com/vim/vim
synced 2025-07-15 16:51:57 +00:00
runtime(cs): Update C# runtime files
closes: #16884 Signed-off-by: Nick Jensen <nickspoon@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
47071c6076
commit
96395e1512
@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Mar 10
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Mar 15
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -1286,6 +1286,21 @@ doesn't work for you, or you don't edit Progress at all, use this in your
|
||||
startup vimrc: >
|
||||
:let filetype_w = "cweb"
|
||||
|
||||
CSHARP *cs.vim* *ft-cs-syntax*
|
||||
|
||||
C# raw string literals may use any number of quote marks to encapsulate the
|
||||
block, and raw interpolated string literals may use any number of braces to
|
||||
encapsulate the interpolation, e.g. >
|
||||
|
||||
$$$""""Hello {{{name}}}""""
|
||||
<
|
||||
By default, Vim highlights 3-8 quote marks, and 1-8 interpolation braces.
|
||||
The maximum numbers of quotes and braces recognized can configured using the
|
||||
following variables:
|
||||
|
||||
Variable Default ~
|
||||
g:cs_raw_string_quote_count 8
|
||||
g:cs_raw_string_interpolation_brace_count 8
|
||||
|
||||
DART *dart.vim* *ft-dart-syntax*
|
||||
|
||||
|
@ -6722,6 +6722,7 @@ creating-menus gui.txt /*creating-menus*
|
||||
credits intro.txt /*credits*
|
||||
crontab options.txt /*crontab*
|
||||
cs-find if_cscop.txt /*cs-find*
|
||||
cs.vim syntax.txt /*cs.vim*
|
||||
cs7-problem term.txt /*cs7-problem*
|
||||
cscope if_cscop.txt /*cscope*
|
||||
cscope-commands if_cscop.txt /*cscope-commands*
|
||||
@ -7319,6 +7320,7 @@ ft-context-intro ft_context.txt /*ft-context-intro*
|
||||
ft-context-mappings ft_context.txt /*ft-context-mappings*
|
||||
ft-context-settings ft_context.txt /*ft-context-settings*
|
||||
ft-cpp-syntax syntax.txt /*ft-cpp-syntax*
|
||||
ft-cs-syntax syntax.txt /*ft-cs-syntax*
|
||||
ft-csh-syntax syntax.txt /*ft-csh-syntax*
|
||||
ft-css-omni insert.txt /*ft-css-omni*
|
||||
ft-csv-syntax syntax.txt /*ft-csv-syntax*
|
||||
|
@ -2,8 +2,7 @@
|
||||
" Language: C#
|
||||
" Maintainer: Nick Jensen <nickspoon@gmail.com>
|
||||
" Former Maintainer: Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: 2022-11-16
|
||||
" 2024 Jan 14 by Vim Project (browsefilter)
|
||||
" Last Change: 2025-03-14
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/nickspoons/vim-cs
|
||||
|
||||
@ -21,8 +20,11 @@ setlocal formatoptions-=t formatoptions+=croql
|
||||
|
||||
" Set 'comments' to format dashed lists in comments.
|
||||
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
|
||||
setlocal commentstring=//\ %s
|
||||
|
||||
let b:undo_ftplugin = 'setl com< fo<'
|
||||
setlocal cinoptions=J1
|
||||
|
||||
let b:undo_ftplugin = 'setl com< fo< cino<'
|
||||
|
||||
if exists('loaded_matchit') && !exists('b:match_words')
|
||||
" #if/#endif support included by default
|
||||
|
@ -3,7 +3,7 @@
|
||||
" Maintainer: Nick Jensen <nickspoon@gmail.com>
|
||||
" Former Maintainers: Anduin Withers <awithers@anduin.com>
|
||||
" Johannes Zellner <johannes@zellner.org>
|
||||
" Last Change: 2022-11-16
|
||||
" Last Change: 2025-03-14
|
||||
" Filenames: *.cs
|
||||
" License: Vim (see :h license)
|
||||
" Repository: https://github.com/nickspoons/vim-cs
|
||||
@ -190,6 +190,18 @@ syn match csUnicodeNumber +\\U00\x\{6}+ contained contains=csUnicodeSpecifier di
|
||||
syn match csUnicodeSpecifier +\\[uUx]+ contained display
|
||||
|
||||
syn region csString matchgroup=csQuote start=+"+ end=+"\%(u8\)\=+ end=+$+ extend contains=csSpecialChar,csSpecialError,csUnicodeNumber,@Spell
|
||||
|
||||
for s:i in range(3, get(g:, "cs_raw_string_quote_count", 8))
|
||||
exe 'syn region csRawString' .. s:i .. ' matchgroup=csQuote start=+\z("\{' .. s:i .. '}\)+ end=+\z1+ oneline nextgroup=csRawStringError' .. s:i
|
||||
exe 'syn region csRawString' .. s:i .. ' matchgroup=csQuote start=+\z("\{' .. s:i .. '}\)\s*$+ end=+^\s*\z1+ nextgroup=csRawStringError' .. s:i .. ' contains=csRawStringError' .. s:i
|
||||
exe 'syn match csRawStringError' .. s:i .. ' /\%("\{' .. s:i .. '}\)\@' .. s:i .. '<="\+/ contained'
|
||||
exe 'syn match csRawStringError' .. s:i .. ' /\S.\{-}\s*"\{' .. s:i .. '}"\@!/ contained'
|
||||
|
||||
exe 'hi def link csRawString' .. s:i .. ' csString'
|
||||
exe 'hi def link csRawStringError' .. s:i .. ' Error'
|
||||
endfor
|
||||
unlet s:i
|
||||
|
||||
syn match csCharacter "'[^']*'" contains=csSpecialChar,csSpecialCharError,csUnicodeNumber display
|
||||
syn match csCharacter "'\\''" contains=csSpecialChar display
|
||||
syn match csCharacter "'[^\\]'" display
|
||||
@ -217,11 +229,26 @@ syn match csInterpolationAlignDel +,+ contained display
|
||||
syn match csInterpolationFormatDel +:+ contained display
|
||||
|
||||
syn region csVerbatimString matchgroup=csQuote start=+@"+ end=+"\%(u8\)\=+ skip=+""+ extend contains=csVerbatimQuote,@Spell
|
||||
|
||||
" Interpolated raw string literals
|
||||
for s:i in range(1, get(g:, "cs_raw_string_interpolation_brace_count", 8))
|
||||
exe 'syn region csInterpolatedRawString' .. s:i .. ' matchgroup=csQuote start=+$\{' .. s:i .. '}\z("""\+\)+ end=+\z1+ extend contains=csInterpolation' .. s:i .. ',csInterpolationDelimiterError' .. s:i .. ',@Spell'
|
||||
exe 'syn match csInterpolationDelimiterError' .. s:i .. ' "}\{' .. s:i .. '}" contained'
|
||||
exe 'syn match csInterpolationDelimiterError' .. s:i .. ' "{\{' .. 2 * s:i .. ',}" contained'
|
||||
exe 'syn match csInterpolationDelimiterError' .. s:i .. ' "}\{' .. 2 * s:i .. ',}" contained'
|
||||
exe 'syn region csInterpolation' .. s:i .. ' matchgroup=csInterpolationDelimiter start=+\%({\{' .. s:i .. '}\)\@' .. s:i .. '<!{\{' .. s:i .. '}{\@!+ end=+}\@<!}\{' .. s:i .. '}\%(}\{' .. s:i .. '}\)\@!+' ..
|
||||
\ ' keepend contained contains=@csAll,csBraced,csBracketed,csInterpolationAlign,csInterpolationFormat,csInterpolationDelimiterError' .. s:i
|
||||
|
||||
exe 'hi def link csInterpolationDelimiterError' .. s:i .. ' Error'
|
||||
exe 'hi def link csInterpolatedRawString' .. s:i .. ' csRawString'
|
||||
endfor
|
||||
unlet s:i
|
||||
|
||||
syn match csVerbatimQuote +""+ contained
|
||||
|
||||
syn region csInterVerbString matchgroup=csQuote start=+$@"+ start=+@$"+ end=+"\%(u8\)\=+ skip=+""+ extend contains=csInterpolation,csEscapedInterpolation,csSpecialChar,csSpecialError,csUnicodeNumber,csVerbatimQuote,@Spell
|
||||
|
||||
syn cluster csString contains=csString,csInterpolatedString,csVerbatimString,csInterVerbString
|
||||
syn cluster csString contains=csString,csInterpolatedString,csVerbatimString,csInterVerbString,csRawString
|
||||
|
||||
syn cluster csLiteral contains=csBoolean,@csNumber,csCharacter,@csString,csNull
|
||||
|
||||
@ -282,6 +309,8 @@ hi def link csLogicSymbols Operator
|
||||
hi def link csSpecialError Error
|
||||
hi def link csSpecialCharError Error
|
||||
hi def link csString String
|
||||
hi def link csRawString csString
|
||||
hi def link csRawStringError Error
|
||||
hi def link csQuote String
|
||||
hi def link csInterpolatedString String
|
||||
hi def link csVerbatimString String
|
||||
|
Reference in New Issue
Block a user