diff --git a/symlinks/config/nvim/lua/esensar/init/plugins.lua b/symlinks/config/nvim/lua/esensar/init/plugins.lua index f1d02f5..3006767 100644 --- a/symlinks/config/nvim/lua/esensar/init/plugins.lua +++ b/symlinks/config/nvim/lua/esensar/init/plugins.lua @@ -46,7 +46,7 @@ return require("packer").startup({ use("rcarriga/nvim-dap-ui") -- UI components for DAP use("theHamsta/nvim-dap-virtual-text") -- Virtual text display for DAP use("diepm/vim-rest-console") -- REST console for vim - use("jamestthompson3/nvim-remote-containers") -- devcontainer.json support + use("esensar/nvim-dev-container") -- devcontainer.json support use("jbyuki/one-small-step-for-vimkind") -- Debugger for Nvim-Lua -- Snippets diff --git a/symlinks/config/nvim/lua/esensar/ui/init.lua b/symlinks/config/nvim/lua/esensar/ui/init.lua index 37a9dee..23e5c49 100644 --- a/symlinks/config/nvim/lua/esensar/ui/init.lua +++ b/symlinks/config/nvim/lua/esensar/ui/init.lua @@ -18,7 +18,7 @@ function M.new_bottom_split(opts) end function M.new_centered_popup(opts) - local split = nui_popup(vim.tbl_extend("force", { + local popup = nui_popup(vim.tbl_extend("force", { enter = true, focusable = true, border = { @@ -31,9 +31,9 @@ function M.new_centered_popup(opts) }, }, opts)) - split:mount() + popup:mount() - return split + return popup end return M diff --git a/symlinks/config/nvim/lua/esensar/ui/statusline.lua b/symlinks/config/nvim/lua/esensar/ui/statusline.lua index f97c85d..bd1684a 100644 --- a/symlinks/config/nvim/lua/esensar/ui/statusline.lua +++ b/symlinks/config/nvim/lua/esensar/ui/statusline.lua @@ -176,7 +176,28 @@ local statuslines = { .. (first_lsp_message.title or "") .. "%*" end - -- TODO: Add current container if devcontainer is used + + 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_lines = build_status_last.commands_run + local command_info = build_lines[#build_lines] + local command_status_line = "" + if command_info then + command_status_line = "(" .. string.sub(command_info, 0, 10) .. ")" + end + status = status + .. " %4*" + .. "[" + .. (build_status_last.current_step or "") + .. "/" + .. (build_status_last.step_count or "") + .. "]" + .. (build_status_last.progress and "(" .. build_status_last.progress .. "%%)" or "") + .. " " + .. command_status_line + .. "%*" + end return status end diff --git a/symlinks/config/nvim/plugin/devcontainer.lua b/symlinks/config/nvim/plugin/devcontainer.lua new file mode 100644 index 0000000..bb51451 --- /dev/null +++ b/symlinks/config/nvim/plugin/devcontainer.lua @@ -0,0 +1,2 @@ +-- Devcontainer setup +require("devcontainer").setup({})