Integrations / Neovim (codecompanion)
N

Neovim (codecompanion)

codecompanion.nvim · Verified setup guide

The AI coding companion for Neovim. Add an openai_compatible adapter.

Setup steps

  1. 1
    Install codecompanionAdd 'olimorris/codecompanion.nvim' with your plugin manager.
  2. 2
    Add the adapterPut the Lua block below in your codecompanion setup.
  3. 3
    Use it:CodeCompanionChat and pick the LuxeChain adapter.

Configuration example

lua
-- codecompanion.nvim setup
require("codecompanion").setup({
  adapters = {
    luxechain = function()
      return require("codecompanion.adapters").extend("openai_compatible", {
        env = { api_key = "lxc_live_YOUR_KEY" },
        schema = {
          model = { default = "YOUR_MODEL_ID" },          -- any id from /models
          url = { default = "https://api.luxechain.si/v1/chat/completions" },
        },
      })
    end,
  },
})

Replace YOUR_MODEL_ID with any model from the catalogue. Never paste a real API key into a shared document.

Troubleshooting

The adapter's url is the FULL chat-completions path, so it ends in /v1/chat/completions.

If the tool rejects the endpoint, confirm the base URL exactly matches the value on the right, and that the key is active in your account.