Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
623 B

  1. -- Set copilot_no_tab_map to true
  2. vim.g.copilot_no_tab_map = true
  3. -- Map <C-J> in insert mode to copilot#Accept("<CR>")
  4. vim.api.nvim_set_keymap('i', '<C-J>', 'v:lua.copilot_accept()', { silent = true, expr = true })
  5. -- Function to handle copilot#Accept("<CR>")
  6. function copilot_accept()
  7. return vim.fn["copilot#Accept"]("<CR>")
  8. end
  9. -- Disable copilot for certain filetypes
  10. vim.g.copilot_filetypes = {
  11. ["*"] = false,
  12. ["javascript"] = true,
  13. ["typescript"] = true,
  14. ["lua"] = false,
  15. ["rust"] = true,
  16. ["c"] = true,
  17. ["c#"] = true,
  18. ["c++"] = true,
  19. ["go"] = true,
  20. ["python"] = true,
  21. }