config/doom: add lilypond template

This commit is contained in:
xeruf 2022-06-01 01:01:20 +02:00
parent 7313d8ba63
commit 179fd73cf7
5 changed files with 52 additions and 3 deletions

View File

@ -123,8 +123,11 @@ Version 2019-11-04 2021-02-16"
(setq initial-major-mode 'org-mode) (setq initial-major-mode 'org-mode)
(add-to-list 'auto-mode-alist '("/journal/" . 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-to-list 'auto-mode-alist '("\\.twee\\'" . twee-chapbook-mode))
(add-hook 'twee-chapbook-mode-hook 'twee-mode) (add-hook 'twee-chapbook-mode-hook 'twee-mode)
(whitespace-mode 0) (whitespace-mode 0)
(auto-correct-mode) (auto-correct-mode)
@ -724,7 +727,7 @@ Version 2019-11-04 2021-02-16"
;;; File modes ;;; File modes
(use-package! plantuml-mode ; Diagrams (use-package! plantuml-mode ; Diagrams
:defer t :mode "\\.puml\\'"
:config :config
(set-file-template! 'plantuml-mode :mode 'plantuml-mode) (set-file-template! 'plantuml-mode :mode 'plantuml-mode)
(setq plantuml-executable-path "nostderr" (setq plantuml-executable-path "nostderr"
@ -755,11 +758,13 @@ Version 2019-11-04 2021-02-16"
(use-package! lilypond-mode (use-package! lilypond-mode
:mode ("\\.ly\\'" . LilyPond-mode) :mode ("\\.ly\\'" . LilyPond-mode)
:config :config
;; TODO template (set-file-template! 'LilyPond-mode :mode 'LilyPond-mode)
(setq LilyPond-pdf-command "xdg-open") (setq LilyPond-pdf-command "xdg-open")
(add-hook 'LilyPond-mode-hook 'turn-on-font-lock) (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) (add-hook 'pdf-view-mode-hook 'auto-revert-mode)
(setq auto-revert-interval 2) (setq auto-revert-interval 2)
; TODO (require 'lyqi nil t)
) )
(setq js-indent-level 2) (setq js-indent-level 2)
@ -817,6 +822,8 @@ Version 2019-11-04 2021-02-16"
(direnv-mode) (direnv-mode)
) )
(use-package! recompile-on-save)
;; https://emacs.stackexchange.com/questions/64532/emms-and-mpd-configuration ;; https://emacs.stackexchange.com/questions/64532/emms-and-mpd-configuration
(use-package! emms (use-package! emms
:disabled :disabled

View File

@ -89,3 +89,4 @@
:recipe (:host github :repo "magoyette/twee-chapbook-mode")) :recipe (:host github :repo "magoyette/twee-chapbook-mode"))
(package! kill-or-bury-alive) ; https://github.com/mrkkrp/kill-or-bury-alive (package! kill-or-bury-alive) ; https://github.com/mrkkrp/kill-or-bury-alive
(package! recompile-on-save)

View File

@ -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 { }
}

View File

@ -3,5 +3,7 @@
# -- # --
@startuml @startuml
hide empty description hide empty description
!theme bluegray
'top to bottom direction
$0 $0
@enduml @enduml

View File

@ -11,7 +11,6 @@
org-roam-directory org-directory org-roam-directory org-directory
)) ))
) )
(if (and org-directory (file-exists-p org-directory)) (if (and org-directory (file-exists-p org-directory))
(setq default-directory org-directory (setq default-directory org-directory
org-agenda-files (append org-agenda-files (append