Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show relative paths when CWD only is enabled for recent files #416

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

carlos-algms
Copy link
Contributor

When config.mru.cwd_only is true, show only the relative path of the files

image

@carlos-algms
Copy link
Contributor Author

@glepnir could you assist on why the pipeline is broken?
Is there something wrong with the branch name? 🤔
Thanks.

@@ -187,8 +187,10 @@ local function mru_list(config)
local filename = vim.fn.fnamemodify(file, ':t')
local icon, group = utils.get_icon(filename)
icon = icon or ' '
if not utils.is_win then
file = file:gsub(vim.env.HOME, '~')
if config.mru.cwd_only then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we need colon here. just doc ci failed can ignore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean next line?
file = vim.fn.fnamemodify(file, ':.') ??

:. Reduce file name to be relative to current directory, if
possible. File name is unmodified if it is not below the
current directory.

https://neovim.io/doc/user/cmdline.html#%3A%3A.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i know this. i wonder the action can still work ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, everything seems to be working as expected.

@glepnir glepnir merged commit f6e8b07 into nvimdev:master Feb 2, 2024
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.

2 participants