mirror of
https://gitlab.com/dwt1/dotfiles.git
synced 2026-04-21 18:40:26 +10:00
Moving to Doom Emacs!
This commit is contained in:
569
.emacs.d/docs/api.org
Normal file
569
.emacs.d/docs/api.org
Normal file
@@ -0,0 +1,569 @@
|
||||
#+TITLE: API Demos
|
||||
#+PROPERTY: header-args:elisp :results pp
|
||||
|
||||
This appendix serves as a reference on how to use Doom Emacs' standard library.
|
||||
It is integrated into Helpful, in Doom.
|
||||
|
||||
* Table of Contents :TOC_3:
|
||||
- [[#examples-for-dooms-library][Examples for Doom's library]]
|
||||
- [[#core-lib][core-lib]]
|
||||
- [[#add-hook][add-hook!]]
|
||||
- [[#add-transient-hook][add-transient-hook!]]
|
||||
- [[#after][after!]]
|
||||
- [[#appendq][appendq!]]
|
||||
- [[#custom-set-faces][custom-set-faces!]]
|
||||
- [[#custom-theme-set-faces][custom-theme-set-faces!]]
|
||||
- [[#defer-feature][defer-feature!]]
|
||||
- [[#defer-until][defer-until!]]
|
||||
- [[#disable-packages][disable-packages!]]
|
||||
- [[#doom][doom!]]
|
||||
- [[#file-exists-p][file-exists-p!]]
|
||||
- [[#lambda][lambda!]]
|
||||
- [[#lambda-1][lambda!!]]
|
||||
- [[#letenv][letenv!]]
|
||||
- [[#load][load!]]
|
||||
- [[#map][map!]]
|
||||
- [[#package][package!]]
|
||||
- [[#pushnew][pushnew!]]
|
||||
- [[#prependq][prependq!]]
|
||||
- [[#quiet][quiet!]]
|
||||
- [[#remove-hook][remove-hook!]]
|
||||
- [[#setq-hook][setq-hook!]]
|
||||
- [[#unsetq-hook][unsetq-hook!]]
|
||||
- [[#use-package][use-package!]]
|
||||
- [[#interesting-snippets][Interesting snippets]]
|
||||
- [[#persist-emacs-initial-frame-size-across-sessions][Persist Emacs' initial frame size across sessions]]
|
||||
- [[#persist-emacs-initial-frame-position-dimensions-andor-full-screen-state-across-sessions][Persist Emacs' initial frame position, dimensions and/or full-screen state across sessions]]
|
||||
- [[#update-cursor-shape-under-terminal-emacs][Update cursor shape under terminal Emacs]]
|
||||
|
||||
* Examples for Doom's library
|
||||
** core-lib
|
||||
*** add-hook!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; With only one hook and one function, this is identical to `add-hook'. In that
|
||||
;; case, use that instead.
|
||||
(add-hook! 'some-mode-hook #'enable-something)
|
||||
|
||||
;; Adding many-to-many functions to hooks
|
||||
(add-hook! some-mode #'enable-something #'and-another)
|
||||
(add-hook! some-mode #'(enable-something and-another))
|
||||
(add-hook! '(one-mode-hook second-mode-hook) #'enable-something)
|
||||
(add-hook! (one-mode second-mode) #'enable-something)
|
||||
|
||||
;; Appending and local hooks
|
||||
(add-hook! (one-mode second-mode) :append #'enable-something)
|
||||
(add-hook! (one-mode second-mode) :local #'enable-something)
|
||||
|
||||
;; With arbitrary forms
|
||||
(add-hook! (one-mode second-mode) (setq v 5) (setq a 2))
|
||||
(add-hook! (one-mode second-mode) :append :local (setq v 5) (setq a 2))
|
||||
|
||||
;; Inline named hook functions
|
||||
(add-hook! '(one-mode-hook second-mode-hook)
|
||||
(defun do-something ()
|
||||
...)
|
||||
(defun do-another-thing ()
|
||||
...))
|
||||
#+END_SRC
|
||||
|
||||
*** TODO add-transient-hook!
|
||||
*** after!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;;; `after!' will take:
|
||||
|
||||
;; An unquoted package symbol (the name of a package)
|
||||
(after! helm ...)
|
||||
|
||||
;; An unquoted list of package symbols (i.e. BODY is evaluated once both magit
|
||||
;; and git-gutter have loaded)
|
||||
(after! (magit git-gutter) ...)
|
||||
|
||||
;; An unquoted, nested list of compound package lists, using any combination of
|
||||
;; :or/:any and :and/:all
|
||||
(after! (:or package-a package-b ...) ...)
|
||||
(after! (:and package-a package-b ...) ...)
|
||||
(after! (:and package-a (:or package-b package-c) ...) ...)
|
||||
;; (Without :or/:any/:and/:all, :and/:all are implied.)
|
||||
|
||||
;; A common mistake is to pass it the names of major or minor modes, e.g.
|
||||
(after! rustic-mode ...)
|
||||
(after! python-mode ...)
|
||||
;; But the code in them will never run! rustic-mode is in the `rustic' package
|
||||
;; and python-mode is in the `python' package. This is what you want:
|
||||
(after! rustic ...)
|
||||
(after! python ...)
|
||||
#+END_SRC
|
||||
*** appendq!
|
||||
#+BEGIN_SRC elisp
|
||||
(let ((x '(a b c)))
|
||||
(appendq! x '(c d e))
|
||||
x)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: (a b c c d e)
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(let ((x '(a b c))
|
||||
(y '(c d e))
|
||||
(z '(f g)))
|
||||
(appendq! x y z '(h))
|
||||
x)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: (a b c c d e f g h)
|
||||
|
||||
*** custom-set-faces!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(custom-set-faces!
|
||||
'(outline-1 :weight normal)
|
||||
'(outline-2 :weight normal)
|
||||
'(outline-3 :weight normal)
|
||||
'(outline-4 :weight normal)
|
||||
'(outline-5 :weight normal)
|
||||
'(outline-6 :weight normal)
|
||||
'(default :background "red" :weight bold)
|
||||
'(region :background "red" :weight bold))
|
||||
|
||||
(custom-set-faces!
|
||||
'((outline-1 outline-2 outline-3 outline-4 outline-5 outline-6)
|
||||
:weight normal)
|
||||
'((default region)
|
||||
:background "red" :weight bold))
|
||||
|
||||
(let ((red-bg-faces '(default region)))
|
||||
(custom-set-faces!
|
||||
`(,(cl-loop for i from 0 to 6 collect (intern (format "outline-%d" i)))
|
||||
:weight normal)
|
||||
`(,red-bg-faces
|
||||
:background "red" :weight bold)))
|
||||
|
||||
;; If you want to make use of the `doom-themes' package API (e.g. `doom-color',
|
||||
;; `doom-lighten', `doom-darken', etc.), you must use `custom-set-faces!'
|
||||
;; *after* the theme has been loaded. e.g.
|
||||
(load-theme 'doom-one t)
|
||||
(custom-set-faces!
|
||||
`(outline-1 :foreground ,(doom-color 'red))
|
||||
`(outline-2 :background ,(doom-color 'blue)))
|
||||
#+END_SRC
|
||||
|
||||
*** custom-theme-set-faces!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(custom-theme-set-faces! 'doom-one-theme
|
||||
'(outline-1 :weight normal)
|
||||
'(outline-2 :weight normal)
|
||||
'(outline-3 :weight normal)
|
||||
'(outline-4 :weight normal)
|
||||
'(outline-5 :weight normal)
|
||||
'(outline-6 :weight normal)
|
||||
'(default :background "red" :weight bold)
|
||||
'(region :background "red" :weight bold))
|
||||
|
||||
(custom-theme-set-faces! '(doom-one-theme doom-one-light-theme)
|
||||
'((outline-1 outline-2 outline-3 outline-4 outline-5 outline-6)
|
||||
:weight normal)
|
||||
'((default region)
|
||||
:background "red" :weight bold))
|
||||
|
||||
(let ((red-bg-faces '(default region)))
|
||||
(custom-theme-set-faces! '(doom-one-theme doom-one-light-theme)
|
||||
`(,(cl-loop for i from 0 to 6 collect (intern (format "outline-%d" i)))
|
||||
:weight normal)
|
||||
`(,red-bg-faces
|
||||
:background "red" :weight bold)))
|
||||
|
||||
;; If you want to make use of the `doom-themes' package API (e.g. `doom-color',
|
||||
;; `doom-lighten', `doom-darken', etc.), you must use `custom-set-faces!'
|
||||
;; *after* the theme has been loaded. e.g.
|
||||
(load-theme 'doom-one t)
|
||||
(custom-theme-set-faces! 'doom-one
|
||||
`(outline-1 :foreground ,(doom-color 'red))
|
||||
`(outline-2 :background ,(doom-color 'blue)))
|
||||
#+END_SRC
|
||||
|
||||
*** TODO defer-feature!
|
||||
*** TODO defer-until!
|
||||
*** disable-packages!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; Disable packages enabled by DOOM
|
||||
(disable-packages! some-package second-package)
|
||||
#+END_SRC
|
||||
|
||||
*** doom!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(doom! :completion
|
||||
company
|
||||
ivy
|
||||
;;helm
|
||||
|
||||
:tools
|
||||
(:if IS-MAC macos)
|
||||
docker
|
||||
lsp
|
||||
|
||||
:lang
|
||||
(cc +lsp)
|
||||
(:cond ((string= system-name "work-pc")
|
||||
python
|
||||
rust
|
||||
web)
|
||||
((string= system-name "writing-pc")
|
||||
(org +dragndrop)
|
||||
ruby))
|
||||
(:if IS-LINUX
|
||||
(web +lsp)
|
||||
web)
|
||||
|
||||
:config
|
||||
literate
|
||||
(default +bindings +smartparens))
|
||||
#+END_SRC
|
||||
|
||||
*** file-exists-p!
|
||||
#+BEGIN_SRC elisp
|
||||
(file-exists-p! "init.el" doom-emacs-dir)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: /home/hlissner/.emacs.d/init.el
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(file-exists-p! (and (or "doesnotexist" "init.el")
|
||||
"LICENSE")
|
||||
doom-emacs-dir)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: /home/hlissner/.emacs.d/LICENSE
|
||||
|
||||
*** lambda!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(map! "C-j" (lambda! (newline) (indent-according-to-mode)))
|
||||
|
||||
;; The `λ!' short-form alias exists. If you have the snippets module enabled and
|
||||
;; Doom's default snippets, the 'lam' snippet will expand into 'λ!'. Otherwise,
|
||||
;; you can use `lambda!'.
|
||||
(map! "C-j" (λ! (newline) (indent-according-to-mode)))
|
||||
#+END_SRC
|
||||
*** lambda!!
|
||||
When ~newline~ is passed a numerical prefix argument (=C-u 5 M-x newline=), it
|
||||
inserts N newlines. We can use ~lambda!!~ to easily create a keybinds that bakes
|
||||
in the prefix arg into the command call:
|
||||
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(map! "C-j" (lambda!! #'newline 5))
|
||||
|
||||
;; The `λ!!' short-form alias exists. If you have the snippets module enabled
|
||||
;; and Doom's default snippets, a 'lam' snippet is available to expand into
|
||||
;; 'λ!'. Otherwise, you can use `lambda!!'.
|
||||
(map! "C-j" (λ!! #'newline 5))
|
||||
#+END_SRC
|
||||
|
||||
Or to create aliases for functions that behave differently:
|
||||
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(fset 'insert-5-newlines (lambda!! #'newline 5))
|
||||
|
||||
;; The equivalent of C-u M-x org-global-cycle, which resets the org document to
|
||||
;; its startup visibility settings.
|
||||
(fset 'org-reset-global-visibility (lambda!! #'org-global-cycle '(4))
|
||||
#+END_SRC
|
||||
*** letenv!
|
||||
#+BEGIN_SRC elisp
|
||||
(letenv! (("SHELL" "/bin/sh"))
|
||||
(shell-command-to-string "echo $SHELL"))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: "/bin/sh\n"
|
||||
|
||||
*** load!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;;; Lets say we're in ~/.doom.d/config.el
|
||||
(load! "lisp/module") ; loads ~/.doom.d/lisp/module.el
|
||||
(load! "somefile" doom-emacs-dir) ; loads ~/.emacs.d/somefile.el
|
||||
(load! "anotherfile" doom-private-dir) ; loads ~/.doom.d/anotherfile.el
|
||||
|
||||
;; If you don't want a `load!' call to throw an error if the file doesn't exist:
|
||||
(load! "~/.maynotexist" nil t)
|
||||
#+END_SRC
|
||||
|
||||
*** map!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(map! :map magit-mode-map
|
||||
:m "C-r" 'do-something ; C-r in motion state
|
||||
:nv "q" 'magit-mode-quit-window ; q in normal+visual states
|
||||
"C-x C-r" 'a-global-keybind
|
||||
:g "C-x C-r" 'another-global-keybind ; same as above
|
||||
|
||||
(:when IS-MAC
|
||||
:n "M-s" 'some-fn
|
||||
:i "M-o" (lambda (interactive) (message "Hi"))))
|
||||
|
||||
(map! (:when (featurep! :completion company) ; Conditional loading
|
||||
:i "C-@" #'+company/complete
|
||||
(:prefix "C-x" ; Use a prefix key
|
||||
:i "C-l" #'+company/whole-lines)))
|
||||
|
||||
(map! (:when (featurep! :lang latex) ; local conditional
|
||||
(:map LaTeX-mode-map
|
||||
:localleader ; Use local leader
|
||||
:desc "View" "v" #'TeX-view)) ; Add which-key description
|
||||
:leader ; Use leader key from now on
|
||||
:desc "Eval expression" ";" #'eval-expression)
|
||||
#+END_SRC
|
||||
|
||||
These are side-by-side comparisons, showing how to bind keys with and without
|
||||
~map!~:
|
||||
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; bind a global key
|
||||
(global-set-key (kbd "C-x y") #'do-something)
|
||||
(map! "C-x y" #'do-something)
|
||||
|
||||
;; bind a key on a keymap
|
||||
(define-key emacs-lisp-mode (kbd "C-c p") #'do-something)
|
||||
(map! :map emacs-lisp-mode "C-c p" #'do-something)
|
||||
|
||||
;; unbind a key defined elsewhere
|
||||
(define-key lua-mode-map (kbd "SPC m b") nil)
|
||||
(map! :map lua-mode-map "SPC m b" nil)
|
||||
|
||||
;; bind multiple keys
|
||||
(global-set-key (kbd "C-x x") #'do-something)
|
||||
(global-set-key (kbd "C-x y") #'do-something-else)
|
||||
(global-set-key (kbd "C-x z") #'do-another-thing)
|
||||
(map! "C-x x" #'do-something
|
||||
"C-x y" #'do-something-else
|
||||
"C-x z" #'do-another-thing)
|
||||
|
||||
;; bind global keys in normal mode
|
||||
(evil-define-key* 'normal 'global
|
||||
(kbd "C-x x") #'do-something
|
||||
(kbd "C-x y") #'do-something-else
|
||||
(kbd "C-x z") #'do-another-thing)
|
||||
(map! :n "C-x x" #'do-something
|
||||
:n "C-x y" #'do-something-else
|
||||
:n "C-x z" #'do-another-thing)
|
||||
|
||||
;; or on a deferred keymap
|
||||
(evil-define-key 'normal emacs-lisp-mode-map
|
||||
(kbd "C-x x") #'do-something
|
||||
(kbd "C-x y") #'do-something-else
|
||||
(kbd "C-x z") #'do-another-thing)
|
||||
(map! :map emacs-lisp-mode-map
|
||||
:n "C-x x" #'do-something
|
||||
:n "C-x y" #'do-something-else
|
||||
:n "C-x z" #'do-another-thing)
|
||||
|
||||
;; or multiple maps
|
||||
(dolist (map (list emacs-lisp-mode go-mode-map ivy-minibuffer-map))
|
||||
(evil-define-key '(normal insert) map
|
||||
"a" #'a
|
||||
"b" #'b
|
||||
"c" #'c))
|
||||
(map! :map (emacs-lisp-mode go-mode-map ivy-minibuffer-map)
|
||||
:ni "a" #'a
|
||||
:ni "b" #'b
|
||||
:ni "c" #'c)
|
||||
|
||||
;; or in multiple states (order of states doesn't matter)
|
||||
(evil-define-key* '(normal visual) emacs-lisp-mode-map (kbd "C-x x") #'do-something)
|
||||
(evil-define-key* 'insert emacs-lisp-mode-map (kbd "C-x x") #'do-something-else)
|
||||
(evil-define-key* '(visual normal insert emacs) emacs-lisp-mode-map (kbd "C-x z") #'do-another-thing)
|
||||
(map! :map emacs-lisp-mode
|
||||
:nv "C-x x" #'do-something ; normal+visual
|
||||
:i "C-x y" #'do-something-else ; insert
|
||||
:vnie "C-x z" #'do-another-thing) ; visual+normal+insert+emacs
|
||||
|
||||
;; You can nest map! calls:
|
||||
(evil-define-key* '(normal visual) emacs-lisp-mode-map (kbd "C-x x") #'do-something)
|
||||
(evil-define-key* 'normal go-lisp-mode-map (kbd "C-x x") #'do-something-else)
|
||||
(map! (:map emacs-lisp-mode :nv "C-x x" #'do-something)
|
||||
(:map go-lisp-mode :n "C-x x" #'do-something-else))
|
||||
#+END_SRC
|
||||
|
||||
*** package!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; To install a package that can be found on ELPA or any of the sources
|
||||
;; specified in `doom-core-package-sources':
|
||||
(package! evil)
|
||||
(package! js2-mode)
|
||||
(package! rainbow-delimiters)
|
||||
|
||||
;; To disable a package included with Doom (which will no-op all its `after!'
|
||||
;; and `use-package!' blocks):
|
||||
(package! evil :disable t)
|
||||
(package! rainbow-delimiters :disable t)
|
||||
|
||||
;; To install a package from a github repo
|
||||
(package! so-long :recipe (:host github :repo "hlissner/emacs-so-long"))
|
||||
|
||||
;; If a package is particularly big and comes with submodules you don't need,
|
||||
;; you can tell the package manager not to clone the repo recursively:
|
||||
(package! ansible :recipe (:nonrecursive t))
|
||||
|
||||
;; To install a particular branch, commit or tag:
|
||||
(package! evil
|
||||
;; if :host and :fetcher aren't specified, the package manager will fall back
|
||||
;; to evil's default source provided by their (M)ELPA recipes:
|
||||
:recipe (:commit "e7bc39de2f961505e8e112da8c1b315ae8afce52"))
|
||||
|
||||
(package! evil :recipe (:branch "stable"))
|
||||
|
||||
(package! evil :recipe (:tag "1.2.9"))
|
||||
|
||||
;; If you share your config between two computers, and don't want bin/doom
|
||||
;; refresh to delete packages used only on one system, use :ignore
|
||||
(package! evil :ignore (not (equal system-name "my-desktop")))
|
||||
#+END_SRC
|
||||
|
||||
*** pushnew!
|
||||
#+BEGIN_SRC elisp
|
||||
(let ((list '(a b c)))
|
||||
(pushnew! list 'c 'd 'e)
|
||||
list)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: (e d a b c)
|
||||
|
||||
*** prependq!
|
||||
#+BEGIN_SRC elisp
|
||||
(let ((x '(a b c)))
|
||||
(prependq! x '(c d e))
|
||||
x)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: (c d e a b c)
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(let ((x '(a b c))
|
||||
(y '(c d e))
|
||||
(z '(f g)))
|
||||
(prependq! x y z '(h))
|
||||
x)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: (c d e f g h a b c)
|
||||
|
||||
*** quiet!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; Enters recentf-mode without extra output
|
||||
(quiet! (recentf-mode +1))
|
||||
#+END_SRC
|
||||
*** remove-hook!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; With only one hook and one function, this is identical to `remove-hook'. In
|
||||
;; that case, use that instead.
|
||||
(remove-hook! 'some-mode-hook #'enable-something)
|
||||
|
||||
;; Removing N functions from M hooks
|
||||
(remove-hook! some-mode #'enable-something #'and-another)
|
||||
(remove-hook! some-mode #'(enable-something and-another))
|
||||
(remove-hook! '(one-mode-hook second-mode-hook) #'enable-something)
|
||||
(remove-hook! (one-mode second-mode) #'enable-something)
|
||||
|
||||
;; Removing buffer-local hooks
|
||||
(remove-hook! (one-mode second-mode) :local #'enable-something)
|
||||
|
||||
;; Removing arbitrary forms (must be exactly the same as the definition)
|
||||
(remove-hook! (one-mode second-mode) (setq v 5) (setq a 2))
|
||||
#+END_SRC
|
||||
*** setq-hook!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; Set multiple variables after a hook
|
||||
(setq-hook! 'markdown-mode-hook
|
||||
line-spacing 2
|
||||
fill-column 80)
|
||||
|
||||
;; Set variables after multiple hooks
|
||||
(setq-hook! '(eshell-mode-hook term-mode-hook)
|
||||
hscroll-margin 0)
|
||||
#+END_SRC
|
||||
|
||||
*** unsetq-hook!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(unsetq-hook! 'markdown-mode-hook line-spacing)
|
||||
|
||||
;; Removes the following variable hook
|
||||
(setq-hook! 'markdown-mode-hook line-spacing 2)
|
||||
|
||||
;; Removing N variables from M hooks
|
||||
(unsetq-hook! some-mode enable-something and-another)
|
||||
(unsetq-hook! some-mode (enable-something and-another))
|
||||
(unsetq-hook! '(one-mode-hook second-mode-hook) enable-something)
|
||||
(unsetq-hook! (one-mode second-mode) enable-something)
|
||||
#+END_SRC
|
||||
|
||||
*** use-package!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; Use after-call to load package before hook
|
||||
(use-package! projectile
|
||||
:after-call (pre-command-hook after-find-file dired-before-readin-hook))
|
||||
|
||||
;; defer recentf packages one by one
|
||||
(use-package! recentf
|
||||
:defer-incrementally easymenu tree-widget timer
|
||||
:after-call after-find-file)
|
||||
|
||||
;; This is equivalent to :defer-incrementally (abc)
|
||||
(use-package! abc
|
||||
:defer-incrementally t)
|
||||
#+END_SRC
|
||||
* Interesting snippets
|
||||
** Persist Emacs' initial frame size across sessions
|
||||
#+BEGIN_SRC elisp
|
||||
(let ((display-height (display-pixel-height))
|
||||
(display-width (display-pixel-width)))
|
||||
(add-to-list 'initial-frame-alist
|
||||
`((left . ,(/ new-frame-width 2))
|
||||
(top . ,(/ new-frame-height 2))
|
||||
(width . ,(/ display-width 2))
|
||||
(height . ,(/ display-height 2)))))
|
||||
#+END_SRC
|
||||
|
||||
** Persist Emacs' initial frame position, dimensions and/or full-screen state across sessions
|
||||
#+BEGIN_SRC elisp
|
||||
;; add to ~/.doom.d/config.el
|
||||
(when-let (dims (doom-cache-get 'last-frame-size))
|
||||
(cl-destructuring-bind ((left . top) width height fullscreen) dims
|
||||
(setq initial-frame-alist
|
||||
(append initial-frame-alist
|
||||
`((left . ,left)
|
||||
(top . ,top)
|
||||
(width . ,width)
|
||||
(height . ,height)
|
||||
(fullscreen . ,fullscreen))))))
|
||||
|
||||
(defun save-frame-dimensions ()
|
||||
(doom-cache-set 'last-frame-size
|
||||
(list (frame-position)
|
||||
(frame-width)
|
||||
(frame-height)
|
||||
(frame-parameter nil 'fullscreen))))
|
||||
|
||||
(add-hook 'kill-emacs-hook #'save-frame-dimensions)
|
||||
#+END_SRC
|
||||
|
||||
** Update cursor shape under terminal Emacs
|
||||
Install [[https://github.com/7696122/evil-terminal-cursor-changer][evil-terminal-cursor-changer]]. The package isn't included in Doom because
|
||||
it is not maintained, unreasonably buggy, and lacks support for a number of
|
||||
terminals. Where it fails, it inserts unexpected characters into the buffer. To
|
||||
uphold the principle of least surprise, an unchanging cursor is less surprising
|
||||
than unwarranted characters.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
;; ~/.doom.d/packages.el
|
||||
(package! evil-terminal-cursor-changer)
|
||||
|
||||
;; ~/.doom.d/config.el
|
||||
(use-package! evil-terminal-cursor-changer
|
||||
:hook (tty-setup . evil-terminal-cursor-changer-activate))
|
||||
#+END_SRC
|
||||
|
||||
Alternatively, an updated version exists at
|
||||
[[https://github.com/amosbird/evil-terminal-cursor-changer][amosbird/evil-terminal-cursor-changer]], with support for urxvt and tmux.
|
||||
170
.emacs.d/docs/contributing.org
Normal file
170
.emacs.d/docs/contributing.org
Normal file
@@ -0,0 +1,170 @@
|
||||
#+TITLE: Contributing
|
||||
#+STARTUP: nofold
|
||||
|
||||
I can't say Doom Emacs is a one man show anymore. It wouldn't have gotten this
|
||||
far without the help of folks like you! Still, I struggle to maintain it all;
|
||||
especially the modules I do not use. If Doom has been useful to you, consider
|
||||
pitching in and helping me out.
|
||||
|
||||
Help can range from reporting bugs, proposing enhancements, submitting code and
|
||||
documentation, or just spreading the good word. To ensure no toes get stepped on
|
||||
or wires crossed, this guide was created to help you help us.
|
||||
|
||||
* Table of Contents :TOC_3:
|
||||
- [[#where-can-i-help][Where can I help?]]
|
||||
- [[#reporting-issues][Reporting issues]]
|
||||
- [[#collect-backtraces-of-any-error-messages][Collect backtraces of any error messages]]
|
||||
- [[#create-a-step-by-step-reproduction-guide][Create a step-by-step reproduction guide]]
|
||||
- [[#include-information-about-your-doom-install][Include information about your Doom install]]
|
||||
- [[#debugging-crashes-with-gdb][Debugging crashes with gdb]]
|
||||
- [[#suggesting-features-keybinds-andor-enhancements][Suggesting features, keybinds and/or enhancements]]
|
||||
- [[#contributing-code][Contributing code]]
|
||||
- [[#conventions][Conventions]]
|
||||
- [[#code-style][Code style]]
|
||||
- [[#naming-conventions][Naming conventions]]
|
||||
- [[#commits--prs][Commits & PRs]]
|
||||
- [[#keybind-conventions][Keybind conventions]]
|
||||
- [[#your-first-code-contribution][Your first code contribution]]
|
||||
- [[#submitting-pull-requests][Submitting pull requests]]
|
||||
- [[#contributing-to-doom-core][Contributing to Doom core]]
|
||||
- [[#contributing-to-an-existing-module][Contributing to an existing module]]
|
||||
- [[#contributing-a-new-module][Contributing a new module]]
|
||||
- [[#contributing-documentation][Contributing documentation]]
|
||||
- [[#contributing-to-dooms-manual][Contributing to Doom's manual]]
|
||||
- [[#contributing-module-documentation][Contributing module documentation]]
|
||||
- [[#other-ways-to-support-doom-emacs][Other ways to support Doom Emacs]]
|
||||
- [[#special-thanks][Special thanks]]
|
||||
|
||||
* Where can I help?
|
||||
+ Our [[https://github.com/hlissner/doom-emacs/issues][issue tracker]] has many issues. If you find one that you have an answer to,
|
||||
please don't hold back!
|
||||
+ Look for issues tagged [[https://github.com/hlissner/doom-emacs/labels/good%20first%20issue][good first issue]]. These were judged to have a low
|
||||
barrier of entry.
|
||||
+ Look for issues tagged [[https://github.com/hlissner/doom-emacs/labels/help%20wanted][help wanted]]. These tend to be a little (or a lot)
|
||||
harder, and are issues outside my own expertise.
|
||||
+ If you've encountered a bug, [[https://github.com/hlissner/doom-emacs/issues/new/choose][file a bug report]].
|
||||
+ The [[https://github.com/hlissner/doom-emacs/projects/3][development roadmap board]] is a rough timeline of what is being worked on
|
||||
and when. It will give you some idea of what will change and where you can
|
||||
redirect your efforts.
|
||||
+ The [[https://github.com/hlissner/doom-emacs/projects/2][plugins under review board]] lists third party plugins being considered (or
|
||||
rejected) for inclusion in Doom Emacs. Approved and unclaimed packages are
|
||||
open for you to implement yourself.
|
||||
+ The [[https://github.com/hlissner/doom-emacs/projects/5][upstream bugs board]] lists known issues that have external causes, but
|
||||
affect Doom. If you're feeling adventurous (or are better acquainted with the
|
||||
cause) perhaps you can address them at the source.
|
||||
|
||||
* TODO Reporting issues
|
||||
So you've found a problem. Before you fire off that bug report, there are a few
|
||||
things you should try first:
|
||||
|
||||
+ Make sure your configuration (or Doom Emacs) is *not* byte-compiled. Run ~doom
|
||||
clean~ to ensure it isn't. *Byte-compilation interferes with debugging!*
|
||||
+ Run ~bin/doom refresh~ to ensure all plugins are installed and autoload files
|
||||
generated.
|
||||
+ Run ~bin/doom doctor~ to diagnose common issues with your system.
|
||||
+ Check [[file:faq.org::*Common%20Issues][Common Issues]] in the FAQ to see if yours is a known issue.
|
||||
+ If you happen to know what module(s) are relevant to your issue, check their
|
||||
documentation (press =<leader> h m= to jump to a module's documentation). Your
|
||||
issue may be documented.
|
||||
+ If possible, check if the issue can be reproduced in vanilla Emacs (Emacs
|
||||
without Doom) and/or vanilla Doom (Doom without your private config). To test
|
||||
this, use ~M-x doom/sandbox~ (bound to =<leader> h E=). [[file:getting_started.org::*Use the sandbox][A guide for using the
|
||||
sandbox can be found in the manual]].
|
||||
+ Make sure your issue hasn't already been reported by searching the [[https://github.com/hlissner/doom-emacs/issues][issue
|
||||
tracker]].
|
||||
+ Make sure your issue hasn't been resolved on the =develop= branch of Doom.
|
||||
|
||||
If these suggestions haven't worked for you, it's time [[https://github.com/hlissner/doom-emacs/issues/new/choose][to write a bug report]].
|
||||
Please make sure of the following before you submit:
|
||||
|
||||
** TODO Collect backtraces of any error messages
|
||||
|
||||
** TODO Create a step-by-step reproduction guide
|
||||
|
||||
** TODO Include information about your Doom install
|
||||
|
||||
** TODO Debugging crashes with gdb
|
||||
|
||||
* TODO Suggesting features, keybinds and/or enhancements
|
||||
|
||||
* TODO Contributing code
|
||||
There's much to be done around here! We need bugfixes, new features, and
|
||||
documentation. If you'd like to convert some caffeine into Emacs Lisp, here are
|
||||
a few considerations before starting that PR:
|
||||
|
||||
** TODO Conventions
|
||||
*** TODO Code style
|
||||
Doom conforms to [[https://github.com/bbatsov/emacs-lisp-style-guide][@bbatsov's emacs-lisp style guide]] with the following
|
||||
exceptions:
|
||||
|
||||
+ Use ~mapc~ instead of ~seq-do~.
|
||||
+ No hanging parentheses
|
||||
+ We use =DEPRECATED= to indicate code that will eventually be removed.
|
||||
|
||||
*** Naming conventions
|
||||
Doom has a number of naming conventions that it uses in addition to the standard
|
||||
lisp conventions. Third party packages may use their own conventions as well.
|
||||
|
||||
**** Lisp Naming Conventions
|
||||
The lisp conventions are simple. Symbols follow ~NAMESPACE-SYMBOLNAME~ for
|
||||
public variables/functions (e.g. ~bookmark-default-file~ or
|
||||
~electric-indent-mode~) and ~NAMESPACE--SYMBOLNAME~ for private ones (e.g.
|
||||
~byte-compile--lexical-environment~ and ~yas--tables~).
|
||||
|
||||
~NAMESPACE~ is usually the name of the containing file or package. E.g. the
|
||||
~company~ plugin prefixes all its variables/functions with ~company-~.
|
||||
|
||||
**** Doom Naming Conventions
|
||||
+ ~doom/NAME~ or ~+MODULE/NAME~ :: Denotes a public command designed to be used
|
||||
interactively, via =M-x= or a keybinding. e.g. ~doom/info~, ~+popup/other~,
|
||||
~+ivy/rg~.
|
||||
+ ~doom:NAME~ :: A public evil operator, motion or command. e.g. ~+evil:align~,
|
||||
~+ivy:rg~.
|
||||
+ ~doom-[-]NAME-h~ or ~+MODULE-[-]NAME-h~ :: A non-interactive function meant to
|
||||
be used (exclusively) as a hook. e.g. ~+cc-fontify-constants-h~,
|
||||
~+flycheck-buffer-h~.
|
||||
+ ~doom-[-]NAME-a~ or ~+MODULE-[-]NAME-a~ :: Functions designed to be used as
|
||||
advice for other functions. e.g. ~doom-set-jump-a~,
|
||||
~doom--fix-broken-smie-modes-a~, ~+org--babel-lazy-load-library-a~
|
||||
+ ~doom-[-]NAME-fn~ or ~+MODULE-[-]NAME-fn~ :: Indicates an [[https://en.wikipedia.org/wiki/Strategy_pattern][strategy]] function. A
|
||||
good rule of thumb for what makes a strategy function is: is it
|
||||
interchangeable? Can it be replaced with another function with a matching
|
||||
signature? e.g. ~+lookup-dumb-jump-backend-fn~, ~+magit-display-buffer-fn~,
|
||||
~+workspaces-set-project-action-fn~
|
||||
+ ~abc!~ :: A public Doom "autodef" function or macro. An autodef should always
|
||||
be defined, even if its containing module is disabled (i.e. they will not
|
||||
throw a void-function error). The purpose of this is to avoid peppering module
|
||||
configs with conditionals or `after!` blocks before using their APIs. They
|
||||
should noop if their module is disabled, and should be zero-cost in the case
|
||||
their module is disabled.
|
||||
|
||||
Autodefs usually serve to configure Doom or a module. e.g. ~after!~,
|
||||
~set-company-backends!~, ~set-evil-initial-state!~
|
||||
|
||||
*** TODO Commits & PRs
|
||||
+ Target =develop= instead of =master=. The only exception are hotfixes!
|
||||
|
||||
*** TODO Keybind conventions
|
||||
|
||||
** TODO Your first code contribution
|
||||
|
||||
** TODO Submitting pull requests
|
||||
|
||||
** TODO Contributing to Doom core
|
||||
|
||||
** TODO Contributing to an existing module
|
||||
|
||||
** TODO Contributing a new module
|
||||
|
||||
* TODO Contributing documentation
|
||||
Doom Emacs' documentation is an ongoing effort. If you have suggestions,
|
||||
improvements, tutorials and/or articles to submit, don't hesitate to get in
|
||||
contact via our [[https://discord.gg/bcZ6P3y][Discord server]] or [[mailto:henrik@lissner.net][email]]. I appreciate any help I can get!
|
||||
|
||||
** TODO Contributing to Doom's manual
|
||||
|
||||
** TODO Contributing module documentation
|
||||
|
||||
* TODO Other ways to support Doom Emacs
|
||||
|
||||
* TODO Special thanks
|
||||
1131
.emacs.d/docs/faq.org
Normal file
1131
.emacs.d/docs/faq.org
Normal file
File diff suppressed because it is too large
Load Diff
1187
.emacs.d/docs/getting_started.org
Normal file
1187
.emacs.d/docs/getting_started.org
Normal file
File diff suppressed because it is too large
Load Diff
276
.emacs.d/docs/index.org
Normal file
276
.emacs.d/docs/index.org
Normal file
@@ -0,0 +1,276 @@
|
||||
#+TITLE: Doom Emacs Documentation
|
||||
#+STARTUP: nofold
|
||||
|
||||
Doom Emacs is a configuration for [[https://www.gnu.org/software/emacs/][GNU Emacs]] written by a stubborn,
|
||||
shell-dwelling, and melodramatic ex-vimmer. It is designed to be a foundation
|
||||
for your own Emacs configuration or a resource for enthusiasts to learn more
|
||||
about our favorite OS.
|
||||
|
||||
#+begin_quote
|
||||
Github fails to render org links to sub-sections, so it is recommended that you
|
||||
view the documentation from within Doom Emacs by pressing =<help> d h= (=<help>=
|
||||
is =SPC h= for evil users and =C-h= for vanilla users) or searching it with
|
||||
=<help> d /=.
|
||||
#+end_quote
|
||||
|
||||
* Table of Contents :TOC:
|
||||
- [[#release-notes][Release Notes]]
|
||||
- [[#documentation][Documentation]]
|
||||
- [[#getting-started][Getting Started]]
|
||||
- [[#frequently-asked-questions][Frequently Asked Questions]]
|
||||
- [[#contributing][Contributing]]
|
||||
- [[#workflow-tips-tricks--tutorials][Workflow Tips, Tricks & Tutorials]]
|
||||
- [[#community-resources][Community Resources]]
|
||||
- [[#asking-for-help][Asking for help]]
|
||||
- [[#project-roadmap][Project roadmap]]
|
||||
- [[#tutorials--guides][Tutorials & guides]]
|
||||
- [[#module-list][Module list]]
|
||||
- [[#app][:app]]
|
||||
- [[#completion][:completion]]
|
||||
- [[#config][:config]]
|
||||
- [[#editor][:editor]]
|
||||
- [[#emacs][:emacs]]
|
||||
- [[#email][:email]]
|
||||
- [[#input][:input]]
|
||||
- [[#lang][:lang]]
|
||||
- [[#term][:term]]
|
||||
- [[#tools][:tools]]
|
||||
- [[#ui][:ui]]
|
||||
|
||||
* TODO Release Notes
|
||||
|
||||
* Documentation
|
||||
** [[file:getting_started.org][Getting Started]]
|
||||
- [[file:getting_started.org::*Install][Install]] - How to install Emacs, Doom and its plugins
|
||||
- [[file:getting_started.org::*Update][Update]] - Keep Doom and its packages up-to-date
|
||||
- [[file:getting_started.org::*Customize][Customize]] - A primer on customizing and reconfiguring Doom
|
||||
- [[file:getting_started.org::*Troubleshoot][Troubleshoot]] - How to debug Emacs & Doom, find help or look up documentation
|
||||
|
||||
** [[file:faq.org][Frequently Asked Questions]]
|
||||
- [[file:faq.org::*General][General]]
|
||||
- [[file:faq.org::*Configuration][Configuration]]
|
||||
- [[file:faq.org::*Defaults][Defaults]]
|
||||
- [[file:faq.org::Common Issues][Common Issues]]
|
||||
- [[file:faq.org::Contributing][Contributing]]
|
||||
|
||||
** TODO [[file:contributing.org][Contributing]]
|
||||
- [[file:contributing.org::*Where can I help?][Where to get help]]
|
||||
- Writing an effective bug report
|
||||
- Suggesting features, keybinds or enhancements
|
||||
- Contributing code
|
||||
- Contributing documentation
|
||||
- Other ways to support Doom Emacs
|
||||
- Special thanks
|
||||
|
||||
** TODO [[file:workflow.org][Workflow Tips, Tricks & Tutorials]]
|
||||
|
||||
* Community Resources
|
||||
** Asking for help
|
||||
- [[https://discord.gg/bcZ6P3y][Our Discord server]]
|
||||
- [[https://github.com/hlissner/doom-emacs/issues][Our issue tracker]]
|
||||
|
||||
** Project roadmap
|
||||
- [[https://github.com/hlissner/doom-emacs/projects/3][Development roadmap]] - A timeline outlining what's being worked on and when it
|
||||
is expected to be done.
|
||||
- [[https://github.com/hlissner/doom-emacs/projects/2][Plugins under review]] - A sitrep on third party plugins that we've considered,
|
||||
rejected, or awaiting integration into Doom.
|
||||
- [[https://github.com/hlissner/doom-emacs/projects/5][Upstream bugs]] - Tracks issues originating from plugins and external programs
|
||||
that Doom relies on.
|
||||
|
||||
** Tutorials & guides
|
||||
+ *Doom Emacs*
|
||||
- [[https://noelwelsh.com/posts/2019-01-10-doom-emacs.html][Noel's crash course on Doom Emacs]]
|
||||
- [[https://medium.com/@aria_39488/getting-started-with-doom-emacs-a-great-transition-from-vim-to-emacs-9bab8e0d8458][Getting Started with Doom Emacs -- a great transition from Vim to Emacs]]
|
||||
- [[https://medium.com/@aria_39488/the-niceties-of-evil-in-doom-emacs-cabb46a9446b][The Niceties of evil in Doom Emacs]]
|
||||
- [[https://www.youtube.com/playlist?list=PLhXZp00uXBk4np17N39WvB80zgxlZfVwj][DoomCasts (youtube series)]]
|
||||
- [[https://www.youtube.com/watch?v=GK3fij-D1G8][Org-mode, literate programming in (Doom) Emacs]]
|
||||
+ *Emacs & Emacs Lisp*
|
||||
- [[https://www.gnu.org/software/emacs/manual/html_node/elisp/index.html][The Official Emacs manual]]
|
||||
- A variety of Emacs resources - https://github.com/ema2159/awesome-emacs
|
||||
- Quick crash courses on Emacs Lisp's syntax for programmers:
|
||||
- https://learnxinyminutes.com/docs/elisp/
|
||||
- http://steve-yegge.blogspot.com/2008/01/emergency-elisp.html
|
||||
- Workflows for customizing Emacs and its packages (and its C/C++ modes):
|
||||
- https://david.rothlis.net/emacs/customize_c.html
|
||||
+ *Tools in Emacs*
|
||||
- [[https://www.emacswiki.org/emacs/Calc_Tutorials_by_Andrew_Hyatt][How to use M-x calc]]
|
||||
+ *Vim & Evil*
|
||||
- [[https://gist.github.com/dmsul/8bb08c686b70d5a68da0e2cb81cd857f][A crash course on modal editing and Ex commands]]
|
||||
|
||||
* Module list
|
||||
** :app
|
||||
Application modules are complex and opinionated modules that transform Emacs
|
||||
toward a specific purpose. They may have additional dependencies and should be
|
||||
loaded last, before =:config= modules.
|
||||
|
||||
+ [[file:../modules/app/calendar/README.org][calendar]] - TODO
|
||||
+ [[file:../modules/app/irc/README.org][irc]] - how neckbeards socialize
|
||||
+ rss =+org= - an RSS client in Emacs
|
||||
+ [[file:../modules/app/twitter/README.org][twitter]] - A twitter client for Emacs
|
||||
+ [[file:../modules/app/write/README.org][write]] =+wordnut +langtool= - Transforms emacs into an IDE for writers, and for
|
||||
writing fiction, notes, papers and so on.
|
||||
|
||||
** :completion
|
||||
Modules that provide new interfaces or frameworks for completion, including code
|
||||
completion.
|
||||
|
||||
+ [[file:../modules/completion/company/README.org][company]] =+childframe +tng= - The ultimate code completion backend
|
||||
+ helm =+fuzzy +childframe= - *Another* search engine for love and life
|
||||
+ ido - The /other/ *other* search engine for love and life
|
||||
+ [[file:../modules/completion/ivy/README.org][ivy]] =+fuzzy +prescient +childframe= - /The/ search engine for love and life
|
||||
|
||||
** :config
|
||||
Modules that configure Emacs one way or another, or focus on making it easier
|
||||
for you to customize it yourself. It is best to load these last.
|
||||
|
||||
+ literate - For users with literate configs. This will tangle+compile a
|
||||
config.org in your ~doom-private-dir~ when it changes.
|
||||
+ [[file:../modules/config/default/README.org][default]] =+bindings +smartparens= - The default module sets reasonable defaults
|
||||
for Emacs. It also provides a Spacemacs-inspired keybinding scheme and a
|
||||
smartparens config. Use it as a reference for your own modules.
|
||||
|
||||
** :editor
|
||||
Modules that affect and augment your ability to manipulate or insert text.
|
||||
|
||||
+ [[file:../modules/editor/evil/README.org][evil]] =+everywhere= - transforms Emacs into Vim
|
||||
+ [[file:../modules/editor/file-templates/README.org][file-templates]] - Auto-inserted templates in blank new files
|
||||
+ [[file:../modules/editor/fold/README.org][fold]] - universal code folding
|
||||
+ format =+onsave= - TODO
|
||||
+ god - run Emacs commands without modifier keys
|
||||
+ [[file:../modules/editor/lispy/README.org][lispy]] - TODO
|
||||
+ multiple-cursors - TODO
|
||||
+ [[file:../modules/editor/objed/README.org][objed]] - TODO
|
||||
+ [[file:../modules/editor/parinfer/README.org][parinfer]] - TODO
|
||||
+ rotate-text - TODO
|
||||
+ [[file:../modules/editor/snippets/README.org][snippets]] - Snippet expansion for lazy typists
|
||||
+ [[file:../modules/editor/word-wrap/README.org][word-wrap]] - soft wrapping with language-aware indent
|
||||
|
||||
** :emacs
|
||||
Modules that reconfigure or augment packages or features built into Emacs.
|
||||
|
||||
+ [[file:../modules/emacs/dired/README.org][dired]] =+ranger +icons= - TODO
|
||||
+ electric - TODO
|
||||
+ [[file:../modules/emacs/ibuffer/README.org][ibuffer]] =+icons= - TODO
|
||||
+ vc - TODO
|
||||
|
||||
** :email
|
||||
+ [[file:../modules/email/mu4e/README.org][mu4e]] =+gmail= - TODO
|
||||
+ notmuch - TODO
|
||||
+ wanderlust =+gmail= - TODO
|
||||
|
||||
** :input
|
||||
+ [[file:../modules/input/chinese/README.org][chinese]] - TODO
|
||||
+ [[file:../modules/input/japanese/README.org][japanese]] - TODO
|
||||
|
||||
** :lang
|
||||
Modules that bring support for a language or group of languages to Emacs.
|
||||
|
||||
+ [[file:../modules/lang/agda/README.org][agda]] - TODO
|
||||
+ assembly - TODO
|
||||
+ [[file:../modules/lang/cc/README.org][cc]] =+lsp= - TODO
|
||||
+ clojure - TODO
|
||||
+ common-lisp - TODO
|
||||
+ [[file:../modules/lang/coq/README.org][coq]] - TODO
|
||||
+ crystal - TODO
|
||||
+ [[file:../modules/lang/csharp/README.org][csharp]] - TODO
|
||||
+ data - TODO
|
||||
+ [[file:../modules/lang/elixir/README.org][elixir]] =+lsp= - TODO
|
||||
+ elm - TODO
|
||||
+ emacs-lisp - TODO
|
||||
+ erlang - TODO
|
||||
+ [[file:../modules/lang/ess/README.org][ess]] - TODO
|
||||
+ [[file:../modules/lang/faust/README.org][faust]] - TODO
|
||||
+ [[file:../modules/lang/fsharp/README.org][fsharp]] - TODO
|
||||
+ [[file:../modules/lang/go/README.org][go]] =+lsp= - TODO
|
||||
+ [[file:../modules/lang/haskell/README.org][haskell]] =+dante +intero +lsp= - TODO
|
||||
+ hy - TODO
|
||||
+ [[file:../modules/lang/idris/README.org][idris]] - TODO
|
||||
+ java =+meghanada +lsp= - TODO
|
||||
+ [[file:../modules/lang/javascript/README.org][javascript]] =+lsp= - JavaScript, TypeScript, and CoffeeScript support
|
||||
+ julia - TODO
|
||||
+ kotlin =+lsp+= - TODO
|
||||
+ [[file:../modules/lang/latex/README.org][latex]] - TODO
|
||||
+ lean - TODO
|
||||
+ [[file:../modules/lang/ledger/README.org][ledger]] - TODO
|
||||
+ lua =+moonscript= - TODO
|
||||
+ [[file:../modules/lang/markdown/README.org][markdown]] =+grip= - TODO
|
||||
+ [[file:../modules/lang/nim/README.org][nim]] - TODO
|
||||
+ nix - TODO
|
||||
+ [[file:../modules/lang/ocaml/README.org][ocaml]] =+lsp= - TODO
|
||||
+ [[file:../modules/lang/org/README.org][org]] =+dragndrop +gnuplot +hugo +ipython +pandoc +pomodoro +present= - TODO
|
||||
+ [[file:../modules/lang/perl/README.org][perl]] - TODO
|
||||
+ [[file:../modules/lang/php/README.org][php]] =+lsp= - TODO
|
||||
+ plantuml - TODO
|
||||
+ purescript - TODO
|
||||
+ [[file:../modules/lang/python/README.org][python]] =+lsp +pyenv +conda= - TODO
|
||||
+ qt - TODO
|
||||
+ racket - TODO
|
||||
+ [[file:../modules/lang/rest/README.org][rest]] - TODO
|
||||
+ ruby =+lsp +rvm +rbenv= - TODO
|
||||
+ [[file:../modules/lang/rust/README.org][rust]] =+lsp= - TODO
|
||||
+ scala =+lsp= - TODO
|
||||
+ [[file:../modules/lang/scheme/README.org][scheme]] - TODO
|
||||
+ [[file:../modules/lang/sh/README.org][sh]] =+fish +lsp= - TODO
|
||||
+ [[file:../modules/lang/solidity/README.org][solidity]] - TODO
|
||||
+ swift =+lsp= - TODO
|
||||
+ terra - TODO
|
||||
+ web =+lsp= - HTML and CSS (SCSS/SASS/LESS/Stylus) support.
|
||||
|
||||
** :term
|
||||
Modules that offer terminal emulation.
|
||||
|
||||
+ eshell - TODO
|
||||
+ shell - TODO
|
||||
+ term - TODO
|
||||
+ [[file:../modules/term/vterm/README.org][vterm]] - TODO
|
||||
|
||||
** :tools
|
||||
Small modules that give Emacs access to external tools & services.
|
||||
|
||||
+ ansible - TODO
|
||||
+ debugger - A (nigh-)universal debugger in Emacs
|
||||
+ [[file:../modules/tools/direnv/README.org][direnv]] - TODO
|
||||
+ [[file:../modules/tools/docker/README.org][docker]] - TODO
|
||||
+ [[file:../modules/tools/editorconfig/README.org][editorconfig]] - TODO
|
||||
+ [[file:../modules/tools/ein/README.org][ein]] - TODO
|
||||
+ [[file:../modules/tools/eval/README.org][eval]] =+overlay= - REPL & code evaluation support for a variety of languages
|
||||
+ flycheck - Live error/warning highlights
|
||||
+ flyspell - Spell checking
|
||||
+ gist - TODO
|
||||
+ [[file:../modules/tools/lookup/README.org][lookup]] =+docsets= - Universal jump-to & documentation lookup backend
|
||||
+ [[file:../modules/tools/lsp/README.org][lsp]] - TODO
|
||||
+ macos - TODO
|
||||
+ magit - TODO
|
||||
+ make - TODO
|
||||
+ pass - TODO
|
||||
+ pdf - TODO
|
||||
+ prodigy - TODO
|
||||
+ rgb - TODO
|
||||
+ [[file:../modules/tools/terraform/README.org][terraform]]
|
||||
+ tmux - TODO
|
||||
+ upload - TODO
|
||||
|
||||
** :ui
|
||||
Aesthetic modules that affect the Emacs interface or user experience.
|
||||
|
||||
+ [[file:../modules/ui/deft/README.org][deft]] - TODO
|
||||
+ [[file:../modules/ui/doom/README.org][doom]] - TODO
|
||||
+ [[file:../modules/ui/doom-dashboard/README.org][doom-dashboard]] - TODO
|
||||
+ [[file:../modules/ui/doom-quit/README.org][doom-quit]] - TODO
|
||||
+ fill-column - TODO
|
||||
+ [[file:../modules/ui/hl-todo/README.org][hl-todo]] - TODO
|
||||
+ [[file:../modules/ui/hydra/README.org][hydra]] - TODO
|
||||
+ indent-guides - TODO
|
||||
+ [[file:../modules/ui/modeline/README.org][modeline]] - TODO
|
||||
+ [[file:../modules/ui/nav-flash/README.org][nav-flash]] - TODO
|
||||
+ [[file:../modules/ui/neotree/README.org][neotree]] - TODO
|
||||
+ [[file:../modules/ui/ophints/README.org][ophints]] - TODO
|
||||
+ [[file:../modules/ui/popup/README.org][popup]] =+all +defaults= - Makes temporary/disposable windows less intrusive
|
||||
+ pretty-code - TODO
|
||||
+ [[file:../modules/ui/tabs/README.org][tabs]] - TODO
|
||||
+ treemacs - TODO
|
||||
+ [[file:../modules/ui/unicode/README.org][unicode]] - TODO
|
||||
+ vc-gutter - TODO
|
||||
+ vi-tilde-fringe - TODO
|
||||
+ [[file:../modules/ui/window-select/README.org][window-select]] =+switch-window +numbers= - TODO
|
||||
+ [[file:../modules/ui/workspaces/README.org][workspaces]] - Isolated workspaces
|
||||
73
.emacs.d/docs/workflow.org
Normal file
73
.emacs.d/docs/workflow.org
Normal file
@@ -0,0 +1,73 @@
|
||||
#+TITLE: Workflow tips, tricks & tutorials
|
||||
#+STARTUP: nofold
|
||||
|
||||
This page is a WIP.
|
||||
|
||||
* Table of Contents :TOC:
|
||||
- [[#day-1-in-doom-emacs][Day 1 in Doom Emacs]]
|
||||
- [[#an-introduction-to-modal-editing-with-evil][An introduction to modal editing with Evil]]
|
||||
- [[#an-introduction-to-vim][An introduction to Vim]]
|
||||
- [[#getting-around-the-buffer][Getting around the buffer]]
|
||||
- [[#operating-with-operators][Operating with operators]]
|
||||
- [[#get-what-you-want-with-text-objects][Get what you want with text objects]]
|
||||
- [[#ways-to-edit-multiple-places-at-once][Ways to edit multiple places at once]]
|
||||
- [[#pipe-text-through-ex-commands-and-programs][Pipe text through ex commands and programs]]
|
||||
- [[#transposingswapping-text][Transposing/swapping text]]
|
||||
- [[#managing-your-projects][Managing your projects]]
|
||||
- [[#search--replace][Search & replace]]
|
||||
- [[#project-wide-text-search][Project-wide text search]]
|
||||
- [[#search--replace-1][Search & replace]]
|
||||
- [[#how-to-get-around-your-projects][How to get around your projects]]
|
||||
- [[#looking-up-definitionreferences][Looking up definition/references]]
|
||||
- [[#looking-up-documentation][Looking up documentation]]
|
||||
- [[#projectfile-navigation-getting-around-quickly][Project/file navigation; getting around quickly]]
|
||||
- [[#getting-around-slowly][Getting around slowly]]
|
||||
- [[#alternating-files-eg-scss-css-h-c][Alternating files (e.g. .scss<->.css, .h<->.c)]]
|
||||
- [[#looking-things-up-online-or-in-documentation][Looking things up online or in documentation]]
|
||||
- [[#creating-and-using-snippets][Creating and using snippets]]
|
||||
- [[#how-to-use-workspaces][How to use workspaces]]
|
||||
- [[#version-control-with-magit-forge--git-gutter][Version control with Magit, Forge & git-gutter]]
|
||||
- [[#how-to-write--debug-emacs-lisp][How to write & debug Emacs Lisp]]
|
||||
- [[#on-the-fly-code-evaluation--repls][On-the-fly code evaluation & REPLs]]
|
||||
- [[#using-emacs-for][Using Emacs for...]]
|
||||
- [[#writing-fiction][Writing fiction]]
|
||||
- [[#writing-papers][Writing papers]]
|
||||
- [[#composing-music][Composing music]]
|
||||
- [[#game-development][Game development]]
|
||||
- [[#web-development][Web development]]
|
||||
- [[#machine-learning][Machine learning]]
|
||||
- [[#as-an-x-client-twitter-email-rss-reader-etc][As an X client (twitter, email, RSS reader, etc)]]
|
||||
|
||||
* TODO Day 1 in Doom Emacs
|
||||
* TODO An introduction to modal editing with Evil
|
||||
** TODO An introduction to Vim
|
||||
** TODO Getting around the buffer
|
||||
** TODO Operating with operators
|
||||
** TODO Get what you want with text objects
|
||||
** TODO Ways to edit multiple places at once
|
||||
** TODO Pipe text through ex commands and programs
|
||||
** TODO Transposing/swapping text
|
||||
* TODO Managing your projects
|
||||
* TODO Search & replace
|
||||
** TODO Project-wide text search
|
||||
** TODO Search & replace
|
||||
* TODO How to get around your projects
|
||||
** TODO Looking up definition/references
|
||||
** TODO Looking up documentation
|
||||
** TODO Project/file navigation; getting around quickly
|
||||
** TODO Getting around slowly
|
||||
** TODO Alternating files (e.g. .scss<->.css, .h<->.c)
|
||||
* TODO Looking things up online or in documentation
|
||||
* TODO Creating and using snippets
|
||||
* TODO How to use workspaces
|
||||
* TODO Version control with Magit, Forge & git-gutter
|
||||
* TODO How to write & debug Emacs Lisp
|
||||
* TODO On-the-fly code evaluation & REPLs
|
||||
* TODO Using Emacs for...
|
||||
** TODO Writing fiction
|
||||
** TODO Writing papers
|
||||
** TODO Composing music
|
||||
** TODO Game development
|
||||
** TODO Web development
|
||||
** TODO Machine learning
|
||||
** TODO As an X client (twitter, email, RSS reader, etc)
|
||||
Reference in New Issue
Block a user