1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 00:40:05 +08:00
This commit is contained in:
Shidong Wang 2020-02-18 15:27:19 +08:00
commit 02fc42ba33
2 changed files with 32 additions and 1 deletions

View File

@ -81,7 +81,9 @@ function! SpaceVim#layers#git#config() abort
autocmd!
autocmd FileType diff nnoremap <buffer><silent> q :call SpaceVim#mapping#close_current_buffer()<CR>
autocmd FileType gitcommit setl omnifunc=SpaceVim#plugins#gitcommit#complete
autocmd User GitGutter let &l:statusline = SpaceVim#layers#core#statusline#get(1)
if SpaceVim#layers#isLoaded('core#statusline')
autocmd User GitGutter let &l:statusline = SpaceVim#layers#core#statusline#get(1)
endif
" Instead of reverting the cursor to the last position in the buffer, we
" set it to the first line when editing a git commit message
au FileType gitcommit au! BufEnter COMMIT_EDITMSG call setpos('.', [0, 1, 1, 0])

View File

@ -20,6 +20,35 @@ endfunction
function! SpaceVim#layers#lang#zig#config() abort
call SpaceVim#plugins#runner#reg_runner('zig', 'zig run %s')
call SpaceVim#mapping#space#regesit_lang_mappings('zig', function('s:language_specified_mappings'))
if executable(s:ztagsbin) && !exists('g:tagbar_type_zig')
let g:tagbar_type_zig = {
\ 'ctagstype' : 'zig',
\ 'kinds' : [
\ 's:structs',
\ 'u:unions',
\ 'e:enums',
\ 'v:variables',
\ 'm:members',
\ 'f:functions',
\ 'r:errors'
\ ],
\ 'sro' : '.',
\ 'kind2scope' : {
\ 'e' : 'enum',
\ 'u' : 'union',
\ 's' : 'struct',
\ 'r' : 'error'
\ },
\ 'scope2kind' : {
\ 'enum' : 'e',
\ 'union' : 'u',
\ 'struct' : 's',
\ 'error' : 'r'
\ },
\ 'ctagsbin' : s:ztagsbin,
\ 'ctagsargs' : ''
\ }
endif
endfunction
function! s:language_specified_mappings() abort