rouge icon indicating copy to clipboard operation
rouge copied to clipboard

`tree` output

Open brandonchinn178 opened this issue 4 years ago • 0 comments

The name of the language tree

Implementation in other libraries

Additional context Everyone has different ways of showing a directory tree, but I think it would be good to have at least one directory tree syntax available for highlighting, and the tree command is as good of a standard as any.

It doesn't have to highlight much, but I think the following features would be nice:

  • Deemphasize the directory lines (maybe annotate as a comment?)
  • Color directories differently (anything with a / at the end; this can be added manually or with the -F flag)
  • Support both the utf8 syntax and the ascii syntax (see below)

Syntaxes

utf-8

my-project/
├── package.yaml
├── hs-gql-codegen.yaml
└── src/
    ├── MyProject.hs
    └── MyProject/
        ├── Gen.hs
        ├── Users/
        │   ├── API.hs
        │   ├── Resolvers.hs
        │   ├── Gen.hs
        │   └── users.graphql
        └── Posts/
            ├── API.hs
            ├── Resolvers.hs
            ├── Gen.hs
            └── posts.graphql

ascii

my-project/
|-- package.yaml
|-- hs-gql-codegen.yaml
`-- src/
    |-- MyProject.hs
    `-- MyProject/
        |-- Gen.hs
        |-- Users/
        |   |-- API.hs
        |   |-- Resolvers.hs
        |   |-- Gen.hs
        |   `-- users.graphql
        `-- Posts/
            |-- API.hs
            |-- Resolvers.hs
            |-- Gen.hs
            `-- posts.graphql

brandonchinn178 avatar Aug 04 '21 18:08 brandonchinn178