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

templates: document how to turn on the new node styles #3517

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cli/src/config/templates.toml
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ if(hidden,
)
'''

# Uncomment the following or put it in your config to enable facier graph node
# styling.
#
# log_node = 'builtin_log_node'
# op_log_node = 'builtin_op_log_node'

Copy link
Contributor

Choose a reason for hiding this comment

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

I expect the current state is temporary, and the builtin node templates will be enabled in the next release.

Let me know if you prefer that I document this in config.md.

Perhaps, some generalized doc can be added to templates.md? Something like

  • to override the default, set templates.<name> where <name> is usually a command name
  • e.g. templates.log = 'builtin_log_comfortable'
  • stock templates are usually named as builtin_..
  • the list can be obtained by jj log -T (without template value)

Copy link
Contributor Author

@ilyagr ilyagr Apr 17, 2024

Choose a reason for hiding this comment

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

This sounds like a good idea. I'll look into it if I remember (there are a few other small docs PRs that I might want to wrap up first).

This PR was meant for the short term, but I'm fine with not merging it; it should serve its audience even unmerged as most people who'd care probably look at the list of PRs occasionally.

the list can be obtained by jj log -T (without template value)

That's really nice, good to know!

TODO: This should be documented in jj help log.

builtin_log_node = '''
label("node",
coalesce(
Expand Down