mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-13 02:05:40 +08:00
fix(lang#c): fix g d
key binding
close https://github.com/SpaceVim/SpaceVim/issues/4544
This commit is contained in:
parent
6b357c7cde
commit
d4bb45b28d
@ -463,7 +463,13 @@ endfunction
|
|||||||
" local function: go_to_declaration {{{
|
" local function: go_to_declaration {{{
|
||||||
function! s:go_to_declaration() abort
|
function! s:go_to_declaration() abort
|
||||||
if !SpaceVim#layers#lsp#check_filetype(&ft)
|
if !SpaceVim#layers#lsp#check_filetype(&ft)
|
||||||
execute "norm! g\<c-]>"
|
try
|
||||||
|
exe 'ts' expand('<cword>')
|
||||||
|
catch /^Vim\%((\a\+)\)\=:E426/
|
||||||
|
echohl WarningMsg
|
||||||
|
echo 'tag not found: ' . expand('<cword>')
|
||||||
|
echohl NONE
|
||||||
|
endtry
|
||||||
else
|
else
|
||||||
call SpaceVim#lsp#go_to_declaration()
|
call SpaceVim#lsp#go_to_declaration()
|
||||||
endif
|
endif
|
||||||
@ -473,7 +479,13 @@ endfunction
|
|||||||
" local function: go_to_def {{{
|
" local function: go_to_def {{{
|
||||||
function! s:go_to_def() abort
|
function! s:go_to_def() abort
|
||||||
if !SpaceVim#layers#lsp#check_filetype(&ft)
|
if !SpaceVim#layers#lsp#check_filetype(&ft)
|
||||||
execute "norm! g\<c-]>"
|
try
|
||||||
|
exe 'ts' expand('<cword>')
|
||||||
|
catch /^Vim\%((\a\+)\)\=:E426/
|
||||||
|
echohl WarningMsg
|
||||||
|
echo 'tag not found: ' . expand('<cword>')
|
||||||
|
echohl NONE
|
||||||
|
endtry
|
||||||
else
|
else
|
||||||
call SpaceVim#lsp#go_to_def()
|
call SpaceVim#lsp#go_to_def()
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user