Bryley / neoai.nvim

Neovim plugin for intracting with GPT models from OpenAI
MIT License
564 stars 51 forks source link

Unable to open using :NeoAI command #43

Open rakaar opened 1 year ago

rakaar commented 1 year ago

Gives the following error

Error executing Lua callback: ...ka/.local/share/nvim/plugged/neoai.nvim/lua/neoai/ui.lua:79: attempt to index field 'u
i' (a nil value)
stack traceback:
        ...ka/.local/share/nvim/plugged/neoai.nvim/lua/neoai/ui.lua:79: in function 'create_ui'
        ...e/rka/.local/share/nvim/plugged/neoai.nvim/lua/neoai.lua:49: in function 'toggle'
        ...e/rka/.local/share/nvim/plugged/neoai.nvim/lua/neoai.lua:78: in function 'smart_toggle'
        ...ka/.local/share/nvim/plugged/neoai.nvim/plugin/neoai.lua:4: in function <...ka/.local/share/nvim/plugged/neo
ai.nvim/plugin/neoai.lua:3>
jamilraichouni commented 1 year ago

Nearly the same here for :NeoAI, :NeoAIToggle:

image
Lakshamana commented 1 year ago

Perhaps you have to call

require("neoai").setup()

on your nvim lua config file, or

lua << EOF
require("neoai").setup()
EOF

It should just work fine