Golden ratio mode for resizing buffers to comfortable dimensions.
(golden-ratio-mode t)
Langtool path for grammar checking and its keybindings.
(use-package langtool
:config
;; executable path
(setq langtool-language-tool-jar "~/LanguageTool-3.3/languagetool-commandline.jar")
;; keybindings
(spacemacs/set-leader-keys
"olb" 'langtool-check-buffer
"ola" 'langtool-check
"olc" 'langtool-correct-buffer
"old" 'langtool-check-done
"olm" 'langtool-show-message-at-point
"olp" 'langtool-goto-next-error
"oln" 'langtool-goto-previous-error
"oll" 'langtool-switch-default-language))
Emacs apt keybindings.
(use-package emacs-apt
:config
(spacemacs/set-leader-keys
"oaD" 'apt-download
"oaS" 'apt-source
"oaU" 'apt-update
"oaa" 'apt-autoremove
"oac" 'apt-changelog
"oad" 'apt-depends
"oai" 'apt-install
"oap" 'apt-purge
"oaP" 'apt-showpkg
"oap" 'apt-showpkg
"oaR" 'apt-showrc
"oar" 'apt-remove
"oas" 'apt-search
"oat" 'apt-stats
"oag" 'apt-dump
"oaG" 'apt-dumpavail
"oae" 'apt-rdepends
"oan" 'apt-pkgnames
"oao" 'apt-dotty
"oax" 'apt-xvcg
"oam" 'apt-madison
"oal" 'apt-policy
"oau" 'apt-upgrade))
C# omnisharp server path for IDE features. Unfortunately, it requires solution files.
(setq omnisharp-server-executable-path "/home/cgroza/omnisharp-server/OmniSharp/bin/Debug/OmniSharp.exe")
Cabal load path for Haskell binaries and libraries.
(let ((my-cabal-path (expand-file-name "~/.cabal/bin")))
(setenv "PATH" (concat my-cabal-path ":" (getenv "PATH")))
(add-to-list 'exec-path my-cabal-path))
Relative line numbers.
(use-package linum-relative
:config
(global-linum-mode)
(linum-relative-on))
Custom keybindings for inserting files and deleting lines.
(spacemacs/set-leader-keys
"oif" 'ido-insert-file
"oib" 'ido-insert-buffer
"odl" 'delete-blank-lines)
Org configuration for language support, keywords, agenda and custom functions.
;; python org mode support
(use-package ob-python)
(setq org-src-fontify-natively t)
(setq org-todo-keywords
'((sequence "TODO(t)" "WAITING(w)" "DOING(d)" "|" "DONE(D)")))
(add-hook 'org-mode-hook 'org-agenda-file-to-front)
;; miscellaneous utilities
(use-package org-block-surround
:config
(spacemacs/set-leader-keys "oos" 'org-block-surround-region))
Text mode hooks for word processing.
(add-hook 'text-mode-hook 'auto-fill-mode)
(add-hook 'text-mode-hook (lambda () (setq line-spacing 0.5)))
Smart parens configuration.
(smartparens-global-mode)
(show-paren-mode t)
Gnus for mail.
(setq gnus-ignored-newsgroups "^to\\.\\|^[0-9. ]+\\( \\|$\\)\\|^[\"]\"[#'()]")
Custom latex utilities.
(use-package latex-pages)
Text display settings such as global visual line and fringe mode.
(global-visual-line-mode t)
(set-fringe-mode '(1 . 1))
Pdf-tools and latex.
(when (eq system-type 'gnu/linux)
(use-package pdf-tools
:ensure t
:config
(pdf-tools-install)
(setq TeX-view-program-selection '((output-pdf "pdf-tools")))
(setq TeX-view-program-list '(("pdf-tools" "TeX-pdf-tools-sync-view")))))
(defun th/pdf-view-revert-buffer-maybe (file)
(let ((buf (find-buffer-visiting file)))
(when buf
(with-current-buffer buf
(when (derived-mode-p 'pdf-view-mode)
(pdf-view-revert-buffer nil t))))))
(add-hook 'TeX-after-TeX-LaTeX-command-finished-hook
#'th/pdf-view-revert-buffer-maybe)