diff options
author | opalmay <[email protected]> | 2023-02-16 22:39:24 +0200 |
---|---|---|
committer | opalmay <[email protected]> | 2023-02-24 16:45:28 +0200 |
commit | bc2bb3c0ebd0790cb9805cf52e496a21b4e365dd (patch) | |
tree | 53947ebec78c79dd7ea1c82cc4b5ebd908e28d8d | |
parent | d682ae0657a287be05e167ca367de4121ae666b2 (diff) |
fix(bootstrap): override stdpath when called through nvim_call_function
-rw-r--r-- | lua/lvim/bootstrap.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lua/lvim/bootstrap.lua b/lua/lvim/bootstrap.lua index a2a97cea..2edc3e6c 100644 --- a/lua/lvim/bootstrap.lua +++ b/lua/lvim/bootstrap.lua @@ -73,6 +73,13 @@ function M:init(base_dir) return vim.call("stdpath", what) end + vim.api.nvim_call_function = function(fn, args) + if fn == "stdpath" then + return vim.fn.stdpath(args[1]) + end + return vim.call(fn, unpack(args)) + end + ---Get the full path to LunarVim's base directory ---@return string function _G.get_lvim_base_dir() |