dope
dope copied to clipboard
fix: Preprocess `modules_dir` to ensure successful module loading on Windows
Probably for consistency with vim.fn.stdpath, core.helper.path_join uses '' as the path separator on Windows. However, even on Windows, the path returned by vim.fs.find still uses /. This caused pack:load_modules_packages to error when extracting the module name from the module path. To avoid compatibility issues with other places where core.helper.path_join is used, only preprocess modules_path with vim.fs.normalize in pack:load_modules_packages.
另外,有两个地方看符号名似乎用反了 https://github.com/nvimdev/dope/blob/d7ed25abf2a5395b34e1b2a01049c704fc5cff46/lua/core/helper.lua#L8-L14 https://github.com/nvimdev/dope/blob/d7ed25abf2a5395b34e1b2a01049c704fc5cff46/lua/core/helper.lua#L16-L22 我没用dope脚本,不太确定会有什么后果