Add org-mode configuration

This commit is contained in:
Wojciech Kozlowski 2018-02-04 17:13:57 +00:00
parent fc54efbd76
commit e0aaa0e969
3 changed files with 68 additions and 8 deletions

View File

@ -103,6 +103,7 @@
files
helm
helm-gtags
org
parentheses
programming
terminal

51
modules/org.el Normal file
View File

@ -0,0 +1,51 @@
;;; org.el --- Module file for org-mode configuration.
;;
;; Copyright (C) 2017 Wojciech Kozlowski
;;
;; Author: Wojciech Kozlowski <wojciech.kozlowski@vivaldi.net>
;; Created: 4 Feb 2018
;;
;; This file is not part of GNU Emacs.
;;
;;; Commentary:
;;
;; This module sets up org-mode.
;;
;;; License: GPLv3
;;; Required packages:
(setq emodule/org-packages
'(org-bullets)
)
;; Configuration:
(defun emodule/org-init ()
;; --------------------------------------------------------------------------
;; Hide special characters for itlaics/bold/underline.
;; --------------------------------------------------------------------------
(setq org-hide-emphasis-markers t)
;; --------------------------------------------------------------------------
;; Better bullet points.
;; --------------------------------------------------------------------------
(font-lock-add-keywords 'org-mode
'(("^ +\\(*\\) "
(0 (prog1 () (compose-region (match-beginning 1) (match-end 1) ""))))))
;; --------------------------------------------------------------------------
;; Better header bullets
;; --------------------------------------------------------------------------
(use-package org-bullets
:defer t
:init
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
)

View File

@ -212,14 +212,6 @@
`(enh-ruby-regexp-delimiter-face ((t (:foreground, *regexp*))))
`(enh-ruby-string-delimiter-face ((t (:foreground, *normal*))))
;; org-mode
`(org-date ((t (:foreground, *light-purple* :underline t))))
`(org-level-1 ((t (:foreground, *string*))))
`(org-special-keyword ((t (:foreground, *variable*))))
`(org-link ((t (:foreground, *keywords* :underline t))))
`(org-checkbox ((t (:foreground, *keywords* :background, *bg-1* :bold t))))
`(org-clock-overlay ((t (:foreground, *mode-line-bg* :background, *string*))))
;; show-paren
`(show-paren-mismatch ((t (:foreground, *warning* :weight ultra-bold :underline t))))
`(show-paren-match ((t (:foreground, *success* :weight ultra-bold :underline t))))
@ -420,6 +412,22 @@
;; fic-mode
`(fic-face ((t (:foreground ,*warning* :weight bold))))
;; org-mode
`(org-level-8 ((t (:weight bold :foreground ,*head4*))))
`(org-level-7 ((t (:weight bold :foreground ,*head3*))))
`(org-level-6 ((t (:weight bold :foreground ,*head2*))))
`(org-level-5 ((t (:weight bold :foreground ,*head1*))))
`(org-level-4 ((t (:weight bold :height 1.1 :foreground ,*head4*))))
`(org-level-3 ((t (:weight bold :height 1.25 :foreground ,*head3*))))
`(org-level-2 ((t (:weight bold :height 1.5 :foreground ,*head2*))))
`(org-level-1 ((t (:weight bold :height 1.75 :foreground ,*head1*))))
`(org-document-title ((t (:weight bold :height 1.5 :underline nil :foreground ,*method-declaration*))))
`(org-date ((t (:foreground, *light-purple* :underline t))))
`(org-special-keyword ((t (:foreground, *variable*))))
`(org-link ((t (:foreground, *keywords* :underline t))))
`(org-checkbox ((t (:foreground, *keywords* :background, *bg-1* :bold t))))
`(org-clock-overlay ((t (:foreground, *mode-line-bg* :background, *string*))))
)
;; Define values for colours that don't use faces.