From cc322fcff8be3693f39af68b6768916e7aeea971 Mon Sep 17 00:00:00 2001 From: t14 Date: Sat, 6 Jul 2024 11:56:04 +0200 Subject: [PATCH] vimrc(lsp): add codeactions bindings --- .vim/vimrc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.vim/vimrc b/.vim/vimrc index 1b2f9b8..fed3136 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -1225,6 +1225,19 @@ function! s:on_lsp_buffer_enabled() abort inoremap lsp#scroll(+4) inoremap lsp#scroll(-4) + " simple code action for normal mode and visual mode + nmap (lsp-code-action) + vmap :LspCodeAction + + " alternative that uses floating window + nmap f (lsp-code-action-float) + + " mapping for filtered code actions + nmap ri :LspCodeAction refactor.inline + nmap ro :LspCodeAction source.organizeImports + vmap rm :LspCodeAction refactor.extract + nmap rm :LspCodeAction refactor.extract + " let g:lsp_format_sync_timeout = 1000 let g:lsp_format_sync_timeout = 700 augroup lsp_format_sync