Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fetch latest changes and update key mappings #112

Merged
merged 3 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions nvim/lua/plugins/copilot-chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.",
Expand Down
3 changes: 2 additions & 1 deletion nvim/lua/plugins/vscode.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ if not vim.g.vscode then
vim.keymap.set("n", "<leader>e", "<Cmd>call VSCodeNotify('workbench.action.toggleSidebarVisibility')<CR>")

-- Disable convert to uppercase and lowercase in visual mode
vim.keymap.set('v', {'u', 'U'}, '<Nop>', { noremap = true, silent = true })
vim.keymap.set('v', 'u', '<Nop>', { noremap = true, silent = true })
vim.keymap.set('v', 'U', '<Nop>', { noremap = true, silent = true })
end,
})

Expand Down