Skip to content

`tree` with git support, code language detection, and nerd fonts

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

spenserblack/fancy-tree

fancy-tree

Crates.io Version CI

A tree alternative with git support, code language detection, and nerd fonts.

Installation

View INSTALL.md

Features

Nerd Font icons with language detection

Nerd Fonts are used for file icons. Each file is analyzed to determine the appropriate icon and what color the icon should be.

Git Integration

  • Git status is displayed
  • Git ignored files' filenames are dimmed

Configuration

You can edit a config file by calling fancy-tree --edit-config [CONFIG].

The configuration files are Lua modules, which makes them runnable scripts and allow for complex behavior if wanted. This tool provides a small API under the fancytree global table. Check out lua/meta to see the available utilities.

config.lua

See the default file for an example.

This configures general settings.

icons.lua

See the default file for an example.

This provides a function that takes a filename, file attributes, and the default icon, and returns text to use for the icon. Return nil to disable the icon.

Example

return function(filename, attributes, default)
  if fancytree.glob_matches("*.config.{js,ts}", filename) then
    return ""
  end
  return default
end

colors.lua

See the default file for an example.

This provides a function to decide the color for a file's icon, and also functions to set the colors for git statuses.

About

`tree` with git support, code language detection, and nerd fonts

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Contributing

Stars

Watchers

Forks