-- Set copilot_no_tab_map to true vim.g.copilot_no_tab_map = true -- Map in insert mode to copilot#Accept("") vim.api.nvim_set_keymap('i', '', 'v:lua.copilot_accept()', { silent = true, expr = true }) -- Function to handle copilot#Accept("") function copilot_accept() return vim.fn["copilot#Accept"]("") end -- Disable copilot for certain filetypes vim.g.copilot_filetypes = { ["*"] = false, ["javascript"] = true, ["typescript"] = true, ["lua"] = false, ["rust"] = true, ["c"] = true, ["c#"] = true, ["c++"] = true, ["go"] = true, ["python"] = true, }