monkoose / neocodeium

free AI completion plugin for neovim
MIT License
66 stars 0 forks source link

Manual option doesn't seem to work #4

Closed hieulw closed 3 months ago

hieulw commented 3 months ago

I try to set manual = true option since I want to trigger it manually but when I press alt + n nothing happen. It works when manual = false though.

It feel a lot snappier than codeium.vim btw, good plugin

here is my config.

{
    "monkoose/neocodeium",
    opts = {
      manual = true,
      show_label = true,
      debounce = true,
      max_lines = 10000,
      filetypes = {
        help = false,
        gitcommit = false,
        gitrebase = false,
        TelescopePrompt = false,
        ["dap-repl"] = false,
        ["."] = false,
      },
    },
    config = function(_, opts)
      local neocodeium = require("neocodeium")
      neocodeium.setup(opts)
      -- keymaps
      vim.keymap.set("i", "<M-a>", function()
        neocodeium.accept()
      end, { expr = true, silent = true })
      vim.keymap.set("i", "<M-n>", function()
        neocodeium.cycle_or_complete()
      end, { expr = true, silent = true })
      vim.keymap.set("i", "<M-p>", function()
        neocodeium.cycle_or_complete(-1)
      end, { expr = true, silent = true })
    end,
  }
monkoose commented 3 months ago

Hello thank you for reporting. It is a bug introduced after fixing #2

Will fix it soon.

monkoose commented 3 months ago

Should be fixed.

Also, you don't need to add

      filetypes = {
        help = false,
        gitcommit = false,
        gitrebase = false,
        ["."] = false,
      },

They are defaults, you need to add them only if you want to change them to true to overwrite defaults. In your case only

      filetypes = {
        TelescopePrompt = false,
        ["dap-repl"] = false,
      },

should be enough.