Last active
July 24, 2025 03:04
-
-
Save gbrennon/24c1d7f00bb5c2ddb81a3436b96df34e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- mt codigo tb hehehe | |
| local ok, copilot = pcall(require, "copilot") | |
| if not ok then | |
| vim.notify("Copilot not loaded", vim.log.levels.WARN) | |
| return | |
| end | |
| copilot.setup({ | |
| suggestion = { | |
| enabled = true, | |
| auto_trigger = true, | |
| debounce = 75, | |
| }, | |
| panel = { enabled = false }, | |
| filetypes = { | |
| markdown = true, | |
| help = false, | |
| }, | |
| }) | |
| local ok_cmp, copilot_cmp = pcall(require, "copilot_cmp") | |
| if ok_cmp then | |
| copilot_cmp.setup() | |
| end | |
| vim.api.nvim_create_user_command("CopilotStatus", function() | |
| vim.cmd("Copilot panel") | |
| end, { desc = "Open Copilot status panel" }) | |
| -- mais codigo depois |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- codigo antes | |
| local ok, copilot_suggestion = pcall(require, "copilot.suggestion") | |
| if ok then | |
| vim.keymap.set("i", "<C-j>", function() | |
| return copilot_suggestion.accept() | |
| end, { expr = true, silent = true, desc = "Copilot Accept Suggestion" }) | |
| vim.keymap.set("i", "<C-k>", function() | |
| return copilot_suggestion.next() | |
| end, { expr = true, silent = true, desc = "Copilot Next Suggestion" }) | |
| vim.keymap.set("i", "<C-h>", function() | |
| return copilot_suggestion.prev() | |
| end, { expr = true, silent = true, desc = "Copilot Previous Suggestion" }) | |
| vim.keymap.set("i", "<C-l>", function() | |
| return copilot_suggestion.dismiss() | |
| end, { expr = true, silent = true, desc = "Copilot Dismiss Suggestion" }) | |
| end | |
| -- codigo depois |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- ... mt codigo antes e mts configs | |
| { | |
| "zbirenbaum/copilot.lua", | |
| event = "InsertEnter", | |
| config = function() require("copilot_config") end, | |
| }, | |
| { "zbirenbaum/copilot-cmp" } | |
| -- mais codigo depois |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment