Skip to content

feat(panel): add list_options.path_style option for full path display#100

Merged
dlyongemallo merged 1 commit intodlyongemallo:mainfrom
saviocmc:feat/file-name-style
Apr 10, 2026
Merged

feat(panel): add list_options.path_style option for full path display#100
dlyongemallo merged 1 commit intodlyongemallo:mainfrom
saviocmc:feat/file-name-style

Conversation

@saviocmc
Copy link
Copy Markdown

@saviocmc saviocmc commented Apr 9, 2026

  • Add file_panel.file_name_style config option ("basename" or "path")
  • When set to "path", file entries in the file panel show the full path (parent_path/basename) with uniform highlighting, instead of the default behavior of showing only the basename with a dimmed path appended after it

Usage:

require("diffview").setup({
  file_panel = {
    listing_style = 'list',
    file_name_style = "path",
  },
})

@dlyongemallo dlyongemallo self-requested a review April 10, 2026 08:00
Copy link
Copy Markdown
Owner

@dlyongemallo dlyongemallo left a comment

Choose a reason for hiding this comment

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

Thanks @saviocmc for the contribution!

Please update doc/diffview.txt and add the option to the file_panel section, and likewise doc/diffview_defaults.txt.

Comment thread lua/diffview/config.lua Outdated
Add `file_panel.list_options.path_style` config option. When set to
"full", file entries in the file panel show the full path
(parent_path/basename) with uniform highlighting, instead of showing
only the basename with a dimmed path appended after it.
@saviocmc saviocmc force-pushed the feat/file-name-style branch from 35c4b01 to 3e889fb Compare April 10, 2026 12:55
@saviocmc saviocmc changed the title feat(panel): add file_name_style option for full path display feat(panel): add list_options.path_style option for full path display Apr 10, 2026
@saviocmc
Copy link
Copy Markdown
Author

Thanks for the feedback! I agree with the suggested changes and added the documentation as well. Thanks for maintaining this fork!

@saviocmc
Copy link
Copy Markdown
Author

now the config is:

require('diffview').setup({
    file_panel = {
        listing_style = 'list',
        list_options = { path_style = 'full' },
    },
})

@dlyongemallo dlyongemallo merged commit e2544ff into dlyongemallo:main Apr 10, 2026
1 of 2 checks passed
@saviocmc saviocmc deleted the feat/file-name-style branch April 10, 2026 14:44
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