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

fix(lang#php)!: change g D key binding

BREAKING CHANGE: use `g D` to jump to declaration
This commit is contained in:
wsdjeg 2022-04-13 19:19:48 +08:00
parent bdbbaa4a73
commit e32ec1f886
3 changed files with 5 additions and 4 deletions

View File

@ -49,7 +49,7 @@
" >
" key binding Description
" --------------------------------
" g D jump to type definition
" g D jump to declaration
" SPC l e rename symbol
" SPC l x show references
" SPC l h show line diagnostics
@ -103,6 +103,8 @@ function! SpaceVim#layers#lang#php#config() abort
\ || SpaceVim#layers#lsp#check_server('intelephense')
call SpaceVim#mapping#gd#add('php',
\ function('SpaceVim#lsp#go_to_def'))
call SpaceVim#mapping#g_capital_d#add('php',
\ function('SpaceVim#lsp#go_to_declaration'))
endif
if s:auto_fix
@ -125,7 +127,6 @@ function! s:on_ft() abort
\ || SpaceVim#layers#lsp#check_server('phpactor')
\ || SpaceVim#layers#lsp#check_server('intelephense')
nnoremap <silent><buffer> K :call SpaceVim#lsp#show_doc()<CR>
nnoremap <silent><buffer> gD :<C-u>call SpaceVim#lsp#go_to_typedef()<Cr>
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'd'],
\ 'call SpaceVim#lsp#show_doc()', 'show-document', 1)

View File

@ -3966,7 +3966,7 @@ If the lsp layer is enabled for php, the following key bindings can be used:
>
key binding Description
--------------------------------
g D jump to type definition
g D jump to declaration
SPC l e rename symbol
SPC l x show references
SPC l h show line diagnostics

View File

@ -96,7 +96,7 @@ be used:
| key binding | Description |
| ----------- | ----------------------- |
| `g D` | jump to type definition |
| `g D` | jump to declaration |
| `SPC l e` | rename symbol |
| `SPC l x` | show references |
| `SPC l s` | show line diagnostics |