jackMort / ChatGPT.nvim

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

The keymap configuration seems to not work. #152

Closed cauliyang closed 1 year ago

cauliyang commented 1 year ago

I use LazyVim and here is my configuration:

the version is 3ff8403


    {
        "jackMort/ChatGPT.nvim",
        dependencies = {
            "MunifTanjim/nui.nvim",
            "nvim-lua/plenary.nvim",
            "nvim-telescope/telescope.nvim",
        },
        config = function()
            require("chatgpt").setup({

                keymaps = {
                    submit = "<C-s>",
                    close = { "jk", "kj", "<Esc>" },
                    yank_last = "<C-y>",
                    scroll_up = "<C-u>",
                    scroll_down = "<C-d>",
                    toggle_settings = "<C-o>",
                    new_session = "<C-n>",
                    cycle_windows = "<Tab>",

                },

            })
        end,
        event = "VeryLazy",
        enabled = lvim.builtin.chatgpt.active,
    },

The keymaps configuration fails to set, and fall back to the default keymaps.

cauliyang commented 1 year ago

Finally, I find the reason cause the layout of the configuration has been changed. I also answer the question in another related issue. https://github.com/jackMort/ChatGPT.nvim/issues/105#issuecomment-1504718730