aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/mason-core/managers/npm/init.lua1
-rw-r--r--lua/mason/ui/components/main/package_list.lua86
-rw-r--r--lua/mason/ui/instance.lua77
3 files changed, 90 insertions, 74 deletions
diff --git a/lua/mason-core/managers/npm/init.lua b/lua/mason-core/managers/npm/init.lua
index 96571420..7bfa74b4 100644
--- a/lua/mason-core/managers/npm/init.lua
+++ b/lua/mason-core/managers/npm/init.lua
@@ -20,6 +20,7 @@ local function ensure_npm_root(ctx)
if not (ctx.fs:dir_exists "node_modules" or ctx.fs:file_exists "package.json") then
-- Create a package.json to set a boundary for where npm installs packages.
ctx.spawn.npm { "init", "--yes", "--scope=mason" }
+ ctx.stdio_sink.stdout "Initialized npm root\n"
end
end
diff --git a/lua/mason/ui/components/main/package_list.lua b/lua/mason/ui/components/main/package_list.lua
index 5b4600cf..870fe890 100644
--- a/lua/mason/ui/components/main/package_list.lua
+++ b/lua/mason/ui/components/main/package_list.lua
@@ -5,13 +5,13 @@ local settings = require "mason.settings"
local JsonSchema = require "mason.ui.components.json-schema"
----@param props { state: InstallerUiState, heading: INode, packages: Package[], list_item_renderer: (fun(package: Package): INode), hide_when_empty: boolean }
+---@param props { state: InstallerUiState, heading: INode, packages: Package[], list_item_renderer: (fun(package: Package, state: InstallerUiState): INode), hide_when_empty: boolean }
local function PackageListContainer(props)
local items = {}
for i = 1, #props.packages do