vim-patch:47c532e2bc55 (#17780)

Update runtime files
47c532e2bc
This commit is contained in:
Christian Clason
2022-03-20 10:48:10 +01:00
committed by GitHub
parent 54f15a9e47
commit 75157d2572
17 changed files with 101 additions and 78 deletions

View File

@@ -8152,7 +8152,7 @@ taglist({expr} [, {filename}]) *taglist()*
entry depends on the language specific entry depends on the language specific
kind values. Only available when kind values. Only available when
using a tags file generated by using a tags file generated by
Exuberant ctags or hdrtag. Universal/Exuberant ctags or hdrtag.
static A file specific tag. Refer to static A file specific tag. Refer to
|static-tag| for more information. |static-tag| for more information.
More entries may be present, depending on the content of the More entries may be present, depending on the content of the

View File

@@ -89,9 +89,9 @@ file is opened and adds Ada related entries to the main and pop-up menu.
*ft-ada-omni* *ft-ada-omni*
The Ada omni-completions (|i_CTRL-X_CTRL-O|) uses tags database created either The Ada omni-completions (|i_CTRL-X_CTRL-O|) uses tags database created either
by "gnat xref -v" or the "exuberant Ctags (http://ctags.sourceforge.net). The by "gnat xref -v" or the "Universal Ctags" (https://ctags.io). The complete
complete function will automatically detect which tool was used to create the function will automatically detect which tool was used to create the tags
tags file. file.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
3.1 Omni Completion with "gnat xref" ~ 3.1 Omni Completion with "gnat xref" ~
@@ -125,18 +125,18 @@ NOTE: "gnat xref -v" is very tricky to use as it has almost no diagnostic
3.2 Omni Completion with "ctags"~ 3.2 Omni Completion with "ctags"~
*ada-ctags* *ada-ctags*
Exuberant Ctags uses its own multi-language code parser. The parser is quite Universal/Exuberant Ctags use their own multi-language code parser. The
fast, produces a lot of extra information (hence the name "Exuberant Ctags") parser is quite fast, produces a lot of extra information and can run on files
and can run on files which currently do not compile. which currently do not compile.
There are also lots of other Vim-tools which use exuberant Ctags. There are also lots of other Vim-tools which use Universal/Exuberant Ctags.
Universal Ctags is preferred, Exuberant Ctags is no longer being developed.
You will need to install a version of the Exuberant Ctags which has Ada You will need to install Universal Ctags which is available from
support patched in. Such a version is available from the GNU Ada Project https://ctags.io
(http://gnuada.sourceforge.net).
The Ada parser for Exuberant Ctags is fairly new - don't expect complete The Ada parser for Universal/Exuberant Ctags is fairly new - don't expect
support yet. complete support yet.
============================================================================== ==============================================================================
4. Compiler Support ~ 4. Compiler Support ~

View File

@@ -1342,11 +1342,16 @@ in 'runtimepath'. Thus for "java" it is autoload/javacomplete.vim.
C *ft-c-omni* C *ft-c-omni*
Completion of C code requires a tags file. You should use Exuberant ctags, Completion of C code requires a tags file. You should use Universal/
because it adds extra information that is needed for completion. You can find Exuberant ctags, because it adds extra information that is needed for
it here: http://ctags.sourceforge.net/ Version 5.6 or later is recommended. completion. You can find it here:
Universal Ctags: https://ctags.io
Exuberant Ctags: http://ctags.sourceforge.net
For version 5.5.4 you should add a patch that adds the "typename:" field: Universal Ctags is preferred, Exuberant Ctags is no longer being developed.
For Exuberant ctags, version 5.6 or later is recommended. For version 5.5.4
you should add a patch that adds the "typename:" field:
ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch ftp://ftp.vim.org/pub/vim/unstable/patches/ctags-5.5.4.patch
A compiled .exe for MS-Windows can be found at: A compiled .exe for MS-Windows can be found at:
http://ctags.sourceforge.net/ http://ctags.sourceforge.net/
@@ -1467,8 +1472,11 @@ will be suggested. All other elements are not placed in suggestion list.
PHP *ft-php-omni* PHP *ft-php-omni*
Completion of PHP code requires a tags file for completion of data from Completion of PHP code requires a tags file for completion of data from
external files and for class aware completion. You should use Exuberant ctags external files and for class aware completion. You should use Universal/
version 5.5.4 or newer. You can find it here: http://ctags.sourceforge.net/ Exuberant ctags version 5.5.4 or newer. You can find it here:
Universal Ctags: https://ctags.io
Exuberant Ctags: http://ctags.sourceforge.net
Script completes: Script completes:

View File

@@ -6333,9 +6333,10 @@ A jump table for the options with a short description can be found at |Q_op|.
linear search can be avoided when case is ignored. Use a value of '2' linear search can be avoided when case is ignored. Use a value of '2'
in the "!_TAG_FILE_SORTED" line for this. A tag file can be case-fold in the "!_TAG_FILE_SORTED" line for this. A tag file can be case-fold
sorted with the -f switch to "sort" in most unices, as in the command: sorted with the -f switch to "sort" in most unices, as in the command:
"sort -f -o tags tags". For "Exuberant ctags" version 5.x or higher "sort -f -o tags tags". For Universal ctags and Exuberant ctags
(at least 5.5) the --sort=foldcase switch can be used for this as version 5.x or higher (at least 5.5) the --sort=foldcase switch can be
well. Note that case must be folded to uppercase for this to work. used for this as well. Note that case must be folded to uppercase for
this to work.
By default, tag searches are case-sensitive. Case is ignored when By default, tag searches are case-sensitive. Case is ignored when
'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is 'ignorecase' is set and 'tagcase' is "followic", or when 'tagcase' is

View File

@@ -5363,11 +5363,12 @@ WARNING: The longer the tags file, the slower this will be, and the more
memory Vim will consume. memory Vim will consume.
Only highlighting typedefs, unions and structs can be done too. For this you Only highlighting typedefs, unions and structs can be done too. For this you
must use Exuberant ctags (found at http://ctags.sf.net). must use Universal Ctags (found at https://ctags.io) or Exuberant ctags (found
at http://ctags.sf.net).
Put these lines in your Makefile: Put these lines in your Makefile:
# Make a highlight file for types. Requires Exuberant ctags and awk # Make a highlight file for types. Requires Universal/Exuberant ctags and awk
types: types.vim types: types.vim
types.vim: *.[ch] types.vim: *.[ch]
ctags --c-kinds=gstu -o- *.[ch] |\ ctags --c-kinds=gstu -o- *.[ch] |\

View File

@@ -544,7 +544,8 @@ also works. The <CR> and <NL> characters can never appear inside a line.
The second format is new. It includes additional information in optional The second format is new. It includes additional information in optional
fields at the end of each line. It is backwards compatible with Vi. It is fields at the end of each line. It is backwards compatible with Vi. It is
only supported by new versions of ctags (such as Exuberant ctags). only supported by new versions of ctags (such as Universal ctags or Exuberant
ctags).
{tagname} The identifier. Normally the name of a function, but it can {tagname} The identifier. Normally the name of a function, but it can
be any identifier. It cannot contain a <Tab>. be any identifier. It cannot contain a <Tab>.

View File

@@ -33,10 +33,12 @@ following command: >
ctags *.c ctags *.c
"ctags" is a separate program. Most Unix systems already have it installed. "ctags" is a separate program. Most Unix systems already have it installed.
If you do not have it yet, you can find Exuberant ctags here: If you do not have it yet, you can find Universal/Exuberant ctags at:
http://ctags.io ~
http://ctags.sf.net ~ http://ctags.sf.net ~
Universal ctags is preferred, Exuberant ctags is no longer being developed.
Now when you are in Vim and you want to go to a function definition, you can Now when you are in Vim and you want to go to a function definition, you can
jump to it by using the following command: > jump to it by using the following command: >
@@ -142,15 +144,15 @@ ONE TAGS FILE
When Vim has to search many places for tags files, you can hear the disk When Vim has to search many places for tags files, you can hear the disk
rattling. It may get a bit slow. In that case it's better to spend this rattling. It may get a bit slow. In that case it's better to spend this
time while generating one big tags file. You might do this overnight. time while generating one big tags file. You might do this overnight.
This requires the Exuberant ctags program, mentioned above. It offers an This requires the Universal or Exuberant ctags program, mentioned above.
argument to search a whole directory tree: > It offers an argument to search a whole directory tree: >
cd ~/proj cd ~/proj
ctags -R . ctags -R .
The nice thing about this is that Exuberant ctags recognizes various file The nice thing about this is that Universal/Exuberant ctags recognizes various
types. Thus this doesn't work just for C and C++ programs, also for Eiffel file types. Thus this doesn't work just for C and C++ programs, also for
and even Vim scripts. See the ctags documentation to tune this. Eiffel and even Vim scripts. See the ctags documentation to tune this.
Now you only need to tell Vim where your big tags file is: > Now you only need to tell Vim where your big tags file is: >
:set tags=~/proj/tags :set tags=~/proj/tags
@@ -232,7 +234,8 @@ A TAGS BROWSER
Since CTRL-] takes you to the definition of the identifier under the cursor, Since CTRL-] takes you to the definition of the identifier under the cursor,
you can use a list of identifier names as a table of contents. Here is an you can use a list of identifier names as a table of contents. Here is an
example. example.
First create a list of identifiers (this requires Exuberant ctags): > First create a list of identifiers (this requires Universal or Exuberant
ctags): >
ctags --c-types=f -f functions *.c ctags --c-types=f -f functions *.c

View File

@@ -1,7 +1,7 @@
" Vim filetype plugin " Vim filetype plugin
" Language: Liquid " Language: Liquid
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2010 May 21 " Last Change: 2022 Mar 15
if exists('b:did_ftplugin') if exists('b:did_ftplugin')
finish finish
@@ -53,7 +53,7 @@ if has('gui_win32')
endif endif
if exists('loaded_matchit') if exists('loaded_matchit')
let b:match_words .= '\<\%(if\w*\|unless\|case\)\>:\<\%(elsif\|else\|when\)\>:\<end\%(if\w*\|unless\|case\)\>,\<\%(for\|tablerow\)\>:\%({%\s*\)\@<=empty\>:\<end\%(for\|tablerow\)\>,<\(capture\|comment\|highlight\)\>:\<end\1\>' let b:match_words .= '\<\%(if\w*\|unless\|case\)\>:\<\%(elsif\|else\|when\)\>:\<end\%(if\w*\|unless\|case\)\>,\<\%(for\|tablerow\)\>:\%({%\s*\)\@<=empty\>:\<end\%(for\|tablerow\)\>,\<\(capture\|comment\|highlight\)\>:\<end\1\>'
endif endif
setlocal commentstring={%\ comment\ %}%s{%\ endcomment\ %} setlocal commentstring={%\ comment\ %}%s{%\ endcomment\ %}

View File

@@ -73,10 +73,11 @@ exe 'nno <buffer> <silent> ]] /' . escape(s:section, '|') . '/<CR>:nohls<CR>'
exe 'ono <buffer> <silent> [[ ?' . escape(s:section, '|') . '?<CR>:nohls<CR>' exe 'ono <buffer> <silent> [[ ?' . escape(s:section, '|') . '?<CR>:nohls<CR>'
exe 'ono <buffer> <silent> ]] /' . escape(s:section, '|') . '/<CR>:nohls<CR>' exe 'ono <buffer> <silent> ]] /' . escape(s:section, '|') . '/<CR>:nohls<CR>'
setlocal suffixesadd=.php
setlocal commentstring=/*%s*/ setlocal commentstring=/*%s*/
" Undo the stuff we changed. " Undo the stuff we changed.
let b:undo_ftplugin = "setlocal commentstring< include< omnifunc<" . let b:undo_ftplugin = "setlocal suffixesadd< commentstring< include< omnifunc<" .
\ " | unlet! b:browsefilter b:match_words | " . \ " | unlet! b:browsefilter b:match_words | " .
\ s:undo_ftplugin \ s:undo_ftplugin

View File

@@ -1,20 +1,18 @@
" Vim indent file " Vim indent file
" Language: bst " Language: bst
" Author: Tim Pope <vimNOSPAM@tpope.info> " Author: Tim Pope <vimNOSPAM@tpope.info>
" $Id: bst.vim,v 1.1 2007/05/05 18:11:12 vimboss Exp $ " Last Change: 2022 Mar 15
if exists("b:did_indent") if exists("b:did_indent")
finish finish
endif endif
let b:did_indent = 1 let b:did_indent = 1
setlocal expandtab
setlocal indentexpr=GetBstIndent(v:lnum) setlocal indentexpr=GetBstIndent(v:lnum)
"setlocal smartindent
setlocal cinkeys& setlocal cinkeys&
setlocal cinkeys-=0# setlocal cinkeys-=0#
setlocal indentkeys& setlocal indentkeys&
"setlocal indentkeys+=0% let b:undo_indent = 'setlocal indentexpr< cinkeys< indentkeys<'
" Only define the function once. " Only define the function once.
if exists("*GetBstIndent") if exists("*GetBstIndent")

View File

@@ -1,7 +1,7 @@
" Vim indent file " Vim indent file
" Language: Haml " Language: Haml
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2019 Dec 05 " Last Change: 2022 Mar 15
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@@ -14,6 +14,8 @@ setlocal autoindent
setlocal indentexpr=GetHamlIndent() setlocal indentexpr=GetHamlIndent()
setlocal indentkeys=o,O,*<Return>,},],0),!^F,=end,=else,=elsif,=rescue,=ensure,=when setlocal indentkeys=o,O,*<Return>,},],0),!^F,=end,=else,=elsif,=rescue,=ensure,=when
let b:undo_indent = "setl ai< inde< indk<"
" Only define the function once. " Only define the function once.
if exists("*GetHamlIndent") if exists("*GetHamlIndent")
finish finish

View File

@@ -1,7 +1,7 @@
" Vim indent file " Vim indent file
" Language: Liquid " Language: Liquid
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2017 Jun 13 " Last Change: 2022 Mar 15
if exists('b:did_indent') if exists('b:did_indent')
finish finish
@@ -29,17 +29,19 @@ let b:did_indent = 1
setlocal indentexpr=GetLiquidIndent() setlocal indentexpr=GetLiquidIndent()
setlocal indentkeys=o,O,*<Return>,<>>,{,},0),0],o,O,!^F,=end,=endif,=endunless,=endifchanged,=endcase,=endfor,=endtablerow,=endcapture,=else,=elsif,=when,=empty setlocal indentkeys=o,O,*<Return>,<>>,{,},0),0],o,O,!^F,=end,=endif,=endunless,=endifchanged,=endcase,=endfor,=endtablerow,=endcapture,=else,=elsif,=when,=empty
let b:undo_indent = "setl inde< indk<"
" Only define the function once. " Only define the function once.
if exists('*GetLiquidIndent') if exists('*GetLiquidIndent')
finish finish
endif endif
function! s:count(string,pattern) function! s:count(string, pattern) abort
let string = substitute(a:string,'\C'.a:pattern,"\n",'g') let string = substitute(a:string,'\C'.a:pattern,"\n",'g')
return strlen(substitute(string,"[^\n]",'','g')) return strlen(substitute(string,"[^\n]",'','g'))
endfunction endfunction
function! GetLiquidIndent(...) function! GetLiquidIndent(...) abort
if a:0 && a:1 == '.' if a:0 && a:1 == '.'
let v:lnum = line('.') let v:lnum = line('.')
elseif a:0 && a:1 =~ '^\d' elseif a:0 && a:1 =~ '^\d'
@@ -51,13 +53,14 @@ function! GetLiquidIndent(...)
let lnum = prevnonblank(v:lnum-1) let lnum = prevnonblank(v:lnum-1)
let line = getline(lnum) let line = getline(lnum)
let cline = getline(v:lnum) let cline = getline(v:lnum)
let line = substitute(line,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','') let line = substitute(line,'\C^\%(\s*{%-\=\s*end\w*\s*-\=%}\)\+','','')
let line .= matchstr(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+') let line = substitute(line,'\C\%(\s*{%-\=\s*if.\+-\=%}.\+{%-\=\s*endif\s*-\=%}\)\+','','g')
let cline = substitute(cline,'\C^\%(\s*{%\s*end\w*\s*%}\)\+','','') let line .= matchstr(cline,'\C^\%(\s*{%-\=\s*end\w*\s*-\=%}\)\+')
let cline = substitute(cline,'\C^\%(\s*{%-\=\s*end\w*\s*-\=%}\)\+','','')
let sw = shiftwidth() let sw = shiftwidth()
let ind += sw * s:count(line,'{%\s*\%(if\|elsif\|else\|unless\|ifchanged\|case\|when\|for\|empty\|tablerow\|capture\)\>') let ind += sw * s:count(line,'{%-\=\s*\%(if\|elsif\|else\|unless\|ifchanged\|case\|when\|for\|empty\|tablerow\|capture\)\>')
let ind -= sw * s:count(line,'{%\s*end\%(if\|unless\|ifchanged\|case\|for\|tablerow\|capture\)\>') let ind -= sw * s:count(line,'{%-\=\s*end\%(if\|unless\|ifchanged\|case\|for\|tablerow\|capture\)\>')
let ind -= sw * s:count(cline,'{%\s*\%(elsif\|else\|when\|empty\)\>') let ind -= sw * s:count(cline,'{%-\=\s*\%(elsif\|else\|when\|empty\)\>')
let ind -= sw * s:count(cline,'{%\s*end\w*$') let ind -= sw * s:count(cline,'{%-\=\s*end\w*$')
return ind return ind
endfunction endfunction

View File

@@ -1,7 +1,7 @@
" Vim indent file " Vim indent file
" Language: Sass " Language: Sass
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Last Change: 2017 Jun 13 " Last Change: 2022 Mar 15
if exists("b:did_indent") if exists("b:did_indent")
finish finish
@@ -12,6 +12,8 @@ setlocal autoindent sw=2 et
setlocal indentexpr=GetSassIndent() setlocal indentexpr=GetSassIndent()
setlocal indentkeys=o,O,*<Return>,<:>,!^F setlocal indentkeys=o,O,*<Return>,<:>,!^F
let b:undo_indent = "setl ai< inde< indk<"
" Only define the function once. " Only define the function once.
if exists("*GetSassIndent") if exists("*GetSassIndent")
finish finish

View File

@@ -4,10 +4,11 @@
" Copyright: Vim license applies, see ":help license" " Copyright: Vim license applies, see ":help license"
" Last Change: 2022 Jan 17 " Last Change: 2022 Jan 17
" "
" WORK IN PROGRESS - Only the basics work " WORK IN PROGRESS - The basics works stable, more to come
" Note: On MS-Windows you need a recent version of gdb. The one included with " Note: In general you need at least GDB 7.12 because this provides the
" MingW is too old (7.6.1). " frame= response in MI thread-selected events we need to sync stack to file.
" I used version 7.12 from http://www.equation.com/servlet/equation.cmd?fa=gdb " The one included with "old" MingW is too old (7.6.1), you may upgrade it or
" use a newer version from http://www.equation.com/servlet/equation.cmd?fa=gdb
" "
" There are two ways to run gdb: " There are two ways to run gdb:
" - In a terminal window; used if possible, does not work on MS-Windows " - In a terminal window; used if possible, does not work on MS-Windows
@@ -1026,7 +1027,7 @@ func s:Evaluate(range, arg)
call s:SendEval(expr) call s:SendEval(expr)
endfunc endfunc
" get what is specified / under the cursor " get what is specified / under the cursor
func s:GetEvaluationExpression(range, arg) func s:GetEvaluationExpression(range, arg)
if a:arg != '' if a:arg != ''
" user supplied evaluation " user supplied evaluation

View File

@@ -1,7 +1,7 @@
" Vim syntax file " Vim syntax file
" Language: C " Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org> " Maintainer: Bram Moolenaar <Bram@vim.org>
" Last Change: 2021 Dec 07 " Last Change: 2022 Mar 17
" Quit when a (custom) syntax file was already loaded " Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax") if exists("b:current_syntax")
@@ -245,8 +245,14 @@ syn match cWrongComTail display "\*/"
syn keyword cOperator sizeof syn keyword cOperator sizeof
if exists("c_gnu") if exists("c_gnu")
syn keyword cType __label__ __complex__
syn keyword cStatement __asm__ syn keyword cStatement __asm__
syn keyword cOperator typeof __real__ __imag__ syn keyword cOperator __alignof__
syn keyword cOperator typeof __typeof__
syn keyword cOperator __real__ __imag__
syn keyword cStorageClass __attribute__ __const__ __extension__
syn keyword cStorageClass inline __inline__
syn keyword cStorageClass __restrict__ __volatile__ __noreturn__
endif endif
syn keyword cType int long short char void syn keyword cType int long short char void
syn keyword cType signed unsigned float double syn keyword cType signed unsigned float double
@@ -270,16 +276,10 @@ if !exists("c_no_c99") " ISO C99
syn keyword cType intptr_t uintptr_t syn keyword cType intptr_t uintptr_t
syn keyword cType intmax_t uintmax_t syn keyword cType intmax_t uintmax_t
endif endif
if exists("c_gnu")
syn keyword cType __label__ __complex__ __volatile__
endif
syn keyword cTypedef typedef syn keyword cTypedef typedef
syn keyword cStructure struct union enum syn keyword cStructure struct union enum
syn keyword cStorageClass static register auto volatile extern const syn keyword cStorageClass static register auto volatile extern const
if exists("c_gnu")
syn keyword cStorageClass inline __attribute__
endif
if !exists("c_no_c99") && !s:in_cpp_family if !exists("c_no_c99") && !s:in_cpp_family
syn keyword cStorageClass inline restrict syn keyword cStorageClass inline restrict
endif endif
@@ -292,6 +292,7 @@ if !exists("c_no_c11")
syn keyword cOperator _Static_assert static_assert syn keyword cOperator _Static_assert static_assert
syn keyword cStorageClass _Thread_local thread_local syn keyword cStorageClass _Thread_local thread_local
syn keyword cType char16_t char32_t syn keyword cType char16_t char32_t
syn keyword cType max_align_t
" C11 atomics (take down the shield wall!) " C11 atomics (take down the shield wall!)
syn keyword cType atomic_bool atomic_char atomic_schar atomic_uchar syn keyword cType atomic_bool atomic_char atomic_schar atomic_uchar
syn keyword Ctype atomic_short atomic_ushort atomic_int atomic_uint syn keyword Ctype atomic_short atomic_ushort atomic_int atomic_uint

View File

@@ -2,7 +2,7 @@
" Language: Liquid " Language: Liquid
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: *.liquid " Filenames: *.liquid
" Last Change: 2013 May 30 " Last Change: 2022 Mar 15
if exists('b:current_syntax') if exists('b:current_syntax')
finish finish
@@ -68,10 +68,10 @@ if !exists('s:subtype')
unlet s:subtype unlet s:subtype
endif endif
syn region liquidStatement matchgroup=liquidDelimiter start="{%" end="%}" contains=@liquidStatement containedin=ALLBUT,@liquidExempt keepend syn region liquidStatement matchgroup=liquidDelimiter start="{%-\=" end="-\=%}" contains=@liquidStatement containedin=ALLBUT,@liquidExempt keepend
syn region liquidExpression matchgroup=liquidDelimiter start="{{" end="}}" contains=@liquidExpression containedin=ALLBUT,@liquidExempt keepend syn region liquidExpression matchgroup=liquidDelimiter start="{{-\=" end="-\=}}" contains=@liquidExpression containedin=ALLBUT,@liquidExempt keepend
syn region liquidComment matchgroup=liquidDelimiter start="{%\s*comment\s*%}" end="{%\s*endcomment\s*%}" contains=liquidTodo,@Spell containedin=ALLBUT,@liquidExempt keepend syn region liquidComment matchgroup=liquidDelimiter start="{%-\=\s*comment\s*-\=%}" end="{%-\=\s*endcomment\s*-\=%}" contains=liquidTodo,@Spell containedin=ALLBUT,@liquidExempt keepend
syn region liquidRaw matchgroup=liquidDelimiter start="{%\s*raw\s*%}" end="{%\s*endraw\s*%}" contains=TOP,@liquidExempt containedin=ALLBUT,@liquidExempt keepend syn region liquidRaw matchgroup=liquidDelimiter start="{%-\=\s*raw\s*-\=%}" end="{%-\=\s*endraw\s*-\=%}" contains=TOP,@liquidExempt containedin=ALLBUT,@liquidExempt keepend
syn cluster liquidExempt contains=liquidStatement,liquidExpression,liquidComment,liquidRaw,@liquidStatement,liquidYamlHead syn cluster liquidExempt contains=liquidStatement,liquidExpression,liquidComment,liquidRaw,@liquidStatement,liquidYamlHead
syn cluster liquidStatement contains=liquidConditional,liquidRepeat,liquidKeyword,@liquidExpression syn cluster liquidStatement contains=liquidConditional,liquidRepeat,liquidKeyword,@liquidExpression
@@ -79,11 +79,11 @@ syn cluster liquidExpression contains=liquidOperator,liquidString,liquidNumber,l
syn keyword liquidKeyword highlight nextgroup=liquidTypeHighlight skipwhite contained syn keyword liquidKeyword highlight nextgroup=liquidTypeHighlight skipwhite contained
syn keyword liquidKeyword endhighlight contained syn keyword liquidKeyword endhighlight contained
syn region liquidHighlight start="{%\s*highlight\s\+\w\+\s*%}" end="{% endhighlight %}" keepend syn region liquidHighlight start="{%-\=\s*highlight\s\+\w\+\s*-\=%}" end="{%-\= endhighlight -\=%}" keepend
for s:type in g:liquid_highlight_types for s:type in g:liquid_highlight_types
exe 'syn match liquidTypeHighlight "\<'.matchstr(s:type,'[^=]*').'\>" contained' exe 'syn match liquidTypeHighlight "\<'.matchstr(s:type,'[^=]*').'\>" contained'
exe 'syn region liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' start="{%\s*highlight\s\+'.matchstr(s:type,'[^=]*').'\s*%}" end="{% endhighlight %}" keepend contains=@liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g') exe 'syn region liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\..*','','').' start="{%-\=\s*highlight\s\+'.matchstr(s:type,'[^=]*').'\s*-\=%}" end="{%-\= endhighlight -\=%}" keepend contains=@liquidHighlight'.substitute(matchstr(s:type,'[^=]*$'),'\.','','g')
endfor endfor
unlet! s:type unlet! s:type
@@ -92,18 +92,18 @@ syn region liquidString matchgroup=liquidQuote start=+'+ end=+'+ contained
syn match liquidNumber "-\=\<\d\+\>" contained syn match liquidNumber "-\=\<\d\+\>" contained
syn match liquidFloat "-\=\<\d\+\>\.\.\@!\%(\d\+\>\)\=" contained syn match liquidFloat "-\=\<\d\+\>\.\.\@!\%(\d\+\>\)\=" contained
syn keyword liquidBoolean true false contained syn keyword liquidBoolean true false contained
syn keyword liquidNull null nil contained syn keyword liquidNull null nil blank contained
syn match liquidEmpty "\<empty\>" contained syn match liquidEmpty "\<empty\>" contained
syn keyword liquidOperator and or not contained syn keyword liquidOperator and or not contained
syn match liquidPipe '|' contained skipwhite nextgroup=liquidFilter syn match liquidPipe '|' contained skipwhite nextgroup=liquidFilter
syn keyword liquidFilter date capitalize downcase upcase first last join sort size strip_html strip_newlines newline_to_br replace replace_first remove remove_first truncate truncatewords prepend append minus plus times divided_by contained syn keyword liquidFilter date capitalize downcase upcase escape escape_once first last join sort size where uniq strip_html strip_newlines newline_to_br replace replace_first remove remove_first slice split strip truncate truncatewords prepend append url_encode url_decode abs at_most at_least ceil divided_by floor minus plus round times modulo contained
syn keyword liquidConditional if elsif else endif unless endunless case when endcase ifchanged endifchanged contained syn keyword liquidConditional if elsif else endif unless endunless case when endcase ifchanged endifchanged contained
syn keyword liquidRepeat for endfor tablerow endtablerow in contained syn keyword liquidRepeat for endfor tablerow endtablerow in break continue limit offset reversed contained
syn match liquidRepeat "\%({%\s*\)\@<=empty\>" contained syn match liquidRepeat "\%({%-\=\s*\)\@<=empty\>" contained
syn keyword liquidKeyword assign cycle include with contained syn keyword liquidKeyword assign capture endcapture increasement decreasement cycle include with render contained
syn keyword liquidForloop forloop nextgroup=liquidForloopDot contained syn keyword liquidForloop forloop nextgroup=liquidForloopDot contained
syn match liquidForloopDot "\." nextgroup=liquidForloopAttribute contained syn match liquidForloopDot "\." nextgroup=liquidForloopAttribute contained

View File

@@ -2,7 +2,7 @@
" Language: Sass " Language: Sass
" Maintainer: Tim Pope <vimNOSPAM@tpope.org> " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
" Filenames: *.sass " Filenames: *.sass
" Last Change: 2019 Dec 05 " Last Change: 2022 Mar 15
if exists("b:current_syntax") if exists("b:current_syntax")
finish finish
@@ -58,6 +58,7 @@ syn match sassAmpersand "&"
" TODO: Arithmetic (including strings and concatenation) " TODO: Arithmetic (including strings and concatenation)
syn region sassMediaQuery matchgroup=sassMedia start="@media" end="[{};]\@=\|$" contains=sassMediaOperators syn region sassMediaQuery matchgroup=sassMedia start="@media" end="[{};]\@=\|$" contains=sassMediaOperators
syn region sassKeyframe matchgroup=cssAtKeyword start=/@\(-[a-z]\+-\)\=keyframes\>/ end=";\|$" contains=cssVendor,cssComment nextgroup=cssDefinition
syn keyword sassMediaOperators and not only contained syn keyword sassMediaOperators and not only contained
syn region sassCharset start="@charset" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType syn region sassCharset start="@charset" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType
syn region sassInclude start="@import" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType syn region sassInclude start="@import" end=";\|$" contains=scssComment,cssStringQ,cssStringQQ,cssURL,cssUnicodeEscape,cssMediaType