Skip to content

feat: name/path transforms using custom user functions#127

Open
keevan wants to merge 1 commit intoahmedkhalf:mainfrom
keevan:124-custom-filepath
Open

feat: name/path transforms using custom user functions#127
keevan wants to merge 1 commit intoahmedkhalf:mainfrom
keevan:124-custom-filepath

Conversation

@keevan
Copy link
Copy Markdown

@keevan keevan commented Jul 9, 2023

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 keevan force-pushed the 124-custom-filepath branch from 336bfc6 to 61fa02d Compare July 24, 2023 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recent projects, display options for the table

1 participant