Skip to content

feat(filesystem): Customisable column width #1615

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

Merged
merged 2 commits into from
Dec 10, 2024

Conversation

MastarCheeze
Copy link
Contributor

@MastarCheeze MastarCheeze commented Dec 7, 2024

I've added a width field to the configs so that the width of the columns displayed in the file explorer can be customised. Text that are too long are also truncated with to prevent the columns from being offset.

Edit: vim.fn.printf is used instead of string.format to prevent an error when the width is more than 99.

Demo:
image

require("neo-tree").setup({
  default_component_configs = {
    last_modified = {
      width = 10,
    },
    created = {
      enabled = true,
      width = 30,
    },
  },
})

This is the fix mentioned in #1614.

@pynappo
Copy link
Collaborator

pynappo commented Dec 8, 2024

so far LGTM, could you add it to the README in the longer example as well? (i figure that if required_width is already in the readme example, width might as well be there as well)

@MastarCheeze
Copy link
Contributor Author

I've added the options into the readme, thanks for the suggestion!

@pynappo
Copy link
Collaborator

pynappo commented Dec 10, 2024

ty! pinging @cseickel.

@cseickel cseickel merged commit 395ce46 into nvim-neo-tree:main Dec 10, 2024
3 checks passed
qw457812 added a commit to qw457812/dotfiles that referenced this pull request Dec 10, 2024
Add max_symbol_len for dropbar symbols.
Reference: nvim-neo-tree/neo-tree.nvim#1615
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.

None yet

3 participants