mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-13 18:25: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
|
||||
" 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')
|
||||
finish
|
||||
@ -135,6 +144,15 @@ function! s:language_specified_mappings() abort
|
||||
\ . string(function('s:helpversion_cursor')) . ', [])',
|
||||
\ 'echo helpversion under cursor', 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
|
||||
|
||||
function! s:eval_cursor() abort
|
||||
|
@ -19,4 +19,5 @@ endfunction
|
||||
|
||||
function! SpaceVim#layers#treesitter#health() abort
|
||||
call SpaceVim#layers#treesitter#plugins()
|
||||
return 1
|
||||
endfunction
|
||||
|
@ -24,9 +24,7 @@ if (has('nvim-0.5.0') && s:NVIM_VERSION.is_release_version()) || has('nvim-0.6.0
|
||||
\ )
|
||||
endfunction
|
||||
function! SpaceVim#lsp#show_doc() abort
|
||||
lua require('lsp.plugin')
|
||||
\ .client.request('textDocument/hover',
|
||||
\ {}, require('spacevim.lsp').hover_callback)
|
||||
lua vim.lsp.buf.hover()
|
||||
endfunction
|
||||
function! SpaceVim#lsp#go_to_def() abort
|
||||
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
|
||||
<
|
||||
|
||||
>
|
||||
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*
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user