-- require("codecompanion").setup({
--   adapters = {
--     openai = function()
--       return require("codecompanion.adapters").extend("openai", {
--         env = {
--           api_key = os.getenv("OPENAI_API_KEY"),
--         },
--       })
--     end,
--   },
--   strategies = {
--     chat = {
--       adapter = "openai",
--     },
--     inline = {
--       adapter = "copilot",
--     },
--     agent = {
--       adapter = "openai",
--     },
--   },
--   tools = {
--     ["code_runner"] = {
--       name = "Code Runner",
--       description = "Run code generated by the LLM",
--       enabled = true,
--     },
--     opts = {
--       auto_submit_errors = false, -- Automatically send and submit the errors to the LLM?
--       mute_errors = false, -- Hide any tool errors from being displayed in Neovim?
--     },
--   },
--   saved_chats = {
--     save_dir = vim.fn.stdpath("data") .. "/codecompanion/saved_chats", -- Path to save chats to
--   },
--   display = {
--     action_palette = {
--       width = 95,
--       height = 10,
--     },
--     chat = { -- Options for the chat strategy
--       type = "float", -- float|buffer
--       show_settings = true, -- Show the model settings in the chat buffer?
--       show_token_count = true, -- Show the token count for the current chat in the buffer?
--       buf_options = { -- Buffer options for the chat buffer
--         buflisted = false,
--       },
--       float_options = { -- Float window options if the type is "float"
--         border = "single",
--         buflisted = false,
--         max_height = 0,
--         max_width = 0,
--         padding = 1,
--       },
--       win_options = { -- Window options for the chat buffer
--         cursorcolumn = false,
--         cursorline = false,
--         foldcolumn = "0",
--         linebreak = true,
--         list = false,
--         signcolumn = "no",
--         spell = false,
--         wrap = true,
--       },
--       windows = {
--         breakindent = true,
--         cursorcolumn = false,
--         cursorline = false,
--         foldcolumn = "0",
--         linebreak = true,
--         list = false,
--         signcolumn = "no",
--         spell = false,
--         wrap = true,
--       },
--     },
--   },
--   keymaps = {
--     ["<C-s>"] = "keymaps.save", -- Save the chat buffer and trigger the LLM
--     ["<C-q>"] = "keymaps.close", -- Close the chat buffer
--     ["q"] = "keymaps.cancel_request", -- Cancel the currently streaming request
--     ["gc"] = "keymaps.clear", -- Clear the contents of the chat
--     ["ga"] = "keymaps.codeblock", -- Insert a codeblock into the chat
--     ["gs"] = "keymaps.save_chat", -- Save the current chat
--     ["gt"] = "keymaps.add_tool", -- Add a tool to the current chat buffer
--     ["]"] = "keymaps.next", -- Move to the next header in the chat
--     ["["] = "keymaps.previous", -- Move to the previous header in the chat
--   },
--   log_level = "ERROR", -- TRACE|DEBUG|ERROR
--   send_code = true, -- Send code context to the LLM? Disable to prevent leaking code outside of Neovim
--   silence_notifications = false, -- Silence notifications for actions like saving saving chats?
--   use_default_actions = false, -- Use the default actions in the action palette?
--   use_default_pre_defined_prompts = false,
-- })
--
-- vim.api.nvim_set_keymap("n", "<C-a>", "<cmd>CodeCompanionActions<cr>", { noremap = true, silent = true })
-- vim.api.nvim_set_keymap("v", "<C-a>", "<cmd>CodeCompanionActions<cr>", { noremap = true, silent = true })
-- -- vim.api.nvim_set_keymap("n", "<Leader>a", "<cmd>CodeCompanionChat Toggle<cr>", { noremap = true, silent = true })
-- -- vim.api.nvim_set_keymap("v", "<Leader>a", "<cmd>CodeCompanionChat Toggle<cr>", { noremap = true, silent = true })
-- vim.api.nvim_set_keymap("v", "ga", "<cmd>CodeCompanionChat Add<cr>", { noremap = true, silent = true })
--
