just playing with tangled
1{
2 "$schema": "http://json-schema.org/draft-04/schema",
3 "$comment": "`taplo` and the corresponding VS Code plugins only support draft-04 verstion of JSON Schema, see <https://taplo.tamasfe.dev/configuration/developing-schemas.html>. draft-07 is mostly compatible with it, newer versions may not be.",
4 "title": "Jujutsu config",
5 "type": "object",
6 "description": "User configuration for Jujutsu VCS. See https://jj-vcs.github.io/jj/latest/config/ for details",
7 "properties": {
8 "user": {
9 "type": "object",
10 "description": "Settings about the user",
11 "properties": {
12 "name": {
13 "type": "string",
14 "description": "Full name of the user, used in commits"
15 },
16 "email": {
17 "type": "string",
18 "description": "User's email address, used in commits",
19 "format": "email"
20 }
21 }
22 },
23 "operation": {
24 "type": "object",
25 "description": "Metadata to be attached to jj operations (shown in jj op log)",
26 "properties": {
27 "hostname": {
28 "type": "string",
29 "format": "hostname"
30 },
31 "username": {
32 "type": "string"
33 }
34 }
35 },
36 "ui": {
37 "type": "object",
38 "description": "UI settings",
39 "definitions": {
40 "conflict-marker-style": {
41 "type": "string",
42 "description": "Conflict marker style to use when materializing conflicts in the working copy",
43 "enum": [
44 "diff",
45 "snapshot",
46 "git"
47 ],
48 "default": "diff"
49 },
50 "command-env": {
51 "type": "object",
52 "properties": {
53 "command": {
54 "type": ["array", "string"],
55 "items": {
56 "type": "string"
57 }
58 },
59 "env": {
60 "type": "object"
61 }
62 }
63 }
64 },
65 "properties": {
66 "always-allow-large-revsets": {
67 "type": "boolean",
68 "description": "Whether to allow large revsets to be used in all commands without the `all:` modifier",
69 "default": false
70 },
71 "default-command": {
72 "description": "Default command to run when no explicit command is given",
73 "default": "log",
74 "oneOf": [
75 {
76 "type": "string"
77 },
78 {
79 "type": "array",
80 "items": {
81 "type": "string"
82 }
83 }
84 ]
85 },
86 "default-description": {
87 "type": "string",
88 "description": "Default description to use when describing changes with an empty description",
89 "default": ""
90 },
91 "color": {
92 "description": "Whether to colorize command output",
93 "enum": [
94 "always",
95 "never",
96 "debug",
97 "auto"
98 ],
99 "default": "auto"
100 },
101 "paginate": {
102 "type": "string",
103 "description": "Whether or not to use a pager",
104 "enum": [
105 "never",
106 "auto"
107 ],
108 "default": "auto"
109 },
110 "pager": {
111 "oneOf": [
112 {
113 "type": "string"
114 },
115 {
116 "type": "array",
117 "items": {
118 "type": "string"
119 }
120 },
121 {
122 "$ref": "#/properties/ui/definitions/command-env"
123 }
124 ],
125 "description": "Pager to use for displaying command output",
126 "default": "less -FRX"
127 },
128 "streampager": {
129 "type": "object",
130 "description": "':builtin' (streampager-based) pager configuration",
131 "properties": {
132 "interface": {
133 "description": "Whether to quit automatically, whether to clear screen on startup/exit",
134 "enum": [
135 "quit-if-one-page",
136 "full-screen-clear-output",
137 "quit-quickly-or-clear-output"
138 ],
139 "default": "never"
140 },
141 "wrapping": {
142 "description": "Whether to wrap long lines",
143 "enum": [
144 "anywhere",
145 "word",
146 "none"
147 ],
148 "default": "anywhere"
149 }
150 }
151 },
152 "diff": {
153 "type": "object",
154 "description": "Options for how diffs are displayed",
155 "properties": {
156 "format": {
157 "description": "The diff format to use",
158 "enum": [
159 "color-words",
160 "git",
161 "summary"
162 ],
163 "default": "color-words"
164 },
165 "tool": {
166 "type": ["array", "string"],
167 "items": {
168 "type": "string"
169 },
170 "description": "External tool for generating diffs"
171 }
172 }
173 },
174 "diff-instructions": {
175 "type": "boolean",
176 "description": "Whether to generate the JJ-INSTRUCTIONS file as part of editing a diff",
177 "default": true
178 },
179 "graph": {
180 "type": "object",
181 "description": "Options for rendering revision graphs from jj log etc",
182 "properties": {
183 "style": {
184 "description": "Style of connectors/markings used to render the graph. See https://jj-vcs.github.io/jj/latest/config/#graph-style",
185 "enum": [
186 "curved",
187 "square",
188 "ascii",
189 "ascii-large"
190 ],
191 "default": "curved"
192 }
193 }
194 },
195 "log-word-wrap": {
196 "type": "boolean",
197 "description": "Whether to wrap log template output",
198 "default": false
199 },
200 "log-synthetic-elided-nodes": {
201 "type": "boolean",
202 "description": "Whether to render elided parts of the graph as synthetic nodes.",
203 "default": true
204 },
205 "editor": {
206 "type": ["array", "string"],
207 "items": {
208 "type": "string"
209 },
210 "description": "Editor to use for commands that involve editing text"
211 },
212 "diff-editor": {
213 "description": "Editor tool to use for editing diffs",
214 "default": ":builtin",
215 "oneOf": [
216 {
217 "type": "string"
218 },
219 {
220 "type": "array",
221 "items": {
222 "type": "string"
223 }
224 }
225 ]
226 },
227 "merge-editor": {
228 "description": "Tool to use for resolving three-way merges. Behavior for a given tool name can be configured in merge-tools.TOOL tables",
229 "default": ":builtin",
230 "oneOf": [
231 {
232 "type": "string"
233 },
234 {
235 "type": "array",
236 "items": {
237 "type": "string"
238 }
239 }
240 ]
241 },
242 "conflict-marker-style": {
243 "$ref": "#/properties/ui/definitions/conflict-marker-style"
244 },
245 "show-cryptographic-signatures": {
246 "type": "boolean",
247 "default": false,
248 "description": "Whether the built-in templates should show cryptographic signature information"
249 },
250 "movement": {
251 "type": "object",
252 "properties": {
253 "edit": {
254 "type": "boolean",
255 "description": "Whether the next and prev commands should behave as if the --edit flag was passed",
256 "default": false
257 }
258 }
259 }
260 }
261 },
262 "core": {
263 "type": "object",
264 "properties": {
265 "fsmonitor": {
266 "type": "string",
267 "enum": ["none", "watchman"],
268 "description": "Whether to use an external filesystem monitor, useful for large repos"
269 },
270 "watchman": {
271 "type": "object",
272 "properties": {
273 "register-snapshot-trigger": {
274 "type": "boolean",
275 "default": false,
276 "description": "Whether to use triggers to monitor for changes in the background."
277 }
278 }
279 }
280 }
281 },
282 "colors": {
283 "type": "object",
284 "description": "Mapping from jj formatter labels to colors",
285 "definitions": {
286 "colorNames": {
287 "enum": [
288 "default",
289 "black",
290 "red",
291 "green",
292 "yellow",
293 "blue",
294 "magenta",
295 "cyan",
296 "white",
297 "bright black",
298 "bright red",
299 "bright green",
300 "bright yellow",
301 "bright blue",
302 "bright magenta",
303 "bright cyan",
304 "bright white"
305 ]
306 },
307 "hexColor": {
308 "type": "string",
309 "pattern": "^#[0-9a-fA-F]{6}$"
310 },
311 "colors": {
312 "oneOf": [
313 {
314 "$ref": "#/properties/colors/definitions/colorNames"
315 },
316 {
317 "$ref": "#/properties/colors/definitions/hexColor"
318 }
319 ]
320 }
321 },
322 "additionalProperties": {
323 "description": "A color profile for the given formatter label. Either a bare color name used as the foreground color or a table describing color and formatting",
324 "oneOf": [
325 {
326 "$ref": "#/properties/colors/definitions/colors"
327 },
328 {
329 "type": "object",
330 "properties": {
331 "fg": {
332 "$ref": "#/properties/colors/definitions/colors"
333 },
334 "bg": {
335 "$ref": "#/properties/colors/definitions/colors"
336 },
337 "bold": {
338 "type": "boolean"
339 },
340 "italic": {
341 "type": "boolean"
342 },
343 "underline": {
344 "type": "boolean"
345 },
346 "reverse": {
347 "type": "boolean"
348 }
349 }
350 }
351 ]
352 }
353 },
354 "diff": {
355 "type": "object",
356 "description": "Builtin diff formats settings",
357 "properties": {
358 "color-words": {
359 "type": "object",
360 "description": "Options for color-words diffs",
361 "properties": {
362 "max-inline-alternation": {
363 "type": "integer",
364 "description": "Maximum number of removed/added word alternation to inline",
365 "default": 3
366 },
367 "context": {
368 "type": "integer",
369 "description": "Number of lines of context to show",
370 "default": 3
371 }
372 }
373 },
374 "git": {
375 "type": "object",
376 "description": "Options for git diffs",
377 "properties": {
378 "context": {
379 "type": "integer",
380 "description": "Number of lines of context to show",
381 "default": 3
382 }
383 }
384 }
385 }
386 },
387 "git": {
388 "type": "object",
389 "description": "Settings for git behavior (when using git backend)",
390 "properties": {
391 "auto-local-bookmark": {
392 "type": "boolean",
393 "description": "Whether jj creates a local bookmark with the same name when it imports a remote-tracking branch from git. See https://jj-vcs.github.io/jj/latest/config/#automatic-local-bookmark-creation",
394 "default": false
395 },
396 "abandon-unreachable-commits": {
397 "type": "boolean",
398 "description": "Whether jj should abandon commits that became unreachable in Git.",
399 "default": true
400 },
401 "push-bookmark-prefix": {
402 "type": "string",
403 "description": "Prefix used when pushing a bookmark based on a change ID",
404 "default": "push-"
405 },
406 "push-new-bookmarks": {
407 "type": "boolean",
408 "description": "Allow pushing new bookmarks without --allow-new",
409 "default": false
410 },
411 "fetch": {
412 "description": "The remote(s) from which commits are fetched",
413 "default": "origin",
414 "oneOf": [
415 {
416 "type": "string"
417 },
418 {
419 "type": "array",
420 "items": {
421 "type": "string"
422 }
423 }
424 ]
425 },
426 "push": {
427 "type": "string",
428 "description": "The remote to which commits are pushed",
429 "default": "origin"
430 },
431 "sign-on-push": {
432 "type": "boolean",
433 "description": "Whether jj should sign commits before pushing",
434 "default": "false"
435 },
436 "subprocess": {
437 "type": "boolean",
438 "description": "Whether jj spawns a git subprocess for network operations (push/fetch/clone)",
439 "default": true
440 },
441 "executable-path": {
442 "type": "string",
443 "description": "Path to the git executable",
444 "default": "git"
445 }
446 }
447 },
448 "merge-tools": {
449 "type": "object",
450 "description": "Tables of custom options to pass to the given merge tool (selected in ui.merge-editor)",
451 "additionalProperties": {
452 "type": "object",
453 "properties": {
454 "program": {
455 "type": "string"
456 },
457 "diff-args": {
458 "type": "array",
459 "items": {
460 "type": "string"
461 }
462 },
463 "diff-expected-exit-codes": {
464 "type": "array",
465 "items": {
466 "type": "integer"
467 },
468 "description": "Array of exit codes that do not indicate tool failure, i.e. [0, 1] for unix diff.",
469 "default": [0]
470 },
471 "diff-invocation-mode": {
472 "description": "Invoke the tool with directories or individual files",
473 "enum": [
474 "dir",
475 "file-by-file"
476 ],
477 "default": "dir"
478 },
479 "edit-args": {
480 "type": "array",
481 "items": {
482 "type": "string"
483 }
484 },
485 "merge-args": {
486 "type": "array",
487 "items": {
488 "type": "string"
489 }
490 },
491 "merge-conflict-exit-codes": {
492 "type": "array",
493 "items": {
494 "type": "number"
495 },
496 "description": "Array of exit codes to indicate that the conflict was only partially resolved. See https://jj-vcs.github.io/jj/latest/config/#editing-conflict-markers-with-a-tool-or-a-text-editor",
497 "default": []
498 },
499 "merge-tool-edits-conflict-markers": {
500 "type": "boolean",
501 "description": "Whether to populate the output file with conflict markers before starting the merge tool. See https://jj-vcs.github.io/jj/latest/config/#editing-conflict-markers-with-a-tool-or-a-text-editor",
502 "default": false
503 },
504 "conflict-marker-style": {
505 "$ref": "#/properties/ui/definitions/conflict-marker-style"
506 }
507 }
508 }
509 },
510 "revsets": {
511 "type": "object",
512 "description": "Revset expressions used by various commands",
513 "properties": {
514 "fix": {
515 "type": "string",
516 "description": "Default set of revisions to fix when no explicit revset is given for jj fix",
517 "default": "reachable(@, mutable())"
518 },
519 "log": {
520 "type": "string",
521 "description": "Default set of revisions to show when no explicit revset is given for jj log and similar commands",
522 "default": "present(@) | ancestors(immutable_heads().., 2) | present(trunk())"
523 },
524 "short-prefixes": {
525 "type": "string",
526 "description": "Revisions to give shorter change and commit IDs to",
527 "default": "<revsets.log>"
528 },
529 "simplify-parents": {
530 "type": "string",
531 "description": "Default set of revisions to simplify when no explicit revset is given for jj simplify-parents",
532 "default": "reachable(@, mutable())"
533 },
534 "sign": {
535 "type": "string",
536 "description": "Default set of revisions to sign when no explicit revset is given for jj sign",
537 "default": "reachable(@, mutable())"
538 },
539 "log-graph-prioritize": {
540 "type": "string",
541 "description": "Set of revisions to prioritize when rendering the graph for jj log",
542 "default": "present(@)"
543 }
544 },
545 "additionalProperties": {
546 "type": "string"
547 }
548 },
549 "revset-aliases": {
550 "type": "object",
551 "description": "Custom symbols/function aliases that can used in revset expressions",
552 "properties": {
553 "immutable_heads()": {
554 "type": "string",
555 "description": "Revisions to consider immutable. Ancestors of these are also considered immutable. The root commit is always considered immutable.",
556 "default": "present(trunk()) | tags() | untracked_remote_branches()"
557 }
558 },
559 "additionalProperties": {
560 "type": "string"
561 }
562 },
563 "template-aliases": {
564 "type": "object",
565 "description": "Custom symbols/function aliases that can used in templates",
566 "additionalProperties": {
567 "type": "string"
568 }
569 },
570 "aliases": {
571 "type": "object",
572 "description": "Custom subcommand aliases to be supported by the jj command",
573 "additionalProperties": {
574 "type": "array",
575 "items": {
576 "type": "string"
577 }
578 }
579 },
580 "snapshot": {
581 "type": "object",
582 "description": "Parameters governing automatic capture of files into the working copy commit",
583 "properties": {
584 "auto-track": {
585 "type": "string",
586 "description": "Fileset pattern describing what new files to automatically track on snapshotting. By default all new files are tracked.",
587 "default": "all()"
588 },
589 "auto-update-stale": {
590 "type": "boolean",
591 "description": "Whether to automatically update the working copy if it is stale. See https://jj-vcs.github.io/jj/latest/working-copy/#stale-working-copy",
592 "default": "false"
593 },
594 "max-new-file-size": {
595 "type": [
596 "integer",
597 "string"
598 ],
599 "description": "New files with a size in bytes above this threshold are not snapshotted, unless the threshold is 0",
600 "default": "1MiB"
601 }
602 }
603 },
604 "experimental-advance-branches": {
605 "type": "object",
606 "description": "Settings controlling the 'advance-branches' feature which moves bookmarks forward when new commits are created.",
607 "properties": {
608 "enabled-branches": {
609 "type": "array",
610 "description": "Patterns used to identify bookmarks which may be advanced.",
611 "items": {
612 "type": "string"
613 }
614 },
615 "disabled-branches": {
616 "type": "array",
617 "description": "Patterns used to identify bookmarks which are not advanced. Takes precedence over 'enabled-branches'.",
618 "items": {
619 "type": "string"
620 }
621 }
622 }
623 },
624 "signing": {
625 "type": "object",
626 "description": "Settings for verifying and creating cryptographic commit signatures",
627 "properties": {
628 "backend": {
629 "type": "string",
630 "enum": ["gpg", "gpgsm", "none", "ssh"],
631 "description": "The backend to use for signing commits. The string `none` disables signing.",
632 "default": "none"
633 },
634 "key": {
635 "type": "string",
636 "description": "The key the configured signing backend will use to to sign commits. Overridden by `jj sign` parameter or by the global `--sign-with` option"
637 },
638 "behavior": {
639 "type": "string",
640 "enum": ["drop", "keep", "own", "force"],
641 "description": "Which commits to sign by default. Values: drop (never sign), keep (preserve existing signatures), own (sign own commits), force (sign all commits)"
642 },
643 "backends": {
644 "type": "object",
645 "description": "Tables of options to pass to specific signing backends",
646 "properties": {
647 "gpg": {
648 "type": "object",
649 "properties": {
650 "program": {
651 "type": "string",
652 "description": "Path to the gpg program to be called",
653 "default": "gpg"
654 },
655 "allow-expired-keys": {
656 "type": "boolean",
657 "description": "Whether to consider signatures generated with an expired key as valid",
658 "default": false
659 }
660 }
661 },
662 "gpgsm": {
663 "type": "object",
664 "properties": {
665 "program": {
666 "type": "string",
667 "description": "Path to the gpgsm program to be called",
668 "default": "gpgsm"
669 },
670 "allow-expired-keys": {
671 "type": "boolean",
672 "description": "Whether to consider signatures generated with an expired key as valid",
673 "default": false
674 }
675 }
676 },
677 "ssh": {
678 "type": "object",
679 "properties": {
680 "program": {
681 "type": "string",
682 "description": "Path to the ssh-keygen program to be called",
683 "default": "ssh-keygen"
684 },
685 "allowed-signers": {
686 "type": "string",
687 "description": "Path to an allowed signers file used for signature verification"
688 }
689 }
690 }
691 },
692 "additionalProperties": true
693 }
694 }
695 },
696 "fix": {
697 "type": "object",
698 "description": "Settings for jj fix",
699 "properties": {
700 "tools": {
701 "type": "object",
702 "additionalProperties": {
703 "type": "object",
704 "description": "Settings for how specific filesets are affected by a tool",
705 "properties": {
706 "command": {
707 "type": "array",
708 "items": {
709 "type": "string"
710 },
711 "description": "Arguments used to execute this tool"
712 },
713 "patterns": {
714 "type": "array",
715 "items": {
716 "type": "string"
717 },
718 "description": "Filesets that will be affected by this tool"
719 },
720 "enabled": {
721 "type": "boolean",
722 "description": "Disables this tool if set to false",
723 "default": true
724 }
725 }
726 },
727 "description": "Settings for tools run by jj fix"
728 }
729 }
730 },
731 "split": {
732 "type": "object",
733 "description": "Settings for jj split",
734 "properties": {
735 "legacy-bookmark-behavior": {
736 "type": "boolean",
737 "description": "If true, bookmarks will move to the second commit instead of the first.",
738 "default": false
739 }
740 }
741 },
742 "hints": {
743 "type": "object",
744 "description": "Various hints in jj's UI that can be disabled",
745 "additionalProperties": {
746 "type": "boolean"
747 }
748 }
749 }
750}