robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
7945732ed7
master
1" Vim filetype plugin 2" Language: Sass 3" Maintainer: Tim Pope <vimNOSPAM@tpope.org> 4" Last Change: 2023 Dec 28 5" 2026 Jun 27 by Vim Project normalize recommended style guard 6 7" Only do this when not done yet for this buffer 8if exists ( "b:did_ftplugin" ) 9finish 10endif 11let b: did_ftplugin = 1 12 13let b: undo_ftplugin = "setl com< cms< def< inc< inex< ofu< sua<" 14 15setlocal comments = :// 16setlocal commentstring = //\ %s 17setlocal includeexpr = SassIncludeExpr (v:fname) 18setlocal omnifunc = csscomplete#CompleteCSS 19setlocal suffixesadd = .sass,.scss,.css 20if & filetype =~# '\<s[ac]ss]\>' 21setlocal iskeyword += - 22setlocal iskeyword += $ 23setlocal iskeyword += % 24let b: undo_ftplugin .= ' isk<' 25endif 26 27if get ( g:, 'sass_recommended_style' , 28 \get ( g:, 'filetype_recommended_style' , 1 )) 29setlocal shiftwidth = 2 softtabstop = 2 expandtab 30let b: undo_ftplugin .= ' sw< sts< et<' 31endif 32 33let & l: define = '^\C\v\s*%(\@function|\@mixin|\=)|^\s*%(\$[[:alnum:]-]+:|[%.][:alnum:]-]+\s*%(\{|$))@=' 34let & l: include = '^\s*@import\s\+\%(url(\)\=["'']\=' 35 36function ! SassIncludeExpr ( file ) abort 37let partial = substitute ( a: file , '\%(.*/\|^\)\zs' , '_' , '' ) 38if ! empty ( findfile ( partial )) 39return partial 40endif 41return a: file 42endfunction 43 44" vim:set sw=2: