[Feature]: Make path separator configurable #97
Closed
MasouShizuka
started this conversation in
Ideas
Replies: 2 comments 4 replies
-
It actually is. I just don't document it as. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I mean configure for Currently function M.get_dir_pattern()
local pattern = "/"
if vim.fn.has("win32") == 1 then
pattern = "[\\:]"
end
return pattern
end
local function get_current()
local name = vim.fn.getcwd():gsub(utils.get_dir_pattern(), "%%")
return config.options.save_dir .. name .. M.get_branch() .. ".vim"
end |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently
persisted.nvim
maps both:
and/
in the working directory to%
, whilegit branch separator
is configurable.There will be some trouble if want to map the session file back to the working directory.
For example, on Windows, since the path contains both
:
and/
, the reverse mapping of%
is somewhat troublesome.It is beneficial to make the session file mappable back to the working directory.
For example, I can use other launcher software to start neovim in the specific working directory based on the saved session file, so that
persisted.nvim
canautoload
the session and achieve the startup function of workspace.Beta Was this translation helpful? Give feedback.
All reactions