1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 17:20:04 +08:00

Move xml lua html autocmd to lang layer

This commit is contained in:
Shidong Wang 2019-01-22 22:24:05 +08:00
parent 6234d7379a
commit 413ef72c6f
4 changed files with 10 additions and 5 deletions

View File

@ -43,10 +43,6 @@ function! SpaceVim#autocmds#init() abort
autocmd FileType c,cpp,java,javascript set comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
autocmd FileType cs set comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
autocmd FileType vim set comments=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\"
autocmd FileType lua set comments=f:--
autocmd FileType xml call XmlFileTypeInit()
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
autocmd Filetype qf setlocal nobuflisted
autocmd FileType python,coffee call zvim#util#check_if_expand_tab()
au StdinReadPost * call s:disable_welcome()

View File

@ -25,6 +25,7 @@ function! SpaceVim#layers#lang#html#config() abort
autocmd!
autocmd FileType html,css,scss,sass,less,javascript,jsp,vue,eex call s:install_emmet()
autocmd Filetype html setlocal omnifunc=htmlcomplete#CompleteTags
autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
augroup END
endfunction

View File

@ -30,6 +30,10 @@ let s:lua_repl_command = ''
function! SpaceVim#layers#lang#lua#config() abort
augroup spacevim_lang_lua
autocmd!
autocmd FileType lua set comments=f:--
augroup END
call SpaceVim#mapping#space#regesit_lang_mappings('lua', function('s:language_specified_mappings'))
let luaexe = filter(['lua53', 'lua52', 'lua51'], 'executable(v:val)')
if !empty(luaexe)

View File

@ -23,5 +23,9 @@ function! SpaceVim#layers#lang#xml#plugins() abort
endfunction
function! SpaceVim#layers#lang#xml#config() abort
augroup spacevim_lang_xml
autocmd!
autocmd FileType xml call XmlFileTypeInit()
autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
augroup END
endfunction