Files
.emacs.d/modules/editor/siren-origami.el
Jim Myhrberg fe6a4e7ce5 fix(elisp): add lexical-binding comment to all files to suppress new Emacs 31 warnings
I've set `lexical-binding` to `nil` in all Emacs Lisp files to suppress
the warnings introduced in Emacs 31 requiring all elisp files to have a
`lexical-binding` comment.

This retains the default behavior of dynamic binding when no
`lexical-binding` comment is present. With it set to `t` across the
board, various things break, and fixing those is a task for another day.
2025-06-29 12:23:03 +01:00

53 lines
1.4 KiB
EmacsLisp

;;; siren-origami.el --- jimeh's Emacs Siren: origami configuration. -*- lexical-binding: nil; -*-
;;; Commentary:
;; Basic configuration for origami code.
;;; Code:
(use-package origami
:general
(:keymaps 'origami-mode-map
"M-0" 'origami-open-all-nodes
"M-9" 'origami-close-all-nodes
"C-=" 'origami-forward-toggle-node
"C-c C-h" 'origami-forward-toggle-node)
:hook
((dart-mode
go-mode
go-ts-mode
js-mode
js-ts-mode
json-mode
json-ts-mode
php-mode
protobuf-mode
rjsx-mode
rust-mode
rust-ts-mode
typescript-mode) . siren-origami-mode-enable)
:preface
(defun siren-origami-mode-enable ()
(origami-mode t))
:config
(dolist (item '((dart-mode . origami-c-style-parser)
(json-mode . origami-c-style-parser)
(json-ts-mode . origami-c-style-parser)
(protobuf-mode . origami-c-style-parser)
(rjsx-mode . origami-c-style-parser)
(rust-mode . origami-c-style-parser)
(rust-ts-mode . origami-c-style-parser)
(typescript-mode . origami-c-style-parser)
(typescript-ts-mode . origami-c-style-parser)))
(add-to-list 'origami-parser-alist item)))
(use-package lsp-origami
:after lsp-mode)
(provide 'siren-origami)
;;; siren-origami.el ends here