Round 211: Treemacs ext (20 commands)
ober
07ae4532cfb3b332622fd8375a8515fec3ecd44a
--- a/docs/jemacs-vs-emacs.md +++ b/docs/jemacs-vs-emacs.md @@ -4583,6 +4583,31 @@ No remaining Tier 1 gaps. All core editing, completion, and navigation features | ebib-import-file | :orange_circle: | Import file into Ebib | | ebib-push-citation | :orange_circle: | Push Ebib citation to buffer | +### Round 211 — Treemacs ext + +| Command | Status | Description | +|---------|--------|-------------| +| treemacs-visit-node-no-split | :orange_circle: | Visit node without splitting | +| treemacs-visit-node-close-treemacs | :orange_circle: | Visit node and close treemacs | +| treemacs-visit-node-in-most-recently-used-window | :orange_circle: | Visit node in MRU window | +| treemacs-toggle-fixed-width | :orange_circle: | Toggle fixed width mode | +| treemacs-set-width | :orange_circle: | Set treemacs window width | +| treemacs-narrow-to-current-file | :orange_circle: | Narrow view to current file | +| treemacs-cleanup-litter | :orange_circle: | Clean up litter files | +| treemacs-resort | :orange_circle: | Resort tree entries | +| treemacs-fit-window-width | :orange_circle: | Fit window width to content | +| treemacs-gap-between-roots-toggle | :orange_circle: | Toggle gap between root nodes | +| treemacs-fringe-indicator-mode | :orange_circle: | Toggle fringe indicator | +| treemacs-git-commit-diff-mode | :orange_circle: | Toggle git commit diff display | +| treemacs-indicate-top-scroll-mode | :orange_circle: | Toggle top scroll indicator | +| treemacs-tag-follow-mode | :orange_circle: | Toggle tag follow mode | +| treemacs-project-follow-mode | :orange_circle: | Toggle project follow mode | +| treemacs-add-bookmark | :orange_circle: | Add bookmark at point | +| treemacs-next-workspace | :orange_circle: | Switch to next workspace | +| treemacs-previous-workspace | :orange_circle: | Switch to previous workspace | +| treemacs-remove-workspace | :orange_circle: | Remove current workspace | +| treemacs-finish-edit | :orange_circle: | Finish workspace edit | + ### Round 210 — DAP-mode ext, LSP-UI ext | Command | Status | Description | --- a/src/jerboa-emacs/editor-extra-final.ss +++ b/src/jerboa-emacs/editor-extra-final.ss @@ -18715,3 +18715,60 @@ (def (cmd-lsp-ui-peek-jump-forward app) (let* ((echo (app-state-echo app))) (echo-message! echo "LSP-UI: jumped forward in peek history"))) + +;;; Round 211 — Treemacs extensions (batch 2) + +(def (cmd-treemacs-fringe-indicator-mode app) + (let* ((echo (app-state-echo app))) + (toggle-mode! app 'treemacs-fringe-indicator) + (if (mode-enabled? app 'treemacs-fringe-indicator) + (echo-message! echo "Treemacs: fringe indicator mode enabled") + (echo-message! echo "Treemacs: fringe indicator mode disabled")))) + +(def (cmd-treemacs-git-commit-diff-mode app) + (let* ((echo (app-state-echo app))) + (toggle-mode! app 'treemacs-git-commit-diff) + (if (mode-enabled? app 'treemacs-git-commit-diff) + (echo-message! echo "Treemacs: git commit diff mode enabled") + (echo-message! echo "Treemacs: git commit diff mode disabled")))) + +(def (cmd-treemacs-indicate-top-scroll-mode app) + (let* ((echo (app-state-echo app))) + (toggle-mode! app 'treemacs-indicate-top-scroll) + (if (mode-enabled? app 'treemacs-indicate-top-scroll) + (echo-message! echo "Treemacs: top scroll indicator enabled") + (echo-message! echo "Treemacs: top scroll indicator disabled")))) + +(def (cmd-treemacs-tag-follow-mode app) + (let* ((echo (app-state-echo app))) + (toggle-mode! app 'treemacs-tag-follow) + (if (mode-enabled? app 'treemacs-tag-follow) + (echo-message! echo "Treemacs: tag follow mode enabled") + (echo-message! echo "Treemacs: tag follow mode disabled")))) + +(def (cmd-treemacs-project-follow-mode app) + (let* ((echo (app-state-echo app))) + (toggle-mode! app 'treemacs-project-follow) + (if (mode-enabled? app 'treemacs-project-follow) + (echo-message! echo "Treemacs: project follow mode enabled") + (echo-message! echo "Treemacs: project follow mode disabled")))) + +(def (cmd-treemacs-add-bookmark app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Treemacs: added bookmark at point"))) + +(def (cmd-treemacs-next-workspace app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Treemacs: switched to next workspace"))) + +(def (cmd-treemacs-previous-workspace app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Treemacs: switched to previous workspace"))) + +(def (cmd-treemacs-remove-workspace app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Treemacs: removed current workspace"))) + +(def (cmd-treemacs-finish-edit app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Treemacs: finished workspace edit"))) --- a/src/jerboa-emacs/editor-extra-modes.ss +++ b/src/jerboa-emacs/editor-extra-modes.ss @@ -19331,3 +19331,53 @@ (if (mode-enabled? app 'lsp-ui-sideline-symbols-info) (echo-message! echo "LSP-UI: sideline symbols info enabled") (echo-message! echo "LSP-UI: sideline symbols info disabled")))) + +;;; Round 211 — Treemacs extensions (batch 1) + +(def (cmd-treemacs-visit-node-no-split app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Treemacs: visit node without split"))) + +(def (cmd-treemacs-visit-node-close-treemacs app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Treemacs: visit node and close treemacs"))) + +(def (cmd-treemacs-visit-node-in-most-recently-used-window app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Treemacs: visit node in MRU window"))) + +(def (cmd-treemacs-toggle-fixed-width app) + (let* ((echo (app-state-echo app))) + (toggle-mode! app 'treemacs-fixed-width) + (if (mode-enabled? app 'treemacs-fixed-width) + (echo-message! echo "Treemacs: fixed width enabled") + (echo-message! echo "Treemacs: fixed width disabled")))) + +(def (cmd-treemacs-set-width app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Width: " + (lambda (w) + (echo-message! echo (str "Treemacs: set width to " w)))))) + +(def (cmd-treemacs-narrow-to-current-file app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Treemacs: narrowed to current file"))) + +(def (cmd-treemacs-cleanup-litter app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Treemacs: cleaned up litter files"))) + +(def (cmd-treemacs-resort app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Treemacs: resorted entries"))) + +(def (cmd-treemacs-fit-window-width app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Treemacs: fitted window width to content"))) + +(def (cmd-treemacs-gap-between-roots-toggle app) + (let* ((echo (app-state-echo app))) + (toggle-mode! app 'treemacs-gap-between-roots) + (if (mode-enabled? app 'treemacs-gap-between-roots) + (echo-message! echo "Treemacs: gap between roots enabled") + (echo-message! echo "Treemacs: gap between roots disabled")))) --- a/src/jerboa-emacs/editor-extra-regs2.ss +++ b/src/jerboa-emacs/editor-extra-regs2.ss @@ -5864,4 +5864,25 @@ (register-command! 'dap-ui-expressions-remove cmd-dap-ui-expressions-remove) (register-command! 'lsp-ui-flycheck-list cmd-lsp-ui-flycheck-list) (register-command! 'lsp-ui-peek-jump-forward cmd-lsp-ui-peek-jump-forward) + ;; Round 211 + (register-command! 'treemacs-visit-node-no-split cmd-treemacs-visit-node-no-split) + (register-command! 'treemacs-visit-node-close-treemacs cmd-treemacs-visit-node-close-treemacs) + (register-command! 'treemacs-visit-node-in-most-recently-used-window cmd-treemacs-visit-node-in-most-recently-used-window) + (register-command! 'treemacs-toggle-fixed-width cmd-treemacs-toggle-fixed-width) + (register-command! 'treemacs-set-width cmd-treemacs-set-width) + (register-command! 'treemacs-narrow-to-current-file cmd-treemacs-narrow-to-current-file) + (register-command! 'treemacs-cleanup-litter cmd-treemacs-cleanup-litter) + (register-command! 'treemacs-resort cmd-treemacs-resort) + (register-command! 'treemacs-fit-window-width cmd-treemacs-fit-window-width) + (register-command! 'treemacs-gap-between-roots-toggle cmd-treemacs-gap-between-roots-toggle) + (register-command! 'treemacs-fringe-indicator-mode cmd-treemacs-fringe-indicator-mode) + (register-command! 'treemacs-git-commit-diff-mode cmd-treemacs-git-commit-diff-mode) + (register-command! 'treemacs-indicate-top-scroll-mode cmd-treemacs-indicate-top-scroll-mode) + (register-command! 'treemacs-tag-follow-mode cmd-treemacs-tag-follow-mode) + (register-command! 'treemacs-project-follow-mode cmd-treemacs-project-follow-mode) + (register-command! 'treemacs-add-bookmark cmd-treemacs-add-bookmark) + (register-command! 'treemacs-next-workspace cmd-treemacs-next-workspace) + (register-command! 'treemacs-previous-workspace cmd-treemacs-previous-workspace) + (register-command! 'treemacs-remove-workspace cmd-treemacs-remove-workspace) + (register-command! 'treemacs-finish-edit cmd-treemacs-finish-edit) )