jackMort / ChatGPT.nvim

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

Can't use it with init.vim #448

Open VadimRight opened 2 weeks ago

VadimRight commented 2 weeks ago

I have init.vim for my neovim setup with lua code.

But I can't use it.

Ctrl-O not working, Ctrl-Enter also not working.

I dont understand a thing Here is my lua config

lua << EOF
require("chatgpt").setup({
    api_key_cmd="echo 'mysupersecretkey",
    openai_params = {
      model = "gpt-4-o",
      frequency_penalty = 0,
      presence_penalty = 0,
      max_tokens = 300,
      temperature = 0,
      top_p = 1,
      n = 1,
    },
    keymaps = { 
       close = "<C-c>", 
       accept = "<C-y>", 
       toggle_diff = "<C-d>", 
       toggle_settings = "<C-o>", 
       toggle_help = "<C-h>", 
       cycle_windows = "<Tab>", 
       use_output_as_input = "<C-i>", 
     }, 
})
EOF