| | |
| | | (setenv "PATH" (mapconcat #'identity exec-path path-separator)))
|
| | | ((eq system-type 'darwin)
|
| | | (use-package exec-path-from-shell
|
| | | :ensure t
|
| | | :config
|
| | | (exec-path-from-shell-initialize))
|
| | | (setq default-directory "~/")))
|
| | |
| | |
|
| | | (cond ((eq emacs-theme 'zenburn)
|
| | | (use-package zenburn-theme
|
| | | :ensure t
|
| | | :init
|
| | | (disable-all-themes)
|
| | | :config
|
| | | (load-theme 'zenburn t)))
|
| | | ((eq emacs-theme 'doom-one)
|
| | | (use-package doom-themes
|
| | | :ensure t
|
| | | :init
|
| | | (disable-all-themes)
|
| | | :config
|
| | |
| | | (doom-themes-org-config)))
|
| | | ((eq emacs-theme 'nord)
|
| | | (use-package nord-theme
|
| | | :ensure t
|
| | | :init
|
| | | (disable-all-themes)
|
| | | :config
|
| | | (load-theme 'nord t)))
|
| | | ((eq emacs-theme 'solarized)
|
| | | (use-package solarized-theme
|
| | | :ensure t
|
| | | :init
|
| | | (disable-all-themes)
|
| | | :config
|
| | | (load-theme 'solarized-dark t)))
|
| | | ((eq emacs-theme 'jetbrains-darcula)
|
| | | (use-package jetbrains-darcula-theme
|
| | | :ensure t
|
| | | :init
|
| | | (disable-all-themes)
|
| | | :config
|
| | |
| | | Open external applications with =s-&=
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package exwm
|
| | | :ensure t
|
| | | :defer t
|
| | | :config
|
| | | (require 'exwm-config)
|
| | |
| | | Use aspell for spellchecking.
|
| | | Auto-enable in latex and org as they're the main writing modes.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (require 'ispell)
|
| | | (setq-default ispell-program-name "aspell")
|
| | | (setq-default ispell-local-dictionary "en_AU")
|
| | | (add-hook 'tex-mode-hook 'flyspell-mode)
|
| | | (add-hook 'latex-mode-hook 'flyspell-mode)
|
| | | (add-hook 'TeX-mode-hook 'flyspell-mode)
|
| | | (add-hook 'LaTeX-mode-hook 'flyspell-mode)
|
| | | ;; (require 'ispell)
|
| | | ;; (setq-default ispell-program-name "aspell")
|
| | | ;; (setq-default ispell-local-dictionary "en_AU")
|
| | | ;; (add-hook 'tex-mode-hook 'flyspell-mode)
|
| | | ;; (add-hook 'latex-mode-hook 'flyspell-mode)
|
| | | ;; (add-hook 'TeX-mode-hook 'flyspell-mode)
|
| | | ;; (add-hook 'LaTeX-mode-hook 'flyspell-mode)
|
| | | ;; (add-hook 'latex-mode-hook 'flyspell-buffer)
|
| | | (add-hook 'org-mode-hook 'flyspell-mode)
|
| | | ;; (add-hook 'org-mode-hook 'flyspell-mode)
|
| | | ;; (add-hook 'org-mode-hook 'flyspell-buffer)
|
| | | (diminish 'flyspell-mode)
|
| | |
|
| | | ;; (diminish 'flyspell-mode)
|
| | | (use-package flyspell
|
| | | :hook (tex-mode latex-mode TeX-mode LaTeX-mode org-mode)
|
| | | :diminish flyspell-mode
|
| | | :config
|
| | | (setq-default ispell-program-name "aspell")
|
| | | (setq-default ispell-local-dictionary "en_AU"))
|
| | | #+END_SRC
|
| | | ** COMMENT Language Tool
|
| | | Language tool is an open source grammar checker.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package langtool
|
| | | :ensure t
|
| | | :init
|
| | | (setq langtool-java-classpath "/usr/share/languagetool:/usr/share/java/languagetool/*"))
|
| | | #+END_SRC
|
| | |
| | | Helps to change windows easily when many are open at once.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package switch-window
|
| | | :ensure t
|
| | | :config
|
| | | ;; (setq switch-window-input-style 'minibuffer)
|
| | | (setq switch-window-threshold 2)
|
| | |
| | | Helpful pdf viewer.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package pdf-tools
|
| | | :ensure t
|
| | | :config
|
| | | (pdf-tools-install 1))
|
| | | #+END_SRC
|
| | |
| | | Supposedly should provide insight to writing quality.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package writegood-mode
|
| | | :ensure t
|
| | | :hook (text-mode . writegood-mode))
|
| | | #+END_SRC
|
| | |
|
| | |
| | | *** Enable it
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package projectile
|
| | | :ensure t
|
| | | :bind ("C-c p" . projectile-command-map)
|
| | | :diminish projectile-mode
|
| | | :config
|
| | |
| | | Use helm to manage project.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package helm-projectile
|
| | | :ensure t
|
| | | :config
|
| | | (helm-projectile-on))
|
| | | #+END_SRC
|
| | |
| | | Use GNU Global Tags. Can be useful for large projects.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package ggtags
|
| | | :ensure t
|
| | | :bind (("C-c g s" . ggtags-find-other-symbol)
|
| | | ("C-c g h" . ggtags-view-tag-history)
|
| | | ("C-c g r" . ggtags-find-reference)
|
| | |
| | | )
|
| | |
|
| | | (use-package helm-gtags
|
| | | :ensure t
|
| | | :config
|
| | | (add-hook 'dired-mode-hook 'helm-gtags-mode)
|
| | | (add-hook 'eshell-mode-hook 'helm-gtags-mode)
|
| | |
| | | Why not? They make it look nice.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package pretty-mode
|
| | | :ensure t
|
| | | :diminish t
|
| | | :if window-system
|
| | | :config
|
| | |
| | | Helps to explain keybindings if you get lost.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package which-key
|
| | | :ensure t
|
| | | :diminish which-key-mode
|
| | | :config
|
| | | (which-key-mode))
|
| | |
| | | Matches brackets automatically. Added "$" for latex in org mode.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package smartparens
|
| | | :ensure t
|
| | | :diminish smartparens-mode
|
| | | :config
|
| | | (progn
|
| | |
| | | Colours according to code after a "#", works with 3 and 6 character hex codes.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package rainbow-mode
|
| | | :ensure t
|
| | | :diminish rainbow-mode
|
| | | :init
|
| | | (add-hook 'prog-mode-hook 'rainbow-mode))
|
| | |
| | | Colours the brackets so that they stand out more.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package rainbow-delimiters
|
| | | :ensure t
|
| | | :hook (prog-mode . rainbow-delimiters-mode))
|
| | | #+END_SRC
|
| | |
|
| | |
| | | Removes unnecessary white space
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package clean-aindent-mode
|
| | | :ensure t
|
| | | :hook prog-mode)
|
| | | #+END_SRC
|
| | | Shows trailing white space
|
| | |
| | | Use M-x keyfreq-show to show in emacs or M-x keyfreq-html to output
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package keyfreq
|
| | | :ensure t
|
| | | :config
|
| | | (keyfreq-mode 1)
|
| | | (keyfreq-autosave-mode 1))
|
| | |
| | | Pretty neat, if seldom used.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package undo-tree
|
| | | :ensure t
|
| | | :diminish undo-tree-mode
|
| | | :config
|
| | | (global-undo-tree-mode))
|
| | |
| | | Colour the material just copied
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package volatile-highlights
|
| | | :ensure t
|
| | | :diminish volatile-highlights-mode
|
| | | :config
|
| | | (volatile-highlights-mode t))
|
| | |
| | | Tabs for indentation, spaces for alignment
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package smart-tabs-mode
|
| | | :ensure t
|
| | | :config
|
| | | (smart-tabs-insinuate 'c 'c++ 'java 'javascript 'cperl 'python 'ruby
|
| | | 'nxml))
|
| | |
| | | Hate having to re-input passwords.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package tramp
|
| | | :ensure t
|
| | | :pin gnu
|
| | | :config
|
| | | ;; (setq tramp-default-method "ssh")
|
| | |
| | | Want to make work but need to find a good way of doing so.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package sublimity
|
| | | :ensure t
|
| | | :config
|
| | | (require 'sublimity-scroll)
|
| | | (setq sublimity-scroll-weight 4
|
| | |
| | | (sublimity-mode 1))
|
| | |
|
| | | (use-package minimap
|
| | | :ensure t
|
| | | :config
|
| | | (minimap-mode))
|
| | | #+END_SRC
|
| | |
| | | Vertical demarcations for indent levels
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package highlight-indentation
|
| | | :ensure t
|
| | | :hook (prog-mode . highlight-indentation-mode))
|
| | | #+END_SRC
|
| | | * Mode line tweaks
|
| | |
| | | A little easier to read than the default emacs mode line.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package spaceline
|
| | | :ensure t
|
| | | :config
|
| | | (require 'spaceline-config)
|
| | | (setq spaceline-buffer-encoding-abbrev-p t)
|
| | |
| | | Use nyan cat as a reference for buffer progression.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package nyan-mode
|
| | | :ensure t
|
| | | :config
|
| | | (nyan-mode 1))
|
| | | #+END_SRC
|
| | |
| | | Manually added snippets are in ~/.emacs.d/snippets/{mode}.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package yasnippet
|
| | | :ensure t
|
| | | :diminish yas-minor-mode
|
| | | :config
|
| | | (yas-global-mode 1))
|
| | |
|
| | | (use-package yasnippet-snippets
|
| | | :ensure t
|
| | | :after yasnippet)
|
| | | #+END_SRC
|
| | |
|
| | | ** Flycheck
|
| | | Basic linter. Works pretty well.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package flycheck
|
| | | :ensure t
|
| | | :diminish flycheck-mode
|
| | | :config
|
| | | (global-flycheck-mode))
|
| | |
| | | Add suggestions at the cursor.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package flycheck-pos-tip
|
| | | :ensure t
|
| | | :after flycheck
|
| | | :config
|
| | | (flycheck-pos-tip-mode))
|
| | |
| | | Uses various backends, more of which are added later.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package company
|
| | | :ensure t
|
| | | :diminish company-mode
|
| | | :config
|
| | | (global-company-mode)
|
| | |
| | | Need to generate ~compile_flags~ for c/c++, can use ~bear~ but may need other tools.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package lsp-mode
|
| | | :ensure t
|
| | | :hook (((c-mode
|
| | | c++-mode
|
| | | tex-mode
|
| | |
| | | (add-to-list 'exec-path "~/.cargo/bin"))
|
| | |
|
| | | (use-package lsp-ui
|
| | | :ensure t
|
| | | :commands lsp-ui-mode)
|
| | |
|
| | | (use-package helm-lsp
|
| | | :ensure t
|
| | | :commands helm-lsp-workspace-symbol)
|
| | | #+END_SRC
|
| | |
|
| | |
| | | Pretty good and offers fairly decent features.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package magit
|
| | | :ensure t
|
| | | :commands magit-get-top-dir
|
| | | :bind ("C-x g" . magit-status)
|
| | | :init
|
| | |
| | | Gerrit takes ~origin:refs/for/master~ as a destination.
|
| | | Enable magit to work with its oddities.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package magit-gerrit
|
| | | :ensure t)
|
| | | (use-package magit-gerrit)
|
| | | #+END_SRC
|
| | |
|
| | | ** CEDET
|
| | |
| | | Should help to refactor file.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package srefactor
|
| | | :ensure t
|
| | | :bind (("M-RET o" . 'srefactor-lisp-one-line)
|
| | | ("M-RET m" . 'srefactor-lisp-format-sexp)
|
| | | ("M-RET d" . 'srefactor-lisp-format-defun)
|
| | |
| | | Add the clang backend for linting.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package flycheck-clang-analyzer
|
| | | :ensure t
|
| | | :after flycheck
|
| | | :config
|
| | | (with-eval-after-load 'flycheck
|
| | |
| | | Add header completion as well as Irony, which uses clang for suggestions.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package company-c-headers
|
| | | :ensure t
|
| | | :after company
|
| | | :config
|
| | | (add-hook 'c++-mode-hook 'company-mode)
|
| | |
| | | **** COMMENT Irony
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package irony
|
| | | :ensure t
|
| | | :init
|
| | | (setq w32-pipe-read-delay 0)
|
| | | (setq irony-server-w32-pipe-buffer-size (* 64 1024))
|
| | |
| | | (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options))
|
| | |
|
| | | (use-package company-irony
|
| | | :ensure t
|
| | | :after irony
|
| | | :config
|
| | | (add-to-list 'company-backends '(company-c-headers
|
| | |
| | | "IndentCaseLabels: false}"))))
|
| | |
|
| | | (use-package clang-format
|
| | | :ensure t
|
| | | :hook (c-mode-common . (set-clang-format-style)))
|
| | |
|
| | | ;; (defun clang-format-on-save ()
|
| | |
| | | (add-hook 'emacs-lisp-mode-hook 'company-mode)
|
| | |
|
| | | (use-package slime
|
| | | :ensure t
|
| | | :config
|
| | | (setq inferior-lisp-program "/usr/bin/sbcl")
|
| | | (setq slime-contribs '(slime-fancy)))
|
| | |
|
| | | (use-package slime-company
|
| | | :ensure t
|
| | | :init
|
| | | (require 'company)
|
| | | (slime-setup '(slime-fancy slime-company)))
|
| | |
| | | Look up reference PDF. Use Intel manual.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package x86-lookup
|
| | | :ensure t
|
| | | :init
|
| | | (setq x86-lookup-pdf "D:/Coding/x86-instructions.pdf")
|
| | | :bind ("C-h x" . x86-lookup))
|
| | |
| | | Help company complete tex math and references.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package company-math
|
| | | :ensure t
|
| | | :after company
|
| | | :config
|
| | | (add-to-list 'company-backends '(company-math-symbols-unicode company-math-symbols-latex
|
| | |
| | | (setq company-math-allow-latex-symbols-in-faces t))
|
| | |
|
| | | (use-package company-reftex
|
| | | :ensure t
|
| | | :after company
|
| | | :config
|
| | | (add-to-list 'company-backends 'company-reftex-citations))
|
| | |
|
| | | (use-package company-auctex
|
| | | :ensure t
|
| | | :after company
|
| | | :config
|
| | | (company-auctex-init))
|
| | |
|
| | | (use-package company-bibtex
|
| | | :ensure t
|
| | | :after company
|
| | | (add-to-list 'company-backends 'company-bibtex))
|
| | | #+END_SRC
|
| | |
| | | Sets the PlantUML path for the mode to generate models.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package plantuml-mode
|
| | | :ensure t
|
| | | :init
|
| | | (cond ((eq system-type 'windows-nt)
|
| | | (when (file-exists-p "c:/ProgramData/chocolatey/lib/plantuml/tools/plantuml.jar")
|
| | |
| | | (setenv "PATH" (mapconcat #'identity exec-path path-separator)))
|
| | |
|
| | | (use-package racket-mode
|
| | | :ensure t
|
| | | :config
|
| | | (autoload 'racket-mode "Racket" "Racket Editing Mode" t)
|
| | | (add-to-list
|
| | |
| | | Use latest version from repositories.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package verilog-mode
|
| | | :ensure t
|
| | | :pin gnu
|
| | | :config
|
| | | (autoload 'verilog-mode "verilog-mode" "Verilog mode" t )
|
| | |
| | | For editing MIPS assembly.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package mips-mode
|
| | | :ensure t
|
| | | :mode "\\.mips$")
|
| | | #+END_SRC
|
| | |
|
| | | *** COMMENT IPython notebooks
|
| | | Allow emacs to view and use IPython notebooks
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package ein
|
| | | :ensure t)
|
| | | (use-package ein)
|
| | | #+END_SRC
|
| | |
|
| | | *** Rust
|
| | |
| | | Get the major mode for rust files.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package rust-mode
|
| | | :ensure t
|
| | | :config
|
| | | ;; style guide suggests spaces not tabs
|
| | | (add-hook 'rust-mode-hook (lambda () (setq indent-tabs-mode nil)))
|
| | | (setq rust-format-on-save t))
|
| | |
|
| | | (use-package toml-mode
|
| | | :ensure t)
|
| | | (use-package toml-mode)
|
| | | #+END_SRC
|
| | | **** Cargo integration
|
| | | Integrate Cargo, rust's package manager.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package cargo
|
| | | :ensure t
|
| | | :hook
|
| | | (rust-mode . cargo-minor-mode))
|
| | | #+END_SRC
|
| | |
| | | Linting with flycheck.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package flycheck-rust
|
| | | :ensure t
|
| | | :config
|
| | | (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))
|
| | | #+END_SRC
|
| | |
| | | **** Major mode
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package go-mode
|
| | | :ensure t
|
| | | :config
|
| | | (add-hook 'before-save-hook #'gofmt-before-save))
|
| | | #+END_SRC
|
| | |
| | | **** Flycheck
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package flycheck-golangci-lint
|
| | | :ensure t
|
| | | :config
|
| | | (add-hook 'flycheck-mode-hook #'flycheck-golangci-lint-setup))
|
| | | #+END_SRC
|
| | | **** Company
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package company-go
|
| | | :ensure t)
|
| | | (use-package company-go)
|
| | | #+END_SRC
|
| | | * Org mode
|
| | | ** Up to date org
|
| | |
| | | Use bullets of different colours and styles instead of the "\*\*\*" to denote indentation levels.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package org-superstar
|
| | | :ensure t
|
| | | :config
|
| | | (add-hook 'org-mode-hook (lambda () (org-superstar-mode 1))))
|
| | | #+END_SRC
|
| | |
| | | Allow the editing of files while execution of blocks is occurring.
|
| | | Needs :async tag in src header.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package ob-async
|
| | | :ensure t)
|
| | | (use-package ob-async)
|
| | | #+END_SRC
|
| | |
|
| | | ** Latex preview fragments match colour
|
| | |
| | | Call pandoc on org buffer from org export.
|
| | | Need to add ~#+OPTIONS: H:99~ to enable large level header exports.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package ox-pandoc
|
| | | :ensure t)
|
| | | (use-package ox-pandoc)
|
| | | #+END_SRC
|
| | |
|
| | | *** COMMENT Dokuwiki Wiki
|
| | | Allow export to dokuwiki markup from org.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package ox-wk
|
| | | :ensure t)
|
| | | (use-package ox-wk)
|
| | | #+END_SRC
|
| | |
|
| | | * COMMENT EMMS
|
| | |
| | | Copied and modified from the example configuration.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package org-static-blog
|
| | | :ensure t
|
| | | :config
|
| | | (setq org-static-blog-publish-title "Joel's Site")
|
| | | (setq org-static-blog-publish-url "https://blog.joelg.cf/")
|
| | |
| | | Allow org features to be exported to HTML for site.
|
| | | #+BEGIN_SRC emacs-lisp
|
| | | (use-package htmlize
|
| | | :ensure t
|
| | | :defer t)
|
| | | #+END_SRC
|
| | |
|