1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-04-14 23:49:19 +08:00

Fix g d in lang#typescript layer (#4454)

close #4445
This commit is contained in:
Wang Shidong 2021-09-04 11:57:21 +08:00 committed by GitHub
parent 8146051d5e
commit 458b972974
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,10 +161,12 @@ endfunction
function! s:go_to_typescript_def() abort
if !SpaceVim#layers#lsp#check_filetype('typescript')
" if lsp layer is not enabled for typescript, use following commands
if has('nvim')
" TSDef is definded in nvim-typescript
TSDef
else
call SpaceVim#lsp#go_to_def()
TsuDefinition
endif
else
call SpaceVim#lsp#go_to_def()
@ -175,7 +177,7 @@ function! s:go_to_typescriptreact_def() abort
if has('nvim')
TSDef
else
call SpaceVim#lsp#go_to_def()
TsuDefinition
endif
else
call SpaceVim#lsp#go_to_def()