diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2019-04-23 11:49:34 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2019-04-23 11:49:34 +0200 |
commit | 9fd5c11a20f88525088c8635a3bc6a25ec4c05c7 (patch) | |
tree | d99e7094aa3adecd357f810290ab98fd346b8ad6 | |
parent | 679ccf03036dede70ec61878830973d79534bf0e (diff) | |
download | vim-polyglot-3.8.1.tar.gz vim-polyglot-3.8.1.zip |
Remove liquid syntax, closes #384v3.8.1
-rw-r--r-- | README.md | 3 | ||||
-rwxr-xr-x | build | 1 | ||||
-rw-r--r-- | ftdetect/polyglot.vim | 22 | ||||
-rw-r--r-- | ftplugin/liquid.vim | 65 | ||||
-rw-r--r-- | indent/liquid.vim | 67 | ||||
-rw-r--r-- | syntax/liquid.vim | 142 |
6 files changed, 1 insertions, 299 deletions
@@ -10,7 +10,7 @@ A collection of language packs for Vim. > One to rule them all, one to find them, one to bring them all and in the darkness bind them. - It **won't affect your startup time**, as scripts are loaded only on demand\*. -- It **installs and updates 120+ times faster** than the <!--Package Count-->135<!--/Package Count--> packages it consists of. +- It **installs and updates 120+ times faster** than the <!--Package Count-->134<!--/Package Count--> packages it consists of. - Solid syntax and indentation support (other features skipped). Only the best language packs. - All unnecessary files are ignored (like enormous documentation from php support). - No support for esoteric languages, only most popular ones (modern too, like `slim`). @@ -107,7 +107,6 @@ If you need full functionality of any plugin, please use it directly with your p - [latex](https://github.com/LaTeX-Box-Team/LaTeX-Box) (syntax, indent, ftplugin) - [less](https://github.com/groenewege/vim-less) (syntax, indent, ftplugin) - [lilypond](https://github.com/anowlcalledjosh/vim-lilypond) (syntax, indent, compiler, ftplugin) -- [liquid](https://github.com/tpope/vim-liquid) (syntax, indent, ftplugin) - [livescript](https://github.com/gkz/vim-ls) (syntax, indent, compiler, ftplugin) - [llvm](https://github.com/rhysd/vim-llvm) (syntax, indent, ftplugin) - [lua](https://github.com/tbastos/vim-lua) (syntax, indent) @@ -214,7 +214,6 @@ PACKS=" kotlin:udalov/kotlin-vim latex:LaTeX-Box-Team/LaTeX-Box less:groenewege/vim-less:_NOAFTER - liquid:tpope/vim-liquid lilypond:anowlcalledjosh/vim-lilypond livescript:gkz/vim-ls llvm:rhysd/vim-llvm diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 9026cf58..abe0d305 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -661,28 +661,6 @@ autocmd BufNewFile,BufRead *.less setf less augroup end endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'liquid') == -1 - augroup filetypedetect - " liquid, from liquid.vim in tpope/vim-liquid -" Liquid -au BufNewFile,BufRead *.liquid set ft=liquid - -au BufNewFile,BufRead */_layouts/*.html,*/_includes/*.html set ft=liquid -au BufNewFile,BufRead *.html,*.xml,*.textile - \ if getline(1) == '---' | set ft=liquid | endif -au BufNewFile,BufRead *.markdown,*.mkd,*.mkdn,*.md - \ if getline(1) == '---' | - \ let b:liquid_subtype = 'markdown' | - \ set ft=liquid | - \ endif - -" Set subtype for Shopify alternate templates -au BufNewFile,BufRead */templates/**.liquid,*/layout/**.liquid,*/snippets/**.liquid - \ let b:liquid_subtype = 'html' | - \ set ft=liquid | - augroup end -endif - if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lilypond') == -1 augroup filetypedetect " lilypond, from lilypond.vim in anowlcalledjosh/vim-lilypond diff --git a/ftplugin/liquid.vim b/ftplugin/liquid.vim deleted file mode 100644 index cb65c184..00000000 --- a/ftplugin/liquid.vim +++ /dev/null @@ -1,65 +0,0 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'liquid') != -1 - finish -endif - -" Vim filetype plugin -" Language: Liquid -" Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2010 May 21 - -if exists('b:did_ftplugin') - finish -endif - -if !exists('g:liquid_default_subtype') - let g:liquid_default_subtype = 'html' -endif - -if !exists('b:liquid_subtype') - let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") - let b:liquid_subtype = matchstr(s:lines,'liquid_subtype=\zs\w\+') - if b:liquid_subtype == '' - let b:liquid_subtype = matchstr(&filetype,'^liquid\.\zs\w\+') - endif - if b:liquid_subtype == '' - let b:liquid_subtype = matchstr(substitute(expand('%:t'),'\c\%(\.liquid\)\+$','',''),'\.\zs\w\+$') - endif - if b:liquid_subtype == '' - let b:liquid_subtype = g:liquid_default_subtype - endif -endif - -if exists('b:liquid_subtype') && b:liquid_subtype != '' - exe 'runtime! ftplugin/'.b:liquid_subtype.'.vim ftplugin/'.b:liquid_subtype.'_*.vim ftplugin/'.b:liquid_subtype.'/*.vim' -else - runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim -endif -let b:did_ftplugin = 1 - -if exists('b:undo_ftplugin') - let b:undo_ftplugin .= '|' -else - let b:undo_ftplugin = '' -endif -if exists('b:browsefilter') - let b:browsefilter = "\n".b:browsefilter -else - let b:browsefilter = '' -endif -if exists('b:match_words') - let b:match_words .= ',' -elseif exists('loaded_matchit') - let b:match_words = '' -endif - -if has('gui_win32') - let b:browsefilter="Liquid Files (*.liquid)\t*.liquid" . b:browsefilter -endif - -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\>' -endif - -setlocal commentstring={%\ comment\ %}%s{%\ endcomment\ %} - -let b:undo_ftplugin .= 'setl cms< | unlet! b:browsefilter b:match_words' diff --git a/indent/liquid.vim b/indent/liquid.vim deleted file mode 100644 index a8988b5a..00000000 --- a/indent/liquid.vim +++ /dev/null @@ -1,67 +0,0 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'liquid') != -1 - finish -endif - -" Vim indent file -" Language: Liquid -" Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Last Change: 2010 May 21 - -if exists('b:did_indent') - finish -endif - -set indentexpr= -if exists('b:liquid_subtype') - exe 'runtime! indent/'.b:liquid_subtype.'.vim' -else - runtime! indent/html.vim -endif -unlet! b:did_indent - -if &l:indentexpr == '' - if &l:cindent - let &l:indentexpr = 'cindent(v:lnum)' - else - let &l:indentexpr = 'indent(prevnonblank(v:lnum-1))' - endif -endif -let b:liquid_subtype_indentexpr = &l:indentexpr - -let b:did_indent = 1 - -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 - -" Only define the function once. -if exists('*GetLiquidIndent') - finish -endif - -function! s:count(string,pattern) - let string = substitute(a:string,'\C'.a:pattern,"\n",'g') - return strlen(substitute(string,"[^\n]",'','g')) -endfunction - -function! GetLiquidIndent(...) - if a:0 && a:1 == '.' - let v:lnum = line('.') - elseif a:0 && a:1 =~ '^\d' - let v:lnum = a:1 - endif - let vcol = col('.') - call cursor(v:lnum,1) - exe "let ind = ".b:liquid_subtype_indentexpr - let lnum = prevnonblank(v:lnum-1) - let line = getline(lnum) - let cline = getline(v:lnum) - let line = substitute(line,'\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 = exists('*shiftwidth') ? shiftwidth() : &sw - 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(cline,'{%\s*\%(elsif\|else\|when\|empty\)\>') - let ind -= sw * s:count(cline,'{%\s*end\w*$') - return ind -endfunction diff --git a/syntax/liquid.vim b/syntax/liquid.vim deleted file mode 100644 index 1e2552cd..00000000 --- a/syntax/liquid.vim +++ /dev/null @@ -1,142 +0,0 @@ -if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'liquid') != -1 - finish -endif - -" Vim syntax file -" Language: Liquid -" Maintainer: Tim Pope <vimNOSPAM@tpope.org> -" Filenames: *.liquid -" Last Change: 2010 May 21 - -if exists('b:current_syntax') - finish -endif - -if !exists('main_syntax') - let main_syntax = 'liquid' -endif - -if !exists('g:liquid_default_subtype') - let g:liquid_default_subtype = 'html' -endif - -if !exists('b:liquid_subtype') && main_syntax == 'liquid' - let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") - let b:liquid_subtype = matchstr(s:lines,'liquid_subtype=\zs\w\+') - if b:liquid_subtype == '' - let b:liquid_subtype = matchstr(&filetype,'^liquid\.\zs\w\+') - endif - if b:liquid_subtype == '' - let b:liquid_subtype = matchstr(substitute(expand('%:t'),'\c\%(\.liquid\)\+$','',''),'\.\zs\w\+$') - endif - if b:liquid_subtype == '' - let b:liquid_subtype = g:liquid_default_subtype - endif -endif - -if exists('b:liquid_subtype') && b:liquid_subtype != '' - exe 'runtime! syntax/'.b:liquid_subtype.'.vim' - unlet! b:current_syntax -endif - -syn case match - -if exists('b:liquid_subtype') && b:liquid_subtype != 'yaml' - " YAML Front Matter - syn include @liquidYamlTop syntax/yaml.vim - unlet! b:current_syntax - syn region liquidYamlHead start="\%^---$" end="^---\s*$" keepend contains=@liquidYamlTop,@Spell -endif - -if !exists('g:liquid_highlight_types') - let g:liquid_highlight_types = [] -endif - -if !exists('s:subtype') - let s:subtype = exists('b:liquid_subtype') ? b:liquid_subtype : '' - - for s:type in map(copy(g:liquid_highlight_types),'matchstr(v:val,"[^=]*$")') - if s:type =~ '\.' - let b:{matchstr(s:type,'[^.]*')}_subtype = matchstr(s:type,'\.\zs.*') - endif - exe 'syn include @liquidHighlight'.substitute(s:type,'\.','','g').' syntax/'.matchstr(s:type,'[^.]*').'.vim' - unlet! b:current_syntax - endfor - unlet! s:type - - if s:subtype == '' - unlet! b:liquid_subtype - else - let b:liquid_subtype = s:subtype - endif - unlet s:subtype -endif - -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 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 cluster liquidExempt contains=liquidStatement,liquidExpression,liquidComment,liquidRaw,@liquidStatement,liquidYamlHead -syn cluster liquidStatement contains=liquidConditional,liquidRepeat,liquidKeyword,@liquidExpression -syn cluster liquidExpression contains=liquidOperator,liquidString,liquidNumber,liquidFloat,liquidBoolean,liquidNull,liquidEmpty,liquidPipe,liquidForloop - -syn keyword liquidKeyword highlight nextgroup=liquidTypeHighlight skipwhite contained -syn keyword liquidKeyword endhighlight contained -syn region liquidHighlight start="{%\s*highlight\s\+\w\+\s*%}" end="{% endhighlight %}" keepend - -for s:type in g:liquid_highlight_types - 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') -endfor -unlet! s:type - -syn region liquidString matchgroup=liquidQuote start=+"+ end=+"+ contained -syn region liquidString matchgroup=liquidQuote start=+'+ end=+'+ contained -syn match liquidNumber "-\=\<\d\+\>" contained -syn match liquidFloat "-\=\<\d\+\>\.\.\@!\%(\d\+\>\)\=" contained -syn keyword liquidBoolean true false contained -syn keyword liquidNull null nil contained -syn match liquidEmpty "\<empty\>" contained - -syn keyword liquidOperator and or not contained -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 liquidConditional if elsif else endif unless endunless case when endcase ifchanged endifchanged contained -syn keyword liquidRepeat for endfor tablerow endtablerow in contained -syn match liquidRepeat "\%({%\s*\)\@<=empty\>" contained -syn keyword liquidKeyword assign cycle include with contained - -syn keyword liquidForloop forloop nextgroup=liquidForloopDot contained -syn match liquidForloopDot "\." nextgroup=liquidForloopAttribute contained -syn keyword liquidForloopAttribute length index index0 rindex rindex0 first last contained - -syn keyword liquidTablerowloop tablerowloop nextgroup=liquidTablerowloopDot contained -syn match liquidTablerowloopDot "\." nextgroup=liquidTableForloopAttribute contained -syn keyword liquidTablerowloopAttribute length index index0 col col0 index0 rindex rindex0 first last col_first col_last contained - -hi def link liquidDelimiter PreProc -hi def link liquidComment Comment -hi def link liquidTypeHighlight Type -hi def link liquidConditional Conditional -hi def link liquidRepeat Repeat -hi def link liquidKeyword Keyword -hi def link liquidOperator Operator -hi def link liquidString String -hi def link liquidQuote Delimiter -hi def link liquidNumber Number -hi def link liquidFloat Float -hi def link liquidEmpty liquidNull -hi def link liquidNull liquidBoolean -hi def link liquidBoolean Boolean -hi def link liquidFilter Function -hi def link liquidForloop Identifier -hi def link liquidForloopAttribute Identifier - -let b:current_syntax = 'liquid' - -if exists('main_syntax') && main_syntax == 'liquid' - unlet main_syntax -endif |