mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
parent
5426785541
commit
3e47e529b0
@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: generic git output
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2016 Aug 29
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if (exists("b:did_ftplugin"))
|
||||
@ -10,7 +10,7 @@ endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
if !exists('b:git_dir')
|
||||
if expand('%:p') =~# '[\/]\.git[\/]modules[\/]'
|
||||
if expand('%:p') =~# '[\/]\.git[\/]modules[\/]\|:[\/][\/]\|^\a\a\+:'
|
||||
" Stay out of the way
|
||||
elseif expand('%:p') =~# '[\/]\.git[\/]worktrees'
|
||||
let b:git_dir = matchstr(expand('%:p'),'.*\.git[\/]worktrees[\/][^\/]\+\>')
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Haml
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2016 Aug 29
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -37,6 +37,8 @@ endif
|
||||
runtime! ftplugin/ruby.vim ftplugin/ruby_*.vim ftplugin/ruby/*.vim
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let &l:define .= empty(&l:define ? '' : '\|') . '^\s*\%(%\w*\)\=\%(\.[[:alnum:]_-]\+\)*#'
|
||||
|
||||
" Combine the new set of values with those previously included.
|
||||
if exists("b:undo_ftplugin")
|
||||
let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin
|
||||
@ -60,7 +62,7 @@ endif
|
||||
|
||||
setlocal comments= commentstring=-#\ %s
|
||||
|
||||
let b:undo_ftplugin = "setl cms< com< "
|
||||
let b:undo_ftplugin = "setl def< cms< com< "
|
||||
\ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin
|
||||
|
||||
let &cpo = s:save_cpo
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim filetype plugin
|
||||
" Language: Sass
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2016 Aug 29
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
" Only do this when not done yet for this buffer
|
||||
if exists("b:did_ftplugin")
|
||||
@ -13,11 +13,25 @@ let b:undo_ftplugin = "setl com< cms< def< inc< inex< ofu< sua<"
|
||||
|
||||
setlocal comments=://
|
||||
setlocal commentstring=//\ %s
|
||||
setlocal define=^\\s*\\%(@mixin\\\|=\\)
|
||||
setlocal includeexpr=substitute(v:fname,'\\%(.*/\\\|^\\)\\zs','_','')
|
||||
setlocal includeexpr=SassIncludeExpr(v:fname)
|
||||
setlocal omnifunc=csscomplete#CompleteCSS
|
||||
setlocal suffixesadd=.sass,.scss,.css
|
||||
if &filetype =~# '\<s[ac]ss]\>'
|
||||
setlocal iskeyword+=-
|
||||
setlocal iskeyword+=$
|
||||
setlocal iskeyword+=%
|
||||
let b:undo_ftplugin .= ' isk<'
|
||||
endif
|
||||
|
||||
let &l:define = '^\C\v\s*%(\@function|\@mixin|\=)|^\s*%(\$[[:alnum:]-]+:|[%.][:alnum:]-]+\s*%(\{|$))@='
|
||||
let &l:include = '^\s*@import\s\+\%(url(\)\=["'']\='
|
||||
|
||||
function! SassIncludeExpr(file) abort
|
||||
let partial = substitute(a:file, '\%(.*/\|^\)\zs', '_', '')
|
||||
if !empty(findfile(partial))
|
||||
return partial
|
||||
endif
|
||||
return a:file
|
||||
endfunction
|
||||
|
||||
" vim:set sw=2:
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim indent file
|
||||
" Language: Haml
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2017 Jun 13
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
if exists("b:did_indent")
|
||||
finish
|
||||
@ -10,7 +10,7 @@ runtime! indent/ruby.vim
|
||||
unlet! b:did_indent
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal autoindent sw=2 et
|
||||
setlocal autoindent
|
||||
setlocal indentexpr=GetHamlIndent()
|
||||
setlocal indentkeys=o,O,*<Return>,},],0),!^F,=end,=else,=elsif,=rescue,=ensure,=when
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
" Vim syntax file
|
||||
" Language: generic git output
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Last Change: 2010 May 21
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@ -13,7 +13,7 @@ syn sync minlines=50
|
||||
syn include @gitDiff syntax/diff.vim
|
||||
|
||||
syn region gitHead start=/\%^/ end=/^$/
|
||||
syn region gitHead start=/\%(^commit \x\{40\}\%(\s*(.*)\)\=$\)\@=/ end=/^$/
|
||||
syn region gitHead start=/\%(^commit\%( \x\{40\}\)\{1,\}\%(\s*(.*)\)\=$\)\@=/ end=/^$/
|
||||
|
||||
" For git reflog and git show ...^{tree}, avoid sync issues
|
||||
syn match gitHead /^\d\{6\} \%(\w\{4} \)\=\x\{40\}\%( [0-3]\)\=\t.*/
|
||||
@ -25,12 +25,14 @@ syn region gitDiff start=/^\%(@@ -\)\@=/ end=/^\%(diff --\%(git\|cc\|combined\)
|
||||
syn region gitDiffMerge start=/^\%(diff --\%(cc\|combined\) \)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff
|
||||
syn region gitDiffMerge start=/^\%(@@@@* -\)\@=/ end=/^\%(diff --\|$\)\@=/ contains=@gitDiff
|
||||
syn match gitDiffAdded "^ \++.*" contained containedin=gitDiffMerge
|
||||
syn match gitDiffAdded "{+.*+}" contained containedin=gitDiff
|
||||
syn match gitDiffRemoved "^ \+-.*" contained containedin=gitDiffMerge
|
||||
syn match gitDiffRemoved "\[-.*-\]" contained containedin=gitDiff
|
||||
|
||||
syn match gitKeyword /^\%(object\|type\|tag\|commit\|tree\|parent\|encoding\)\>/ contained containedin=gitHead nextgroup=gitHash,gitType skipwhite
|
||||
syn match gitKeyword /^\%(tag\>\|ref:\)/ contained containedin=gitHead nextgroup=gitReference skipwhite
|
||||
syn match gitKeyword /^Merge:/ contained containedin=gitHead nextgroup=gitHashAbbrev skipwhite
|
||||
syn match gitMode /^\d\{6\}/ contained containedin=gitHead nextgroup=gitType,gitHash skipwhite
|
||||
syn match gitMode /^\d\{6\}\>/ contained containedin=gitHead nextgroup=gitType,gitHash skipwhite
|
||||
syn match gitIdentityKeyword /^\%(author\|committer\|tagger\)\>/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
|
||||
syn match gitIdentityHeader /^\%(Author\|Commit\|Tagger\):/ contained containedin=gitHead nextgroup=gitIdentity skipwhite
|
||||
syn match gitDateHeader /^\%(AuthorDate\|CommitDate\|Date\):/ contained containedin=gitHead nextgroup=gitDate skipwhite
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: Haml
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: *.haml
|
||||
" Last Change: 2016 Aug 29
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@ -38,7 +38,7 @@ syn match hamlDespacer "[<>]" contained nextgroup=hamlDespacer,hamlSelfCloser,
|
||||
syn match hamlSelfCloser "/" contained
|
||||
syn match hamlClassChar "\." contained nextgroup=hamlClass
|
||||
syn match hamlIdChar "#{\@!" contained nextgroup=hamlId
|
||||
syn match hamlClass "\%(\w\|-\)\+" contained nextgroup=@hamlComponent
|
||||
syn match hamlClass "\%(\w\|-\|\:\)\+" contained nextgroup=@hamlComponent
|
||||
syn match hamlId "\%(\w\|-\)\+" contained nextgroup=@hamlComponent
|
||||
syn region hamlDocType start="^\s*!!!" end="$"
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: Sass
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: *.sass
|
||||
" Last Change: 2016 Aug 29
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@ -21,8 +21,7 @@ syn match sassProperty "\%([{};]\s*\|^\)\@<=\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:"
|
||||
syn match sassProperty "^\s*\zs\s\%(\%([[:alnum:]-]\|#{[^{}]*}\)\+\s*:\|:[[:alnum:]-]\+\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute
|
||||
syn match sassProperty "^\s*\zs\s\%(:\=[[:alnum:]-]\+\s*=\)"hs=s+1 contains=css.*Prop skipwhite nextgroup=sassCssAttribute
|
||||
syn match sassCssAttribute +\%("\%([^"]\|\\"\)*"\|'\%([^']\|\\'\)*'\|#{[^{}]*}\|[^{};]\)*+ contained contains=@sassCssAttributes,sassVariable,sassFunction,sassInterpolation
|
||||
syn match sassDefault "!default\>" contained
|
||||
syn match sassVariable "!\%(important\>\|default\>\)\@![[:alnum:]_-]\+"
|
||||
syn match sassFlag "!\%(default\|global\|optional\)\>" contained
|
||||
syn match sassVariable "$[[:alnum:]_-]\+"
|
||||
syn match sassVariableAssignment "\%([!$][[:alnum:]_-]\+\s*\)\@<=\%(||\)\==" nextgroup=sassCssAttribute skipwhite
|
||||
syn match sassVariableAssignment "\%([!$][[:alnum:]_-]\+\s*\)\@<=:" nextgroup=sassCssAttribute skipwhite
|
||||
@ -42,7 +41,6 @@ syn match sassMixin "\%([{};]\s*\|^\s*\)\@<=@mixin" nextgroup=sassMixinName s
|
||||
syn match sassMixing "^\s\+\zs+" nextgroup=sassMixinName
|
||||
syn match sassMixing "\%([{};]\s*\|^\s*\)\@<=@include" nextgroup=sassMixinName skipwhite
|
||||
syn match sassExtend "\%([{};]\s*\|^\s*\)\@<=@extend"
|
||||
syn match sassPlaceholder "\%([{};]\s*\|^\s*\)\@<=%" nextgroup=sassMixinName skipwhite
|
||||
|
||||
syn match sassFunctionName "[[:alnum:]_-]\+" contained nextgroup=sassCssAttribute
|
||||
syn match sassFunctionDecl "\%([{};]\s*\|^\s*\)\@<=@function" nextgroup=sassFunctionName skipwhite
|
||||
@ -52,6 +50,7 @@ syn match sassEscape "^\s*\zs\\"
|
||||
syn match sassIdChar "#[[:alnum:]_-]\@=" nextgroup=sassId
|
||||
syn match sassId "[[:alnum:]_-]\+" contained
|
||||
syn match sassClassChar "\.[[:alnum:]_-]\@=" nextgroup=sassClass
|
||||
syn match sassPlaceholder "\%([{};]\s*\|^\s*\)\@<=%" nextgroup=sassClass
|
||||
syn match sassClass "[[:alnum:]_-]\+" contained
|
||||
syn match sassAmpersand "&"
|
||||
|
||||
@ -75,12 +74,12 @@ syn match sassEndOfLineComment "//.*" contains=sassComment,sassTodo,@Spell
|
||||
hi def link sassEndOfLineComment sassComment
|
||||
hi def link sassCssComment sassComment
|
||||
hi def link sassComment Comment
|
||||
hi def link sassDefault cssImportant
|
||||
hi def link sassFlag cssImportant
|
||||
hi def link sassVariable Identifier
|
||||
hi def link sassFunction Function
|
||||
hi def link sassMixing PreProc
|
||||
hi def link sassMixin PreProc
|
||||
hi def link sassPlaceholder PreProc
|
||||
hi def link sassPlaceholder sassClassChar
|
||||
hi def link sassExtend PreProc
|
||||
hi def link sassFunctionDecl PreProc
|
||||
hi def link sassReturn PreProc
|
||||
|
@ -2,7 +2,7 @@
|
||||
" Language: SCSS
|
||||
" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
|
||||
" Filenames: *.scss
|
||||
" Last Change: 2010 Jul 26
|
||||
" Last Change: 2019 Dec 05
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
@ -10,10 +10,15 @@ endif
|
||||
|
||||
runtime! syntax/sass.vim
|
||||
|
||||
syn match scssComment "//.*" contains=sassTodo,@Spell
|
||||
syn region scssComment start="/\*" end="\*/" contains=sassTodo,@Spell
|
||||
syn clear sassComment
|
||||
syn clear sassCssComment
|
||||
syn clear sassEndOfLineComment
|
||||
|
||||
hi def link scssComment sassComment
|
||||
syn match scssComment "//.*" contains=sassTodo,@Spell
|
||||
syn region scssCssComment start="/\*" end="\*/" contains=sassTodo,@Spell
|
||||
|
||||
hi def link scssCssComment scssComment
|
||||
hi def link scssComment Comment
|
||||
|
||||
let b:current_syntax = "scss"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user