merge
This commit is contained in:
commit
883110eb0b
1 changed files with 101 additions and 41 deletions
142
emacs/emacs.el
142
emacs/emacs.el
|
@ -18,7 +18,7 @@
|
|||
(global-font-lock-mode 1)
|
||||
|
||||
;; Always show line numbers
|
||||
(global-linum-mode t)
|
||||
(global-nlinum-mode t)
|
||||
|
||||
;; Highlight current line
|
||||
(global-hl-line-mode t)
|
||||
|
@ -36,24 +36,6 @@
|
|||
;; Mutt support.
|
||||
(setq auto-mode-alist (append '(("/tmp/mutt.*" . mail-mode)) auto-mode-alist))
|
||||
|
||||
;; auctex
|
||||
(setq TeX-auto-save t)
|
||||
(setq TeX-parse-self t)
|
||||
(setq TeX-save-query nil)
|
||||
(setq TeX-PDF-mode t)
|
||||
|
||||
;; outline mode
|
||||
|
||||
(defun turn-on-outline-minor-mode ()
|
||||
(outline-minor-mode 1))
|
||||
|
||||
(add-hook 'LaTeX-mode-hook 'turn-on-outline-minor-mode)
|
||||
(add-hook 'latex-mode-hook 'turn-on-outline-minor-mode)
|
||||
(setq outline-minor-mode-prefix "\C-c \C-o") ; Or something else
|
||||
|
||||
;; flymake for latex
|
||||
(defun flymake-get-tex-args (file-name)
|
||||
(list "chktex" (list "-q" "-v0" file-name)))
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
|
@ -74,7 +56,7 @@
|
|||
'(org-agenda-files (quote ("~/ownCloud/todo.org")))
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(fic-mode markdown-preview-mode web-mode ob-dart ac-python ac-slime ant auctex-lua auto-compile auto-complete-auctex csv-mode csv ac-haskell-process ghc haskell-mode arduino-mode json-mode gruvbox-theme focus literate-coffee-mode jdee javadoc-lookup pkgbuild-mode vala-snippets vala-mode phpunit ac-php php-completion php+-mode fish-mode hugo mips-mode stumpwm-mode slime muttrc-mode diff-hl magit wanderlust ## auctex yaml-mode typescript sass-mode php-mode outlined-elisp-mode monokai-theme markdown-mode fill-column-indicator edit-server dracula-theme coffee-mode auto-complete atom-one-dark-theme atom-dark-theme)))
|
||||
(doom-themes neotree rainbow-delimiters projectile nlinum powerline airline-themes fic-mode markdown-preview-mode web-mode ob-dart ac-python ac-slime ant auctex-lua auto-compile auto-complete-auctex csv-mode csv ac-haskell-process ghc haskell-mode arduino-mode json-mode gruvbox-theme focus literate-coffee-mode jdee javadoc-lookup pkgbuild-mode vala-snippets vala-mode phpunit ac-php php-completion php+-mode fish-mode hugo mips-mode stumpwm-mode slime muttrc-mode diff-hl magit wanderlust ## auctex yaml-mode typescript sass-mode php-mode outlined-elisp-mode monokai-theme markdown-mode fill-column-indicator edit-server dracula-theme coffee-mode auto-complete atom-one-dark-theme atom-dark-theme)))
|
||||
'(safe-local-variable-values (quote ((TeX-Engine . luatex))))
|
||||
'(send-mail-function (quote smtpmail-send-it))
|
||||
'(standard-indent 2)
|
||||
|
@ -146,7 +128,6 @@
|
|||
|
||||
(require 'fill-column-indicator)
|
||||
(setq fci-rule-width 5) ;;; set rule width to 5px
|
||||
(add-hook 'after-change-major-mode-hook 'fci-mode) ;; enable fci on every file
|
||||
|
||||
;;; diff-hl
|
||||
(global-diff-hl-mode t)
|
||||
|
@ -162,26 +143,8 @@
|
|||
(shell-command
|
||||
"stumpish 'eval (stumpwm::return-es-called-win stumpwm::*es-win*)'"))))
|
||||
|
||||
;; auctex
|
||||
(setq-default TeX-master nil)
|
||||
|
||||
;; reftex
|
||||
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
|
||||
(setq reftex-plug-into-auctex t)
|
||||
|
||||
;; ac-math
|
||||
(add-to-list 'ac-modes 'latex-mode)
|
||||
|
||||
(defun ac-latex-mode-setup ()
|
||||
(setq ac-sources
|
||||
(append '(ac-source-math-unicode ac-source-math-latex ac-source-latex-commands)
|
||||
ac-sources)))
|
||||
|
||||
(add-hook 'TeX-mode-hook 'ac-latex-mode-setup)
|
||||
|
||||
;; auto-fill-mode
|
||||
(add-hook 'mail-mode-hook 'auto-fill-mode)
|
||||
(add-hook 'TeX-mode-hook 'auto-fill-mode)
|
||||
(add-hook 'mail-mode-hook (lambda () (setq fill-column 72)))
|
||||
(global-set-key (kbd "C-c q") 'auto-fill-mode)
|
||||
|
||||
|
@ -219,5 +182,102 @@
|
|||
|
||||
(setq org-src-fontify-natively t)
|
||||
|
||||
;; WIP: set cursor coloer
|
||||
(set-cursor-color "#ebdbb2")
|
||||
;; neotree toggle
|
||||
(global-set-key [f8] 'neotree-toggle)
|
||||
|
||||
;; magit status key
|
||||
(global-set-key [f5] 'magit-status)
|
||||
|
||||
;; enable rainbow delimiters mode in programming modes
|
||||
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)
|
||||
|
||||
;; enable powerline modeline
|
||||
(powerline-center-theme)
|
||||
|
||||
|
||||
; ((Lua)La)TeX configuration using auctex
|
||||
|
||||
;; variables
|
||||
|
||||
;;; Automatically save style information when saving the buffer.
|
||||
(setq TeX-auto-save t)
|
||||
|
||||
;;; Parse file after loading it if no style hook is found for it.
|
||||
(setq TeX-parse-self t)
|
||||
|
||||
;;; Don't ask the user when saving a file for each file.
|
||||
(setq TeX-save-query nil)
|
||||
|
||||
;;; Use luatex as default TeX engine.
|
||||
(setq TeX-engine (quote luatex))
|
||||
|
||||
;;; Outline mode keyboard shortcut.
|
||||
(setq outline-minor-mode-prefix "\C-c \C-o")
|
||||
|
||||
;;; set default master file to nil so auctex asks for it.
|
||||
(setq-default TeX-master nil)
|
||||
|
||||
;;; enable reftex auctex interaction.
|
||||
(setq reftex-plug-into-auctex t)
|
||||
|
||||
;;; add the latex mode to the autocomplete modes.
|
||||
(add-to-list 'ac-modes 'latex-mode)
|
||||
|
||||
;;; enable synctex correlation.
|
||||
(setq TeX-source-correlate-mode t
|
||||
TeX-source-correlate-start-server t)
|
||||
|
||||
;; functions
|
||||
|
||||
;;; function for enabling outline mode
|
||||
(defun turn-on-outline-minor-mode ()
|
||||
(outline-minor-mode 1))
|
||||
|
||||
;;; autocompletion for latex
|
||||
;;;; does this really work?
|
||||
(defun ac-latex-mode-setup ()
|
||||
(setq ac-sources
|
||||
(append '(ac-source-math-unicode ac-source-math-latex ac-source-latex-commands)
|
||||
ac-sources)))
|
||||
|
||||
(eval-after-load "tex"
|
||||
'(setcar (cdr (assoc 'output-pdf TeX-view-program-selection)) "Okular"))
|
||||
|
||||
;; hooks
|
||||
|
||||
;;; hooks for outline mode
|
||||
(add-hook 'LaTeX-mode-hook 'turn-on-outline-minor-mode)
|
||||
(add-hook 'latex-mode-hook 'turn-on-outline-minor-mode)
|
||||
|
||||
;;; hook for fci-mode
|
||||
(add-hook 'LaTeX-mode-hook 'fci-mode)
|
||||
|
||||
;;; hook for reftex
|
||||
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
|
||||
|
||||
;;; hook for autocomplete.
|
||||
(add-hook 'TeX-mode-hook 'ac-latex-mode-setup)
|
||||
|
||||
;;; hook for auto fill mode
|
||||
(add-hook 'TeX-mode-hook 'auto-fill-mode)
|
||||
|
||||
;;; hook for latex math mode
|
||||
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
|
||||
|
||||
;;; hook for rainbox delimiters mode
|
||||
(add-hook 'TeX-mode-hook #'rainbow-delimiters-mode)
|
||||
|
||||
; themes
|
||||
|
||||
;; enable bold and italic
|
||||
(setq doom-themes-enable-bold t
|
||||
doom-themes-enable-italic t)
|
||||
|
||||
;;; enable doom one theme
|
||||
(load-theme 'doom-one t)
|
||||
|
||||
;;; enable flashing mode-line on errors
|
||||
(doom-themes-visual-bell-config)
|
||||
|
||||
;;; enable neotree theme
|
||||
(doom-themes-neotree-config)
|
||||
|
|
Loading…
Reference in a new issue