2016-03-05 11:56:30 +00:00
|
|
|
;;; packages.el --- spacemacs-org layer packages file for Spacemacs.
|
|
|
|
;;
|
2018-01-04 07:00:25 +00:00
|
|
|
;; Copyright (c) 2012-2018 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.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
|
|
|
;;; 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)
|
2016-03-05 11:56:30 +00:00
|
|
|
(org-plus-contrib :step pre)
|
|
|
|
org-bullets
|
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))
|
|
|
|
|
|
|
|
;; dummy init function to force installation of `org-plus-contrib'
|
2016-04-08 02:04:36 +00:00
|
|
|
(defun spacemacs-org/init-org-plus-contrib ())
|
2016-03-05 11:56:30 +00:00
|
|
|
|
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)
|
|
|
|
: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)))))
|
|
|
|
|
|
|
|
(defun spacemacs-org/init-org-bullets ()
|
|
|
|
(use-package org-bullets
|
2018-03-04 04:37:53 +00:00
|
|
|
:defer t
|
2016-03-05 11:56:30 +00:00
|
|
|
:init (add-hook 'org-mode-hook 'org-bullets-mode)))
|
|
|
|
|
|
|
|
(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
|