mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 14:00:06 +08:00
Fix gd
This commit is contained in:
parent
4686c43587
commit
a7cf243844
@ -48,9 +48,19 @@ function! SpaceVim#layers#lang#go#config() abort
|
|||||||
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
|
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
|
||||||
let g:go_snippet_engine = 'neosnippet'
|
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'))
|
call SpaceVim#mapping#space#regesit_lang_mappings('go', function('s:language_specified_mappings'))
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
function! s:go_to_def() abort
|
||||||
|
call go#def#Jump('')
|
||||||
|
endfunction
|
||||||
|
|
||||||
function! s:language_specified_mappings() abort
|
function! s:language_specified_mappings() abort
|
||||||
|
|
||||||
call SpaceVim#mapping#space#langSPC('nmap', ['l','i'],
|
call SpaceVim#mapping#space#langSPC('nmap', ['l','i'],
|
||||||
|
@ -801,6 +801,7 @@ MAPPINGS
|
|||||||
---------------------------------------------
|
---------------------------------------------
|
||||||
normal SPC l i go implements
|
normal SPC l i go implements
|
||||||
normal SPC l f go info
|
normal SPC l f go info
|
||||||
|
normal SPC l g go to declaration
|
||||||
normal SPC l e go rename
|
normal SPC l e go rename
|
||||||
normal SPC l r go run
|
normal SPC l r go run
|
||||||
normal SPC l b go build
|
normal SPC l b go build
|
||||||
|
Loading…
Reference in New Issue
Block a user