mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
Add and configure origami, and enable it for majro modes where it seems to do a good job, and keep using hideshow for other major modes.
46 lines
1.0 KiB
EmacsLisp
46 lines
1.0 KiB
EmacsLisp
;;; siren-dart.el --- jimeh's Emacs Siren: dart-mode configuration.
|
|
|
|
;;; Commentary:
|
|
|
|
;; Basic configuration for dart-mode.
|
|
|
|
;;; Code:
|
|
|
|
(require 'siren-lsp)
|
|
(require 'siren-origami)
|
|
(require 'siren-projectile)
|
|
|
|
(use-package dart-mode
|
|
:mode "\\.dart\\'"
|
|
:interpreter "dart"
|
|
|
|
:hook
|
|
(dart-mode . siren-dart-mode-setup)
|
|
|
|
:custom
|
|
(dart-format-on-save t)
|
|
(dart-enable-analysis-server t)
|
|
|
|
:preface
|
|
(defun siren-dart-mode-setup ()
|
|
(when (fboundp 'highlight-symbol-mode)
|
|
(highlight-symbol-mode -1))
|
|
(when (fboundp 'auto-highlight-symbol-mode)
|
|
(auto-highlight-symbol-mode -1))
|
|
|
|
(lsp-deferred)
|
|
(origami-mode t)
|
|
(subword-mode y))
|
|
|
|
:init
|
|
(with-eval-after-load 'origami
|
|
(add-to-list 'origami-parser-alist
|
|
'(dart-mode . origami-c-style-parser)))
|
|
|
|
(with-eval-after-load 'projectile
|
|
(add-to-list 'projectile-project-root-files-bottom-up "pubspec.yaml")
|
|
(add-to-list 'projectile-project-root-files-bottom-up "BUILD")))
|
|
|
|
(provide 'siren-dart)
|
|
;;; siren-dart.el ends here
|