[nvim] codecompanion removed, added starpls

This commit is contained in:
Dmitrii Chumak
2026-02-24 13:00:06 +03:00
parent 7079e870f8
commit 025ff1e657
5 changed files with 84 additions and 65 deletions

View File

@@ -1,37 +1,37 @@
require("codecompanion").setup({
strategies = {
chat = {
adapter = "deepseek",
},
inline = {
adapter = "deepseek",
},
cmd = {
adapter = "deepseek",
}
},
adapters = {
deepseek = function()
return require("codecompanion.adapters").extend("deepseek", {
env = {
api_key = (function()
local path = os.getenv("HOME") .. "/.config/deepseek_api_key"
local file = io.open(path, "r")
if not file then
vim.notify("Deepseek API key not found at " .. path, vim.log.levels.WARN)
return nil
end
local content = file:read("*a"):gsub("%s+", "")
file:close()
return content
end)(),
},
schema = {
model = {
default = "deepseek-chat",
},
},
})
end,
},
})
-- require("codecompanion").setup({
-- strategies = {
-- chat = {
-- adapter = "deepseek",
-- },
-- inline = {
-- adapter = "deepseek",
-- },
-- cmd = {
-- adapter = "deepseek",
-- }
-- },
-- adapters = {
-- deepseek = function()
-- return require("codecompanion.adapters").extend("deepseek", {
-- env = {
-- api_key = (function()
-- local path = os.getenv("HOME") .. "/.config/deepseek_api_key"
-- local file = io.open(path, "r")
-- if not file then
-- vim.notify("Deepseek API key not found at " .. path, vim.log.levels.WARN)
-- return nil
-- end
-- local content = file:read("*a"):gsub("%s+", "")
-- file:close()
-- return content
-- end)(),
-- },
-- schema = {
-- model = {
-- default = "deepseek-chat",
-- },
-- },
-- })
-- end,
-- },
-- })