From bc2bb3c0ebd0790cb9805cf52e496a21b4e365dd Mon Sep 17 00:00:00 2001 From: opalmay Date: Thu, 16 Feb 2023 22:39:24 +0200 Subject: fix(bootstrap): override stdpath when called through nvim_call_function --- lua/lvim/bootstrap.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lua/lvim/bootstrap.lua') 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() -- cgit v1.2.3