mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Fix command CopyPath issue
the string.gsub in lua is not flexible and use vim.fn.substitute() instead.
This commit is contained in:
parent
7645751dc1
commit
ab75189231
@ -16,7 +16,7 @@ vim.api.nvim_create_user_command("CopyPath", function(context)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
file_path = string.gsub(full_path, project_root, "<project-root>")
|
file_path = vim.fn.substitute(full_path, project_root, "<project-root>", "g")
|
||||||
end
|
end
|
||||||
|
|
||||||
if context["args"] == "absolute" then
|
if context["args"] == "absolute" then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user