2016-03-05 11:56:30 +00:00
|
|
|
;;; packages.el --- spacemacs-org layer packages file for Spacemacs.
|
|
|
|
;;
|
2021-03-22 20:11:29 +00:00
|
|
|
;; Copyright (c) 2012-2021 Sylvain Benner & Contributors
|
2016-03-05 11:56:30 +00:00
|
|
|
;;
|
|
|
|
;; Author: Boris Buliga <d12frosted@d12frosted.local>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
2021-03-24 03:31:44 +00:00
|
|
|
;; This program is free software; you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU General Public License as published by
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
|
|
|
;;
|
|
|
|
;; This program is distributed in the hope that it will be useful,
|
|
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;; GNU General Public License for more details.
|
|
|
|
;;
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2016-03-05 11:56:30 +00:00
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
|
|
|
|
(defconst spacemacs-org-packages
|
|
|
|
'(
|
|
|
|
flyspell
|
2016-04-08 02:04:36 +00:00
|
|
|
;; default-org package does not exist, we invent this package name
|
|
|
|
;; to allow the `org' layer to own the `org' package instead of this
|
|
|
|
;; layer. So it is easier for users to steal the ownership of the
|
|
|
|
;; `org' package.
|
2016-05-16 02:01:18 +00:00
|
|
|
(default-org-config :location built-in)
|
2020-06-03 19:13:17 +00:00
|
|
|
org-superstar
|
2016-04-25 04:29:04 +00:00
|
|
|
(space-doc :location local)
|
2016-03-05 11:56:30 +00:00
|
|
|
toc-org
|
|
|
|
))
|
|
|
|
|
|
|
|
(defun spacemacs-org/post-init-flyspell ()
|
|
|
|
(spell-checking/add-flyspell-hook 'org-mode-hook))
|
|
|
|
|
2016-05-16 02:01:18 +00:00
|
|
|
(defun spacemacs-org/init-default-org-config ()
|
2016-03-05 11:56:30 +00:00
|
|
|
(use-package org
|
|
|
|
:commands (org-clock-out org-occur-in-agenda-files org-agenda-files)
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2016-03-05 11:56:30 +00:00
|
|
|
:init
|
|
|
|
(progn
|
|
|
|
;; FIXME: This check has been disabled pending a resolution of
|
|
|
|
;; https://github.com/syl20bnr/spacemacs/issues/3933
|
|
|
|
;; (when (featurep 'org)
|
|
|
|
;; (configuration-layer//set-error)
|
|
|
|
;; (spacemacs-buffer/append
|
|
|
|
;; (concat
|
|
|
|
;; "Org features were loaded before the `org' layer initialized.\n"
|
|
|
|
;; "Try removing org code from user initialization and private layers.") t))
|
|
|
|
(setq org-startup-with-inline-images t
|
|
|
|
org-src-fontify-natively t
|
|
|
|
;; this is consistent with the value of
|
|
|
|
;; `helm-org-headings-max-depth'.
|
|
|
|
org-imenu-depth 8)
|
2021-05-29 20:12:28 +00:00
|
|
|
:config
|
|
|
|
(progn
|
|
|
|
(font-lock-add-keywords
|
|
|
|
'org-mode '(("\\(@@html:<kbd>@@\\) \\(.*\\) \\(@@html:</kbd>@@\\)"
|
|
|
|
(1 font-lock-comment-face prepend)
|
|
|
|
(2 font-lock-function-name-face)
|
|
|
|
(3 font-lock-comment-face prepend))))
|
|
|
|
;; Open links and files with RET in normal state
|
|
|
|
(evil-define-key 'normal org-mode-map (kbd "RET") 'org-open-at-point)))))
|
2016-03-05 11:56:30 +00:00
|
|
|
|
2020-06-03 19:13:17 +00:00
|
|
|
(defun spacemacs-org/init-org-superstar ()
|
2021-01-10 16:38:54 +00:00
|
|
|
(use-package org-superstar
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2020-06-03 19:13:17 +00:00
|
|
|
:init (add-hook 'org-mode-hook 'org-superstar-mode)))
|
2016-03-05 11:56:30 +00:00
|
|
|
|
|
|
|
(defun spacemacs-org/init-toc-org ()
|
|
|
|
(use-package toc-org
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2016-03-05 11:56:30 +00:00
|
|
|
:init
|
|
|
|
(progn
|
|
|
|
(setq toc-org-max-depth 10)
|
|
|
|
(add-hook 'org-mode-hook 'toc-org-enable))))
|
|
|
|
|
2017-06-23 15:58:45 +00:00
|
|
|
(defun spacemacs-org/init-space-doc ()
|
|
|
|
(add-hook 'org-mode-hook 'dotspacemacs//prettify-spacemacs-docs))
|
2016-04-25 04:29:04 +00:00
|
|
|
|
2016-03-05 11:56:30 +00:00
|
|
|
;;; packages.el ends here
|