Function: just-ts-mode
just-ts-mode is an interactive and natively compiled function defined
in just-ts-mode.el.
Signature
(just-ts-mode)
Documentation
Major mode for editing standard Justfiles using treesitter.
In addition to any hooks its parent mode prog-mode might have run,
this mode runs the hook just-ts-mode-hook, as the final or
penultimate step during initialization.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/1vmf8s52d6vniw28ckf3szxslimhfphb-emacs-packages-deps/share/emacs/site-lisp/elpa/just-ts-mode-20260319.1513/just-ts-mode.el
;;;###autoload
(define-derived-mode just-ts-mode prog-mode "Justfile[ts]"
"Major mode for editing standard Justfiles using treesitter."
(unless (treesit-ready-p 'just)
(error "Tree-Sitter for `just' isn't available"))
(treesit-parser-create 'just)
(just-ts-setup)
;; Imenu
(setq-local imenu-generic-expression
'(("setting" "^set +\\([A-Z_a-z][0-9A-Z_a-z-]*\\)\\(?:\\'\\|$\\| \\|:=\\)" 1)
("variable" "^\\(?:export +\\)?\\([A-Z_a-z][0-9A-Z_a-z-]*\\) *:=" 1)
("task" "^\\(?:alias +\\)?@?\\([A-Z_a-z][0-9A-Z_a-z-]*\\).*:[^=]" 1)))
(local-set-key (kbd "C-c '") #'just-src-edit))