1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-13 02:05:40 +08:00

refactor(python): move python autocmd to lang#python layer

This commit is contained in:
wsdjeg 2022-03-31 12:33:43 +08:00
parent bed725bead
commit 14a691a8aa
2 changed files with 7 additions and 5 deletions

View File

@ -46,7 +46,7 @@ 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 qf setlocal nobuflisted
autocmd FileType python,coffee call SpaceVim#util#check_if_expand_tab()
autocmd FileType coffee call SpaceVim#util#check_if_expand_tab()
au StdinReadPost * call s:disable_welcome()
if !has('nvim-0.5.0')
autocmd InsertEnter * call s:fixindentline()

View File

@ -131,11 +131,13 @@ function! SpaceVim#layers#lang#python#config() abort
" mapping in your vimrc, such as if you do:
let g:pydocstring_enable_mapping = 0
if g:spacevim_autocomplete_parens
augroup python_delimit
augroup spacevim_layer_lang_python
autocmd!
autocmd FileType python call SpaceVim#util#check_if_expand_tab()
if g:spacevim_autocomplete_parens
au FileType python let b:delimitMate_nesting_quotes = ['"', "'"]
augroup end
endif
endif
augroup END
" }}}
let g:deoplete#sources#jedi#enable_typeinfo = s:enable_typeinfo
call SpaceVim#plugins#runner#reg_runner('python',