9 | $0
--------------------------------------------------------------------------------
/+package-config.el:
--------------------------------------------------------------------------------
1 | ;;; +package-config.el -*- lexical-binding: t; -*-
2 |
3 |
4 |
5 | ;; ---------------------------------------
6 | ;; Configure packages
7 | ;;
8 | ;; Packages that are not part of Doom Emacs
9 | ;; are included via packages.el
10 | ;; and configured in package-config.el
11 |
12 |
13 | ;; Keycast - show keys and commands in modeline
14 | ;; https://github.com/staticaland/doom-emacs-config/blob/master/config.el
15 | (use-package! keycast
16 | :commands keycast-mode ;; load package on issuing command
17 | :config
18 | (define-minor-mode keycast-mode
19 | "Show current command and its key binding in the mode line."
20 | :global t
21 | (if keycast-mode
22 | (progn
23 | (add-hook 'pre-command-hook 'keycast-mode-line-update t)
24 | (add-to-list 'global-mode-string '("" mode-line-keycast " ")))
25 | (remove-hook 'pre-command-hook 'keycast-mode-line-update)
26 | (setq global-mode-string (remove '("" mode-line-keycast " ") global-mode-string))))
27 | (custom-set-faces!
28 | '(keycast-command :inherit doom-modeline-debug
29 | :height 0.9)
30 | '(keycast-key :inherit custom-modified
31 | :height 1.1
32 | :weight bold)))
33 |
34 | ;; Toggle keycast-mode
35 | (map! :leader
36 | (:prefix "t"
37 | :desc "keycast" "k" #'keycast-mode))
38 |
39 |
40 | ;; ---------------------------------------
41 |
--------------------------------------------------------------------------------
/+lsp.el:
--------------------------------------------------------------------------------
1 | ;;; +lsp.el -*- lexical-binding: t; -*-
2 |
3 | ;; ---------------------------------------
4 | ;; LSP Configuration
5 |
6 | (use-package! lsp-mode
7 | :commands lsp
8 | :config
9 |
10 | ;; Core
11 | (setq
12 | ;; https://emacs-lsp.github.io/lsp-mode/page/settings/headerline/
13 | lsp-headerline-breadcrumb-enable t ; Breadcrumb trail
14 | lsp-headerline-breadcrumb-segments '(symbols) ; namespace & symbols, no file path
15 |
16 | lsp-signature-render-documentation nil
17 | lsp-signature-function 'lsp-signature-posframe
18 | lsp-semantic-tokens-enable t
19 | lsp-idle-delay 0.2 ;; Smoother LSP features response in cost of performance (Most servers I use have good performance)
20 | lsp-use-plists nil)
21 | (add-hook 'lsp-after-apply-edits-hook (lambda (&rest _) (save-buffer)))
22 | (add-hook 'lsp-mode-hook (lambda () (setq-local company-format-margin-function #'company-vscode-dark-icons-margin))))
23 |
24 | (use-package! lsp-treemacs
25 | :config
26 | (setq lsp-treemacs-error-list-current-project-only t))
27 |
28 |
29 | (use-package! lsp-ui
30 | :after lsp-mode
31 | :commands lsp-ui-mode
32 | :config
33 | (setq lsp-ui-doc-enable nil ;; disable all doc popups
34 | lsp-ui-sideline-enable nil ;; disable sideline bar for less distraction
35 | treemacs-space-between-root-nodes nil ;; no spacing in treemacs views
36 | lsp-log-io t ; Log client-server json communication
37 | lsp-ui-peek-enable t))
38 |
39 | ;; End of LSP
40 | ;; ---------------------------------------
41 |
--------------------------------------------------------------------------------
/+markdown.el:
--------------------------------------------------------------------------------
1 | ;;; $DOOMDIR/+markdown.el -*- lexical-binding: t; -*-
2 |
3 | ;; ---------------------------------------
4 | ;; Markdown
5 | ;;
6 | ;; Doom Markdown configuration
7 | ;; ~/.config/emacs-doom/modules/lang/markdown/config.el
8 |
9 |
10 | ;; ---------------------------------------
11 | ;; Markdown key bindings
12 |
13 | ;; Changes
14 | ;; - move toggle prefix from `t' to `T'
15 | ;; - add table prefix `t'
16 |
17 | (map! :map markdown-mode-map
18 | :localleader
19 | (:prefix ("t" . nil))
20 | (:prefix ("t" . "Table")
21 | :desc "Header" "h" #'markdown-table-hline-at-point-p
22 | :desc "Sort" "s" #'markdown-table-sort-lines
23 | :desc "Region to table" "r" #'markdown-table-convert-region
24 | :desc "Table insert" "t" #'markdown-insert-table
25 | (:prefix ("d" . "Delete")
26 | :desc "column" "c" #'markdown-table-delete-column
27 | :desc "row" "r" #'markdown-table-delete-row)
28 | (:prefix ("i" . "Insert")
29 | :desc "Column" "c" #'markdown-table-insert-column
30 | :desc "Row" "r" #'markdown-table-insert-row))
31 |
32 | (:prefix ("T" . "toggle")
33 | :desc "Inline LaTeX" "e" #'markdown-toggle-math
34 | :desc "Code highlights" "f" #'markdown-toggle-fontify-code-blocks-natively
35 | :desc "Inline images" "i" #'markdown-toggle-inline-images
36 | :desc "URL hiding" "l" #'markdown-toggle-url-hiding
37 | :desc "Markup hiding" "m" #'markdown-toggle-markup-hiding
38 | :desc "Wiki links" "w" #'markdown-toggle-wiki-links
39 | :desc "GFM checkbox" "x" #'markdown-toggle-gfm-checkbox))
40 |
--------------------------------------------------------------------------------
/+org-mode.el:
--------------------------------------------------------------------------------
1 | ;;; +org-mode.el -*- lexical-binding: t; -*-
2 |
3 | ;; ---------------------------------------
4 | ;; Org-mode configuration
5 | ;; - configuration being tested, may need further adjusting for Doom
6 |
7 |
8 | (after! org
9 | (setq
10 | ;; Default location of org files
11 | org-directory "~/projects/org/"
12 | ;; Define the location of the file to hold tasks
13 | org-default-notes-file "~/Documents/todo-list.org"
14 |
15 | ;; Define stages for todo tasks
16 | org-todo-keywords '((sequence "TODO" "DOING" "BLOCKED" "REVIEW" "|" "DONE" "ARCHIVED"))
17 |
18 | ;; When item enters DONE, add a CLOSED: property with current date-time stamp
19 | org-log-done 'time
20 |
21 | ;; Make TODO states easier to distinguish by using different colours
22 | ;; Using X11 colour names from: https://en.wikipedia.org/wiki/Web_colors
23 | hl-todo-keyword-faces
24 | '(("TODO" . "SlateGray")
25 | ("DOING" . "DarkOrchid")
26 | ("BLOCKED" . "Firebrick")
27 | ("REVIEW" . "Teal")
28 | ("DONE" . "ForestGreen")
29 | ("ARCHIVED" . "SlateBlue"))
30 |
31 | org-todo-keyword-faces
32 | '(("TODO" . "SlateGray")
33 | ("DOING" . "DarkOrchid")
34 | ("BLOCKED" . "Firebrick")
35 | ("REVIEW" . "Teal")
36 | ("DONE" . "ForestGreen")
37 | ("ARCHIVED" . "SlateBlue"))
38 | ))
39 |
40 |
41 | ;; customize org-mode's checkboxes with unicode symbols
42 | (add-hook! org-mode
43 | (lambda ()
44 | "Beautify Org Checkbox Symbol"
45 | (push '("[ ]" . "☐") prettify-symbols-alist)
46 | (push '("[X]" . "☑" ) prettify-symbols-alist)
47 | (push '("[-]" . "❍" ) prettify-symbols-alist)
48 | (prettify-symbols-mode)))
49 |
50 | ;; End of Org-mode Configuration
51 | ;; ---------------------------------------
52 |
--------------------------------------------------------------------------------
/+smartparens.el:
--------------------------------------------------------------------------------
1 | ;;; +smartparens.el -*- lexical-binding: t; -*-
2 |
3 | ;; Smartparens - Practicalli config and key bindings
4 |
5 |
6 | ;; A Spacemacs like Lisp state menu (without the transient state)
7 |
8 | (map! :leader
9 | (:prefix ("k". "Smartparens")
10 | :desc "Slurp forward" "s" #'sp-forward-slurp-sexp
11 | :desc "Slurp backward" "S" #'sp-backward-slurp-sexp
12 | :desc "" "$" #'sp-end-of-sexp
13 | (:prefix ("`" . "Hybrid"))
14 | :desc "Kill" "k" #'sp-kill-hybrid-sexp
15 | :desc "Push" "p" #'sp-push-hybrid-sexp
16 | :desc "Slurp" "s" #'sp-slurp-hybrid-sexp
17 | :desc "Transpose" "t" #'sp-transpose-hybrid-sexp
18 | :desc "Absorb" "a" #'sp-absorb-sexp
19 | :desc "Barf forward" "b" #'sp-forward-barf-sexp
20 | :desc "Barf backward" "B" #'sp-backward-barf-sexp
21 | :desc "Convoluted" "c" #'sp-convolute-sexp
22 | (:prefix ("d" . "Delete")
23 | :desc "Symbol" "s" #'sp-kill-symbol
24 | :desc "Symbol Backward" "S" #'sp-backward-kill-symbol
25 | :desc "Word" "w" #'sp-kill-word
26 | :desc "Word Backward" "W" #'sp-backward-kill-word
27 | :desc "Kill" "x" #'sp-kill-sexp
28 | :desc "Kill Backward" "X" #'sp-backward-kill-sexp)
29 | :desc "Splice" "e" #'sp-splice-sexp-killing-forward
30 | :desc "Splice Backward" "E" #'sp-splice-sexp-killing-backward
31 | :desc "Symbol Backward" "h" #'sp-backward-symbol
32 | :desc "Sexp Backward" "H" #'sp-backward-sexp
33 | :desc "Join" "j" #'sp-join-sexp
34 | :desc "Sexp Forward" "l" #'sp-forward-sexp
35 | :desc "Sexp Forward" "L" #'sp-forward-sexp
36 | :desc "Raise" "r" #'sp-raise-sexp
37 | :desc "Slurp" "s" #'sp-forward-slurp-sexp
38 | :desc "Slurp Backward" "S" #'sp-backward-slurp-sexp
39 | :desc "Transpose" "t" #'sp-transpose-sexp
40 | :desc "Up Backward" "U" #'sp-backward-up-sexp
41 | (:prefix ("w" . "Wrap")
42 | :desc "()" "(" #'sp-wrap-round
43 | :desc "{}" "{" #'sp-wrap-curly
44 | :desc "[]" "[" #'sp-wrap-square
45 | :desc "Round" "w" #'sp-wrap-round
46 | :desc "Curly" "c" #'sp-wrap-curly
47 | :desc "Square" "s" #'sp-wrap-square
48 | :desc "Unwrap" "u" #'sp-unwrap-sexp)
49 | :desc "Copy sexp" "y" #'sp-copy-sexp))
50 |
--------------------------------------------------------------------------------
/+git.el:
--------------------------------------------------------------------------------
1 | ;;; +git.el -*- lexical-binding: t; -*-
2 |
3 | ;; ---------------------------------------
4 | ;; Version Control configuration
5 |
6 | ;; Load magit-todos
7 | (use-package! magit-todos)
8 |
9 | ;; Location of developer tokens - default ~/.authinfo
10 | ;; Use XDG_CONFIG_HOME location or HOME
11 | ;; Optional: (setq auth-source-cache-expiry nil) ; default is 7200 (2h)
12 | (setq auth-sources (list
13 | (concat (getenv "XDG_CONFIG_HOME") "/authinfo.gpg")
14 | "~/.authinfo.gpg"))
15 |
16 |
17 | ;; Use Emacs as $EDITOR (or $GIT_EDITOR) for git commits messages
18 | ;; when using git commit on the command line
19 | ;; (global-git-commit-mode t)
20 |
21 |
22 | ;; Commit message checks
23 | ;; ~/.config/emacs/modules/emacs/vc/config.el
24 | ;; - checks for overlong-summary-line non-empty-line
25 | ;; (setq git-commit-summary-max-length 50
26 | ;; git-commit-style-convention-checks '(overlong-summary-line non-empty-second-line))
27 | (setq git-commit-summary-max-length 60
28 |
29 | ;; Highlight specific characters changed
30 | magit-diff-refine-hunk 'all
31 |
32 | ;; Show project TODO lines in Magit Status
33 | magit-todos-mode t
34 |
35 | ;; Show Libravatar of commit author
36 | magit-revision-show-gravatars '("^Author: " . "^Commit: ")
37 | )
38 |
39 |
40 | ;; Location of Git repositories
41 | ;; define paths and level of sub-directories to search
42 | (setq magit-repository-directories
43 | '(("~/projects/" . 2)))
44 |
45 |
46 | ;; Number of topics displayed (issues, pull requests)
47 | ;; open & closed, negative number for closed topics
48 | ;; or `forge-toggle-closed-visibility'
49 | ;; set closed to 0 to never show closed issues
50 | ;; (setq forge-topic-list-limit '(100 . 0))
51 | (setq forge-topic-list-limit '(100 . -10))
52 |
53 |
54 | ;; GitHub user and organization accounts owned
55 | ;; used by @ c f to create a fork
56 | (setq forge-owned-accounts
57 | '(("practicalli" "practicalli-john"
58 | "ClojureBridgeLondon" "ldnclj"
59 | "clojure-hacks"
60 | "reclojure")))
61 |
62 |
63 | ;; Blacklist specific accounts, over-riding forge-owned-accounts
64 | ;; (setq forge-owned-blacklist
65 | ;; '(("bad-hacks" "really-bad-hacks")))
66 | ;;
67 | ;;
68 | ;;
69 | ;;
70 | ;; End of Version Control configuration
71 | ;; ---------------------------------------
72 |
--------------------------------------------------------------------------------
/README.org:
--------------------------------------------------------------------------------
1 | * Practicalli Doom Emacs Config
2 | A personal configuration for Doom Emacs with a focus on creating a similar key binding and menu experience to that of Spacemacs, as [[https://jr0cket.co.uk/2015/08/spacemacs-first-impressions-from-an-emacs-driven-developer.html][Practicalli has used Spacemacs since 2015]].
3 |
4 | ** To Archive
5 | Practicalli is not actively developing this configuration, although it should be useable with current versions of Doom Emacs and Emacs 28 onward as it is mostly key binding configuration.
6 |
7 | ** Overview
8 |
9 | Doom Emacs default key bindings have been changed significantly and further changes will be made as this project evolves. Therefore this configuration is probably not directly applicable for those already comfortable with the Doom Emacs maintainers workflow (although there are quite a few commonalities).
10 |
11 |
12 | ** Notable key binding changes
13 | ~+bindings.el~ contains all the additonal, remapped and delete Doom key bindings to provide a more mnemonic menu. Module specific configurations may also contain key bindings that override the Doom defaults.
14 |
15 | The most noticalbe key bindings changed from the Doom Emacs defaults include:
16 |
17 | ~,~ is set to local leader and ~SPC~ remains the leader key
18 |
19 | ~SPC TAB~ jumps to previous buffer
20 |
21 | ~SPC l TAB~ jumps to previously selected workspace (layout in Spacemacs terms)
22 |
23 | ~SPC g s~ opens Magit status (rather than stage hunk at point)
24 |
25 | ~fd~ alternative key binding to pressing ~ESC~ key
26 |
27 | ** Org-mode [1/2]
28 | - [-] Pretty checkboxes [1/2]
29 | - [X] Added code from practicalli/spacemacs.d
30 | - [ ] Review why checkbox icons not being used
31 | - [ ] Review org-mode key bindings
32 | - [ ] ~, b d~ to add code blocks via babel demarcate
33 |
34 | ** Screencasts
35 | ~SPC t k~ to enable ~keycast-mode~ which shows key bindings and commands in the modeline as you type, exspecially useful for screencasts (or to learn what commands the key bindings are calling)
36 |
37 | ** Git
38 | For Commit message buffer Doom key binding kept rather than use Spacemacs:
39 | - ~Z Z~ rather than ~, ,~ to confirm the message and commit
40 | - ~Z Q~ rather than ~, k~ to cancel the message without commit
41 |
42 | ** Clojure
43 | ~+clojure.el~ configuration overrides many CIDER variables defined in the clojure Doom module, as well as adding keybindings similar to the Spacemacs Clojure layer.
44 |
--------------------------------------------------------------------------------
/packages.el:
--------------------------------------------------------------------------------
1 | ;; -*- no-byte-compile: t; -*-
2 | ;;; $DOOMDIR/packages.el
3 |
4 | ;; To install a package with Doom you must declare them here and run 'doom sync'
5 | ;; on the command line, then restart Emacs for the changes to take effect -- or
6 | ;; use 'M-x doom/reload'.
7 |
8 |
9 | ;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
10 | ;(package! some-package)
11 |
12 | ;; To install a package directly from a remote git repo, you must specify a
13 | ;; `:recipe'. You'll find documentation on what `:recipe' accepts here:
14 | ;; https://github.com/radian-software/straight.el#the-recipe-format
15 | ;(package! another-package
16 | ; :recipe (:host github :repo "username/repo"))
17 |
18 | ;; If the package you are trying to install does not contain a PACKAGENAME.el
19 | ;; file, or is located in a subdirectory of the repo, you'll need to specify
20 | ;; `:files' in the `:recipe':
21 | ;(package! this-package
22 | ; :recipe (:host github :repo "username/repo"
23 | ; :files ("some-file.el" "src/lisp/*.el")))
24 |
25 | ;; If you'd like to disable a package included with Doom, you can do so here
26 | ;; with the `:disable' property:
27 | ;(package! builtin-package :disable t)
28 |
29 | ;; You can override the recipe of a built in package without having to specify
30 | ;; all the properties for `:recipe'. These will inherit the rest of its recipe
31 | ;; from Doom or MELPA/ELPA/Emacsmirror:
32 | ;(package! builtin-package :recipe (:nonrecursive t))
33 | ;(package! builtin-package-2 :recipe (:repo "myfork/package"))
34 |
35 | ;; Specify a `:branch' to install a package from a particular branch or tag.
36 | ;; This is required for some packages whose default branch isn't 'master' (which
37 | ;; our package manager can't deal with; see radian-software/straight.el#279)
38 | ;(package! builtin-package :recipe (:branch "develop"))
39 |
40 | ;; Use `:pin' to specify a particular commit to install.
41 | ;(package! builtin-package :pin "1a2b3c4d5e")
42 |
43 |
44 | ;; Doom's packages are pinned to a specific commit and updated from release to
45 | ;; release. The `unpin!' macro allows you to unpin single packages...
46 | ;(unpin! pinned-package)
47 | ;; ...or multiple packages
48 | ;(unpin! pinned-package another-pinned-package)
49 | ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
50 | ;(unpin! t)
51 |
52 | ;; Use the latest available packages for Clojure
53 | ;; - cider, clojure-mode
54 | (unpin! (:lang clojure))
55 |
56 | ;; Koacha test runner in Emacs
57 | (package! kaocha-runner)
58 |
59 | ;; Keycast
60 | ;; latest release 2020-11-17
61 | (package! keycast :pin "16d9961d15536054632be1eff75fd0fb1a4420f8")
62 |
63 | ;; Very large files mode loads large files in chunks to open ridiculously large files.
64 |
65 | ;; (package! vlf :recipe (:host github :repo "m00natic/vlfi" :files ("*.el"))
66 | ;; :pin "cc02f2533782d6b9b628cec7e2dcf25b2d05a27c" :disable t)
67 |
--------------------------------------------------------------------------------
/+bindings.el:
--------------------------------------------------------------------------------
1 | ;;; +bindings.el -*- lexical-binding: t; -*-
2 |
3 | ;; Key binding guide
4 | ;; https://discourse.doomemacs.org/t/how-to-re-bind-keys/
5 | ;; NOTE: use `map!' macro for convienience
6 | ;;
7 | ;; Bind key onto Evil Normal state
8 | ;; (map! :after evil
9 | ;; :map evil-normal-state-map
10 | ;; "/" #'+default/search-buffer)
11 |
12 | ;; ------------------------------------------------
13 | ;; Key binding vars
14 |
15 | ;; fd as Esc key binding
16 | ;; https://discourse.doomemacs.org/t/typing-jk-deletes-j-and-returns-to-normal-mode/59/7
17 | (after! evil-escape
18 | (setq evil-escape-key-sequence "fd"))
19 |
20 | ;; https://discourse.doomemacs.org/t/what-are-leader-and-localleader-keys/153
21 | ;; Doom Defaults: `SPC' leader key, `SPC m' local leader
22 | ;; Practicalli: Set local leader to `,'
23 | (setq doom-localleader-key ",")
24 | ;; ------------------------------------------------
25 |
26 |
27 | ;; ------------------------------------------------
28 | ;; Over-ride or add to Doom Emacs default key bindings
29 |
30 | (map! :leader
31 | "SPC" nil
32 | :desc "M-x" "SPC" #'execute-extended-command)
33 |
34 | ;; Layout keys - disable `SPC TAB' workspace prefix
35 | (map! :leader
36 | (:prefix-map ("TAB" . nil))
37 | (:prefix ("l". "Layouts")
38 | :desc "Last Layout" "" #'+workspace/other
39 | :desc "Display Tabs" "d" #'+workspace/display
40 | :desc "Delete layout" "D" #'+workspace/delete
41 | :desc "Layout list" "l" #'+workspace/switch-to
42 | :desc "Load Layout" "L" #'+workspace/load
43 | :desc "New Layout" "n" #'+workspace/new
44 | :desc "Rename Layout" "r" #'+workspace/rename
45 | :desc "Restore session" "R" #'+workspace/restore-last-session
46 | :desc "Save Layout" "s" #'+workspace/save
47 | :desc "Kill Session" "x" #'+workspace/kill-session
48 | :desc "Switch to 0" "0" #'+workspace/switch-to-0
49 | :desc "Switch to 1" "1" #'+workspace/switch-to-1
50 | :desc "Switch to 2" "2" #'+workspace/switch-to-2
51 | :desc "Switch to 3" "3" #'+workspace/switch-to-3
52 | :desc "Switch to 4" "4" #'+workspace/switch-to-4
53 | :desc "Switch to 5" "5" #'+workspace/switch-to-5
54 | :desc "Switch to 6" "6" #'+workspace/switch-to-6
55 | :desc "Switch to 7" "7" #'+workspace/switch-to-7
56 | :desc "Switch to 8" "8" #'+workspace/switch-to-8
57 | :desc "Switch to 9" "9" #'+workspace/switch-to-9))
58 |
59 | ;; Buffer customisations
60 | (map! :leader
61 | "TAB" nil
62 | :desc "Last Buffer" "TAB" #'evil-switch-to-windows-last-buffer)
63 |
64 | ;; Replace Doom `/' highlight with buffer-search
65 | (map! :after evil
66 | :map evil-normal-state-map
67 | "/" #'+default/search-buffer)
68 |
69 | (map! :leader
70 | (:prefix "b"
71 | :desc "Dashboard" "h" #'+doom-dashboard/open
72 | :desc "Toggle Last" "TAB" #'evil-switch-to-windows-last-buffer))
73 |
74 |
75 | ;; Treemacs
76 | ;; Toggle treemacs project browser from project menu
77 | (map! :leader
78 | (:prefix "p"
79 | "t" nil ; disable project todos key binding
80 | :desc "Project browser" "t" #'+treemacs/toggle))
81 |
82 |
83 | ;; Change SPC g s to call Magit Status, rather than stage hunk at point
84 | (map! :leader
85 | (:prefix "g"
86 | :desc "" "s" nil ; remove existing binding
87 | :desc "Magit Status" "s" #'magit-status))
88 |
89 | ;; Diff of files
90 | (map! :leader
91 | (:prefix "f"
92 | :desc "" "d" nil ; remove existing binding
93 | (:prefix ("d" . "diff")
94 | :desc "3 files" "3" #'ediff3
95 | :desc "ediff" "d" #'diff
96 | :desc "ediff" "e" #'ediff
97 | :desc "version" "r" #'vc-root-diff
98 | :desc "version" "v" #'vc-ediff)))
99 |
100 | ;; Format
101 | (map! :leader
102 | (:prefix ("=" . "format")
103 | :desc "buffer" "=" #'+format/buffer
104 | :desc "buffer" "b" #'+format/buffer
105 | :desc "region" "r" #'+format/region
106 | :desc "whitespace" "w" #'delete-trailing-whitespace))
107 |
108 |
109 | ;; ------------------------------------------------
110 | ;; Experiments
111 | ;; Use `,,` to close a commit message and `,k' to cancel
112 | ;; Doom maps `ZZ` to commit, `ZQ' to quit
113 | ;; (map! :after magit
114 | ;; :map text-mode-map
115 | ;; :localleader
116 | ;; "," #'with-editor-finish
117 | ;; "k" #'with-editor-cancel)
118 |
--------------------------------------------------------------------------------
/config.el:
--------------------------------------------------------------------------------
1 | ;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
2 |
3 | ;; Place your private configuration here! Remember, you do not need to run 'doom
4 | ;; sync' after modifying this file!
5 |
6 |
7 | ;; User Identify (optional)
8 | ;; e.g. GPG configuration, email clients, file templates and snippets
9 | (setq user-full-name "Practicalli John"
10 | user-mail-address "john@practical.li")
11 |
12 | ;; Doom exposes five (optional) variables for controlling fonts in Doom:
13 | ;;
14 | ;; - `doom-font' -- the primary font to use
15 | ;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
16 | ;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
17 | ;; presentations or streaming.
18 | ;; - `doom-unicode-font' -- for unicode glyphs
19 | ;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
20 | ;;
21 | ;; See 'C-h v doom-font' for documentation and more examples of what they
22 | ;; accept. For example:
23 | ;;
24 | ;;(setq doom-font (font-spec :family "Fira Code" :size 12 :weight 'semi-light)
25 | ;; doom-variable-pitch-font (font-spec :family "Fira Sans" :size 13))
26 |
27 | (setq doom-font (font-spec :family "Fira Code" :size 16)
28 | doom-big-font (font-spec :family "Fira Code" :size 24)
29 | doom-variable-pitch-font (font-spec :family "Ubuntu" :size 16))
30 |
31 |
32 | ;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
33 | ;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
34 | ;; refresh your font settings. If Emacs still can't find your font, it likely
35 | ;; wasn't installed correctly. Font issues are rarely Doom issues!
36 |
37 | ;; There are two ways to load a theme. Both assume the theme is installed and
38 | ;; available. You can either set `doom-theme' or manually load a theme with the
39 | ;; `load-theme' function. This is the default:
40 | (setq doom-theme 'doom-gruvbox)
41 |
42 | ;; This determines the style of line numbers in effect. If set to `nil', line
43 | ;; numbers are disabled. For relative line numbers, set this to `relative'.
44 | (setq display-line-numbers-type 'relative)
45 |
46 | ;; If you use `org' and don't want your org files in the default location below,
47 | ;; change `org-directory'. It must be set before org loads!
48 | (setq org-directory "~/org/")
49 |
50 |
51 | ;; Whenever you reconfigure a package, make sure to wrap your config in an
52 | ;; `after!' block, otherwise Doom's defaults may override your settings. E.g.
53 | ;;
54 | ;; (after! PACKAGE
55 | ;; (setq x y))
56 | ;;
57 | ;; The exceptions to this rule:
58 | ;;
59 | ;; - Setting file/directory variables (like `org-directory')
60 | ;; - Setting variables which explicitly tell you to set them before their
61 | ;; package is loaded (see 'C-h v VARIABLE' to look up their documentation).
62 | ;; - Setting doom variables (which start with 'doom-' or '+').
63 | ;;
64 | ;; Here are some additional functions/macros that will help you configure Doom.
65 | ;;
66 | ;; - `load!' for loading external *.el files relative to this one
67 | ;; - `use-package!' for configuring packages
68 | ;; - `after!' for running code after a package has loaded
69 | ;; - `add-load-path!' for adding directories to the `load-path', relative to
70 | ;; this file. Emacs searches the `load-path' when you load packages with
71 | ;; `require' or `use-package'.
72 | ;; - `map!' for binding new keys
73 | ;;
74 | ;; To get information about any of these functions/macros, move the cursor over
75 | ;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k').
76 | ;; This will open documentation for it, including demos of how they are used.
77 | ;; Alternatively, use `C-h o' to look up a symbol (functions, variables, faces,
78 | ;; etc).
79 | ;;
80 | ;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
81 | ;; they are implemented.
82 |
83 |
84 | ;; --------------------------------------------------
85 | ;; Practicalli Configuration
86 | ;; Search https://discourse.doomemacs.org/ for example configuration
87 |
88 | ;; Practicalli Logo on startup dashboard
89 | (setq fancy-splash-image "~/.config/doom/images/practicalli-logo-dark.svg")
90 |
91 | ;; Open Doom Emacs maximised
92 | (add-to-list 'default-frame-alist '(fullscreen . maximized))
93 |
94 | ;; Modeline
95 | ;; - add current workspace name
96 | ;; - add major mode icon
97 | (after! doom-modeline
98 | (setq doom-modeline-persp-name t
99 | doom-modeline-major-mode-icon t))
100 |
101 |
102 | ;; Projects
103 | ;; Define a project path to discover projects using SPC Tab D
104 | ;; https://docs.projectile.mx/projectile/usage.html
105 | ;; (setq projectile-project-search-path '("~/projects/" "~/work/" ("~/github" . 1)))
106 | (setq projectile-project-search-path '(("~/projects" . 2) ("~/.config" . 1)))
107 |
108 | ;; Disable projectile cache - saves requirement to invalidate cache when moving files
109 | ;; (setq projectile-enable-caching nil)
110 | ;;
111 | ;; Delete whitespace on save, including in markdow-mode
112 | (setq ws-butler-global-exempt-modes '(special-mode comint-mode term-mode eshell-mode diff-mode))
113 |
114 | ;; Completion results order by history of use and then alphabetical
115 | ;; - does not work for autocomplete popups
116 | ;; (setq vertico-sort-function 'vertico-sort-history-alpha)
117 |
118 | ;; ---------------------------------------
119 |
120 |
121 | ;; ---------------------------------------
122 | ;; Additional Configuration
123 |
124 | ;; Which-key and Evil Key Bindings - Spacemacs style
125 | (load! "+bindings")
126 |
127 | ;; Clojure mode & Cider Configuration + key bindings
128 | (load! "+clojure")
129 |
130 | ;; LSP Configuration
131 | (load! "+lsp")
132 |
133 | ;; Magit and Version Control
134 | (load! "+git")
135 |
136 | ;; Markdown mode
137 | (load! "+markdown.el")
138 |
139 | ;; Org-mode configuraiton
140 | (load! "+org-mode")
141 |
142 | ;; Structural Editing - Smartparens
143 | (load! "+smartparens.el")
144 |
145 | ;; Configure packages outside of Doom modules
146 | ;; - keycast
147 | (load! "+package-config")
148 |
149 | ;; ---------------------------------------
150 |
--------------------------------------------------------------------------------
/CHANGELOG.org:
--------------------------------------------------------------------------------
1 | #+TITLE: Changelog - Practicalli Doom Emacs Config
2 |
3 | * Unreleased
4 |
5 | * 2023-02-11
6 | ** Added
7 | *** main init: enable lookup of words in online dictionary
8 | *** init: add +peek flag to lsp module
9 | *** init: enable spell with flyspell flag
10 | *** init: enable vterm terminal support
11 | *** init: add ranger support to dired
12 | *** readme: update description of project
13 | *** clojure: portal commands with nrepl sync
14 | *** clojure: refactor and update cider variable settings
15 | *** config: remove vertico sort function
16 | *** package: use latest version of CIDER available
17 | *** practicalli/main package: load package-config.el file
18 | *** practicalli/main markdown: add table keys, move toggle menu
19 | *** smartparens: key bindings for structural editing
20 | *** config: remove doom modeline workspace name variable
21 | *** binding: buffer search replaces / hightlight search
22 | *** binding: binding sections with line comment
23 | *** binding: binding guilde url update
24 | *** config: dark version of new practicalli logo
25 | *** binding: add file diff binding menu
26 | *** config: enable ws-butler for markdow mode
27 | *** git: magit-todos, refine-hunk & gravitar
28 | *** lsp: headline-breadcrumb - show only symbols
29 | *** lsp: headline-breadcrumb set twice
30 | *** binding: use doom bindings to commit / abort commit
31 | *** binding: last layout for SPC TAB binding
32 | *** content: minor content corrections
33 | *** module: Doom yaml module with LSP support
34 | *** module: Doom web module with LSP support
35 | *** module: Doom json module with LSP support
36 | *** config: clean up practicalli specific configs
37 | *** org-mode: added TODO highlights and file locations
38 | *** dashboard: practicalli logo svg added
39 | *** lsp: clean up configuration, remove local lsp server
40 | *** git: clean up git config and load from main config
41 | *** clojure: key bindings and functions from Spacemacs
42 | *** readme: add screencats docs for keycast mode
43 | *** readme: fix link to Spacemacs article
44 | *** binding: format commands & whitespace cleanup
45 | *** changelog: updated changelog from start of project
46 | *** config: wrap doom-modeline custom config in after!
47 | *** config: set doom-font to size 16
48 | *** config: doom-big-font set to fira code size 24
49 |
50 | * 2023-01-03
51 | ** Added
52 | *** package: [[https://github.com/tarsius/keycast][Keycast package]] to show keys and commands on the modeline
53 | *** bindings: ~SPC t k~ toggles keycast mode
54 | *** +package-configuration.el created to configure packages outside of Doom modules
55 |
56 | * 2023-01-03
57 | ** Added
58 | *** module: add unicode support for more characters
59 | *** bindings: override SPC SPC to call M-x
60 |
61 | * 2023-01-01
62 | ** Added
63 | *** snippets: mkdocs snippets
64 | *** config: modeline workspace name and major mode icon
65 | *** git: separate config file
66 | *** packages: add kaocha-runner package
67 | *** bindings: fix magit status key binding spc g s
68 | *** bindings: spc p t to toggle treemacs view of project
69 | *** module: add doom with LSP support
70 | *** module: add font ligature support
71 | *** module: add emoji support
72 | *** init: minimise CPU usage during native compilation
73 | *** config: maximise Emacs frame on startup
74 | *** module: add make for Makefile support
75 | *** module: use magit with forge
76 | *** module: use treemacs with lsp
77 | *** config: projectile search path for project discovery
78 | *** config: magit key bindings for commit message
79 | *** config: , as local leader
80 | *** module: Docker support
81 | *** module: JSON syntax support
82 | *** module: yaml syntax support
83 | *** lsp: enable breadcrumbs in LSP UI, add docs
84 | *** module: clojure and LSP support
85 | *** module: edit with multiple cursors
86 | *** module: add treemacs for visual file browser
87 | *** module: remove long line tilde marks from fringe
88 | *** config: set relative line numbers for vim line jumps
89 | *** config: set doom-gruvbox theme
90 | *** binding: Spacemacs sytle key bindings for working with project files and buffers
91 | *** binding: fd as escape key binding
92 | *** Set localleader to ~,~
93 |
94 |
95 |
96 |
97 |
98 | a0ebce1 * package: keycast package and key binding
99 | fcc7835 * module: add unicode support for more characters
100 | 491db2a * readme: draft readme to explain the purpose of repo
101 | 9ea6a44 * bindings: override SPC SPC to call M-x
102 | 74d4660 * snippets: mkdocs snippets
103 | 854d845 * config: modeline workspace name and major mode icon
104 | bd7968c * git: separate config file
105 | a0d52c8 * packages: add kaocha-runner package
106 | 41fc80e * bindings: fix magit status key binding spc g s
107 | 2ef7039 * bindings: spc p t to toggle treemacs view of project
108 | f31946b * lsp: enable breadcrumbs in LSP UI, add docs
109 | db2e59e * lsp: separate config file
110 | 51df9db * clojure: separate config file & key bindings
111 | 1d407ef * bindings: separate bindings config file
112 | 8f3562b * module: add doom with LSP support
113 | 9932969 * module: add font ligature support
114 | 00b0f03 * module: add emoji support
115 | 2bd3064 * init: minimise CPU usage during native compilation
116 | ab37811 * config: maximise Emacs frame on startup
117 | d398162 * module: add make for Makefile support
118 | 62a3774 * module: use magit with forge
119 | 19b42c6 * module: use treemacs with lsp
120 | 1f78b82 * config: projectile search path for project discovery
121 | 12a8b98 * config: magit key bindings for commit message
122 | def59c7 * config: , as local leader
123 | 57efde4 * config: fd as escape key binding
124 | 64ff101 * module: Docker support
125 | 1d9e609 * module: JSON syntax support
126 | 7ff2562 * module: yaml syntax support
127 | fadfb20 * module: clojure and LSP support
128 | a13f604 * module: edit with multiple cursors
129 | 6ff29c1 * module: format on save
130 | 2bcc173 * module: add treemacs for visual file browser
131 | 23be776 * module: remove long line tilde marks from fringe
132 | 71ab537 * config: set relative line numbers for vim line jumps
133 | 2c50e68 * config: set doom-gruvbox theme
134 | f4fbc43 * config: set fira code 14 font
135 | 2ace490 * config: add user identity
136 | 9b666b7 * config: default doom config from doom install
137 |
--------------------------------------------------------------------------------
/images/practicalli-logo.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
167 |
--------------------------------------------------------------------------------
/images/practicalli-logo-dark.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
169 |
--------------------------------------------------------------------------------
/init.el:
--------------------------------------------------------------------------------
1 | ;;; init.el -*- lexical-binding: t; -*-
2 |
3 | ;; This file controls what Doom modules are enabled and what order they load
4 | ;; in. Remember to run 'doom sync' after modifying it!
5 |
6 | ;; NOTE Press 'SPC h d h' (or 'C-h d h' for non-vim users) to access Doom's
7 | ;; documentation. There you'll find a link to Doom's Module Index where all
8 | ;; of our modules are listed, including what flags they support.
9 |
10 | ;; NOTE Move your cursor over a module's name (or its flags) and press 'K' (or
11 | ;; 'C-c c k' for non-vim users) to view its documentation. This works on
12 | ;; flags as well (those symbols that start with a plus).
13 | ;;
14 | ;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
15 | ;; directory (for easy access to its source code).
16 |
17 |
18 | ;; Emacs Native Compilation
19 | ;; Emacs 28 with native compilation enabled will compile each package
20 | ;; the first time it is added or if the major version of Emacs changes
21 | ;; Minimise resources used by native compilation
22 | (setq native-comp-async-jobs-number 1)
23 |
24 |
25 | (doom! :input
26 | ;;bidi ; (tfel ot) thgir etirw uoy gnipleh
27 | ;;chinese
28 | ;;japanese
29 | ;;layout ; auie,ctsrnm is the superior home row
30 |
31 | :completion
32 | company ; the ultimate code completion backend
33 | ;;helm ; the *other* search engine for love and life
34 | ;;ido ; the other *other* search engine...
35 | ;;ivy ; a search engine for love and life
36 | vertico ; the search engine of the future
37 |
38 | :ui
39 | ;;deft ; notational velocity for Emacs
40 | doom ; what makes DOOM look the way it does
41 | doom-dashboard ; a nifty splash screen for Emacs
42 | ;;doom-quit ; DOOM quit-message prompts when you quit Emacs
43 | (emoji +unicode) ; 🙂
44 | hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
45 | ;;hydra
46 | ;;indent-guides ; highlighted indent columns
47 | ligatures ; ligatures and symbols to make your code pretty again
48 | ;;minimap ; show a map of the code on the side
49 | modeline ; snazzy, Atom-inspired modeline, plus API
50 | ;;nav-flash ; blink cursor line after big motions
51 | ;;neotree ; a project drawer, like NERDTree for vim
52 | ophints ; highlight the region an operation acts on
53 | (popup +defaults) ; tame sudden yet inevitable temporary windows
54 | ;;tabs ; a tab bar for Emacs
55 | (treemacs +lsp) ; a project drawer, like neotree but cooler
56 | unicode ; extended unicode support for various languages
57 | (vc-gutter +pretty) ; vcs diff in the fringe
58 | ;; vi-tilde-fringe ; fringe tildes to mark beyond EOB
59 | ;;window-select ; visually switch windows
60 | workspaces ; tab emulation, persistence & separate workspaces
61 | ;;zen ; distraction-free coding or writing
62 |
63 | :editor
64 | (evil +everywhere); come to the dark side, we have cookies
65 | file-templates ; auto-snippets for empty files
66 | fold ; (nigh) universal code folding
67 | (format +onsave) ; automated prettiness
68 | ;;god ; run Emacs commands without modifier keys
69 | ;;lispy ; vim for lisp, for people who don't like vim
70 | multiple-cursors ; editing in many places at once
71 | ;;objed ; text object editing for the innocent
72 | ;;parinfer ; turn lisp into python, sort of
73 | ;;rotate-text ; cycle region at point between text candidates
74 | snippets ; my elves. They type so I don't have to
75 | ;;word-wrap ; soft wrapping with language-aware indent
76 |
77 | :emacs
78 | (dired +ranger) ; making dired pretty [functional]
79 | electric ; smarter, keyword-based electric-indent
80 | ;;ibuffer ; interactive buffer management
81 | undo ; persistent, smarter undo for your inevitable mistakes
82 | vc ; version-control and Emacs, sitting in a tree
83 |
84 | :term
85 | ;;eshell ; the elisp shell that works everywhere
86 | ;;shell ; simple shell REPL for Emacs
87 | ;;term ; basic terminal emulator for Emacs
88 | vterm ; the best terminal emulation in Emacs
89 |
90 | :checkers
91 | syntax ; tasing you for every semicolon you forget
92 | (spell +flyspell) ; tasing you for misspelling mispelling
93 | ;;grammar ; tasing grammar mistake every you make
94 |
95 | :tools
96 | ;;ansible
97 | ;;biblio ; Writes a PhD for you (citation needed)
98 | ;;debugger ; FIXME stepping through code, to help you add bugs
99 | ;;direnv
100 | (docker +lsp)
101 | ;;editorconfig ; let someone else argue about tabs vs spaces
102 | ;;ein ; tame Jupyter notebooks with emacs
103 | (eval +overlay) ; run code, run (also, repls)
104 | ;;gist ; interacting with github gists
105 | (lookup +dictionary) ; navigate your code and its documentation
106 | (lsp +peek) ; M-x vscode
107 | (magit +forge) ; a git porcelain for Emacs
108 | make ; run make tasks from Emacs
109 | ;;pass ; password manager for nerds
110 | ;;pdf ; pdf enhancements
111 | ;;prodigy ; FIXME managing external services & code builders
112 | ;;rgb ; creating color strings
113 | ;;taskrunner ; taskrunner for all your projects
114 | ;;terraform ; infrastructure as code
115 | ;;tmux ; an API for interacting with tmux
116 | ;;tree-sitter ; syntax and parsing, sitting in a tree...
117 | ;;upload ; map local to remote projects via ssh/ftp
118 |
119 | :os
120 | (:if IS-MAC macos) ; improve compatibility with macOS
121 | ;;tty ; improve the terminal Emacs experience
122 |
123 | :lang
124 | ;;agda ; types of types of types of types...
125 | ;;beancount ; mind the GAAP
126 | ;;(cc +lsp) ; C > C++ == 1
127 | (clojure +lsp) ; java with a lisp
128 | ;;common-lisp ; if you've seen one lisp, you've seen them all
129 | ;;coq ; proofs-as-programs
130 | ;;crystal ; ruby at the speed of c
131 | ;;csharp ; unity, .NET, and mono shenanigans
132 | ;;data ; config/data formats
133 | ;;(dart +flutter) ; paint ui and not much else
134 | ;;dhall
135 | ;;elixir ; erlang done right
136 | ;;elm ; care for a cup of TEA?
137 | emacs-lisp ; drown in parentheses
138 | ;;erlang ; an elegant language for a more civilized age
139 | ;;ess ; emacs speaks statistics
140 | ;;factor
141 | ;;faust ; dsp, but you get to keep your soul
142 | ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER)
143 | ;;fsharp ; ML stands for Microsoft's Language
144 | ;;fstar ; (dependent) types and (monadic) effects and Z3
145 | ;;gdscript ; the language you waited for
146 | ;;(go +lsp) ; the hipster dialect
147 | ;;(graphql +lsp) ; Give queries a REST
148 | ;;(haskell +lsp) ; a language that's lazier than I am
149 | ;;hy ; readability of scheme w/ speed of python
150 | ;;idris ; a language you can depend on
151 | (json +lsp) ; At least it ain't XML
152 | ;;(java +lsp) ; the poster child for carpal tunnel syndrome
153 | ;;javascript ; all(hope(abandon(ye(who(enter(here))))))
154 | ;;julia ; a better, faster MATLAB
155 | ;;kotlin ; a better, slicker Java(Script)
156 | ;;latex ; writing papers in Emacs has never been so fun
157 | ;;lean ; for folks with too much to prove
158 | ;;ledger ; be audit you can be
159 | ;;lua ; one-based indices? one-based indices
160 | markdown ; writing docs for people to ignore
161 | ;;nim ; python + lisp at the speed of c
162 | ;;nix ; I hereby declare "nix geht mehr!"
163 | ;;ocaml ; an objective camel
164 | org ; organize your plain life in plain text
165 | ;;php ; perl's insecure younger brother
166 | ;;plantuml ; diagrams for confusing people more
167 | ;;purescript ; javascript, but functional
168 | ;;python ; beautiful is better than ugly
169 | ;;qt ; the 'cutest' gui framework ever
170 | ;;racket ; a DSL for DSLs
171 | ;;raku ; the artist formerly known as perl6
172 | ;;rest ; Emacs as a REST client
173 | ;;rst ; ReST in peace
174 | ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"}
175 | ;;(rust +lsp) ; Fe2O3.unwrap().unwrap().unwrap().unwrap()
176 | ;;scala ; java, but good
177 | ;;(scheme +guile) ; a fully conniving family of lisps
178 | sh ; she sells {ba,z,fi}sh shells on the C xor
179 | ;;sml
180 | ;;solidity ; do you need a blockchain? No.
181 | ;;swift ; who asked for emoji variables?
182 | ;;terra ; Earth and Moon in alignment for performance.
183 | (web +lsp) ; the tubes
184 | (yaml +lsp) ; JSON, but readable
185 | ;;zig ; C, but simpler
186 |
187 | :email
188 | ;;(mu4e +org +gmail)
189 | ;;notmuch
190 | ;;(wanderlust +gmail)
191 |
192 | :app
193 | ;;calendar
194 | ;;emms
195 | ;;everywhere ; *leave* Emacs!? You must be joking
196 | ;;irc ; how neckbeards socialize
197 | ;;(rss +org) ; emacs as an RSS reader
198 | ;;twitter ; twitter client https://twitter.com/vnought
199 |
200 | :config
201 | ;;literate
202 | (default +bindings +smartparens))
203 |
--------------------------------------------------------------------------------
/+clojure.el:
--------------------------------------------------------------------------------
1 | ;;; $DOOMDIR/+clojure.el -*- lexical-binding: t; -*-
2 |
3 | ;; ---------------------------------------
4 | ;; Clojure
5 |
6 | ;; Connecting to a reomote nREPL server
7 | ;; (setq nrepl-use-ssh-fallback-for-remote-hosts t)
8 |
9 | ;; Configure CIDER variables & LSP hooks
10 |
11 | (use-package! clojure-mode
12 | :config
13 | (setq clojure-indent-style 'align-arguments
14 | clojure-align-forms-automatically t
15 | clojure-toplevel-inside-comment-form t ;; evaluate expressions in comment as top level
16 | ))
17 |
18 |
19 | (use-package! cider
20 | :after clojure-mode
21 | :config
22 | (setq cider-show-error-buffer t ; show stacktrace buffer
23 | cider-print-fn 'puget ; pretty printing with sorted keys / set values
24 | cider-result-overlay-position 'at-point ; results shown right after expression
25 | cider-overlays-use-font-lock t
26 |
27 | ;; LSP features over Cider features
28 | cider-font-lock-dynamically nil ; use lsp semantic tokens
29 | cider-eldoc-display-for-symbol-at-point nil ; use lsp
30 | cider-use-xref nil ; cider xref to find definitions
31 |
32 | ;; minimise the repl buffer activity
33 | cider-repl-buffer-size-limit 100 ; limit lines shown in REPL buffer
34 | cider-repl-display-help-banner nil ; disable help banner
35 | cider-repl-history-size 10 ; limit command history
36 | cider-repl-history-file nil ; write repl buffer commands to file DOOMDIR/.local/cider-repl-history
37 | cider-repl-history-highlight-current-entry nil ; cider default
38 | cider-repl-history-highlight-inserted-item nil ; cider default
39 | cider-repl-history-quit-action 'quit-window ; restores previous emacs window config (cider default )
40 | cider-repl-pop-to-buffer-on-connect nil ; REPL buffer shown at starup (nil does not show buffer)
41 | cider-repl-use-clojure-font-lock nil
42 | cider-repl-use-pretty-printing nil
43 | )
44 | (set-lookup-handlers! '(cider-mode cider-repl-mode) nil) ; use lsp
45 | (set-popup-rule! "*cider-test-report*" :side 'right :width 0.4)
46 | (set-popup-rule! "^\\*cider-repl" :side 'bottom :quit nil)
47 | ;; use lsp completion
48 | (add-hook 'cider-mode-hook (lambda () (remove-hook 'completion-at-point-functions #'cider-complete-at-point))))
49 |
50 |
51 |
52 | ;; Kaocha test runner from Emacs
53 | ;; - provides rich test reports
54 | (use-package! kaocha-runner
55 | :after cider
56 | :config
57 | ;; enable Kaocha test runner
58 | (setq clojure-enable-kaocha-runner t))
59 |
60 | ;; End of Clojure
61 | ;; ---------------------------------------
62 |
63 |
64 | ;; ---------------------------------------
65 | ;; Clojure helper functions
66 |
67 | ;; Toggle reader comment #_ at beginnig of an expression
68 | (defun clojure-toggle-reader-comment-sexp ()
69 | (interactive)
70 | (let* ((point-pos1 (point)))
71 | (evil-insert-line 0)
72 | (let* ((point-pos2 (point))
73 | (cmtstr "#_")
74 | (cmtstr-len (length cmtstr))
75 | (line-start (buffer-substring-no-properties point-pos2 (+ point-pos2 cmtstr-len)))
76 | (point-movement (if (string= cmtstr line-start) -2 2))
77 | (ending-point-pos (+ point-pos1 point-movement 1)))
78 | (if (string= cmtstr line-start)
79 | (delete-char cmtstr-len)
80 | (insert cmtstr))
81 | (goto-char ending-point-pos)))
82 | (evil-normal-state))
83 |
84 | ;; Assign keybinding to the toggle-reader-comment-sexp function
85 | (define-key global-map (kbd "C-#") 'clojure-toggle-reader-comment-sexp)
86 |
87 | ;; ---------------------------------------
88 |
89 |
90 | ;; ---------------------------------------
91 | ;; Portal Integration
92 |
93 | ;; def portal to the dev namespace to allow dereferencing via @dev/portal
94 | (defun portal.api/open ()
95 | (interactive)
96 | (cider-nrepl-sync-request:eval
97 | "(do (ns dev) (def portal ((requiring-resolve 'portal.api/open))) (add-tap (requiring-resolve 'portal.api/submit)))"))
98 |
99 | (defun portal.api/clear ()
100 | (interactive)
101 | (cider-nrepl-sync-request:eval "(portal.api/clear)"))
102 |
103 | (defun portal.api/close ()
104 | (interactive)
105 | (cider-nrepl-sync-request:eval "(portal.api/close)"))
106 |
107 | ;; Key bindings added to Debug Clojure section
108 | ;; - , d p p - portal open
109 | ;; - , d p c - portal clear
110 | ;; - , d p D - portal clear
111 |
112 | ;; ---------------------------------------
113 |
114 |
115 | ;; ---------------------------------------
116 | ;; Clojure key bindings
117 | ;; TODO: review evaluation key bindings from Spacemacs
118 |
119 | (map! :after cider
120 | :map clojure-mode-map
121 | :localleader
122 | :desc "REPL session" "'" #'sesman-start
123 |
124 | ;; Debug Clojure
125 | (:prefix ("d" . "debug/inspect")
126 | :desc "debug" "d" #'cider-debug-defun-at-point
127 | (:prefix ("i" . "inspect")
128 | :desc "last expression" "e" #'cider-inspect-last-sexp
129 | :desc "expression" "f" #'cider-inspect-defun-at-point
130 | :desc "inspector" "i" #'cider-inspect
131 | :desc "last result" "l" #'cider-inspect-last-result
132 | (:prefix ("p" . "portal")
133 | :desc "Clear" "c" #'portal.api/open
134 | :desc "Clear" "D" #'portal.api/close
135 | :desc "Open" "p" #'portal.api/open)
136 | :desc "value" "v" #'cider-inspect-expr))
137 |
138 | ;; Evaluation
139 | (:prefix "e"
140 | :desc "Expression to comment" ";" #'cider-eval-defun-to-comment
141 | ;; :desc "" "e$" #'spacemacs/cider-eval-sexp-end-of-line
142 | :desc "at point" "(" #'cider-eval-list-at-point
143 | :desc "buffer" "b" #'cider-eval-buffer
144 | "D" nil ; Doom: send to repl
145 | :desc "prev expression" "e" #'cider-eval-last-sexp
146 | :desc "expresion" "f" #'cider-eval-defun-at-point
147 | :desc "interupt" "i" #'cider-interrupt
148 | ;; :desc "" "el" #'spacemacs/cider-eval-sexp-end-of-line
149 | :desc "macroexpand" "m" #'cider-macroexpand-1
150 | :desc "macroexpand all" "M" #'cider-macroexpand-all
151 | :desc "region" "r" #'cider-eval-region
152 | :desc "undefine" "u" #'cider-undef
153 | :desc "undefine" "U" #'cider-undef-all
154 | :desc "expresion at point" "v" #'cider-eval-sexp-at-point
155 | :desc "expresion upto point" "V" #'cider-eval-sexp-up-to-point
156 | :desc "replace with result" "w" #'cider-eval-last-sexp-and-replace)
157 |
158 | ;; Format Clojure
159 | (:prefix ("=" . "format")
160 | :desc "buffer" "=" #'cider-format-buffer
161 | :desc "region" "r" #'cider-format-region
162 | :desc "expression" "f" #'cider-format-defun
163 | (:prefix ("e" . "edn")
164 | :desc "expression" "b" #'cider-format-edn-buffer
165 | :desc "prev expression" "e" #'cider-format-edn-last-sexp
166 | :desc "expression" "r" #'cider-format-edn-region))
167 |
168 | ;; Goto / jump
169 | (:prefix ("g" . "goto/jump")
170 | :desc "pop back" "b" #'cider-pop-back
171 | :desc "classpath" "c" #'cider-classpath
172 | ;; :desc "Find var" "c" #'spacemacs/clj-find-var
173 | :desc "find ns" "n" #'cider-find-ns
174 | :desc "error" "e" #'cider-jump-to-compilation-error
175 | :desc "resource" "r" #'cider-find-resource
176 | :desc "spec" "s" #'cider-browse-spec
177 | :desc "spec All" "S" #'cider-browse-spec-all)
178 |
179 | ;; Help & Documentation
180 | (:prefix ("h" . "help")
181 | :desc "apropos" "a" #'cider-apropos
182 | :desc "cheetsheet" "c" #'cider-cheatsheet
183 | :desc "clojure docs" "d" #'cider-clojuredocs
184 | :desc "javadoc" "j" #'cider-javadoc
185 | :desc "browse ns" "n" #'cider-browse-ns
186 | :desc "browse all ns" "N" #'cider-browse-ns-all
187 | :desc "browse spec" "s" #'cider-browse-spec
188 | :desc "browse all spe" "S" #'cider-browse-spec-all)
189 |
190 | ;; Evaluation - Namespaces
191 | (:prefix ("n" . "namespace")
192 | :desc "reload all" "a" #'cider-ns-reload-all
193 | :desc "" "n" #'cider-eval-ns-form
194 | :desc "" "r" #'cider-ns-refresh
195 | :desc "" "l" #'cider-ns-reload
196 | :desc "" "L" #'cider-ns-reload-all)
197 |
198 | ;; Evaluation - Pretty print
199 | (:prefix ("n" . "Pretty print")
200 | :desc "Expression comment" ";" #'cider-pprint-eval-defun-to-comment
201 | :desc "Preceeding expresion comment" ":" #'cider-pprint-eval-last-sexp-to-comment
202 | :desc "Expression" "f" #'cider-pprint-eval-defun-at-point
203 | :desc "Preceeding Expression" "e" #'cider-pprint-eval-last-sexp)
204 |
205 | ;; Refactor - Doom clj-refactor hydra menu
206 | (:prefix-map ("R" . nil))
207 |
208 | ;; REPL Sesison management
209 | (:prefix ("s" . "REPL Session")
210 | ;; :desc "toggle buffer" "a" (if (eq m 'cider-repl-mode) 'cider-switch-to-last-clojure-buffer 'cider-switch-to-repl-buffer)
211 | :desc "Browse Session" "b" #'sesman-browser
212 | :desc "Goto Session" "g" #'sesman-goto
213 | :desc "Session Info" "i" #'sesman-info
214 | :desc "quit" "q" #'sesman-quit
215 | :desc "quit session" "Q" #'sesman-quit-session
216 | :desc "restart" "r" #'sesman-restart
217 | :desc "start Session" "s" #'sesman-start
218 |
219 | (:prefix ("l" . "Link Sessions")
220 | :desc "buffer" "b" #'sesman-link-with-buffer
221 | :desc "directory" "d" #'sesman-link-with-directory
222 | :desc "project" "p" #'sesman-link-with-project
223 | :desc "project" "s" #'cider-connect-sibling-clj
224 | :desc "project" "S" #'cider-connect-sibling-cljs
225 | :desc "unlink" "u" #'sesman-unlink))
226 |
227 | ;; Testing
228 | (:prefix ("t" . "Testing")
229 | :desc "loaded" "l" #'cider-test-run-loaded-tests
230 | :desc "namespace" "n" #'cider-test-run-ns-tests
231 | :desc "project" "p" #'cider-test-run-project-tests
232 | :desc "filters" "s" #'cider-test-run-ns-tests-with-filters
233 | :desc "show report" "S" #'cider-test-show-report
234 | :desc "filters" "r" #'cider-test-rerun-failed-tests
235 | :desc "filters" "R" #'cider-test-rerun-test
236 | :desc "test" "t" #'cider-test-run-test)
237 |
238 | (:prefix ("T" . "Toggle")
239 | :desc "auto-test" "a" #'cider-auto-test-mode
240 | :desc "enlightenment" "e" #'cider-enlighten-mode
241 | :desc "namespace" "n" #'cider-test-run-ns-tests
242 | :desc "project" "p" #'cider-test-run-project-tests
243 | :desc "filters" "s" #'cider-test-run-ns-tests-with-filters
244 | :desc "show report" "S" #'cider-test-show-report
245 | :desc "filters" "r" #'cider-test-rerun-failed-tests
246 | :desc "filters" "R" #'cider-test-rerun-test
247 | :desc "test" "t" #'cider-test-run-test))
248 |
249 |
250 | ;; Kaocha test runner from CIDER - Requires running REPL
251 | ;; next prefix expressions for key sequence, i.e. `SPC t k'
252 | (map! :after kaocha-runner
253 | :map clojure-mode-map
254 | :localleader
255 | (:prefix "t"
256 | (:prefix ("k". "Kaocha")
257 | :desc "Run current test" "t" #'kaocha-runner-run-test-at-point
258 | :desc "Run test" "r" #'kaocha-runner-run-tests
259 | :desc "Run all tests" "a" #'kaocha-runner-run-all-tests
260 | :desc "Runner Warnings" "w" #'kaocha-runner-show-warnings
261 | :desc "Kaocha Runner" "h" #'kaocha-runner-hide-windows)))
262 |
263 |
264 | ;; End of Clojure Key bindings
265 | ;; ---------------------------------------
266 |
267 |
268 | ;; ---------------------------------------
269 | ;; Clojure-mode configurations
270 | ;;
271 | ;; Do not indent single ; comment characters
272 | ;; (add-hook 'clojure-mode-hook (lambda () (setq-local comment-column 0)))
273 |
274 | ;; Auto-indent code automatically
275 | ;; https://emacsredux.com/blog/2016/02/07/auto-indent-your-code-with-aggressive-indent-mode/
276 | ;; Conflicts with Clojure LSP automatic formatting
277 | ;; (add-hook 'clojure-mode-hook #'aggressive-indent-mode)
278 |
279 | ;; Lookup functions in Clojure - The Essentail Reference book
280 | ;; https://github.com/p3r7/clojure-essential-ref
281 | ;; (spacemacs/set-leader-keys "oh" 'clojure-essential-ref)
282 | ;;
283 | ;; end of clojure configuration
284 | ;; ---------------------------------------
285 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Attribution-ShareAlike 4.0 International
2 |
3 | =======================================================================
4 |
5 | Creative Commons Corporation ("Creative Commons") is not a law firm and
6 | does not provide legal services or legal advice. Distribution of
7 | Creative Commons public licenses does not create a lawyer-client or
8 | other relationship. Creative Commons makes its licenses and related
9 | information available on an "as-is" basis. Creative Commons gives no
10 | warranties regarding its licenses, any material licensed under their
11 | terms and conditions, or any related information. Creative Commons
12 | disclaims all liability for damages resulting from their use to the
13 | fullest extent possible.
14 |
15 | Using Creative Commons Public Licenses
16 |
17 | Creative Commons public licenses provide a standard set of terms and
18 | conditions that creators and other rights holders may use to share
19 | original works of authorship and other material subject to copyright
20 | and certain other rights specified in the public license below. The
21 | following considerations are for informational purposes only, are not
22 | exhaustive, and do not form part of our licenses.
23 |
24 | Considerations for licensors: Our public licenses are
25 | intended for use by those authorized to give the public
26 | permission to use material in ways otherwise restricted by
27 | copyright and certain other rights. Our licenses are
28 | irrevocable. Licensors should read and understand the terms
29 | and conditions of the license they choose before applying it.
30 | Licensors should also secure all rights necessary before
31 | applying our licenses so that the public can reuse the
32 | material as expected. Licensors should clearly mark any
33 | material not subject to the license. This includes other CC-
34 | licensed material, or material used under an exception or
35 | limitation to copyright. More considerations for licensors:
36 | wiki.creativecommons.org/Considerations_for_licensors
37 |
38 | Considerations for the public: By using one of our public
39 | licenses, a licensor grants the public permission to use the
40 | licensed material under specified terms and conditions. If
41 | the licensor's permission is not necessary for any reason--for
42 | example, because of any applicable exception or limitation to
43 | copyright--then that use is not regulated by the license. Our
44 | licenses grant only permissions under copyright and certain
45 | other rights that a licensor has authority to grant. Use of
46 | the licensed material may still be restricted for other
47 | reasons, including because others have copyright or other
48 | rights in the material. A licensor may make special requests,
49 | such as asking that all changes be marked or described.
50 | Although not required by our licenses, you are encouraged to
51 | respect those requests where reasonable. More_considerations
52 | for the public:
53 | wiki.creativecommons.org/Considerations_for_licensees
54 |
55 | =======================================================================
56 |
57 | Creative Commons Attribution-ShareAlike 4.0 International Public
58 | License
59 |
60 | By exercising the Licensed Rights (defined below), You accept and agree
61 | to be bound by the terms and conditions of this Creative Commons
62 | Attribution-ShareAlike 4.0 International Public License ("Public
63 | License"). To the extent this Public License may be interpreted as a
64 | contract, You are granted the Licensed Rights in consideration of Your
65 | acceptance of these terms and conditions, and the Licensor grants You
66 | such rights in consideration of benefits the Licensor receives from
67 | making the Licensed Material available under these terms and
68 | conditions.
69 |
70 |
71 | Section 1 -- Definitions.
72 |
73 | a. Adapted Material means material subject to Copyright and Similar
74 | Rights that is derived from or based upon the Licensed Material
75 | and in which the Licensed Material is translated, altered,
76 | arranged, transformed, or otherwise modified in a manner requiring
77 | permission under the Copyright and Similar Rights held by the
78 | Licensor. For purposes of this Public License, where the Licensed
79 | Material is a musical work, performance, or sound recording,
80 | Adapted Material is always produced where the Licensed Material is
81 | synched in timed relation with a moving image.
82 |
83 | b. Adapter's License means the license You apply to Your Copyright
84 | and Similar Rights in Your contributions to Adapted Material in
85 | accordance with the terms and conditions of this Public License.
86 |
87 | c. BY-SA Compatible License means a license listed at
88 | creativecommons.org/compatiblelicenses, approved by Creative
89 | Commons as essentially the equivalent of this Public License.
90 |
91 | d. Copyright and Similar Rights means copyright and/or similar rights
92 | closely related to copyright including, without limitation,
93 | performance, broadcast, sound recording, and Sui Generis Database
94 | Rights, without regard to how the rights are labeled or
95 | categorized. For purposes of this Public License, the rights
96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar
97 | Rights.
98 |
99 | e. Effective Technological Measures means those measures that, in the
100 | absence of proper authority, may not be circumvented under laws
101 | fulfilling obligations under Article 11 of the WIPO Copyright
102 | Treaty adopted on December 20, 1996, and/or similar international
103 | agreements.
104 |
105 | f. Exceptions and Limitations means fair use, fair dealing, and/or
106 | any other exception or limitation to Copyright and Similar Rights
107 | that applies to Your use of the Licensed Material.
108 |
109 | g. License Elements means the license attributes listed in the name
110 | of a Creative Commons Public License. The License Elements of this
111 | Public License are Attribution and ShareAlike.
112 |
113 | h. Licensed Material means the artistic or literary work, database,
114 | or other material to which the Licensor applied this Public
115 | License.
116 |
117 | i. Licensed Rights means the rights granted to You subject to the
118 | terms and conditions of this Public License, which are limited to
119 | all Copyright and Similar Rights that apply to Your use of the
120 | Licensed Material and that the Licensor has authority to license.
121 |
122 | j. Licensor means the individual(s) or entity(ies) granting rights
123 | under this Public License.
124 |
125 | k. Share means to provide material to the public by any means or
126 | process that requires permission under the Licensed Rights, such
127 | as reproduction, public display, public performance, distribution,
128 | dissemination, communication, or importation, and to make material
129 | available to the public including in ways that members of the
130 | public may access the material from a place and at a time
131 | individually chosen by them.
132 |
133 | l. Sui Generis Database Rights means rights other than copyright
134 | resulting from Directive 96/9/EC of the European Parliament and of
135 | the Council of 11 March 1996 on the legal protection of databases,
136 | as amended and/or succeeded, as well as other essentially
137 | equivalent rights anywhere in the world.
138 |
139 | m. You means the individual or entity exercising the Licensed Rights
140 | under this Public License. Your has a corresponding meaning.
141 |
142 |
143 | Section 2 -- Scope.
144 |
145 | a. License grant.
146 |
147 | 1. Subject to the terms and conditions of this Public License,
148 | the Licensor hereby grants You a worldwide, royalty-free,
149 | non-sublicensable, non-exclusive, irrevocable license to
150 | exercise the Licensed Rights in the Licensed Material to:
151 |
152 | a. reproduce and Share the Licensed Material, in whole or
153 | in part; and
154 |
155 | b. produce, reproduce, and Share Adapted Material.
156 |
157 | 2. Exceptions and Limitations. For the avoidance of doubt, where
158 | Exceptions and Limitations apply to Your use, this Public
159 | License does not apply, and You do not need to comply with
160 | its terms and conditions.
161 |
162 | 3. Term. The term of this Public License is specified in Section
163 | 6(a).
164 |
165 | 4. Media and formats; technical modifications allowed. The
166 | Licensor authorizes You to exercise the Licensed Rights in
167 | all media and formats whether now known or hereafter created,
168 | and to make technical modifications necessary to do so. The
169 | Licensor waives and/or agrees not to assert any right or
170 | authority to forbid You from making technical modifications
171 | necessary to exercise the Licensed Rights, including
172 | technical modifications necessary to circumvent Effective
173 | Technological Measures. For purposes of this Public License,
174 | simply making modifications authorized by this Section 2(a)
175 | (4) never produces Adapted Material.
176 |
177 | 5. Downstream recipients.
178 |
179 | a. Offer from the Licensor -- Licensed Material. Every
180 | recipient of the Licensed Material automatically
181 | receives an offer from the Licensor to exercise the
182 | Licensed Rights under the terms and conditions of this
183 | Public License.
184 |
185 | b. Additional offer from the Licensor -- Adapted Material.
186 | Every recipient of Adapted Material from You
187 | automatically receives an offer from the Licensor to
188 | exercise the Licensed Rights in the Adapted Material
189 | under the conditions of the Adapter's License You apply.
190 |
191 | c. No downstream restrictions. You may not offer or impose
192 | any additional or different terms or conditions on, or
193 | apply any Effective Technological Measures to, the
194 | Licensed Material if doing so restricts exercise of the
195 | Licensed Rights by any recipient of the Licensed
196 | Material.
197 |
198 | 6. No endorsement. Nothing in this Public License constitutes or
199 | may be construed as permission to assert or imply that You
200 | are, or that Your use of the Licensed Material is, connected
201 | with, or sponsored, endorsed, or granted official status by,
202 | the Licensor or others designated to receive attribution as
203 | provided in Section 3(a)(1)(A)(i).
204 |
205 | b. Other rights.
206 |
207 | 1. Moral rights, such as the right of integrity, are not
208 | licensed under this Public License, nor are publicity,
209 | privacy, and/or other similar personality rights; however, to
210 | the extent possible, the Licensor waives and/or agrees not to
211 | assert any such rights held by the Licensor to the limited
212 | extent necessary to allow You to exercise the Licensed
213 | Rights, but not otherwise.
214 |
215 | 2. Patent and trademark rights are not licensed under this
216 | Public License.
217 |
218 | 3. To the extent possible, the Licensor waives any right to
219 | collect royalties from You for the exercise of the Licensed
220 | Rights, whether directly or through a collecting society
221 | under any voluntary or waivable statutory or compulsory
222 | licensing scheme. In all other cases the Licensor expressly
223 | reserves any right to collect such royalties.
224 |
225 |
226 | Section 3 -- License Conditions.
227 |
228 | Your exercise of the Licensed Rights is expressly made subject to the
229 | following conditions.
230 |
231 | a. Attribution.
232 |
233 | 1. If You Share the Licensed Material (including in modified
234 | form), You must:
235 |
236 | a. retain the following if it is supplied by the Licensor
237 | with the Licensed Material:
238 |
239 | i. identification of the creator(s) of the Licensed
240 | Material and any others designated to receive
241 | attribution, in any reasonable manner requested by
242 | the Licensor (including by pseudonym if
243 | designated);
244 |
245 | ii. a copyright notice;
246 |
247 | iii. a notice that refers to this Public License;
248 |
249 | iv. a notice that refers to the disclaimer of
250 | warranties;
251 |
252 | v. a URI or hyperlink to the Licensed Material to the
253 | extent reasonably practicable;
254 |
255 | b. indicate if You modified the Licensed Material and
256 | retain an indication of any previous modifications; and
257 |
258 | c. indicate the Licensed Material is licensed under this
259 | Public License, and include the text of, or the URI or
260 | hyperlink to, this Public License.
261 |
262 | 2. You may satisfy the conditions in Section 3(a)(1) in any
263 | reasonable manner based on the medium, means, and context in
264 | which You Share the Licensed Material. For example, it may be
265 | reasonable to satisfy the conditions by providing a URI or
266 | hyperlink to a resource that includes the required
267 | information.
268 |
269 | 3. If requested by the Licensor, You must remove any of the
270 | information required by Section 3(a)(1)(A) to the extent
271 | reasonably practicable.
272 |
273 | b. ShareAlike.
274 |
275 | In addition to the conditions in Section 3(a), if You Share
276 | Adapted Material You produce, the following conditions also apply.
277 |
278 | 1. The Adapter's License You apply must be a Creative Commons
279 | license with the same License Elements, this version or
280 | later, or a BY-SA Compatible License.
281 |
282 | 2. You must include the text of, or the URI or hyperlink to, the
283 | Adapter's License You apply. You may satisfy this condition
284 | in any reasonable manner based on the medium, means, and
285 | context in which You Share Adapted Material.
286 |
287 | 3. You may not offer or impose any additional or different terms
288 | or conditions on, or apply any Effective Technological
289 | Measures to, Adapted Material that restrict exercise of the
290 | rights granted under the Adapter's License You apply.
291 |
292 |
293 | Section 4 -- Sui Generis Database Rights.
294 |
295 | Where the Licensed Rights include Sui Generis Database Rights that
296 | apply to Your use of the Licensed Material:
297 |
298 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right
299 | to extract, reuse, reproduce, and Share all or a substantial
300 | portion of the contents of the database;
301 |
302 | b. if You include all or a substantial portion of the database
303 | contents in a database in which You have Sui Generis Database
304 | Rights, then the database in which You have Sui Generis Database
305 | Rights (but not its individual contents) is Adapted Material,
306 |
307 | including for purposes of Section 3(b); and
308 | c. You must comply with the conditions in Section 3(a) if You Share
309 | all or a substantial portion of the contents of the database.
310 |
311 | For the avoidance of doubt, this Section 4 supplements and does not
312 | replace Your obligations under this Public License where the Licensed
313 | Rights include other Copyright and Similar Rights.
314 |
315 |
316 | Section 5 -- Disclaimer of Warranties and Limitation of Liability.
317 |
318 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
319 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
320 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
321 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
322 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
323 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
324 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
325 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
326 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
327 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
328 |
329 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
330 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
331 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
332 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
333 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
334 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
335 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
336 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
337 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
338 |
339 | c. The disclaimer of warranties and limitation of liability provided
340 | above shall be interpreted in a manner that, to the extent
341 | possible, most closely approximates an absolute disclaimer and
342 | waiver of all liability.
343 |
344 |
345 | Section 6 -- Term and Termination.
346 |
347 | a. This Public License applies for the term of the Copyright and
348 | Similar Rights licensed here. However, if You fail to comply with
349 | this Public License, then Your rights under this Public License
350 | terminate automatically.
351 |
352 | b. Where Your right to use the Licensed Material has terminated under
353 | Section 6(a), it reinstates:
354 |
355 | 1. automatically as of the date the violation is cured, provided
356 | it is cured within 30 days of Your discovery of the
357 | violation; or
358 |
359 | 2. upon express reinstatement by the Licensor.
360 |
361 | For the avoidance of doubt, this Section 6(b) does not affect any
362 | right the Licensor may have to seek remedies for Your violations
363 | of this Public License.
364 |
365 | c. For the avoidance of doubt, the Licensor may also offer the
366 | Licensed Material under separate terms or conditions or stop
367 | distributing the Licensed Material at any time; however, doing so
368 | will not terminate this Public License.
369 |
370 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
371 | License.
372 |
373 |
374 | Section 7 -- Other Terms and Conditions.
375 |
376 | a. The Licensor shall not be bound by any additional or different
377 | terms or conditions communicated by You unless expressly agreed.
378 |
379 | b. Any arrangements, understandings, or agreements regarding the
380 | Licensed Material not stated herein are separate from and
381 | independent of the terms and conditions of this Public License.
382 |
383 |
384 | Section 8 -- Interpretation.
385 |
386 | a. For the avoidance of doubt, this Public License does not, and
387 | shall not be interpreted to, reduce, limit, restrict, or impose
388 | conditions on any use of the Licensed Material that could lawfully
389 | be made without permission under this Public License.
390 |
391 | b. To the extent possible, if any provision of this Public License is
392 | deemed unenforceable, it shall be automatically reformed to the
393 | minimum extent necessary to make it enforceable. If the provision
394 | cannot be reformed, it shall be severed from this Public License
395 | without affecting the enforceability of the remaining terms and
396 | conditions.
397 |
398 | c. No term or condition of this Public License will be waived and no
399 | failure to comply consented to unless expressly agreed to by the
400 | Licensor.
401 |
402 | d. Nothing in this Public License constitutes or may be interpreted
403 | as a limitation upon, or waiver of, any privileges and immunities
404 | that apply to the Licensor or You, including from the legal
405 | processes of any jurisdiction or authority.
406 |
407 |
408 | =======================================================================
409 |
410 | Creative Commons is not a party to its public
411 | licenses. Notwithstanding, Creative Commons may elect to apply one of
412 | its public licenses to material it publishes and in those instances
413 | will be considered the “Licensor.” The text of the Creative Commons
414 | public licenses is dedicated to the public domain under the CC0 Public
415 | Domain Dedication. Except for the limited purpose of indicating that
416 | material is shared under a Creative Commons public license or as
417 | otherwise permitted by the Creative Commons policies published at
418 | creativecommons.org/policies, Creative Commons does not authorize the
419 | use of the trademark "Creative Commons" or any other trademark or logo
420 | of Creative Commons without its prior written consent including,
421 | without limitation, in connection with any unauthorized modifications
422 | to any of its public licenses or any other arrangements,
423 | understandings, or agreements concerning use of licensed material. For
424 | the avoidance of doubt, this paragraph does not form part of the
425 | public licenses.
426 |
427 | Creative Commons may be contacted at creativecommons.org.
428 |
--------------------------------------------------------------------------------