diff --git a/.config/doom/config.el b/.config/doom/config.el index 097f71e..061f895 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -123,8 +123,11 @@ Version 2019-11-04 2021-02-16" (setq initial-major-mode 'org-mode) (add-to-list 'auto-mode-alist '("/journal/" . org-mode)) +(add-to-list 'auto-mode-alist '("\\.el##" . emacs-lisp-mode)) + (add-to-list 'auto-mode-alist '("\\.twee\\'" . twee-chapbook-mode)) (add-hook 'twee-chapbook-mode-hook 'twee-mode) + (whitespace-mode 0) (auto-correct-mode) @@ -724,7 +727,7 @@ Version 2019-11-04 2021-02-16" ;;; File modes (use-package! plantuml-mode ; Diagrams - :defer t + :mode "\\.puml\\'" :config (set-file-template! 'plantuml-mode :mode 'plantuml-mode) (setq plantuml-executable-path "nostderr" @@ -755,11 +758,13 @@ Version 2019-11-04 2021-02-16" (use-package! lilypond-mode :mode ("\\.ly\\'" . LilyPond-mode) :config - ;; TODO template + (set-file-template! 'LilyPond-mode :mode 'LilyPond-mode) (setq LilyPond-pdf-command "xdg-open") (add-hook 'LilyPond-mode-hook 'turn-on-font-lock) + (add-hook 'LilyPond-mode-hook (lambda () (setq-local compile-command (format "lilypond %s" (shell-quote-argument buffer-file-name))))) (add-hook 'pdf-view-mode-hook 'auto-revert-mode) (setq auto-revert-interval 2) + ; TODO (require 'lyqi nil t) ) (setq js-indent-level 2) @@ -817,6 +822,8 @@ Version 2019-11-04 2021-02-16" (direnv-mode) ) +(use-package! recompile-on-save) + ;; https://emacs.stackexchange.com/questions/64532/emms-and-mpd-configuration (use-package! emms :disabled diff --git a/.config/doom/packages.el b/.config/doom/packages.el index 1fe981c..3abdbe0 100644 --- a/.config/doom/packages.el +++ b/.config/doom/packages.el @@ -89,3 +89,4 @@ :recipe (:host github :repo "magoyette/twee-chapbook-mode")) (package! kill-or-bury-alive) ; https://github.com/mrkkrp/kill-or-bury-alive +(package! recompile-on-save) diff --git a/.config/doom/snippets/LilyPond-mode/__ b/.config/doom/snippets/LilyPond-mode/__ new file mode 100644 index 0000000..7fb1402 --- /dev/null +++ b/.config/doom/snippets/LilyPond-mode/__ @@ -0,0 +1,40 @@ +# -*- mode: snippet -*- +# name: LilyPond Foundation +# -- +\header { + title = "${1:`(upcase-initials (file-name-nondirectory (file-name-sans-extension (buffer-file-name))))`}" + %%subtitle = "" + composer = "Janek Fischer" +} +\version "2.22.2" +\score { +<< + \time 4/4 +%%% Chords + \new ChordNames { + \set chordChanges = ##t + \chordmode { + c,,1\p + } + } +%%% Melody + \new Staff { + \key c \major + \tempo 4 = 80 + \relative c' { + $0 + } + \addlyrics { + } + } +%%% Bass + \new Staff { + \key c \major + \clef bass + \relative c { + } + } +>> +\midi { } +\layout { } +} \ No newline at end of file diff --git a/.config/doom/snippets/plantuml-mode/__ b/.config/doom/snippets/plantuml-mode/__ index 4afa696..d27bed5 100644 --- a/.config/doom/snippets/plantuml-mode/__ +++ b/.config/doom/snippets/plantuml-mode/__ @@ -3,5 +3,7 @@ # -- @startuml hide empty description +!theme bluegray +'top to bottom direction $0 @enduml \ No newline at end of file diff --git a/.config/doom/user.el##user.janek b/.config/doom/user.el##user.janek index 6658653..6e52898 100644 --- a/.config/doom/user.el##user.janek +++ b/.config/doom/user.el##user.janek @@ -11,7 +11,6 @@ org-roam-directory org-directory )) ) - (if (and org-directory (file-exists-p org-directory)) (setq default-directory org-directory org-agenda-files (append