diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2019-09-04 16:24:55 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2019-09-04 16:25:08 +0200 |
commit | fe84062992e12dea8e090e647afa6b314e891f73 (patch) | |
tree | ca79f486b6fa9c7562dce7c0bdfef93f3cebd1f7 | |
parent | 8742443e694c51fd80db6828f3f0289183e96a40 (diff) | |
download | vim-polyglot-fe84062992e12dea8e090e647afa6b314e891f73.tar.gz vim-polyglot-fe84062992e12dea8e090e647afa6b314e891f73.zip |
Include missing file from styledcomponents, fixes #418
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | after/autoload/styledcomplete.vim | 21 | ||||
-rwxr-xr-x | build | 2 |
3 files changed, 23 insertions, 2 deletions
@@ -161,7 +161,7 @@ If you need full functionality of any plugin, please use it directly with your p - [slime](https://github.com/slime-lang/vim-slime-syntax) (syntax, indent) - [smt2](https://github.com/bohlender/vim-smt2) (syntax, autoload, ftplugin) - [solidity](https://github.com/tomlion/vim-solidity) (syntax, indent, ftplugin) -- [styled-components](https://github.com/styled-components/vim-styled-components#main) (syntax, indent, ftplugin) +- [styled-components](https://github.com/styled-components/vim-styled-components#main) (after) - [stylus](https://github.com/wavded/vim-stylus) (syntax, indent, ftplugin) - [svelte](https://github.com/evanleck/vim-svelte) (syntax, indent) - [svg-indent](https://github.com/jasonshell/vim-svg-indent) (indent) diff --git a/after/autoload/styledcomplete.vim b/after/autoload/styledcomplete.vim new file mode 100644 index 00000000..efa992c4 --- /dev/null +++ b/after/autoload/styledcomplete.vim @@ -0,0 +1,21 @@ +if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'styled-components') != -1 + finish +endif + +" 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 @@ -271,7 +271,7 @@ PACKS=" slime:slime-lang/vim-slime-syntax smt2:bohlender/vim-smt2 solidity:tomlion/vim-solidity - styled-components:styled-components/vim-styled-components#main + styled-components:styled-components/vim-styled-components#main:_ALL stylus:wavded/vim-stylus svelte:evanleck/vim-svelte svg-indent:jasonshell/vim-svg-indent |