0

I am using astronvim. Installed copilot and set hotkey ctrl+l. Here is the code itself, lua on top, plugin below. mappings.lua file

return {
  n = {
    ["b"] = { "<Plug>Sneak_S", desc = "Sneak back" },
    ["<M-l>"] = { ":wa<CR>", desc = "close all" },
    ["<leader>;"] = { ":vsplit<CR>", desc = "split" },
    ["<S-l>"] = {
      function() require("astronvim.utils.buffer").nav(vim.v.count > 0 and vim.v.count or 1) end,
      desc = "Next buffer",
    },
    ["<S-h>"] = {
      function() require("astronvim.utils.buffer").nav(-(vim.v.count > 0 and vim.v.count or 1)) end,
      desc = "Previous buffer",
    },
  },
  i = {
    ["<C-l>"] = { "copilot#Accept('\\<CR>')", desc = "copilot expand", silent = true, expr = true, script = true },
  },
}


-- imap <silent><script><expr> <C-J> copilot#Accept("\<CR>")
-- let g:copilot_no_tab_map = v:true

So, the expand works, only two non-printable characters <80>@7 appear at the end

Thanks in advance for your help.

2
  • To me this seems like a bug for either the copilot plugin or whatever astronvim is using for mappings.
    – D. Ben Knoble
    Commented May 21, 2023 at 20:50
  • Yes, it's a bug...
    – serii
    Commented May 22, 2023 at 8:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.