Use new devcontainer build progress autocmd

main
Ensar Sarajčić 2022-05-19 19:44:54 +02:00
parent 835f6f44f8
commit de6f4277d2
2 changed files with 9 additions and 5 deletions

View File

@ -177,9 +177,8 @@ local statuslines = {
.. "%*"
end
local devcontainer_build_status = require("devcontainer.status").get_status().build_status
local build_status_last = devcontainer_build_status[#devcontainer_build_status]
if build_status_last and build_status_last.running then
local build_status_last = require("devcontainer.status").find_build({ running = true })
if build_status_last then
local build_lines = build_status_last.commands_run
local command_info = build_lines[#build_lines]
local command_status_line = ""
@ -235,7 +234,8 @@ return {
update_colors()
end,
})
vim.api.nvim_create_autocmd({ "User LspProgressUpdate", "User LspRequest" }, {
vim.api.nvim_create_autocmd("User", {
pattern = { "LspProgressUpdate", "LspRequest", "DevcontainerBuildProgress" },
group = au_id,
callback = function()
vim.cmd("redrawstatus")

View File

@ -1,2 +1,6 @@
-- Devcontainer setup
require("devcontainer").setup({})
require("devcontainer").setup({
autocommands = {
clean = true,
},
})