Skip to content

Commit

Permalink
nvim fix <C-g>, add gh pr open command
Browse files Browse the repository at this point in the history
  • Loading branch information
BSathvik committed Apr 24, 2024
1 parent 4ac8e72 commit 4e8b3df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ require("lazy").setup({
local opts = { buffer = bufnr }
vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts)
vim.keymap.set("n", "K", vim.lsp.buf.hover, opts)
vim.keymap.set("n", "<C-k>", vim.lsp.buf.signature_help, opts)
vim.keymap.set("n", "<C-g>", vim.lsp.buf.signature_help, opts)
vim.keymap.set("n", "<leader>D", vim.lsp.buf.type_definition, opts)
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
vim.keymap.set("n", "gr", vim.lsp.buf.references, opts)
Expand Down Expand Up @@ -688,6 +688,10 @@ local function urlencode(url)
return url
end

vim.api.nvim_create_user_command("PR", function()
vim.api.nvim_command("!gh pr view --web")
end, {})

vim.api.nvim_create_user_command("Maps", function()
local left, right = vim.api.nvim_buf_get_mark(0, "<"), vim.api.nvim_buf_get_mark(0, ">")
local text = vim.api.nvim_buf_get_text(0, left[1] - 1, left[2], right[1] - 1, right[2], {})
Expand Down

0 comments on commit 4e8b3df

Please sign in to comment.