project.nvim icon indicating copy to clipboard operation
project.nvim copied to clipboard

feat: name/path transforms using custom user functions

Open keevan opened this issue 2 years ago • 0 comments

Examples of what it might look like after:

image

Config:

lvim.builtin.project.transform_path = function(path)
	return vim.fn.fnamemodify(path, ":~")
end

lvim.builtin.project.transform_name = function(path)
	return "[client] " .. vim.fn.fnamemodify(path, ":t")
end

Ideally, "client" would match on some base known path (e.g. a base project name or client name if there are nested projects under that), and the name would point to a submodule for that project. Sometimes I need to switch from the base project CWD to the submodule, for various reasons, and it would be nice to have that clear separation, and to reduce the noise potentially shown in the path.

[client A] submodule X     ~/projects/client A/some/path/to/submodule X
[client B] submodule X     ~/projects/client B/some/path/to/submodule X

Closes #124

keevan avatar Jul 09 '23 04:07 keevan