diff --git a/nvim/lua/plugins/copilot-chat.lua b/nvim/lua/plugins/copilot-chat.lua index d76a4356..81ab6881 100644 --- a/nvim/lua/plugins/copilot-chat.lua +++ b/nvim/lua/plugins/copilot-chat.lua @@ -110,6 +110,9 @@ return { return nil end + -- Fetch the latest changes from the remote repository + vim.fn.system("git fetch origin main") + local current_branch = vim.fn.system("git rev-parse --abbrev-ref HEAD"):gsub("\n", "") local cmd = string.format("git diff --no-color --no-ext-diff origin/main...%s", current_branch) local handle = io.popen(cmd) @@ -192,9 +195,11 @@ return { Example Output: ```sh - gh pr create --base main --title 'commitzen style title' --body 'hello + gh pr create --base main --title "commitzen style title" --body "hello multiline - body' + body + with \`escaped backticks\` + " ``` ]], prompt = "Please create a pull request for the following code changes.", diff --git a/nvim/lua/plugins/vscode.lua b/nvim/lua/plugins/vscode.lua index a4b07c41..e1297c37 100644 --- a/nvim/lua/plugins/vscode.lua +++ b/nvim/lua/plugins/vscode.lua @@ -46,7 +46,8 @@ if not vim.g.vscode then vim.keymap.set("n", "e", "call VSCodeNotify('workbench.action.toggleSidebarVisibility')") -- Disable convert to uppercase and lowercase in visual mode - vim.keymap.set('v', {'u', 'U'}, '', { noremap = true, silent = true }) + vim.keymap.set('v', 'u', '', { noremap = true, silent = true }) + vim.keymap.set('v', 'U', '', { noremap = true, silent = true }) end, })