mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-23 11:01:34 +08:00
38 lines
1.4 KiB
VimL
38 lines
1.4 KiB
VimL
"=============================================================================
|
|
" html.vim --- SpaceVim lang#html layer
|
|
" Copyright (c) 2016-2017 Wang Shidong & Contributors
|
|
" Author: Wang Shidong < wsdjeg at 163.com >
|
|
" URL: https://spacevim.org
|
|
" License: GPLv3
|
|
"=============================================================================
|
|
|
|
function! SpaceVim#layers#lang#html#plugins() abort
|
|
let plugins = [
|
|
\ ['groenewege/vim-less', { 'on_ft' : ['less']}],
|
|
\ ['cakebaker/scss-syntax.vim', { 'on_ft' : ['scss','sass']}],
|
|
\ ['hail2u/vim-css3-syntax', { 'on_ft' : ['css','scss','sass']}],
|
|
\ ['ap/vim-css-color', { 'on_ft' : ['css','scss','sass','less','styl']}],
|
|
\ ['othree/html5.vim', { 'on_ft' : ['html']}],
|
|
\ ['wavded/vim-stylus', { 'on_ft' : ['stylus']}],
|
|
\ ['mattn/emmet-vim', { 'on_cmd' : 'EmmetInstall'}],
|
|
\ ]
|
|
return plugins
|
|
endfunction
|
|
|
|
function! SpaceVim#layers#lang#html#config() abort
|
|
let g:user_emmet_leader_key=get(g:, 'user_emmet_leader_key', '<C-e>')
|
|
augroup spacevim_lang_html
|
|
autocmd!
|
|
autocmd FileType html,css,scss,sass,less,javascript,jsp,vue,eex call s:install_emmet()
|
|
augroup END
|
|
endfunction
|
|
|
|
|
|
function! s:install_emmet() abort
|
|
try
|
|
EmmetInstall
|
|
catch
|
|
|
|
endtry
|
|
endfunction
|