Xinqi Bao's Git

feat(nvim): add copilot.lua setup with auto-trigger and tab accept
authorXinqi Bao <[email protected]>
Sat, 21 Feb 2026 07:26:51 +0000 (15:26 +0800)
committerXinqi Bao <[email protected]>
Sat, 21 Feb 2026 07:26:51 +0000 (15:26 +0800)
.config/nvim/init.vim
.config/nvim/lua/plugin-config/copilot.lua [new file with mode: 0644]

index 4a6d558..a4ec84a 100644 (file)
@@ -240,6 +240,13 @@ if has_key(plugs, 'nvim-treesitter')
     set foldlevel=99
 endif
 
     set foldlevel=99
 endif
 
+"----------------------
+" copilot.lua setting
+"----------------------
+if has_key(plugs, 'copilot.lua')
+    lua require('plugin-config/copilot')
+endif
+
 "----------------------
 " avante.nvim setting
 "----------------------
 "----------------------
 " avante.nvim setting
 "----------------------
diff --git a/.config/nvim/lua/plugin-config/copilot.lua b/.config/nvim/lua/plugin-config/copilot.lua
new file mode 100644 (file)
index 0000000..7785117
--- /dev/null
@@ -0,0 +1,8 @@
+require("copilot").setup({
+  suggestion = {
+    auto_trigger = true,
+    keymap = {
+      accept = "<Tab>",
+    },
+  },
+})