-
When converting VimScript to Lua in zotcite, the command RConfigShow rnvim_home The code used in local p = vim.o.runtimepath
p = p:gsub(".*,(.*zotcite.*)", "%1")
p = p:gsub(",.*", "")
config.zotcite_home = p .. "/python3" Even if the value of |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Is this a better option? diff --git a/lua/r/config.lua b/lua/r/config.lua
index e4704a6..72579be 100644
--- a/lua/r/config.lua
+++ b/lua/r/config.lua
@@ -292,7 +292,7 @@ local do_common_global = function()
config.is_darwin = config.uname == "Darwin"
-- config.rnvim_home should be the directory where the plugin files are.
- config.rnvim_home = vim.fn.expand("<script>:h:h")
+ config.rnvim_home = debug.getinfo(1).short_src:gsub("/lua.*", "")
-- config.uservimfiles must be a writable directory. It will be config.rnvim_home
-- unless it's not writable. Then it wil be ~/.vim or ~/vimfiles. @akthe-at, could you check this, please? |
Beta Was this translation helpful? Give feedback.
-
It was just that. No need to install zotcite. The path, although odd, seems to be correct. Is it the same of |
Beta Was this translation helpful? Give feedback.
-
Yes, it's broken. Perhaps because we are using the field Thank you! |
Beta Was this translation helpful? Give feedback.
It seems like a broken path to me:
Info 12:21:35 PM notify.info test 1: ...010/AppData/Local/nvim-data/lazy/R.nvim
Info 12:21:35 PM notify.info test 2: C:\Users\ARK010\AppData\Local\nvim-data\lazy\R.nvim