aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2023-03-02 02:11:07 +0100
committerGitHub <noreply@github.com>2023-03-02 02:11:07 +0100
commit156584e98a620b069220c9be5f3dc5c975e6f4d8 (patch)
treef55def01330d0484538e4379eb2ff75c00b2696c /lua
parentfeat(pydocstyle): toml support (#1040) (diff)
downloadmason-156584e98a620b069220c9be5f3dc5c975e6f4d8.tar
mason-156584e98a620b069220c9be5f3dc5c975e6f4d8.tar.gz
mason-156584e98a620b069220c9be5f3dc5c975e6f4d8.tar.bz2
mason-156584e98a620b069220c9be5f3dc5c975e6f4d8.tar.lz
mason-156584e98a620b069220c9be5f3dc5c975e6f4d8.tar.xz
mason-156584e98a620b069220c9be5f3dc5c975e6f4d8.tar.zst
mason-156584e98a620b069220c9be5f3dc5c975e6f4d8.zip
feat: set $MASON and $MANPATH (#1041)
Diffstat (limited to 'lua')
-rw-r--r--lua/mason/init.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/lua/mason/init.lua b/lua/mason/init.lua
index 36c269a7..f76756e0 100644
--- a/lua/mason/init.lua
+++ b/lua/mason/init.lua
@@ -18,6 +18,7 @@ function M.setup(config)
if config then
settings.set(config)
end
+ vim.env.MASON = settings.current.install_root_dir
if settings.current.PATH == "prepend" then
vim.env.PATH = path.bin_prefix() .. platform.path_sep .. vim.env.PATH
@@ -25,6 +26,10 @@ function M.setup(config)
vim.env.PATH = vim.env.PATH .. platform.path_sep .. path.bin_prefix()
end
+ if platform.is.unix then
+ vim.env.MANPATH = path.share_prefix "man" .. ":" .. (vim.env.MANPATH or "")
+ end
+
require "mason.api.command"
setup_autocmds()
require("mason-registry.sources").set_registries(settings.current.registries)