|
|
@@ -802,26 +802,26 @@ operations. |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
*** Code completion |
|
|
|
[[https://company-mode.github.io/][company]] comlpetes anything in the buffer |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package company |
|
|
|
:ensure t |
|
|
|
:hook (after-init . global-company-mode) |
|
|
|
:general |
|
|
|
(:keymaps 'company-active-map |
|
|
|
"C-SPC" 'company-abort) |
|
|
|
:config |
|
|
|
(setq company-maximum-prefix-length 3 |
|
|
|
company-idle-delay 0.2)) |
|
|
|
|
|
|
|
;; Documentation popups with company, works best with gui |
|
|
|
(when window-system |
|
|
|
(use-package company-quickhelp |
|
|
|
:ensure t |
|
|
|
:after company |
|
|
|
:hook (company-mode . company-quickhelp-mode))) |
|
|
|
#+END_SRC |
|
|
|
[[https://company-mode.github.io/][company]] comlpetes anything in the buffer |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package company |
|
|
|
:ensure t |
|
|
|
:hook (after-init . global-company-mode) |
|
|
|
:general |
|
|
|
(:keymaps 'company-active-map |
|
|
|
"C-SPC" 'company-abort) |
|
|
|
:config |
|
|
|
(setq company-maximum-prefix-length 3 |
|
|
|
company-idle-delay 0.2)) |
|
|
|
|
|
|
|
;; Documentation popups with company, works best with gui |
|
|
|
(when window-system |
|
|
|
(use-package company-quickhelp |
|
|
|
:ensure t |
|
|
|
:after company |
|
|
|
:hook (company-mode . company-quickhelp-mode))) |
|
|
|
#+END_SRC |
|
|
|
** Snippets |
|
|
|
Powered by Yasnippet |
|
|
|
|
|
|
@@ -877,32 +877,32 @@ use =ga= and =gA= to hint letters n stuff. |
|
|
|
#+END_SRC |
|
|
|
** org-mode |
|
|
|
*** Master org package |
|
|
|
Keep org-mode up to date straight from the cow's utters. |
|
|
|
If the manual is not on your computer, it's [[https://orgmode.org/manual/][here]]. |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package org |
|
|
|
:ensure t |
|
|
|
:ensure org-plus-contrib |
|
|
|
:pin org |
|
|
|
:general |
|
|
|
(wiz-major-def |
|
|
|
:keymaps 'org-capture-mode-map |
|
|
|
"c" 'org-capture-finalize |
|
|
|
"w" 'org-capture-refile |
|
|
|
"k" 'org-capture-kill) |
|
|
|
(wiz-major-def |
|
|
|
:keymaps 'org-mode-map |
|
|
|
"e" 'org-export-dispatch) |
|
|
|
(wiz-org-def |
|
|
|
"a" 'org-agenda |
|
|
|
"l" 'org-store-link |
|
|
|
"b" 'org-switch)) |
|
|
|
|
|
|
|
(use-package org-contacts |
|
|
|
:ensure nil |
|
|
|
:after org |
|
|
|
:custom (org-contacts-files '("~/Documents/org/contacts.org"))) |
|
|
|
#+END_SRC |
|
|
|
Keep org-mode up to date straight from the cow's utters. |
|
|
|
If the manual is not on your computer, it's [[https://orgmode.org/manual/][here]]. |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package org |
|
|
|
:ensure t |
|
|
|
:ensure org-plus-contrib |
|
|
|
:pin org |
|
|
|
:general |
|
|
|
(wiz-major-def |
|
|
|
:keymaps 'org-capture-mode-map |
|
|
|
"c" 'org-capture-finalize |
|
|
|
"w" 'org-capture-refile |
|
|
|
"k" 'org-capture-kill) |
|
|
|
(wiz-major-def |
|
|
|
:keymaps 'org-mode-map |
|
|
|
"e" 'org-export-dispatch) |
|
|
|
(wiz-org-def |
|
|
|
"a" 'org-agenda |
|
|
|
"l" 'org-store-link |
|
|
|
"b" 'org-switch)) |
|
|
|
|
|
|
|
(use-package org-contacts |
|
|
|
:ensure nil |
|
|
|
:after org |
|
|
|
:custom (org-contacts-files '("~/Documents/org/contacts.org"))) |
|
|
|
#+END_SRC |
|
|
|
*** Pretty bullets |
|
|
|
Make bullets look choice |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
@@ -913,28 +913,28 @@ use =ga= and =gA= to hint letters n stuff. |
|
|
|
*** org-download |
|
|
|
For [[https://github.com/abo-abo/org-download][drag n drop]] images n stuff |
|
|
|
# #+BEGIN_SRC emacs-lisp |
|
|
|
(use-package org-download |
|
|
|
:after org |
|
|
|
:pin melpa |
|
|
|
# (use-package org-download |
|
|
|
# :after org |
|
|
|
# :pin melpa |
|
|
|
# :ensure t |
|
|
|
# :hook (dired-mode . org-download-enable)) |
|
|
|
# #+END_SRC |
|
|
|
** Startup splash screen |
|
|
|
Show a custom buffer on startup |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package dashboard |
|
|
|
:ensure t |
|
|
|
:hook (dired-mode . org-download-enable)) |
|
|
|
:config |
|
|
|
(dashboard-setup-startup-hook) |
|
|
|
(setq dashboard-banner-logo-title "Electronic Macs") |
|
|
|
(setq dashboard-startup-banner wiz-startpic) |
|
|
|
(setq dashboard-items '((recents . 5) |
|
|
|
(agenda) |
|
|
|
(projects . 5) |
|
|
|
(bookmarks . 5) |
|
|
|
(registers . 5)))) |
|
|
|
#+END_SRC |
|
|
|
** Startup splash screen |
|
|
|
Show a custom buffer on startup |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package dashboard |
|
|
|
:ensure t |
|
|
|
:config |
|
|
|
(dashboard-setup-startup-hook) |
|
|
|
(setq dashboard-banner-logo-title "Electronic Macs") |
|
|
|
(setq dashboard-startup-banner wiz-startpic) |
|
|
|
(setq dashboard-items '((recents . 5) |
|
|
|
(agenda) |
|
|
|
(projects . 5) |
|
|
|
(bookmarks . 5) |
|
|
|
(registers . 5)))) |
|
|
|
#+END_SRC |
|
|
|
|
|
|
|
|
|
|
|
** Tags |
|
|
|
make tag files. |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
@@ -995,116 +995,22 @@ Irony handles enhanced C / C++ operations powered by clang |
|
|
|
:config |
|
|
|
(add-to-list 'company-backends 'company-irony)) |
|
|
|
#+END_SRC |
|
|
|
**** Snippets |
|
|
|
Enable yasnippet on c / c++ modes |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
#+END_SRC |
|
|
|
*** Clojure |
|
|
|
Now that I'm going to be trying out this live-coding thing, I'm going |
|
|
|
to need some clojure modes for working with [[http://overtone.github.io/docs.html][overtone]]. [[http://cider.readthedocs.io/en/latest/][cider]] provides |
|
|
|
REPL integration with emacs and company highlighting. Obviously, |
|
|
|
[[https://github.com/clojure-emacs/clojure-mode/][clojure-mode]] just gives clojure highlighting n stuff. See also: the |
|
|
|
clojure wiki page for [[http://clojure-doc.org/articles/tutorials/emacs.html][integrating with emacs]]. |
|
|
|
|
|
|
|
Essentially, you need to add the following to =~/.lein/profiles.clj=: |
|
|
|
#+BEGIN_SRC clojure |
|
|
|
{:repl {:plugins [[cider/cider-nrepl "0.17.0"]]}} |
|
|
|
#+END_SRC |
|
|
|
Note that you need to keep this updated to the current =cider-nrepl= |
|
|
|
version. You can =lein search cider-nrepl= in a terminal for this. |
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
;; Needed for cider I guess |
|
|
|
(use-package sesman |
|
|
|
:ensure t) |
|
|
|
(use-package clojure-mode |
|
|
|
:pin melpa |
|
|
|
:ensure t |
|
|
|
:defer t) |
|
|
|
(use-package cider |
|
|
|
:pin melpa |
|
|
|
:after (clojure-mode company) |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:hook ((cider-repl-mode . company-mode) |
|
|
|
(cider-mode . company-mode) |
|
|
|
(cider-repl-mode . cider-company-enable-fuzzy-completion) |
|
|
|
(cider-mode . cider-company-enable-fuzzy-completion))) |
|
|
|
(use-package clojure-snippets |
|
|
|
:after (clojure-mode yasnippet) |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:config |
|
|
|
(add-to-list 'clojure-mode-hook 'yas-minor-mode)) |
|
|
|
#+END_SRC |
|
|
|
*** Elixir |
|
|
|
[[https://alchemist.readthedocs.io/en/latest/][Alchemist]] provides various elixir extensions. |
|
|
|
|
|
|
|
[[https://github.com/emacs-evil/evil-collection/blob/master/evil-collection-alchemist.el][Evil Collection]] bindings are avaliable |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package elixir-mode |
|
|
|
:defer t |
|
|
|
:ensure t) |
|
|
|
|
|
|
|
(use-package alchemist |
|
|
|
:defer t |
|
|
|
:ensure t |
|
|
|
:after elixir-mode |
|
|
|
:init |
|
|
|
(add-to-list 'elixir-mode-hook 'alchemist-mode) |
|
|
|
(add-to-list 'elixir-mode-hook 'company-mode)) |
|
|
|
#+END_SRC |
|
|
|
*** Javascript |
|
|
|
**** Better editing mode |
|
|
|
[[https://github.com/mooz/js2-mode][js2-mode]] for help editing java files. Keybindings in [[https://github.com/emacs-evil/evil-collection/blob/master/evil-collection-js2-mode.el][this file]]. |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package js2-mode |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:hook (js2-mode . yas-minor-mode) |
|
|
|
:init |
|
|
|
(add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode)) |
|
|
|
(add-to-list 'interpreter-mode-alist '("node" . js2-mode))) |
|
|
|
#+END_SRC |
|
|
|
**** Completion |
|
|
|
Use [[http://ternjs.net/doc/manual.html][tern]] to help complete javascript snippets. |
|
|
|
*** Python |
|
|
|
**** jedi for autocompletion sources n stuff |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package company-tern |
|
|
|
(use-package company-jedi |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:init |
|
|
|
(defun wiz-js2-company-mode-hook () |
|
|
|
(add-to-list 'company-backends 'company-tern)) |
|
|
|
(add-hook 'js2-mode-hook 'wiz-js2-company-mode-hook)) |
|
|
|
#+END_SRC |
|
|
|
*** Markdown |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package markdown-mode |
|
|
|
:ensure t) |
|
|
|
#+END_SRC |
|
|
|
*** Powershell |
|
|
|
Enable a powershell mode |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package powershell |
|
|
|
:pin melpa |
|
|
|
:ensure t) |
|
|
|
(defun wiz-python-company-mode-hook () |
|
|
|
(add-to-list 'company-backends 'company-jedi)) |
|
|
|
(add-hook 'python-mode-hook 'wiz-python-company-mode-hook) |
|
|
|
(setq python-environment-virtualenv '("virtualenv" "--system-site-packages" "--quiet")) |
|
|
|
(setq jedi:environment-root "jedi") ; or any other name you like |
|
|
|
(setq jedi:environment-virtualenv |
|
|
|
(append python-environment-virtualenv |
|
|
|
'("--python" "/usr/bin/python3")))) |
|
|
|
#+END_SRC |
|
|
|
*** Python |
|
|
|
**** jedi for autocompletion sources n stuff |
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
(use-package company-jedi |
|
|
|
:ensure t |
|
|
|
:defer t |
|
|
|
:init |
|
|
|
(defun wiz-python-company-mode-hook () |
|
|
|
(add-to-list 'company-backends 'company-jedi)) |
|
|
|
(add-hook 'python-mode-hook 'wiz-python-company-mode-hook) |
|
|
|
(setq python-environment-virtualenv '("virtualenv" "--system-site-packages" "--quiet")) |
|
|
|
(setq jedi:environment-root "jedi") ; or any other name you like |
|
|
|
(setq jedi:environment-virtualenv |
|
|
|
(append python-environment-virtualenv |
|
|
|
'("--python" "/usr/bin/python3")))) |
|
|
|
#+END_SRC |
|
|
|
*** Web Development |
|
|
|
**** Web mode |
|
|
|
Should give everything you need for a web-dev major mode, except for |
|
|
|