neovim: Add binding for LSP code action

This commit is contained in:
Simon Bruder 2021-09-05 14:46:58 +02:00
parent 1730681386
commit d840d4c227
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -290,6 +290,7 @@ in
nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR> nnoremap <buffer> <silent> gd :call LanguageClient#textDocument_definition()<CR>
nnoremap <buffer> <silent> <F2> :call LanguageClient#textDocument_rename()<CR> nnoremap <buffer> <silent> <F2> :call LanguageClient#textDocument_rename()<CR>
nnoremap <buffer> <silent> <Leader>f :call LanguageClient#textDocument_formatting()<CR> nnoremap <buffer> <silent> <Leader>f :call LanguageClient#textDocument_formatting()<CR>
nnoremap <buffer> <silent> <Leader>ca :call LanguageClient#textDocument_codeAction()<CR>
" disable since it breaks most code " disable since it breaks most code
"set formatexpr=LanguageClient#textDocument_rangeFormatting_sync() "set formatexpr=LanguageClient#textDocument_rangeFormatting_sync()
endif endif