updates
This commit is contained in:
@@ -29,6 +29,20 @@ return {
|
||||
},
|
||||
})
|
||||
end,
|
||||
llama_cpp = function()
|
||||
return require("codecompanion.adapters").extend("openai_compatible", {
|
||||
name = "llama-cpp",
|
||||
schema = {
|
||||
model = {
|
||||
default = "qwen2.5-coder-14b-instruct",
|
||||
},
|
||||
},
|
||||
env = {
|
||||
url = "http://localhost:8888",
|
||||
chat_url = "/v1/chat/completions",
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
strategies = {
|
||||
chat = {
|
||||
|
||||
@@ -48,7 +48,7 @@ function M:pop_progress_handle(id)
|
||||
end
|
||||
|
||||
function M:create_progress_handle(request)
|
||||
local title = " Requesting assistance"
|
||||
local title = " Requesting assistance"
|
||||
.. " ("
|
||||
.. request.data.strategy
|
||||
.. ") from "
|
||||
@@ -56,7 +56,9 @@ function M:create_progress_handle(request)
|
||||
.. " using "
|
||||
.. request.data.adapter.model
|
||||
local idx = 1
|
||||
local notification_id = notify(spinner_frames[idx] .. " In progress...", "info", { title = title, timeout = false })
|
||||
local start_time = os.time()
|
||||
local notification_id =
|
||||
notify(spinner_frames[idx] .. " In progress (" .. "0s" .. ")...", "info", { title = title, timeout = false })
|
||||
local handle = { notification_id = notification_id, title = title, finished = false }
|
||||
local timer = vim.loop.new_timer()
|
||||
timer:start(
|
||||
@@ -67,13 +69,17 @@ function M:create_progress_handle(request)
|
||||
return
|
||||
end -- stop updating if finished
|
||||
idx = idx % spinner_len + 1
|
||||
local elapsed = os.difftime(os.time(), start_time)
|
||||
local opts = { replace = handle.notification_id, title = title, timeout = false }
|
||||
local ok, new_id = safe_notify(spinner_frames[idx] .. " In progress...", "info", opts)
|
||||
local ok, new_id = safe_notify(spinner_frames[idx] .. " In progress (" .. elapsed .. "s)...", "info", opts)
|
||||
if ok then
|
||||
handle.notification_id = new_id
|
||||
else
|
||||
handle.notification_id =
|
||||
notify(spinner_frames[idx] .. " In progress...", "info", { title = title, timeout = false })
|
||||
handle.notification_id = notify(
|
||||
spinner_frames[idx] .. " In progress (" .. elapsed .. "s)...",
|
||||
"info",
|
||||
{ title = title, timeout = false }
|
||||
)
|
||||
end
|
||||
end)
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ return {
|
||||
"bashls",
|
||||
"jedi_language_server",
|
||||
"jsonls",
|
||||
"yamlls",
|
||||
-- "yamlls",
|
||||
"vimls",
|
||||
"dotls",
|
||||
"dockerls",
|
||||
@@ -18,6 +18,7 @@ return {
|
||||
"ts_ls",
|
||||
"angularls",
|
||||
"ansiblels",
|
||||
"docker_compose_language_service",
|
||||
}
|
||||
|
||||
for _, lsp in ipairs(servers) do
|
||||
@@ -65,6 +66,13 @@ return {
|
||||
Lua = {},
|
||||
},
|
||||
})
|
||||
elseif lsp == "docker_compose_language_service" then
|
||||
lspconfig[lsp].setup({
|
||||
filetypes = { "dockerfile", "docker-compose", "yaml", "yml" },
|
||||
on_attach = function()
|
||||
vim.notify("Docker Compose LSP attached", nil, { title = "LSP" })
|
||||
end,
|
||||
})
|
||||
else
|
||||
lspconfig[lsp].setup({
|
||||
on_attach = function()
|
||||
|
||||
Reference in New Issue
Block a user