diff --git a/nvimrc b/nvimrc index 6c30127..e82d242 100644 --- a/nvimrc +++ b/nvimrc @@ -193,14 +193,11 @@ function! OpenGitURLToLineOrRange() range endif endfunction -nnoremap as :Git -nnoremap ab :Git blame -nnoremap ac :Commits -nnoremap af gg0jVG:s/^pick/fixup/ \| :redraw!:wq -nnoremap aY :call CopyGitURLToLineOrRange() -vnoremap aY :call CopyGitURLToLineOrRange() -nnoremap ao :call OpenGitURLToLineOrRange() -nnoremap ap :execute 'silent !ghpr ' \| redraw! +nnoremap gb :Git blame +nnoremap gf gg0jVG:s/^pick/fixup/ \| :redraw!:wq +nnoremap gy :call CopyGitURLToLineOrRange() +vnoremap gy :call CopyGitURLToLineOrRange() +nnoremap go :call OpenGitURLToLineOrRange() " echo filename of current buffer: nmap fe :echom expand("%:p") diff --git a/vim/lua/lsp_config.lua b/vim/lua/lsp_config.lua index aeccbd4..a47813e 100644 --- a/vim/lua/lsp_config.lua +++ b/vim/lua/lsp_config.lua @@ -16,9 +16,11 @@ local on_attach = function(client, bufnr) vim.api.nvim_buf_set_keymap(bufnr, "n", "r", "lua vim.lsp.buf.references()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "i", "lua vim.lsp.buf.implementation()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "ca", "lua vim.lsp.buf.code_action()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "v", "ca", "lua vim.lsp.buf.code_action()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "ci", "lua vim.lsp.buf.incoming_calls()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "co", "lua vim.lsp.buf.outgoing_calls()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "K", "lua vim.lsp.buf.hover()", opts) + vim.api.nvim_buf_set_keymap(bufnr, "v", "K", "lua vim.lsp.buf.hover()", opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "]e", 'lua vim.diagnostic.goto_next({severity="Error"})', opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "[e", 'lua vim.diagnostic.goto_prev({severity="Error"})', opts) vim.api.nvim_buf_set_keymap(bufnr, "n", "]d", "lua vim.diagnostic.goto_next()", opts)