mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-12 05:23:51 -05:00
20 lines
704 B
VimL
20 lines
704 B
VimL
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'styled-components') == -1
|
|
" Vim completion script
|
|
" Language: styled-components (js/ts)
|
|
" Maintainer: Karl Fleischmann <fleischmann.karl@gmail.com>
|
|
" URL: https://github.com/styled-components/vim-styled-components
|
|
|
|
fun! styledcomplete#CompleteSC(findstart, base)
|
|
if IsStyledDefinition(line('.'))
|
|
return csscomplete#CompleteCSS(a:findstart, a:base)
|
|
endif
|
|
|
|
" Only trigger original omnifunc if it was set in the first place
|
|
if exists('b:prevofu')
|
|
" create a funcref to call with the previous omnicomplete function
|
|
let s:funcref = function(b:prevofu)
|
|
return s:funcref(a:findstart, a:base)
|
|
endif
|
|
endfun
|
|
endif
|