lang/org: refactor advice & ob-ammonite integration
This commit is contained in:
parent
21dfd6159e
commit
24d2f494c9
1 changed files with 5 additions and 9 deletions
|
@ -6,7 +6,8 @@
|
||||||
(D . C)
|
(D . C)
|
||||||
(sh . shell)
|
(sh . shell)
|
||||||
(bash . shell)
|
(bash . shell)
|
||||||
(matlab . octave))
|
(matlab . octave)
|
||||||
|
(amm . ammonite))
|
||||||
"An alist mapping languages to babel libraries. This is necessary for babel
|
"An alist mapping languages to babel libraries. This is necessary for babel
|
||||||
libraries (ob-*.el) that don't match the name of the language.
|
libraries (ob-*.el) that don't match the name of the language.
|
||||||
|
|
||||||
|
@ -242,12 +243,7 @@ path too.")
|
||||||
(message
|
(message
|
||||||
(concat "`org-babel-do-load-languages' is redundant with Doom's lazy loading mechanism for babel "
|
(concat "`org-babel-do-load-languages' is redundant with Doom's lazy loading mechanism for babel "
|
||||||
"packages. There is no need to use it, so it has been disabled")))
|
"packages. There is no need to use it, so it has been disabled")))
|
||||||
|
)
|
||||||
(when (featurep! :lang scala)
|
|
||||||
(add-hook! '+org-babel-load-functions
|
|
||||||
(defun +org-babel-load-ammonite-h (lang)
|
|
||||||
(and (eq lang 'amm)
|
|
||||||
(require 'ob-ammonite nil t))))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun +org-init-capture-defaults-h ()
|
(defun +org-init-capture-defaults-h ()
|
||||||
|
@ -491,11 +487,11 @@ eldoc string."
|
||||||
(funcall orig-fn
|
(funcall orig-fn
|
||||||
(cl-loop for part in path
|
(cl-loop for part in path
|
||||||
;; Remove full link syntax
|
;; Remove full link syntax
|
||||||
for part = (replace-regexp-in-string org-link-any-re "\\4" part)
|
for fixedpart = (replace-regexp-in-string org-link-any-re "\\4" part)
|
||||||
for n from 0
|
for n from 0
|
||||||
for face = (nth (% n org-n-level-faces) org-level-faces)
|
for face = (nth (% n org-n-level-faces) org-level-faces)
|
||||||
collect
|
collect
|
||||||
(org-add-props part
|
(org-add-props fixedpart
|
||||||
nil 'face `(:foreground ,(face-foreground face nil t) :weight bold)))
|
nil 'face `(:foreground ,(face-foreground face nil t) :weight bold)))
|
||||||
width prefix separator))
|
width prefix separator))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue