jackMort / ChatGPT.nvim

ChatGPT Neovim Plugin: Effortless Natural Language Generation with OpenAI's ChatGPT API
Apache License 2.0
3.77k stars 313 forks source link

Closing Window only working with :chatgpt #172

Closed PaysanCorrezien closed 1 year ago

PaysanCorrezien commented 1 year ago

Hi, First, thanks for this great plugin, there are some realy good features to play with gpt :+1:
Now for the issue : When i use Chatgpt i can ctrl c and it close the prompt, when i use the other like ChatGPTRun summarize i can't quit the window. Not working with EditWithInstructions either I tryed multiples remaps but it's not working ( Esc , ctrl-c ...) My config :

  {
    "jackMort/ChatGPT.nvim",
    dependencies = {
      "MunifTanjim/nui.nvim",
      "nvim-lua/plenary.nvim",
      "nvim-telescope/telescope.nvim",
    },
    config = function()
      require("chatgpt").setup({
        chat = {
          keymaps = {
            close = "<C-c>",
            yank_last = "<C-y>",
            scroll_up = "<C-u>",
            scroll_down = "<C-d>",
            toggle_settings = "<C-o>",
            new_session = "<C-s>",
            cycle_windows = "<Tab>",
            select_session = "<C-g>",
          },
        },

        -- actions_paths = { "/home/dylan/.config/lvim/correct_french.json" },
        popup_input = {
          submit = "<CR>",
        },
      })
    end,
  },

It's a basic setup for lunarvim that work I think the override of the default key behavior is not working for every prompt, it's not apllied to some windows ? The workaround that i found is using ctrl w q (defaut nvim close window) It might be the same issue than #164 Thanks

mlp1802 commented 1 year ago

Same problem

nikbrunner commented 1 year ago

I have the same problem

pdbradley commented 1 year ago

me too

ehaynes99 commented 1 year ago

I think this fixed it: https://github.com/jackMort/ChatGPT.nvim/pull/171