1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 02:40:05 +08:00
This commit is contained in:
wsdjeg 2018-03-25 20:58:24 +08:00
parent 4686c43587
commit a7cf243844
2 changed files with 26 additions and 15 deletions

View File

@ -48,9 +48,19 @@ function! SpaceVim#layers#lang#go#config() abort
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
let g:go_snippet_engine = 'neosnippet'
if SpaceVim#layers#lsp#check_filetype('go')
call SpaceVim#mapping#gd#add('go',
\ function('SpaceVim#lsp#go_to_def'))
else
call SpaceVim#mapping#gd#add('go', function('s:go_to_def'))
endif
call SpaceVim#mapping#space#regesit_lang_mappings('go', function('s:language_specified_mappings'))
endfunction
function! s:go_to_def() abort
call go#def#Jump('')
endfunction
function! s:language_specified_mappings() abort
call SpaceVim#mapping#space#langSPC('nmap', ['l','i'],

View File

@ -801,6 +801,7 @@ MAPPINGS
---------------------------------------------
normal SPC l i go implements
normal SPC l f go info
normal SPC l g go to declaration
normal SPC l e go rename
normal SPC l r go run
normal SPC l b go build