mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-13 18:25:42 +08:00
feat(lang#vim
): add SPC l s
key binding
Add `SPC l s` to show line diagnostics when lsp layer is enabled for vim script.
This commit is contained in:
parent
9d374eaa3c
commit
e8a75bc7e2
@ -40,6 +40,7 @@
|
||||
" key binding Description
|
||||
" SPC l e rename symbol
|
||||
" SPC l x show references
|
||||
" SPC l s show line diagnostics
|
||||
" SPC l d show document
|
||||
" K show document
|
||||
" <
|
||||
@ -149,11 +150,13 @@ function! s:language_specified_mappings() abort
|
||||
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#lsp#show_doc()', 'show-document', 1)
|
||||
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'x'],
|
||||
\ 'call SpaceVim#lsp#references()', 'show-references', 1)
|
||||
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 'e'],
|
||||
\ 'call SpaceVim#lsp#rename()', 'rename symbol', 1)
|
||||
\ 'call SpaceVim#lsp#rename()', 'rename-symbol', 1)
|
||||
call SpaceVim#mapping#space#langSPC('nnoremap', ['l', 's'],
|
||||
\ 'call SpaceVim#lsp#show_line_diagnostics()', 'show-line-diagnostics', 1)
|
||||
endif
|
||||
|
||||
endfunction
|
||||
|
@ -47,6 +47,9 @@ if (has('nvim-0.5.0') && s:NVIM_VERSION.is_release_version()) || has('nvim-0.6.0
|
||||
function! SpaceVim#lsp#go_to_impl() abort
|
||||
lua vim.lsp.buf.implementation()
|
||||
endfunction
|
||||
function! SpaceVim#lsp#show_line_diagnostics() abort
|
||||
lua vim.lsp.diagnostic.show_line_diagnostics()
|
||||
endfunction
|
||||
elseif SpaceVim#layers#isLoaded('autocomplete') && get(g:, 'spacevim_autocomplete_method') ==# 'coc'
|
||||
" use coc.nvim
|
||||
let s:coc_language_servers = {}
|
||||
|
@ -4263,6 +4263,7 @@ used:
|
||||
key binding Description
|
||||
SPC l e rename symbol
|
||||
SPC l x show references
|
||||
SPC l s show line diagnostics
|
||||
SPC l d show document
|
||||
K show document
|
||||
<
|
||||
|
Loading…
x
Reference in New Issue
Block a user