mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-14 10:45:42 +08:00
fix(lang#vim): fix lang#vim
layer key bindings
This commit is contained in:
parent
57211cc410
commit
43fc0e8df2
@ -33,6 +33,15 @@
|
|||||||
" SPC l f open exception trace
|
" SPC l f open exception trace
|
||||||
" g d jump to definition
|
" g d jump to definition
|
||||||
" <
|
" <
|
||||||
|
" >
|
||||||
|
" key binding Description
|
||||||
|
" SPC l e rename symbol
|
||||||
|
" SPC l d show document
|
||||||
|
" K show document
|
||||||
|
" <
|
||||||
|
"
|
||||||
|
" If the lsp layer is enabled for vim script, the following key bindings can
|
||||||
|
" be used:
|
||||||
|
|
||||||
if exists('s:auto_generate_doc')
|
if exists('s:auto_generate_doc')
|
||||||
finish
|
finish
|
||||||
@ -135,6 +144,15 @@ function! s:language_specified_mappings() abort
|
|||||||
\ . string(function('s:helpversion_cursor')) . ', [])',
|
\ . string(function('s:helpversion_cursor')) . ', [])',
|
||||||
\ 'echo helpversion under cursor', 1)
|
\ 'echo helpversion under cursor', 1)
|
||||||
call SpaceVim#mapping#space#langSPC('nmap', ['l','f'], 'call exception#trace()', 'tracing exceptions', 1)
|
call SpaceVim#mapping#space#langSPC('nmap', ['l','f'], 'call exception#trace()', 'tracing exceptions', 1)
|
||||||
|
if SpaceVim#layers#lsp#check_server('vimls') || SpaceVim#layers#lsp#check_filetype('vim')
|
||||||
|
nnoremap <silent><buffer> K :call SpaceVim#lsp#show_doc()<CR>
|
||||||
|
|
||||||
|
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'd'],
|
||||||
|
\ 'call SpaceVim#lsp#show_doc()', 'show_document', 1)
|
||||||
|
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'e'],
|
||||||
|
\ 'call SpaceVim#lsp#rename()', 'rename symbol', 1)
|
||||||
|
endif
|
||||||
|
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:eval_cursor() abort
|
function! s:eval_cursor() abort
|
||||||
|
@ -19,4 +19,5 @@ endfunction
|
|||||||
|
|
||||||
function! SpaceVim#layers#treesitter#health() abort
|
function! SpaceVim#layers#treesitter#health() abort
|
||||||
call SpaceVim#layers#treesitter#plugins()
|
call SpaceVim#layers#treesitter#plugins()
|
||||||
|
return 1
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -24,9 +24,7 @@ if (has('nvim-0.5.0') && s:NVIM_VERSION.is_release_version()) || has('nvim-0.6.0
|
|||||||
\ )
|
\ )
|
||||||
endfunction
|
endfunction
|
||||||
function! SpaceVim#lsp#show_doc() abort
|
function! SpaceVim#lsp#show_doc() abort
|
||||||
lua require('lsp.plugin')
|
lua vim.lsp.buf.hover()
|
||||||
\ .client.request('textDocument/hover',
|
|
||||||
\ {}, require('spacevim.lsp').hover_callback)
|
|
||||||
endfunction
|
endfunction
|
||||||
function! SpaceVim#lsp#go_to_def() abort
|
function! SpaceVim#lsp#go_to_def() abort
|
||||||
lua vim.lsp.buf.definition()
|
lua vim.lsp.buf.definition()
|
||||||
|
@ -4257,6 +4257,16 @@ The following key bindings will be added when this layer is loaded:
|
|||||||
g d jump to definition
|
g d jump to definition
|
||||||
<
|
<
|
||||||
|
|
||||||
|
>
|
||||||
|
key binding Description
|
||||||
|
SPC l e rename symbol
|
||||||
|
SPC l d show document
|
||||||
|
K show document
|
||||||
|
<
|
||||||
|
|
||||||
|
If the lsp layer is enabled for vim script, the following key bindings can be
|
||||||
|
used:
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
LANG#VUE *SpaceVim-layers-lang-vue*
|
LANG#VUE *SpaceVim-layers-lang-vue*
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user