├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── banners └── practicalli-logo.svg ├── clojure-config.el ├── deprecated-config.el ├── eshell-config.el ├── init.el ├── org-config.el ├── snippets ├── README.md ├── clojure-mode │ ├── 4clojure-body │ ├── 4clojure-heading │ ├── cc-license-name │ ├── cc-license-url │ ├── compojure-routing │ ├── def │ ├── def- │ ├── deftest │ ├── deprecated-banner │ ├── deps-git-sha │ ├── deps-git-tag │ ├── deps-local │ ├── deps-maven │ ├── deps-project │ ├── deps-testrunner-project │ ├── design-journal │ ├── doc-header │ ├── doc-section │ ├── header-comment-namespace │ ├── hot-loading │ ├── repl-experiments │ ├── rich-comment-hotload │ ├── rich-comment-redefined-ignore │ ├── section-divider │ ├── todo-demo │ └── todo-deprecate ├── clojurescript-mode │ ├── div-with-class │ ├── hiccup-anchor │ ├── hiccup-div-class │ ├── hiccup-link │ └── repl-experiments ├── emacs-lisp-mode │ └── cider-dir-locals ├── lisp-data-mode │ └── dir-local-clojure-aliases ├── markdown-mode │ ├── article-signature │ ├── cc-license-name │ ├── changelog-jira-link │ ├── code │ ├── creative-commons-license │ ├── cryogen-post-clojure │ ├── cryogen-post-ubuntu │ ├── gitbook-cli-alias-m-replaced-a │ ├── gitbook-collapse │ ├── gitbook-hint │ ├── gitbook-hint-content-refactor │ ├── gitbook-hint-p9i-deps-edn-repo │ ├── gitbook-note │ ├── gitbook-siteurl │ ├── gitbook-tab-cli-lein │ ├── gitbook-tabs-clojure-deps-edn │ ├── gitbook-tabs-deps-lein │ ├── gitbook-tabs-deps-lein-boot │ ├── gitbook-tabs-repl-project │ ├── gitbook-todo │ ├── gitbook-todo-wip │ ├── gitbook-todo-wip-pr │ ├── gitbook-youtube │ ├── image-linked │ ├── kaocha-script │ ├── klipse │ ├── klipse-html │ ├── lighttable-keybindings-table │ ├── mini-challenge │ ├── mkdocs-content-tab │ ├── mkdocs-evil-jkhl-key-bindings │ ├── mkdocs-fontawesome-book │ ├── mkdocs-fontawesome-github │ ├── mkdocs-fontawesome-youtube │ ├── mkdocs-hint-title │ ├── mkdocs-icon-globe │ ├── mkdocs-iframe-youtube │ ├── mkdocs-image-align-left │ ├── mkdocs-image-form-full │ ├── mkdocs-keys-comma-character │ ├── mkdocs-keys-comma-single-quote │ ├── mkdocs-keys-ctrl-c-ctrl-c │ ├── mkdocs-keys-meta-x │ ├── mkdocs-keys-spc-f-e-d │ ├── mkdocs-keys-spc-tab │ ├── mkdocs-link-button │ ├── mkdocs-link-button-target-blank │ ├── mkdocs-link-dark │ ├── mkdocs-link-doom-emacs-config │ ├── mkdocs-link-only-dark-tag │ ├── mkdocs-link-p9i-clojure-cli-config │ ├── mkdocs-link-target-blank │ ├── mkdocs-p9i-neovim-config-redux │ ├── mkdocs-p9i-spacemacs-d │ ├── orgtbl-keybinding-simple │ ├── section-separator │ ├── spacemacs-keybindings │ ├── todo-work-in-progress │ ├── url-practicalli-clojure │ ├── youtube-live-broadcast │ ├── youtube-live-hangout │ └── youtube-recorded-broadcast ├── org-journal-mode │ └── heading-with-checkboxes ├── org-mode │ ├── hyperlink │ └── journal-entry └── sh-mode │ └── kaocha-script ├── theme-config.el ├── user-config.el └── version-control-config.el /.gitignore: -------------------------------------------------------------------------------- 1 | # Git Ignore patterns for Spacemacs configuration 2 | 3 | # Environment variables are automatically generated 4 | .spacemacs.env 5 | recentf 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | # Unreleased 4 | ## Changed 5 | - add syntax-checker layer to support `d s` & `c s` evil commands to delete or change surrounding parens 6 | - disable helm-discbinds to prevent it blocking which-key menu 7 | 8 | # 2023-09-08 9 | ## Changed 10 | - main layers: remove syntax checking - lsp makes this redundant 11 | - lsp: disable peek due to visualy conflict with completion popup 12 | - practicalli/main lsp: improve typing responsiveness with longer idle delay 13 | 14 | # 2023-04-04 15 | ## Added 16 | - [Clojure Essentail Reference Emacs package](https://github.com/p3r7/clojure-essential-ref) to look up functions in book of same name, added key binding in Clojure mode `, h r` 17 | - snippet: mkdocs fontawesome icons: book, github, youtube 18 | - snippet: mkdocs full image form 19 | - snippet: link to Practicalli spacemacs and doom emacs configurations 20 | 21 | ## Changed 22 | - comment magit-delta-plugin as unstaged changes are not show if [delta](https://github.com/dandavison/delta) binary is not on the Emacs PATH, leave for user to enable and install tool 23 | - snippet: comment header and section using --- lines rather than ;;; 24 | 25 | 26 | # 2023-03-13 27 | ## Changed 28 | - disable lsp hover and associated markdown doc generation call - enable clojure-mode to evaluate forms in rich comment as top level form 29 | 30 | # 2023-03-08 31 | ## Changed 32 | * renamed default branch to main 33 | * renamed GitHub repository to practicalli/spacemacs-config 34 | * [#7](https://github.com/practicalli/spacemacs-config/pull/7) Refactor dotspacemacs/user-config into individual files 35 | * Update clojure and autocomplete layer variables for optimal use with LSP 36 | * Update LSP variables to include peek menus for references, symbols, etc 37 | * update git layer with git-delta plugin for enhanced diff highlights 38 | * spacemacs-modeline - hide evil state icon (use cursor colour & shape for effective state tracking) 39 | * Move unused configuration to deprecated-config.el 40 | 41 | # 2022-12-26 42 | ## Added 43 | * Spacemacs template updates 44 | * MkDocs snippets 45 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Practicalli Spacemacs configuration 2 | 3 | ```none 4 | ██████╗ ██████╗ █████╗ ██████╗████████╗██╗ ██████╗ █████╗ ██╗ ██╗ ██╗ 5 | ██╔══██╗██╔══██╗██╔══██╗██╔════╝╚══██╔══╝██║██╔════╝██╔══██╗██║ ██║ ██║ 6 | ██████╔╝██████╔╝███████║██║ ██║ ██║██║ ███████║██║ ██║ ██║ 7 | ██╔═══╝ ██╔══██╗██╔══██║██║ ██║ ██║██║ ██╔══██║██║ ██║ ██║ 8 | ██║ ██║ ██║██║ ██║╚██████╗ ██║ ██║╚██████╗██║ ██║███████╗███████╗██║ 9 | ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ 10 | ``` 11 | 12 | 13 | User configuration to support the [Practicalli Spacemacs book](https://practical.li/spacemacs). 14 | 15 | - recommended layers for use for enhanced Clojure development experience 16 | - numerous tweaks for general [Spacemacs](https://github.com/syl20bnr/spacemacs/) usage 17 | - snippets (code and configuration templates) for clojure and markdown languages 18 | 19 | [![Spacemacs Practicalli - Interactive Clojure development with Emacs and CIDER](https://raw.githubusercontent.com/practicalli/graphic-design/live/book-covers/practicalli-spacemacs-book-banner.png)](https://practical.li/spacemacs) 20 | 21 | # Requirements 22 | 23 | [Practicalli Spacemacs - install spacemacs](https://practical.li/spacemacs/install-spacemacs/) details installation and pre-install requirements. 24 | 25 | 26 | ## Feedback & Contributing 27 | 28 | Please follow the [contributing guide for all Practicalli books and configurations](https://practical.li/spacemacs/introduction/contributing/). Thank you. 29 | 30 | 31 | ## Configuration Design 32 | 33 | `dotspacemacs/user-config` section includes additional configuration and is defined across several files to make it easier to manage updates to the configuration over time and avoid merging changes with your own customisation. 34 | 35 | Loaded configuration files: 36 | 37 | * `clojure-config.el` - clojure-mode options, evil-cleverparents enable, portal tap> on nrepl & keybindings, custom elisp functions 38 | * `theme-config.el` - theme and mode-line configuration 39 | * `org-config.el` - notes and task faces and workflow 40 | * `version-control-config.el` - git, Magit and Forge configuration (predominantly forge config) 41 | * `user-config.el` - general config tweaks 42 | 43 | > `eshell-config.el` defines a custom prompt for eshell, although this configuration file is not loaded. Practicalli now uses vterm to use the operating system shell in a terminal popup window. 44 | 45 | The `load-file` function includes the code from each file during startup. Comment the `load-file` expression if that configuration is not required, or add your own configuration files to easily extend the Practicalli configuration without having to merge changes. 46 | 47 | `.spacemacs.d/init.el` is main Spacemacs configuration file (although a $HOME/.spacemacs) file will supersede this configuration and should therefore be removed. 48 | 49 | 50 | ## Getting help 51 | 52 | Discuss this guide [on #practicalli channel of the Clojurians Slack community](https://clojurians.slack.com/messages/practicalli) 53 | 54 | [Clojurians community - Getting Help](https://practical.li/blog/posts/cloure-community-getting-help/) shows other ways to get help with Clojure. 55 | 56 | 57 | ## Sponsor Practicalli 58 | 59 | [![Sponsor practicalli-john](https://raw.githubusercontent.com/practicalli/graphic-design/live/buttons/practicalli-github-sponsors-button.png)](https://github.com/sponsors/practicalli-john/) 60 | 61 | The majority of my work is focused on the [Practicalli series of books and videos](https://practical.li/) and an advisory role with several communities 62 | 63 | Thank you to [Cognitect](https://www.cognitect.com/), [Nubank](https://nubank.com.br/) and a wide range of other [sponsors](https://github.com/sponsors/practicalli-john#sponsors) for your continued support 64 | 65 | 66 | Thank you 67 | 68 | [practical.li](https://practical.li/) 69 | -------------------------------------------------------------------------------- /banners/practicalli-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 24 | 32 | 36 | 37 | 38 | 63 | 65 | 66 | 68 | image/svg+xml 69 | 71 | 72 | 73 | 74 | 79 | 82 | 88 | 92 | 98 | 104 | 114 | 124 | i 135 | P 146 | 9 157 | 158 | 159 | 160 | -------------------------------------------------------------------------------- /clojure-config.el: -------------------------------------------------------------------------------- 1 | ;; --------------------------------------- 2 | ;; Clojure configurations 3 | 4 | ;; --------------------------------------- 5 | ;; Safe structural editing for all major modes 6 | (spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hooks) 7 | ;; for clojure layer only (comment out line above) 8 | ;; (spacemacs/toggle-evil-safe-lisp-structural-editing-on-register-hook-clojure-mode) 9 | ;; 10 | ;; --------------------------------------- 11 | 12 | 13 | ;; --------------------------------------- 14 | ;; Clojure-mode 15 | 16 | ;; Do not indent single ; comment character 17 | (add-hook 'clojure-mode-hook (lambda () (setq-local comment-column 0))) 18 | 19 | ;; Auto-indent code automatically 20 | ;; https://emacsredux.com/blog/2016/02/07/auto-indent-your-code-with-aggressive-indent-mode/ 21 | ;; (add-hook 'clojure-mode-hook #'aggressive-indent-mode) 22 | 23 | ;; Lookup functions in Clojure - The Essentail Reference book 24 | ;; https://github.com/p3r7/clojure-essential-ref 25 | (spacemacs/set-leader-keys "oh" 'clojure-essential-ref) 26 | 27 | 28 | 29 | ;; --------------------------------------- 30 | ;; Portal Data Inspector 31 | 32 | ;; def portal to the dev namespace to allow dereferencing via @dev/portal 33 | (defun portal.api/open () 34 | (interactive) 35 | (cider-nrepl-sync-request:eval 36 | "(do (ns dev) (def portal ((requiring-resolve 'portal.api/open))) (add-tap (requiring-resolve 'portal.api/submit)))")) 37 | 38 | (defun portal.api/clear () 39 | (interactive) 40 | (cider-nrepl-sync-request:eval "(portal.api/clear)")) 41 | 42 | (defun portal.api/close () 43 | (interactive) 44 | (cider-nrepl-sync-request:eval "(portal.api/close)")) 45 | 46 | (spacemacs/set-leader-keys "opp" 'portal.api/open) 47 | (spacemacs/set-leader-keys "opc" 'portal.api/clear) 48 | (spacemacs/set-leader-keys "opD" 'portal.api/close) 49 | 50 | ;; --------------------------------------- 51 | 52 | 53 | ;; --------------------------------------- 54 | ;; Clojure Essentail Ref lookup 55 | 56 | (spacemacs/set-leader-keys-for-minor-mode 'clojure-mode "hr" 'clojure-essential-ref) 57 | 58 | ;; --------------------------------------- 59 | 60 | ;; --------------------------------------- 61 | ;; Custom functions 62 | 63 | ;; toggle reader macro sexp comment 64 | ;; toggles the #_ characters at the start of an expression 65 | (defun clojure-toggle-reader-comment-sexp () 66 | (interactive) 67 | (let* ((point-pos1 (point))) 68 | (evil-insert-line 0) 69 | (let* ((point-pos2 (point)) 70 | (cmtstr "#_") 71 | (cmtstr-len (length cmtstr)) 72 | (line-start (buffer-substring-no-properties point-pos2 (+ point-pos2 cmtstr-len))) 73 | (point-movement (if (string= cmtstr line-start) -2 2)) 74 | (ending-point-pos (+ point-pos1 point-movement 1))) 75 | (if (string= cmtstr line-start) 76 | (delete-char cmtstr-len) 77 | (insert cmtstr)) 78 | (goto-char ending-point-pos))) 79 | (evil-normal-state)) 80 | ;; 81 | ;; Assign keybinding to the toggle-reader-comment-sexp function 82 | (define-key global-map (kbd "C-#") 'clojure-toggle-reader-comment-sexp) 83 | ;; 84 | ;; 85 | ;; Toggle view of a clojure `(comment ,,,) block' 86 | (defun clojure-hack/toggle-comment-block (arg) 87 | "Close all top level (comment) forms. With universal arg, open all." 88 | (interactive "P") 89 | (save-excursion 90 | (goto-char (point-min)) 91 | (while (search-forward-regexp "^(comment\\>" nil 'noerror) 92 | (call-interactively 93 | (if arg 'evil-open-fold 94 | 'evil-close-fold))))) 95 | 96 | (evil-define-key 'normal clojure-mode-map 97 | "zC" 'clojure-hack/toggle-comment-block 98 | "zO" (lambda () (interactive) (clojure-hack/toggle-comment-block 'open))) 99 | ;; --------------------------------------- 100 | 101 | ;; --------------------------------------- 102 | -------------------------------------------------------------------------------- /deprecated-config.el: -------------------------------------------------------------------------------- 1 | ;; Practicalli Spacemacs Config 2 | ;; - deprecated configuration 3 | 4 | 5 | ;; TODO: Review user configuration 6 | 7 | ;; (defun practicalli/setup-completion-for-lsp () 8 | ;; (remove-hook 'completion-at-point-functions #'cider-complete-at-point)) 9 | 10 | ;; (add-hook 'cider-mode-hook 'practicalli/setup-completion-for-lsp) 11 | 12 | ;; (add-hook 'cider-mode-hook (lambda () (remove-hook 'completion-at-point-functions #'cider-complete-at-point))) 13 | 14 | ;; (add-hook 'cider-mode-hook 15 | ;; (lambda () (remove-hook 'completion-at-point-functions #'cider-complete-at-point))) 16 | 17 | 18 | ;; --------------------------------------- 19 | ;; Undo-tree configuration 20 | 21 | ;; Disable undo-tree and use Emacs native undo with evil-undo support 22 | ;; https://github.com/syl20bnr/spacemacs/issues/14406#issuecomment-851597233 23 | ;; (global-undo-tree-mode -1) 24 | ;; (evil-set-undo-system 'undo-redo) 25 | 26 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 27 | 28 | ;; --------------------------------------- 29 | ;; Keeping Helm history clean 30 | ;; (setq history-delete-duplicates t) 31 | ;; (setq extended-command-history 32 | ;; (delq nil (delete-dups extended-command-history))) 33 | 34 | ;; --------------------------------------- 35 | 36 | 37 | 38 | ;; --------------------------------------- 39 | ;; Emacs text rendering optimizations 40 | ;; https://200ok.ch/posts/2020-09-29_comprehensive_guide_on_handling_long_lines_in_emacs.html 41 | 42 | ;; Only render text left to right 43 | ;; (setq-default bidi-paragraph-direction 'left-to-right) 44 | 45 | ;; Disable Bidirectional Parentheses Algorithm 46 | ;; (if (version<= "27.1" emacs-version) 47 | ;; (setq bidi-inhibit-bpa t)) 48 | 49 | ;; Files with known long lines 50 | ;; SPC f l to open files literally to disable most text processing 51 | 52 | ;; So long mode when Emacs thinks a file would affect performance 53 | ;; (if (version<= "27.1" emacs-version) 54 | ;; (global-so-long-mode 1)) 55 | 56 | ;; End of: Emacs text rendering optimizations 57 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 58 | 59 | 60 | 61 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 62 | ;; User key bindings 63 | ;; 64 | ;; org-journal - create a new journal entry - `, j' in org-journal mode 65 | ;; (spacemacs/set-leader-keys "oj" 'org-journal-new-entry) 66 | ;; 67 | ;; Toggle workspaces forward/backwards 68 | ;; (spacemacs/set-leader-keys "ow" 'eyebrowse-next-window-config) 69 | ;; (spacemacs/set-leader-keys "oW" 'eyebrowse-last-window-config) 70 | 71 | ;; Revert buffer - loads in .dir-locals.el changes 72 | ;; (spacemacs/set-leader-keys "oR" 'revert-buffer) 73 | ;; 74 | ;; Keycast mode - show key bindings and commands in mode line 75 | ;; (spacemacs/set-leader-keys "ok" 'keycast-mode) 76 | 77 | ;; Replace Emacs Tabs key bindings with Workspace key bindings 78 | ;; (with-eval-after-load 'evil-maps 79 | ;; (when (featurep 'tab-bar) 80 | ;; (define-key evil-normal-state-map "gt" nil) 81 | ;; (define-key evil-normal-state-map "gT" nil))) 82 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 83 | 84 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 85 | ;; Over-ride Spacemacs defaults 86 | ;; 87 | ;; Set new location for file bookmarks, SPC f b 88 | ;; Default: SPACEMACSDIR.cache/bookmarks 89 | ;; (setq bookmark-default-file (concat dotspacemacs-directory "bookmarks")) 90 | ;; 91 | ;; Set new location for recent save files 92 | ;; Default: SPACEMACSDIR.cache/recentf 93 | ;; (setq recentf-save-file (concat dotspacemacs-directory "recentf") ) 94 | ;; 95 | 96 | ;; dotspacemacs/user-init 97 | ;; custom theme modification 98 | ;; spacemacs - overriding default height of modeline 99 | ;; doom-gruvbox - subtle lsp symbol highlight 100 | ;; (setq-default 101 | ;; theming-modifications 102 | ;; '((spacemacs-light 103 | ;; (mode-line :height 0.92) 104 | ;; (mode-line-inactive :height 0.92)) 105 | ;; (doom-solarized-light 106 | ;; (mode-line :height 0.92) 107 | ;; (mode-line-inactive :height 0.92)) 108 | ;; (doom-gruvbox-light 109 | ;; (lsp-face-highlight-read :background nil :weight bold) 110 | ;; (command-log-command :foreground "firebrick") 111 | ;; (command-log-key :foreground "dark magenta")))) 112 | 113 | 114 | 115 | ;; dotspacemacs/user-config 116 | 117 | ;; org-mode config 118 | 119 | ;; No longer using org-reveal 120 | ;; Org-reveal - define were reveal.js files can be found 121 | ;; Place reveal.js files in same directory as org-reveal content files) 122 | ;; (setq org-reveal-root "") 123 | 124 | ;; use org-re-reveal instead of org-reveal (which hasnt been updated in ages and breaks org-mode 9.2) 125 | ;; (use-package org-re-reveal :after org) 126 | ;; 127 | 128 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 129 | ;; Web-mode configuration 130 | ;; 131 | ;; Changing auto indent size for languages in html layer (web mode) to 2 (defaults to 4) 132 | ;; (defun web-mode-indent-2-hook () 133 | ;; "Indent settings for languages in Web mode, markup=html, css=css, code=javascript/php/etc." 134 | ;; (setq web-mode-markup-indent-offset 2) 135 | ;; (setq web-mode-css-indent-offset 2) 136 | ;; (setq web-mode-code-indent-offset 2)) 137 | ;; 138 | ;; (add-hook 'web-mode-hook 'web-mode-indent-2-hook) 139 | ;; 140 | ;; End of Web-mode configuration 141 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 142 | 143 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 144 | ;; Shell configuration 145 | ;; 146 | ;; Use zsh for default multi-term shell 147 | ;; (setq multi-term-program "/usr/bin/zsh") 148 | ;; 149 | ;; End of Shell configuration 150 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 151 | 152 | 153 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 154 | ;; MacOSX 155 | ;; Disable touchpad zoom gestures 156 | ;; 157 | ;; (define-key global-map (kbd "") nil) 158 | ;; (define-key global-map (kbd "") nil) 159 | ;; 160 | ;; (defun practicalli-nothing () 161 | ;; (interactive) 162 | ;; (message "Buttons are not toys") ) 163 | ;; 164 | ;; (define-key global-map (kbd "") 'practicalli-nothing) 165 | ;; 166 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 167 | 168 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 169 | ;; Spaceline Doom theme settings 170 | ;; https://seagle0128.github.io/doom-modeline/ 171 | ;; Configuration set in layer variables 172 | ;; 173 | ;; Set height of the modeline - will resize to height of text 174 | ;; (setq doom-modeline-height 12) 175 | 176 | ;; The left hand bar in the modeline 177 | ;; setting to zero shows a large box outline 178 | ;; (setq doom-modeline-bar-width 1) 179 | 180 | ;; Determine style of current filename / path displayed 181 | ;; default: auto 182 | ;; (setq doom-modeline-buffer-file-name-style 'relative-to-project) 183 | 184 | ;; default perspective name displayed in the mode-line. 185 | ;; (setq doom-modeline-display-default-persp-name t) 186 | 187 | ;; Do not show buffer encoding 188 | ;; (setq doom-modeline-buffer-encoding nil) 189 | 190 | ;; display GitHub notifications (requires `ghub' package) 191 | ;; (setq doom-modeline-github t) 192 | ;; The interval of checking GitHub. 193 | ;; (setq doom-modeline-github-interval (* 30 60)) 194 | 195 | ;; GNUs notifications - default t 196 | ;; (setq doom-modeline-gnus nil) 197 | 198 | ;; IRC notifications - default t 199 | ;; (setq doom-modeline-irc nil) 200 | 201 | ;; Environment versions - default t 202 | ;; (setq doom-modeline-env-version t) 203 | 204 | ;; Use ascii rather than icon for modal state (more specific) 205 | ;; Icon not changing for doom-solarized-light theme 206 | ;; - icon changes color for doom-gruvbox-light theme 207 | ;; (setq doom-modeline-modal-icon nil) 208 | ;; End of Spaceline Doom theme settings 209 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 210 | 211 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 212 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 213 | ;; Configuration no longer used 214 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 215 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 216 | 217 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 218 | ;; Workarounds and bug fixes - temporary hopefully 219 | ;; 220 | ;; From a community question - not advisable 221 | ;; Set a different key binding for evil lisp state 222 | ;; (with-eval-after-load 'evil-lisp-state 223 | ;; (spacemacs/set-leader-keys "k" evil-lisp-state-map)) 224 | ;; 225 | ;; evil-escape - switch between insert and normal state 226 | ;; (setq-default evil-escape-delay 0.2) 227 | ;; (setq-default evil-escape-key-sequence "fd") 228 | ;; 229 | ;; Undo history size limit, triggering garbage collection 230 | ;; Updating all defaults by a power of 10 (adding another zero at the end) 231 | ;; default in spacemacs is 80000 232 | ;; (setq undo-limit 400000) 233 | ;; 234 | ;; default in spacemacs is 120000 235 | ;; (setq undo-strong-limit 6000000) 236 | ;; 237 | ;; default in spacemacs is 12000000 238 | ;; (setq undo-strong-limit 60000000) 239 | ;; 240 | ;; 241 | ;; disable undo-tree as it seems to be loosing history 242 | ;; (global-undo-tree-mode -1) 243 | ;; 244 | ;; TODO: try explicitly saving history 245 | ;; (setq undo-tree-auto-save-history t) 246 | ;; 247 | ;; TODO: try setting undo-tree tmp files location 248 | ;; (setq undo-tree-history-directory-alist '(("." . "~/var/emacs/undo"))) 249 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 250 | 251 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 252 | ;; Literal Searching Configuration 253 | ;; 254 | ;; Literal search, rather than regex, in spacemacs search - helm-ag 255 | ;; (setq-default helm-grep-ag-command-option "-Q") 256 | ;; 257 | ;; End of Searching Configuration 258 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 259 | 260 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 261 | ;; Systemd user service 262 | ;; 263 | ;; Use the exec-path-from-shell package to get PATH, MANPATH 264 | ;; and the environment variables from your zsh or bash rc-files. 265 | ;; 266 | ;; (setq exec-path-from-shell-variables 267 | ;; (append exec-path-from-shell-variables 268 | ;; (list "TERM" 269 | ;; "RUST_SRC_PATH" 270 | ;; "…" 271 | ;; ))) 272 | ;; (exec-path-from-shell-initialize) 273 | ;; 274 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 275 | 276 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 277 | ;; Neotree configuration 278 | ;; 279 | ;; Display neotree on the right rather than left (default) 280 | ;; (setq neo-window-position 'right) 281 | ;; 282 | ;; End of Neotree configuration 283 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 284 | 285 | 286 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 287 | ;; old-school emacs style keybindings that i am replacing with nicer spacemacs alternatives 288 | ;; 289 | ;; jr0cket: text scaling keybindings - use spc z x =/- 290 | ;; (define-key global-map (kbd "c-+") 'text-scale-increase) 291 | ;; (define-key global-map (kbd "c--") 'text-scale-decrease) 292 | ;; 293 | ;; smartparens keybindings - use lisp-state, spc k menu instead 294 | ;; (define-key global-map (kbd "c-)") 'sp-forward-slurp-sexp) 295 | ;; (define-key global-map (kbd "c-(") 'sp-backward-slurp-sexp) 296 | ;; (define-key global-map (kbd "m-)") 'sp-forward-barf-sexp) 297 | ;; (define-key global-map (kbd "m-(") 'sp-backward-barf-sexp) 298 | ;; 299 | ;; jr0cket: keybindings for cycling buffers 300 | ;; use spc b n and spc b n instead 301 | ;; (global-set-key [c-prior] 'previous-buffer) 302 | ;; (global-set-key [c-next] 'next-buffer) 303 | ;; 304 | ;; jr0cket: remap multiple cursors to a pattern that is easier to remember 305 | ;; learn iedit mode instead (its fantastic) 306 | ;; (define-key global-map (kbd "c-c m c") 'mc/edit-lines) 307 | ;; 308 | ;; end of old-school bindings 309 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 310 | -------------------------------------------------------------------------------- /eshell-config.el: -------------------------------------------------------------------------------- 1 | ;; -*- mode: emacs-lisp; lexical-binding: t -*- 2 | 3 | ;; --------------------------------------- 4 | ;; Eshell visual enhancements 5 | ;; --------------------------------------- 6 | 7 | ;; NOTE: Practicalli uses vterm rather than eshell 8 | 9 | ;; --------------------------------------- 10 | ;; Customise Eshell Prompt 11 | 12 | (require 'dash) 13 | (require 's) 14 | 15 | (defmacro with-face (STR &rest PROPS) 16 | "Return STR propertized with PROPS." 17 | `(propertize ,STR 'face (list ,@PROPS))) 18 | 19 | (defmacro esh-section (NAME ICON FORM &rest PROPS) 20 | "Build eshell section NAME with ICON prepended to evaled FORM with PROPS." 21 | `(setq ,NAME 22 | (lambda () (when ,FORM 23 | (-> ,ICON 24 | (concat esh-section-delim ,FORM) 25 | (with-face ,@PROPS)))))) 26 | 27 | (defun esh-acc (acc x) 28 | "Accumulator for evaluating and concatenating esh-sections." 29 | (--if-let (funcall x) 30 | (if (s-blank? acc) 31 | it 32 | (concat acc esh-sep it)) 33 | acc)) 34 | 35 | (defun esh-prompt-func () 36 | "Build `eshell-prompt-function'" 37 | (concat esh-header 38 | (-reduce-from 'esh-acc "" eshell-funcs) 39 | "\n" 40 | eshell-prompt-string)) 41 | 42 | 43 | ;; Unicode icons on Emacs 44 | ;; `list-character-sets' and select unicode-bmp 45 | (esh-section esh-dir 46 | "\xf07c" ;  (faicon folder) 47 | (abbreviate-file-name (eshell/pwd)) 48 | '(:foreground "olive" :bold bold :underline t)) 49 | 50 | (esh-section esh-git 51 | "\xf397" ;  (git branch icon) 52 | (magit-get-current-branch) 53 | '(:foreground "maroon")) 54 | 55 | ;; (esh-section esh-python 56 | ;; "\xe928" ;  (python icon) 57 | ;; pyvenv-virtual-env-name) 58 | 59 | (esh-section esh-clock 60 | "" ;  (clock icon) 61 | (format-time-string "%H:%M" (current-time)) 62 | '(:foreground "forest green")) 63 | 64 | ;; Implement a "prompt number" section 65 | (setq esh-prompt-num 0) 66 | (add-hook 'eshell-exit-hook (lambda () (setq esh-prompt-num 0))) 67 | (advice-add 'eshell-send-input :before 68 | (lambda (&rest args) (setq esh-prompt-num (incf esh-prompt-num)))) 69 | 70 | 71 | ;; "\xf0c9" ;  (list icon) 72 | (esh-section esh-num 73 | "\x2130" ; ℰ (eshell icon) 74 | (number-to-string esh-prompt-num) 75 | '(:foreground "brown")) 76 | 77 | ;; Separator between esh-sections 78 | (setq esh-sep " ") ; or " | " 79 | 80 | ;; Separator between an esh-section icon and form 81 | (setq esh-section-delim "") 82 | 83 | ;; Eshell prompt header 84 | (setq esh-header "\n ") ; or "\n┌─" 85 | 86 | ;; Eshell prompt regexp and string. 87 | (setq eshell-prompt-regexp " \x2130 ") ; or "└─> " 88 | (setq eshell-prompt-string " \x2130 ") ; or "└─> " 89 | 90 | ;; Choose which eshell-funcs to enable 91 | ;; (setq eshell-funcs (list esh-dir esh-git esh-python esh-clock esh-num)) 92 | ;; (setq eshell-funcs (list esh-dir esh-git esh-clock esh-num)) 93 | (setq eshell-funcs (list esh-dir esh-git)) 94 | 95 | ;; Enable the new eshell prompt 96 | (setq eshell-prompt-function 'esh-prompt-func) 97 | 98 | ;; --------------------------------------- 99 | -------------------------------------------------------------------------------- /init.el: -------------------------------------------------------------------------------- 1 | ;; -*- mode: emacs-lisp; lexical-binding: t -*- 2 | ;; This file is loaded by Spacemacs at startup. 3 | ;; It must be stored in your home directory. 4 | 5 | (defun dotspacemacs/layers () 6 | "Layer configuration: 7 | This function should only modify configuration layer settings." 8 | (setq-default 9 | ;; Base distribution to use. This is a layer contained in the directory 10 | ;; `+distribution'. For now available distributions are `spacemacs-base' 11 | ;; or `spacemacs'. (default 'spacemacs) 12 | dotspacemacs-distribution 'spacemacs 13 | 14 | ;; Lazy installation of layers (i.e. layers are installed only when a file 15 | ;; with a supported type is opened). Possible values are `all', `unused' 16 | ;; and `nil'. `unused' will lazy install only unused layers (i.e. layers 17 | ;; not listed in variable `dotspacemacs-configuration-layers'), `all' will 18 | ;; lazy install any layer that support lazy installation even the layers 19 | ;; listed in `dotspacemacs-configuration-layers'. `nil' disable the lazy 20 | ;; installation feature and you have to explicitly list a layer in the 21 | ;; variable `dotspacemacs-configuration-layers' to install it. 22 | ;; (default 'unused) 23 | dotspacemacs-enable-lazy-installation nil 24 | 25 | ;; If non-nil then Spacemacs will ask for confirmation before installing 26 | ;; a layer lazily. (default t) 27 | dotspacemacs-ask-for-lazy-installation t 28 | 29 | ;; List of additional paths where to look for configuration layers. 30 | ;; Paths must have a trailing slash (i.e. "~/.mycontribs/") 31 | dotspacemacs-configuration-layer-path '() 32 | 33 | ;; List of configuration layers to load. 34 | dotspacemacs-configuration-layers 35 | '( 36 | ;; ---------------------------------------------------------------- 37 | ;; Example of useful layers you may want to use right away. 38 | ;; Uncomment some layer names and press `SPC f e R' (Vim style) or 39 | ;; `M-m f e R' (Emacs style) to install them. 40 | ;; ---------------------------------------------------------------- 41 | ;; 42 | ;; Layers added in alphabetic order 43 | 44 | ;; Add tool tips to show doc string of functions 45 | ;; Show snippets in the auto-completion popup 46 | ;; Show suggestions by most commonly used 47 | (auto-completion :variables 48 | auto-completion-enable-help-tooltip t 49 | auto-completion-enable-snippets-in-popup t 50 | auto-completion-enable-sort-by-usage t 51 | auto-completion-idle-delay 0.0 52 | auto-completion-minimum-prefix-length 1 53 | ;; auto-completion-complete-with-key-sequence "fd" 54 | ) 55 | 56 | ;; https://develop.spacemacs.org/layers/+lang/clojure/README.html 57 | (clojure :variables 58 | ;; clojure-backend 'cider ; use cider and disable lsp 59 | clojure-enable-kaocha-runner t ; enable Kaocha test runner 60 | cider-repl-display-help-banner nil ; disable help banner 61 | cider-print-fn 'puget ; pretty printing with sorted keys / set values 62 | clojure-indent-style 'align-arguments 63 | clojure-align-forms-automatically t 64 | clojure-toplevel-inside-comment-form t ; clashes with LSP 65 | cider-result-overlay-position 'at-point ; results shown right after expression 66 | cider-overlays-use-font-lock t 67 | cider-repl-buffer-size-limit 100 ; limit lines shown in REPL buffer 68 | nrepl-use-ssh-fallback-for-remote-hosts t ; connect via ssh to remote hosts 69 | ) 70 | 71 | ;; Nyan cat indicating relative position in current buffer 72 | ;; :variables colors-enable-nyan-cat-progress-bar (display-graphic-p) 73 | colors 74 | 75 | ;; SPC a L displays key and command history in a separate buffer 76 | command-log 77 | 78 | ;; Tools to work with comma separate values e.g. data science data 79 | ;; https://develop.spacemacs.org/layers/+lang/csv/README.html 80 | csv 81 | 82 | ;; Dockerfile LSP and docker container management 83 | (docker :variables 84 | docker-dockerfile-backend 'lsp) 85 | 86 | ;; For Spacemacs configuration files and packages 87 | emacs-lisp 88 | 89 | ;; Include emojis into everything 90 | emoji 91 | 92 | ;; SPC g s opens Magit git client full screen (q restores previous layout) 93 | ;; show word-granularity differences in current diff hunk 94 | ;; delta-plugin requires git-detlta install 95 | ;; https://develop.spacemacs.org/layers/+source-control/git/README.html#magit-plugins 96 | (git :variables 97 | git-magit-status-fullscreen t 98 | magit-diff-refine-hunk t 99 | git-enable-magit-todos-plugin t 100 | 101 | ;; Install https://github.com/dandavison/delta for language syntax highlights in diff 102 | ;; git-enable-magit-delta-plugin t 103 | ) 104 | 105 | ;; graphviz - open-source graph declaration system 106 | ;; Used to generated graphs of Clojure project dependencies 107 | ;; https://develop.spacemacs.org/layers/+lang/graphviz/README.html 108 | graphviz 109 | 110 | ;; add variable `helm-follow-mode-persistent t' for helm-follow-mode sticky 111 | ;; helm follow mode previews when scrolling through a helm list 112 | ;; - remembers use of C-c C-f in helm pop-up 113 | helm 114 | 115 | html 116 | javascript 117 | json 118 | 119 | ;; Language server protocol with minimal visual impact 120 | ;; https://practical.li/spacemacs/install-spacemacs/clojure-lsp/ 121 | (lsp :variables 122 | lsp-headerline-breadcrumb-enable t ; Breadcrumb trail 123 | lsp-headerline-breadcrumb-segments '(symbols) ; namespace & symbols, no file path 124 | lsp-ui-peek-enable nil ; popups for refs, errors, symbols, etc. 125 | lsp-semantic-tokens-enable t ; enhance syntax highlight 126 | lsp-treemacs-error-list-current-project-only t ; limit errors to current project 127 | lsp-idle-delay 1.5 ; smooth LSP features response 128 | lsp-eldoc-enable-hover nil ; disable all hover actions 129 | lsp-ui-doc-enable nil ; doc hover popups 130 | lsp-ui-sideline-enable nil ; sidebar code actions visual indicator 131 | treemacs-space-between-root-nodes nil ; spacing in treemacs views 132 | lsp-log-io t ; Log client-server json communication 133 | ) 134 | 135 | markdown 136 | 137 | ;; Editing multiple lines of text concurrently 138 | ;; `g r' menu in Emacs normal state 139 | multiple-cursors 140 | 141 | ;; Spacemacs Org mode 142 | (org :variables 143 | org-enable-github-support t 144 | org-enable-bootstrap-support t 145 | ;; org-enable-reveal-js-support t 146 | org-want-todo-bindings t 147 | org-enable-org-journal-support t 148 | org-journal-dir "~/projects/journal/" 149 | org-journal-file-format "%Y-%m-%d" 150 | org-journal-date-prefix "#+TITLE: " 151 | org-journal-date-format "%A, %B %d %Y" 152 | org-journal-time-prefix "* " 153 | org-journal-time-format "" 154 | org-journal-carryover-items "TODO=\"TODO\"|TODO=\"DOING\"|TODO=\"BLOCKED\"|TODO=\"REVIEW\"") 155 | 156 | 157 | ;; Text-based file manager with preview - SPC a t r r 158 | (ranger :variables 159 | ranger-show-preview t 160 | ranger-show-hidden t 161 | ranger-cleanup-eagerly t 162 | ranger-cleanup-on-disable t 163 | ranger-ignored-extensions '("mkv" "flv" "iso" "mp4")) 164 | 165 | ;; SPC ' runs shell in a popup buffer 166 | (shell :variables 167 | shell-default-shell 'vterm 168 | shell-default-term-shell "/usr/bin/zsh" 169 | shell-default-height 30 170 | shell-default-position 'bottom) 171 | 172 | ;; spacemacs-layouts layer added to set variables 173 | ;; SPC TAB restricted to current layout buffers 174 | ;; Kill buffers when killing layer - SPC l x 175 | (spacemacs-layouts :variables 176 | spacemacs-layouts-restrict-spc-tab t 177 | persp-autokill-buffer-on-remove 'kill-weak) 178 | 179 | ;; Configuration: https://github.com/seagle0128/doom-modeline#customize 180 | (spacemacs-modeline :variables 181 | doom-modeline-height 12 182 | doom-modeline-bar-width 0 ; size of bar icon at start of modeline 183 | doom-modeline-buffer-state-icon t ; disk icon for unsaved changes (default) 184 | doom-modeline-major-mode-color-icon t ; color icon of major mode 185 | doom-modeline-buffer-file-name-style 'relative-to-project 186 | doom-modeline-display-default-persp-name t ; layout name 187 | doom-modeline-minor-modes nil ; show minor modes 188 | doom-modeline-modal nil ; show Evil state icon/text 189 | ;; doom-modeline-modal-icon t ; icon when t, ascii when nil 190 | doom-modeline-buffer-encoding nil ; remove UTF-8, etc. 191 | ) 192 | 193 | ;; Spell as you type with Flyspell package, 194 | ;; requires external command - ispell, hunspell, aspell 195 | ;; SPC S menu, SPC S s to check current word 196 | spell-checking 197 | 198 | ;; Use original flycheck fringe bitmaps 199 | ;; (syntax-checking :variables 200 | ;; syntax-checking-use-original-bitmaps t) 201 | 202 | ;; Visual file manager - `SPC p t' 203 | ;; treemacs-no-png-images t removes file and directory icons 204 | (treemacs :variables 205 | treemacs-indentation 1 206 | treemacs-use-filewatch-mode t 207 | treemacs-use-follow-mode t) 208 | 209 | ;; Support font ligatures (fancy symbols) in all modes 210 | ;; 'prog-mode for only programming languages 211 | ;; including text-mode may cause issues with org-mode and magit 212 | (unicode-fonts :variables 213 | unicode-fonts-enable-ligatures t 214 | unicode-fonts-ligature-modes '(prog-mode)) 215 | 216 | ;; Highlight changes in buffers 217 | ;; SPC g . transient state for navigating changes 218 | (version-control :variables 219 | version-control-diff-tool 'diff-hl 220 | version-control-global-margin t) 221 | 222 | (yaml :variables 223 | yaml-enable-lsp t) 224 | 225 | ) ; End of dotspacemacs-configuration-layers 226 | 227 | 228 | ;; List of additional packages that will be installed without being wrapped 229 | ;; in a layer (generally the packages are installed only and should still be 230 | ;; loaded using load/require/use-package in the user-config section below in 231 | ;; this file). If you need some configuration for these packages, then 232 | ;; consider creating a layer. You can also put the configuration in 233 | ;; `dotspacemacs/user-config'. To use a local version of a package, use the 234 | ;; `:location' property: '(your-package :location "~/path/to/your-package/") 235 | ;; Also include the dependencies as they will not be resolved automatically. 236 | dotspacemacs-additional-packages '(clojure-essential-ref 237 | (evil-surround 238 | :location 239 | (recipe :fetcher github 240 | :repo "emacs-evil/evil-surround" 241 | :commit "f273821f575ace519066fb106ee45a5b8577475f"))) 242 | 243 | ;; A list of packages that cannot be updated. 244 | dotspacemacs-frozen-packages '() 245 | 246 | ;; A list of packages that will not be installed and loaded. 247 | dotspacemacs-excluded-packages '() 248 | 249 | ;; Defines the behaviour of Spacemacs when installing packages. 250 | ;; Possible values are `used-only', `used-but-keep-unused' and `all'. 251 | ;; `used-only' installs only explicitly used packages and deletes any unused 252 | ;; packages as well as their unused dependencies. `used-but-keep-unused' 253 | ;; installs only the used packages but won't delete unused ones. `all' 254 | ;; installs *all* packages supported by Spacemacs and never uninstalls them. 255 | ;; (default is `used-only') 256 | dotspacemacs-install-packages 'used-only)) 257 | 258 | (defun dotspacemacs/init () 259 | "Initialization: 260 | This function is called at the very beginning of Spacemacs startup, 261 | before layer configuration. 262 | It should only modify the values of Spacemacs settings." 263 | ;; This setq-default sexp is an exhaustive list of all the supported 264 | ;; spacemacs settings. 265 | (setq-default 266 | ;; If non-nil then enable support for the portable dumper. You'll need to 267 | ;; compile Emacs 27 from source following the instructions in file 268 | ;; EXPERIMENTAL.org at to root of the git repository. 269 | ;; 270 | ;; WARNING: pdumper does not work with Native Compilation, so it's disabled 271 | ;; regardless of the following setting when native compilation is in effect. 272 | ;; 273 | ;; (default nil) 274 | dotspacemacs-enable-emacs-pdumper nil 275 | 276 | ;; Name of executable file pointing to emacs 27+. This executable must be 277 | ;; in your PATH. 278 | ;; (default "emacs") 279 | dotspacemacs-emacs-pdumper-executable-file "emacs" 280 | 281 | ;; Name of the Spacemacs dump file. This is the file will be created by the 282 | ;; portable dumper in the cache directory under dumps sub-directory. 283 | ;; To load it when starting Emacs add the parameter `--dump-file' 284 | ;; when invoking Emacs 27.1 executable on the command line, for instance: 285 | ;; ./emacs --dump-file=$HOME/.emacs.d/.cache/dumps/spacemacs-27.1.pdmp 286 | ;; (default (format "spacemacs-%s.pdmp" emacs-version)) 287 | dotspacemacs-emacs-dumper-dump-file (format "spacemacs-%s.pdmp" emacs-version) 288 | 289 | ;; If non-nil ELPA repositories are contacted via HTTPS whenever it's 290 | ;; possible. Set it to nil if you have no way to use HTTPS in your 291 | ;; environment, otherwise it is strongly recommended to let it set to t. 292 | ;; This variable has no effect if Emacs is launched with the parameter 293 | ;; `--insecure' which forces the value of this variable to nil. 294 | ;; (default t) 295 | dotspacemacs-elpa-https t 296 | 297 | ;; Maximum allowed time in seconds to contact an ELPA repository. 298 | ;; (default 5) 299 | dotspacemacs-elpa-timeout 5 300 | 301 | ;; Set `gc-cons-threshold' and `gc-cons-percentage' when startup finishes. 302 | ;; This is an advanced option and should not be changed unless you suspect 303 | ;; performance issues due to garbage collection operations. 304 | ;; (default '(100000000 0.1)) 305 | dotspacemacs-gc-cons '(100000000 0.1) 306 | 307 | ;; Set `read-process-output-max' when startup finishes. 308 | ;; This defines how much data is read from a foreign process. 309 | ;; Setting this >= 1 MB should increase performance for lsp servers 310 | ;; in emacs 27. 311 | ;; (default (* 1024 1024)) 312 | dotspacemacs-read-process-output-max (* 1024 1024) 313 | 314 | ;; If non-nil then Spacelpa repository is the primary source to install 315 | ;; a locked version of packages. If nil then Spacemacs will install the 316 | ;; latest version of packages from MELPA. Spacelpa is currently in 317 | ;; experimental state please use only for testing purposes. 318 | ;; (default nil) 319 | dotspacemacs-use-spacelpa nil 320 | 321 | ;; If non-nil then verify the signature for downloaded Spacelpa archives. 322 | ;; (default t) 323 | dotspacemacs-verify-spacelpa-archives t 324 | 325 | ;; If non-nil then spacemacs will check for updates at startup 326 | ;; when the current branch is not `develop'. Note that checking for 327 | ;; new versions works via git commands, thus it calls GitHub services 328 | ;; whenever you start Emacs. (default nil) 329 | dotspacemacs-check-for-update nil 330 | 331 | ;; If non-nil, a form that evaluates to a package directory. For example, to 332 | ;; use different package directories for different Emacs versions, set this 333 | ;; to `emacs-version'. (default 'emacs-version) 334 | dotspacemacs-elpa-subdirectory 'emacs-version 335 | 336 | ;; One of `vim', `emacs' or `hybrid'. 337 | ;; `hybrid' is like `vim' except that `insert state' is replaced by the 338 | ;; `hybrid state' with `emacs' key bindings. The value can also be a list 339 | ;; with `:variables' keyword (similar to layers). Check the editing styles 340 | ;; section of the documentation for details on available variables. 341 | ;; (default 'vim) 342 | dotspacemacs-editing-style 'vim 343 | 344 | ;; If non-nil show the version string in the Spacemacs buffer. It will 345 | ;; appear as (spacemacs version)@(emacs version) 346 | ;; (default t) 347 | dotspacemacs-startup-buffer-show-version t 348 | 349 | ;; Specify the startup banner. Default value is `official', it displays 350 | ;; the official spacemacs logo. An integer value is the index of text 351 | ;; banner, `random' chooses a random text banner in `core/banners' 352 | ;; directory. A string value must be a path to an image format supported 353 | ;; by your Emacs build. 354 | ;; If the value is nil then no banner is displayed. (default 'official) 355 | ;; dotspacemacs-startup-banner 'official 356 | dotspacemacs-startup-banner (concat dotspacemacs-directory "banners/practicalli-logo.svg") 357 | 358 | ;; Scale factor controls the scaling (size) of the startup banner. Default 359 | ;; value is `auto' for scaling the logo automatically to fit all buffer 360 | ;; contents, to a maximum of the full image height and a minimum of 3 line 361 | ;; heights. If set to a number (int or float) it is used as a constant 362 | ;; scaling factor for the default logo size. 363 | dotspacemacs-startup-banner-scale 'auto 364 | 365 | ;; List of items to show in startup buffer or an association list of 366 | ;; the form `(list-type . list-size)`. If nil then it is disabled. 367 | ;; Possible values for list-type are: 368 | ;; `recents' `recents-by-project' `bookmarks' `projects' `agenda' `todos'. 369 | ;; List sizes may be nil, in which case 370 | ;; `spacemacs-buffer-startup-lists-length' takes effect. 371 | ;; The exceptional case is `recents-by-project', where list-type must be a 372 | ;; pair of numbers, e.g. `(recents-by-project . (7 . 5))', where the first 373 | ;; number is the project limit and the second the limit on the recent files 374 | ;; within a project. 375 | dotspacemacs-startup-lists '((recents . 5) 376 | (projects . 7)) 377 | 378 | ;; True if the home buffer should respond to resize events. (default t) 379 | dotspacemacs-startup-buffer-responsive t 380 | 381 | ;; Show numbers before the startup list lines. (default t) 382 | dotspacemacs-show-startup-list-numbers t 383 | 384 | ;; The minimum delay in seconds between number key presses. (default 0.4) 385 | dotspacemacs-startup-buffer-multi-digit-delay 0.4 386 | 387 | ;; If non-nil, show file icons for entries and headings on Spacemacs home buffer. 388 | ;; This has no effect in terminal or if "all-the-icons" package or the font 389 | ;; is not installed. (default nil) 390 | dotspacemacs-startup-buffer-show-icons t 391 | 392 | ;; Default major mode for a new empty buffer. Possible values are mode 393 | ;; names such as `text-mode'; and `nil' to use Fundamental mode. 394 | ;; (default `text-mode') 395 | dotspacemacs-new-empty-buffer-major-mode 'text-mode 396 | 397 | ;; Default major mode of the scratch buffer (default `text-mode') 398 | dotspacemacs-scratch-mode 'text-mode 399 | 400 | ;; If non-nil, *scratch* buffer will be persistent. Things you write down in 401 | ;; *scratch* buffer will be saved and restored automatically. 402 | dotspacemacs-scratch-buffer-persistent t 403 | 404 | ;; If non-nil, `kill-buffer' on *scratch* buffer 405 | ;; will bury it instead of killing. 406 | dotspacemacs-scratch-buffer-unkillable t 407 | 408 | ;; Initial message in the scratch buffer, such as "Welcome to Spacemacs!" 409 | ;; (default nil) 410 | dotspacemacs-initial-scratch-message nil 411 | 412 | ;; List of themes, the first of the list is loaded when spacemacs starts. 413 | ;; Press `SPC T n' to cycle to the next theme in the list (works great 414 | ;; with 2 themes variants, one dark and one light) 415 | dotspacemacs-themes '(doom-gruvbox 416 | doom-gruvbox-light 417 | spacemacs-dark 418 | spacemacs-light) 419 | 420 | ;; Set the theme for the Spaceline. Supported themes are `spacemacs', 421 | ;; `all-the-icons', `custom', `doom', `vim-powerline' and `vanilla'. The 422 | ;; first three are spaceline themes. `doom' is the doom-emacs mode-line. 423 | ;; `vanilla' is default Emacs mode-line. `custom' is a user defined themes, 424 | ;; refer to the DOCUMENTATION.org for more info on how to create your own 425 | ;; spaceline theme. Value can be a symbol or list with additional properties. 426 | ;; (default '(spacemacs :separator wave :separator-scale 1.5)) 427 | dotspacemacs-mode-line-theme '(doom) 428 | 429 | ;; If non-nil the cursor color matches the state color in GUI Emacs. 430 | ;; (default t) 431 | dotspacemacs-colorize-cursor-according-to-state t 432 | 433 | ;; Default font or prioritized list of fonts. This setting has no effect when 434 | ;; running Emacs in terminal. The font set here will be used for default and 435 | ;; fixed-pitch faces. The `:size' can be specified as 436 | ;; a non-negative integer (pixel size), or a floating-point (point size). 437 | ;; Point size is recommended, because it's device independent. (default 10.0) 438 | dotspacemacs-default-font '("Fira Code" 439 | :size 12.0 440 | :weight normal 441 | :width normal) 442 | 443 | ;; The leader key (default "SPC") 444 | dotspacemacs-leader-key "SPC" 445 | 446 | ;; The key used for Emacs commands `M-x' (after pressing on the leader key). 447 | ;; (default "SPC") 448 | dotspacemacs-emacs-command-key "SPC" 449 | 450 | ;; The key used for Vim Ex commands (default ":") 451 | dotspacemacs-ex-command-key ":" 452 | 453 | ;; The leader key accessible in `emacs state' and `insert state' 454 | ;; (default "M-m") 455 | dotspacemacs-emacs-leader-key "M-m" 456 | 457 | ;; Major mode leader key is a shortcut key which is the equivalent of 458 | ;; pressing ` m`. Set it to `nil` to disable it. (default ",") 459 | dotspacemacs-major-mode-leader-key "," 460 | 461 | ;; Major mode leader key accessible in `emacs state' and `insert state'. 462 | ;; (default "C-M-m" for terminal mode, "" for GUI mode). 463 | ;; Thus M-RET should work as leader key in both GUI and terminal modes. 464 | ;; C-M-m also should work in terminal mode, but not in GUI mode. 465 | dotspacemacs-major-mode-emacs-leader-key (if window-system "" "C-M-m") 466 | 467 | ;; These variables control whether separate commands are bound in the GUI to 468 | ;; the key pairs `C-i', `TAB' and `C-m', `RET'. 469 | ;; Setting it to a non-nil value, allows for separate commands under `C-i' 470 | ;; and TAB or `C-m' and `RET'. 471 | ;; In the terminal, these pairs are generally indistinguishable, so this only 472 | ;; works in the GUI. (default nil) 473 | dotspacemacs-distinguish-gui-tab nil 474 | 475 | ;; Name of the default layout (default "Default") 476 | dotspacemacs-default-layout-name "Default" 477 | 478 | ;; If non-nil the default layout name is displayed in the mode-line. 479 | ;; (default nil) 480 | dotspacemacs-display-default-layout nil 481 | 482 | ;; If non-nil then the last auto saved layouts are resumed automatically upon 483 | ;; start. (default nil) 484 | dotspacemacs-auto-resume-layouts t 485 | 486 | ;; If non-nil, auto-generate layout name when creating new layouts. Only has 487 | ;; effect when using the "jump to layout by number" commands. (default nil) 488 | dotspacemacs-auto-generate-layout-names nil 489 | 490 | ;; Size (in MB) above which spacemacs will prompt to open the large file 491 | ;; literally to avoid performance issues. Opening a file literally means that 492 | ;; no major mode or minor modes are active. (default is 1) 493 | dotspacemacs-large-file-size 1 494 | 495 | ;; Location where to auto-save files. Possible values are `original' to 496 | ;; auto-save the file in-place, `cache' to auto-save the file to another 497 | ;; file stored in the cache directory and `nil' to disable auto-saving. 498 | ;; (default 'cache) 499 | dotspacemacs-auto-save-file-location 'cache 500 | 501 | ;; Maximum number of rollback slots to keep in the cache. (default 5) 502 | dotspacemacs-max-rollback-slots 5 503 | 504 | ;; If non-nil, the paste transient-state is enabled. While enabled, after you 505 | ;; paste something, pressing `C-j' and `C-k' several times cycles through the 506 | ;; elements in the `kill-ring'. (default nil) 507 | dotspacemacs-enable-paste-transient-state t 508 | 509 | ;; Which-key delay in seconds. The which-key buffer is the popup listing 510 | ;; the commands bound to the current keystroke sequence. (default 0.4) 511 | dotspacemacs-which-key-delay 0.4 512 | 513 | ;; Which-key frame position. Possible values are `right', `bottom' and 514 | ;; `right-then-bottom'. right-then-bottom tries to display the frame to the 515 | ;; right; if there is insufficient space it displays it at the bottom. 516 | ;; It is also possible to use a posframe with the following cons cell 517 | ;; `(posframe . position)' where position can be one of `center', 518 | ;; `top-center', `bottom-center', `top-left-corner', `top-right-corner', 519 | ;; `top-right-corner', `bottom-left-corner' or `bottom-right-corner' 520 | ;; (default 'bottom) 521 | dotspacemacs-which-key-position 'bottom 522 | 523 | ;; Control where `switch-to-buffer' displays the buffer. If nil, 524 | ;; `switch-to-buffer' displays the buffer in the current window even if 525 | ;; another same-purpose window is available. If non-nil, `switch-to-buffer' 526 | ;; displays the buffer in a same-purpose window even if the buffer can be 527 | ;; displayed in the current window. (default nil) 528 | dotspacemacs-switch-to-buffer-prefers-purpose nil 529 | 530 | ;; If non-nil a progress bar is displayed when spacemacs is loading. This 531 | ;; may increase the boot time on some systems and emacs builds, set it to 532 | ;; nil to boost the loading time. (default t) 533 | dotspacemacs-loading-progress-bar nil 534 | 535 | ;; If non-nil the frame is fullscreen when Emacs starts up. (default nil) 536 | ;; (Emacs 24.4+ only) 537 | dotspacemacs-fullscreen-at-startup nil 538 | 539 | ;; If non-nil `spacemacs/toggle-fullscreen' will not use native fullscreen. 540 | ;; Use to disable fullscreen animations in OSX. (default nil) 541 | dotspacemacs-fullscreen-use-non-native nil 542 | 543 | ;; If non-nil the frame is maximized when Emacs starts up. 544 | ;; Takes effect only if `dotspacemacs-fullscreen-at-startup' is nil. 545 | ;; (default t) (Emacs 24.4+ only) 546 | dotspacemacs-maximized-at-startup t 547 | 548 | ;; If non-nil the frame is undecorated when Emacs starts up. Combine this 549 | ;; variable with `dotspacemacs-maximized-at-startup' to obtain fullscreen 550 | ;; without external boxes. Also disables the internal border. (default nil) 551 | dotspacemacs-undecorated-at-startup nil 552 | 553 | ;; A value from the range (0..100), in increasing opacity, which describes 554 | ;; the transparency level of a frame when it's active or selected. 555 | ;; Transparency can be toggled through `toggle-transparency'. (default 90) 556 | dotspacemacs-active-transparency 90 557 | 558 | ;; A value from the range (0..100), in increasing opacity, which describes 559 | ;; the transparency level of a frame when it's inactive or deselected. 560 | ;; Transparency can be toggled through `toggle-transparency'. (default 90) 561 | dotspacemacs-inactive-transparency 90 562 | 563 | ;; A value from the range (0..100), in increasing opacity, which describes the 564 | ;; transparency level of a frame background when it's active or selected. Transparency 565 | ;; can be toggled through `toggle-background-transparency'. (default 90) 566 | dotspacemacs-background-transparency 90 567 | 568 | ;; If non-nil show the titles of transient states. (default t) 569 | dotspacemacs-show-transient-state-title t 570 | 571 | ;; If non-nil show the color guide hint for transient state keys. (default t) 572 | dotspacemacs-show-transient-state-color-guide t 573 | 574 | ;; If non-nil unicode symbols are displayed in the mode line. 575 | ;; If you use Emacs as a daemon and wants unicode characters only in GUI set 576 | ;; the value to quoted `display-graphic-p'. (default t) 577 | dotspacemacs-mode-line-unicode-symbols t 578 | 579 | ;; If non-nil smooth scrolling (native-scrolling) is enabled. Smooth 580 | ;; scrolling overrides the default behavior of Emacs which recenters point 581 | ;; when it reaches the top or bottom of the screen. (default t) 582 | dotspacemacs-smooth-scrolling t 583 | 584 | ;; Show the scroll bar while scrolling. The auto hide time can be configured 585 | ;; by setting this variable to a number. (default t) 586 | dotspacemacs-scroll-bar-while-scrolling nil 587 | 588 | ;; Control line numbers activation. 589 | ;; If set to `t', `relative' or `visual' then line numbers are enabled in all 590 | ;; `prog-mode' and `text-mode' derivatives. If set to `relative', line 591 | ;; numbers are relative. If set to `visual', line numbers are also relative, 592 | ;; but only visual lines are counted. For example, folded lines will not be 593 | ;; counted and wrapped lines are counted as multiple lines. 594 | ;; This variable can also be set to a property list for finer control: 595 | ;; '(:relative nil 596 | ;; :visual nil 597 | ;; :disabled-for-modes dired-mode 598 | ;; doc-view-mode 599 | ;; markdown-mode 600 | ;; org-mode 601 | ;; pdf-view-mode 602 | ;; text-mode 603 | ;; :size-limit-kb 1000) 604 | ;; When used in a plist, `visual' takes precedence over `relative'. 605 | ;; (default nil) 606 | dotspacemacs-line-numbers '(:visual t 607 | :disabled-for-modes dired-mode 608 | doc-view-mode 609 | pdf-view-mode 610 | :size-limit-kb 1000) 611 | 612 | ;; Code folding method. Possible values are `evil', `origami' and `vimish'. 613 | ;; (default 'evil) 614 | dotspacemacs-folding-method 'evil 615 | 616 | ;; If non-nil and `dotspacemacs-activate-smartparens-mode' is also non-nil, 617 | ;; `smartparens-strict-mode' will be enabled in programming modes. 618 | ;; (default nil) 619 | dotspacemacs-smartparens-strict-mode t 620 | 621 | ;; If non-nil smartparens-mode will be enabled in programming modes. 622 | ;; (default t) 623 | dotspacemacs-activate-smartparens-mode t 624 | 625 | ;; If non-nil pressing the closing parenthesis `)' key in insert mode passes 626 | ;; over any automatically added closing parenthesis, bracket, quote, etc... 627 | ;; This can be temporary disabled by pressing `C-q' before `)'. (default nil) 628 | dotspacemacs-smart-closing-parenthesis t 629 | 630 | ;; Select a scope to highlight delimiters. Possible values are `any', 631 | ;; `current', `all' or `nil'. Default is `all' (highlight any scope and 632 | ;; emphasis the current one). (default 'all) 633 | dotspacemacs-highlight-delimiters 'all 634 | 635 | ;; If non-nil, start an Emacs server if one is not already running. 636 | ;; (default nil) 637 | dotspacemacs-enable-server nil 638 | 639 | ;; Set the emacs server socket location. 640 | ;; If nil, uses whatever the Emacs default is, otherwise a directory path 641 | ;; like \"~/.emacs.d/server\". It has no effect if 642 | ;; `dotspacemacs-enable-server' is nil. 643 | ;; (default nil) 644 | dotspacemacs-server-socket-dir nil 645 | 646 | ;; If non-nil, advise quit functions to keep server open when quitting. 647 | ;; (default nil) 648 | dotspacemacs-persistent-server nil 649 | 650 | ;; List of search tool executable names. Spacemacs uses the first installed 651 | ;; tool of the list. Supported tools are `rg', `ag', `pt', `ack' and `grep'. 652 | ;; (default '("rg" "ag" "pt" "ack" "grep")) 653 | dotspacemacs-search-tools '("rg" "ag" "pt" "ack" "grep") 654 | 655 | ;; Format specification for setting the frame title. 656 | ;; %a - the `abbreviated-file-name', or `buffer-name' 657 | ;; %t - `projectile-project-name' 658 | ;; %I - `invocation-name' 659 | ;; %S - `system-name' 660 | ;; %U - contents of $USER 661 | ;; %b - buffer name 662 | ;; %f - visited file name 663 | ;; %F - frame name 664 | ;; %s - process status 665 | ;; %p - percent of buffer above top of window, or Top, Bot or All 666 | ;; %P - percent of buffer above bottom of window, perhaps plus Top, or Bot or All 667 | ;; %m - mode name 668 | ;; %n - Narrow if appropriate 669 | ;; %z - mnemonics of buffer, terminal, and keyboard coding systems 670 | ;; %Z - like %z, but including the end-of-line format 671 | ;; If nil then Spacemacs uses default `frame-title-format' to avoid 672 | ;; performance issues, instead of calculating the frame title by 673 | ;; `spacemacs/title-prepare' all the time. 674 | ;; (default "%I@%S") 675 | dotspacemacs-frame-title-format "%I@%S" 676 | 677 | ;; Format specification for setting the icon title format 678 | ;; (default nil - same as frame-title-format) 679 | dotspacemacs-icon-title-format nil 680 | 681 | ;; Color highlight trailing whitespace in all prog-mode and text-mode derived 682 | ;; modes such as c++-mode, python-mode, emacs-lisp, html-mode, rst-mode etc. 683 | ;; (default t) 684 | dotspacemacs-show-trailing-whitespace t 685 | 686 | ;; Delete whitespace while saving buffer. Possible values are `all' 687 | ;; to aggressively delete empty line and long sequences of whitespace, 688 | ;; `trailing' to delete only the whitespace at end of lines, `changed' to 689 | ;; delete only whitespace for changed lines or `nil' to disable cleanup. 690 | ;; (default nil) 691 | dotspacemacs-whitespace-cleanup 'all 692 | 693 | ;; If non-nil activate `clean-aindent-mode' which tries to correct 694 | ;; virtual indentation of simple modes. This can interfere with mode specific 695 | ;; indent handling like has been reported for `go-mode'. 696 | ;; If it does deactivate it here. 697 | ;; (default t) 698 | dotspacemacs-use-clean-aindent-mode t 699 | 700 | ;; Accept SPC as y for prompts if non-nil. (default nil) 701 | dotspacemacs-use-SPC-as-y nil 702 | 703 | ;; If non-nil shift your number row to match the entered keyboard layout 704 | ;; (only in insert state). Currently supported keyboard layouts are: 705 | ;; `qwerty-us', `qwertz-de' and `querty-ca-fr'. 706 | ;; New layouts can be added in `spacemacs-editing' layer. 707 | ;; (default nil) 708 | dotspacemacs-swap-number-row nil 709 | 710 | ;; Either nil or a number of seconds. If non-nil zone out after the specified 711 | ;; number of seconds. (default nil) 712 | dotspacemacs-zone-out-when-idle nil 713 | 714 | ;; Run `spacemacs/prettify-org-buffer' when 715 | ;; visiting README.org files of Spacemacs. 716 | ;; (default nil) 717 | dotspacemacs-pretty-docs nil 718 | 719 | ;; If nil the home buffer shows the full path of agenda items 720 | ;; and todos. If non-nil only the file name is shown. 721 | dotspacemacs-home-shorten-agenda-source nil 722 | 723 | ;; If non-nil then byte-compile some of Spacemacs files. 724 | dotspacemacs-byte-compile nil)) 725 | 726 | (defun dotspacemacs/user-env () 727 | "Environment variables setup. 728 | This function defines the environment variables for your Emacs session. By 729 | default it calls `spacemacs/load-spacemacs-env' which loads the environment 730 | variables declared in `~/.spacemacs.env' or `~/.spacemacs.d/.spacemacs.env'. 731 | See the header of this file for more information." 732 | (spacemacs/load-spacemacs-env) 733 | ) 734 | 735 | (defun dotspacemacs/user-init () 736 | "Initialization for user code: 737 | This function is called immediately after `dotspacemacs/init', before layer 738 | configuration. 739 | It is mostly for variables that should be set before packages are loaded. 740 | If you are unsure, try setting them in `dotspacemacs/user-config' first." 741 | 742 | ;; Save `dotspacemacs/emacs-custom-settings' in a separate file 743 | ;; simplifying version control of the Spacemacs configuration file 744 | (setq custom-file (file-truename (concat dotspacemacs-directory "emacs-custom-settings.el"))) 745 | (load custom-file) 746 | ) 747 | 748 | 749 | (defun dotspacemacs/user-load () 750 | "Library to load while dumping. 751 | This function is called only while dumping Spacemacs configuration. You can 752 | `require' or `load' the libraries of your choice that will be included in the 753 | dump." 754 | ) 755 | 756 | 757 | (defun dotspacemacs/user-config () 758 | "Configuration for user code: 759 | This function is called at the very end of Spacemacs startup, after layer 760 | configuration. 761 | Put your configuration code here, except for variables that should be set 762 | before packages are loaded." 763 | 764 | ;; dotspacemacs/user-config divided into files 765 | ;; - comment files to skip loading specific configuration 766 | 767 | ;; General configuration 768 | (setq user-config-file (file-truename (concat dotspacemacs-directory "user-config.el"))) 769 | (load user-config-file) 770 | 771 | ;; Clojure Layer additionalb configuration 772 | (setq clojure-config-file (file-truename (concat dotspacemacs-directory "clojure-config.el"))) 773 | (load clojure-config-file) 774 | 775 | ;; Customise Theme and Mode-line 776 | (setq theme-config-file (file-truename (concat dotspacemacs-directory "theme-config.el"))) 777 | (load theme-config-file) 778 | 779 | ;; Version Control - Magit & Forge 780 | (setq version-control-config-file (file-truename (concat dotspacemacs-directory "version-control-config.el"))) 781 | (load version-control-config-file) 782 | 783 | ;; Org-mode customisation - notes and tasks 784 | ;; (setq org-config-file (file-truename (concat dotspacemacs-directory "org-config.el"))) 785 | ;; (load org-config-file) 786 | 787 | ;; EShell Customisation 788 | ;; NOTE: Practicalli uses vterm for shell by default 789 | ;; (setq eshell-config-file (file-truename (concat dotspacemacs-directory "eshell-config.el"))) 790 | ;; (load eshell-config-file) 791 | 792 | ) 793 | 794 | 795 | ;; Do not write anything past this comment. This is where Emacs will 796 | ;; auto-generate custom variable definitions. 797 | 798 | ;; NOTE: `custom-set-variables` are now written to a separate file in the Spacemacs configuration location: 799 | ;; Uncomment and evaluate, `, e e', the expression below to check your location 800 | ;; (concat dotspacemacs-directory "emacs-custom-settings.el") 801 | -------------------------------------------------------------------------------- /org-config.el: -------------------------------------------------------------------------------- 1 | ;; --------------------------------------- 2 | ;; Org-mode configuration 3 | ;; --------------------------------------- 4 | 5 | ;; --------------------------------------- 6 | ;; Notes and Tasks 7 | 8 | (with-eval-after-load 'org 9 | (setq 10 | ;; Define the location of the file to hold tasks 11 | org-default-notes-file "~/projects/todo-list.org" 12 | 13 | ;; Define a kanban style set of stages for todo tasks 14 | org-todo-keywords '((sequence "TODO" "DOING" "BLOCKED" "REVIEW" "|" "DONE" "ARCHIVED")) 15 | 16 | ;; Progress Log - add CLOSED: property & current date-time when TODO item enters DONE 17 | org-log-done 'time 18 | 19 | ;; Setting colours (faces) of task states 20 | ;; https://github.com/tkf/org-mode/blob/master/lisp/org-faces.el#L376 21 | ;; Using X11 colour names from: https://en.wikipedia.org/wiki/Web_colors 22 | ;; Using `with-eval-after-load' as a hook to call this setting when org-mode is run 23 | org-todo-keyword-faces 24 | '(("TODO" . "SlateGray") 25 | ("DOING" . "DarkOrchid") 26 | ("BLOCKED" . "Firebrick") 27 | ("REVIEW" . "Teal") 28 | ("DONE" . "ForestGreen") 29 | ("ARCHIVED" . "SlateBlue")))) 30 | 31 | ;; Set TODO keyword faces if over-ridden by theme. 32 | (defun practicalli/set-todo-keyword-faces () 33 | (interactive) 34 | (setq hl-todo-keyword-faces 35 | '(("TODO" . "SlateGray") 36 | ("DOING" . "DarkOrchid") 37 | ("BLOCKED" . "Firebrick") 38 | ("REVIEW" . "Teal") 39 | ("DONE" . "ForestGreen") 40 | ("ARCHIVED" . "SlateBlue")))) 41 | ;; --------------------------------------- 42 | 43 | 44 | ;; --------------------------------------- 45 | ;; customize org-mode's checkboxes with unicode symbols 46 | (add-hook 47 | 'org-mode-hook 48 | (lambda () 49 | "Beautify Org Checkbox Symbol" 50 | (push '("[ ]" . "☐") prettify-symbols-alist) 51 | (push '("[X]" . "☑" ) prettify-symbols-alist) 52 | (push '("[-]" . "❍" ) prettify-symbols-alist) 53 | (prettify-symbols-mode))) 54 | ;; --------------------------------------- 55 | -------------------------------------------------------------------------------- /snippets/README.md: -------------------------------------------------------------------------------- 1 | # Private directory for Yasnippets snippets 2 | 3 | The content of this directory is ignored by Git. This is the default place 4 | where to store your private yasnippets. 5 | 6 | This path will be loaded automatically and used whenever Yasnippets loads. 7 | -------------------------------------------------------------------------------- /snippets/clojure-mode/4clojure-body: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : 4clojure-body 3 | #key : 4clojure-body 4 | #contributor : practicalli 5 | # -- 6 | ;; Deconstruct the problem 7 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 8 | 9 | 10 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 11 | ;; REPL experiments 12 | 13 | 14 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 15 | ;; Answers summary 16 | -------------------------------------------------------------------------------- /snippets/clojure-mode/4clojure-heading: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : 4clojure-heading 3 | #key : 4clojure-heading 4 | #contributor : practicalli 5 | # -- 6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 | ;; $1 8 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 9 | $0 10 | -------------------------------------------------------------------------------- /snippets/clojure-mode/cc-license-name: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : cc-license-name 3 | # key : cc-license-name 4 | # contributor : practicalli 5 | # -- 6 | "Creative Commons Attribution Share-Alike 4.0 International" -------------------------------------------------------------------------------- /snippets/clojure-mode/cc-license-url: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : cc-license-url 3 | # key : cc-license-url 4 | # contributor : practicalli 5 | # -- 6 | "https://creativecommons.org/" -------------------------------------------------------------------------------- /snippets/clojure-mode/compojure-routing: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : routing 3 | #key : compojure-routing 4 | #contributor : practicalli 5 | # -- 6 | (defroutes app 7 | (GET "/" [] handler/welcome-page) 8 | (GET "/accounts" [] handler/accounts-overview-page) 9 | (GET "/account" [] handler/account-history) 10 | (GET "/transfer" [] handler/money-transfer) 11 | (GET "/payment" [] handler/money-payment) 12 | (GET "/register" [] handler/register-customer) ) 13 | -------------------------------------------------------------------------------- /snippets/clojure-mode/def: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : def with doc-string 3 | # key : def 4 | # contributor : practicalli 5 | # -- 6 | (def ${1:name} 7 | "${2:doc-string}" 8 | ${3:value}) 9 | $0 10 | -------------------------------------------------------------------------------- /snippets/clojure-mode/def-: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : def private with doc-string 3 | # key : def- 4 | # contributor : practicalli 5 | # -- 6 | (def ^:private ${1:name} 7 | "${2:doc-string}" 8 | ${3:value}) 9 | $0 10 | -------------------------------------------------------------------------------- /snippets/clojure-mode/deftest: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: deftest clojure.test function 3 | # key: deftest 4 | # contributor: practicalli 5 | # -- 6 | (deftest ${1:name}-test 7 | (testing "${2:Context of the test assertions}"$> 8 | (is (= ${3:assertion-values}))$4))$> 9 | $0 10 | -------------------------------------------------------------------------------- /snippets/clojure-mode/deprecated-banner: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : deprecated-banner 3 | #key : deprecated-banner 4 | #contributor : practicalli 5 | # -- 6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 | ;; DEPRECATED 8 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 9 | -------------------------------------------------------------------------------- /snippets/clojure-mode/deps-git-sha: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : deps.edn Git sha 3 | # key : deps-git-sha 4 | # contributor : practicalli 5 | # -- 6 | ${1:domain/library-name} 7 | {:git/url "https://github.com/${1:}" 8 | :sha "${1:git-sha-value}"}$0 9 | -------------------------------------------------------------------------------- /snippets/clojure-mode/deps-git-tag: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : deps.edn Git tag 3 | # key : deps-git-tag 4 | # contributor : practicalli 5 | # -- 6 | ${1:domain/library-name} 7 | {:git/tag "${1:git-tag-value}" 8 | :git/sha "${2:git-sha-value}"}$0 9 | -------------------------------------------------------------------------------- /snippets/clojure-mode/deps-local: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : deps.edn local project dependency 3 | # key : deps-local 4 | # contributor : practicalli 5 | # -- 6 | ${1:domain/library-name} {:local/root "${2:/path/to/project/root}"}$0 7 | -------------------------------------------------------------------------------- /snippets/clojure-mode/deps-maven: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : Clojure CLI maven dependency 3 | # key : deps-maven 4 | # contributor : practicalli 5 | # -- 6 | ${1:domain/library-name} {:mvn/version "${2:1.0.0}"} -------------------------------------------------------------------------------- /snippets/clojure-mode/deps-project: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : deps-project 3 | # key : deps-project 4 | # contributor : practicalli 5 | # -- 6 | {:paths 7 | ["src" "resources"] 8 | 9 | :deps 10 | {org.clojure/clojure {:mvn/version "1.10.3"}} 11 | 12 | :aliases 13 | {:project/run 14 | {:main-opts ["-m" "${1:project.main-namespace}"]} 15 | 16 | :project/greet 17 | {:ns-default practicalli.testing-watcher 18 | :exec-fn greet 19 | :exec-args {:name "Clojure"}} 20 | 21 | :test/run 22 | {:extra-paths ["test"] 23 | :extra-deps {lambdaisland/kaocha {:mvn/version "1.60.977"}} 24 | :exec-fn kaocha.runner/exec-fn} 25 | 26 | :uberjar 27 | {:replace-deps {com.github.seancorfield/depstar {:mvn/version "2.1.278"}} 28 | :exec-fn hf.depstar/uberjar 29 | :exec-args {:aot true 30 | :jar "testing-watcher.jar" 31 | :main-class "$1" 32 | :sync-pom true}}}} 33 | -------------------------------------------------------------------------------- /snippets/clojure-mode/deps-testrunner-project: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : deps-testrunner-project 3 | #key : deps-testrunner-project 4 | #contributor : jr0cket 5 | # -- 6 | {:paths ["resources" "src"] 7 | 8 | :deps {org.clojure/clojure {:mvn/version "RELEASE"}} 9 | 10 | :aliases {:test 11 | {:extra-paths ["test"] 12 | :extra-deps {org.clojure/test.check 13 | {:mvn/version "RELEASE"}}} 14 | 15 | :runner 16 | {:extra-deps 17 | {com.cognitect/test-runner 18 | {:git/url "https://github.com/cognitect-labs/test-runner" 19 | :sha "76568540e7f40268ad2b646110f237a60295fa3c"}} 20 | :main-opts ["-m" "cognitect.test-runner" "-d" "test"]}}} 21 | -------------------------------------------------------------------------------- /snippets/clojure-mode/design-journal: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : design-journal 3 | # key : design-journal 4 | # contributor : practicalli 5 | # -- 6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 | ;; Design Journal 8 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 9 | -------------------------------------------------------------------------------- /snippets/clojure-mode/doc-header: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : doc-header 3 | #key : doc-header 4 | #contributor : practicalli 5 | # -- 6 | ;; --------------------------------------------------------- 7 | ;; ${1:Heading summary title} 8 | ;; 9 | ;; ${2:Brief description} 10 | ;; --------------------------------------------------------- 11 | 12 | $0 13 | -------------------------------------------------------------------------------- /snippets/clojure-mode/doc-section: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : doc-section 3 | #key : doc-section 4 | # -- 5 | ;; --------------------------------------------------------- 6 | ;; ${1:Section title} 7 | 8 | $0 9 | 10 | ;; End of $1 11 | ;; --------------------------------------------------------- 12 | -------------------------------------------------------------------------------- /snippets/clojure-mode/header-comment-namespace: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : header-comment-namespace 3 | #key : header-comment-namespace 4 | #contributor : practicalli 5 | # -- 6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 | ;; $0 8 | ;; 9 | ;; 10 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 11 | -------------------------------------------------------------------------------- /snippets/clojure-mode/hot-loading: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : hot-loading 3 | # key : hot-loading 4 | # contributor : practicalli 5 | # -- 6 | #_{:clj-kondo/ignore [:redefined-var]} 7 | (comment 8 | ;; Add-lib library for hot-loading 9 | (require '[clojure.tools.deps.alpha.repl :refer [add-libs]]) 10 | (add-libs '{${1:domain/library-name} {:mvn/version \"${2:1.0.0}\"}$3}) 11 | 12 | ) ;; End of rich comment block 13 | -------------------------------------------------------------------------------- /snippets/clojure-mode/repl-experiments: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : repl-experiments 3 | #key : repl-experiments 4 | #contributor : jr0cket 5 | # -- 6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 | ;; REPL Experiments 8 | 9 | $0 10 | -------------------------------------------------------------------------------- /snippets/clojure-mode/rich-comment-hotload: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name : rich comment with hotload 3 | # key : rich-comment-hotload 4 | # contributor : practicalli 5 | # -- 6 | ;; Rich comment block with redefined vars ignored 7 | #_{:clj-kondo/ignore [:redefined-var]} 8 | (comment 9 | ;; Add-lib library for hot-loading 10 | (require '[clojure.tools.deps.alpha.repl :refer [add-libs]]) 11 | (add-libs '{${1:domain/library-name} {:mvn/version \"${2:1.0.0}\"}$3}) 12 | $0 13 | ) ;; End of rich comment block 14 | -------------------------------------------------------------------------------- /snippets/clojure-mode/rich-comment-redefined-ignore: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : rich-comment-redefined-ignore 3 | #key : rich-comment-redefined-ignore 4 | #contributor : practicalli 5 | # -- 6 | ;; Rich comment block with redefined vars ignored 7 | #_{:clj-kondo/ignore [:redefined-var]} 8 | (comment 9 | 10 | $0 11 | 12 | #_()) ;; End of rich comment block 13 | -------------------------------------------------------------------------------- /snippets/clojure-mode/section-divider: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : section-divider 3 | #key : section-divider 4 | # -- 5 | ;; $0 6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -------------------------------------------------------------------------------- /snippets/clojure-mode/todo-demo: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : todo-demo 3 | #key : todo-demo 4 | #contributor : jr0cket 5 | # -- 6 | ;; TODO: demo 7 | -------------------------------------------------------------------------------- /snippets/clojure-mode/todo-deprecate: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : todo-deprecate 3 | #key : todo-deprecate 4 | #contributor : practicalli 5 | # -- 6 | ;; TODO: deprecate content 7 | -------------------------------------------------------------------------------- /snippets/clojurescript-mode/div-with-class: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : div-with-class 3 | #key : div-with-class 4 | #contributor : jr0cket 5 | # -- 6 | [:div {:class "$1"}] -------------------------------------------------------------------------------- /snippets/clojurescript-mode/hiccup-anchor: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : hiccup-anchor 3 | #key : hiccup-anchor 4 | #contributor : jr0cket 5 | # -- 6 | [:a {:class "$1"} 7 | "$0"] 8 | -------------------------------------------------------------------------------- /snippets/clojurescript-mode/hiccup-div-class: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : hiccup-div-class 3 | #key : hiccup-div-class 4 | #contributor : jr0cket 5 | # -- 6 | [:div {:class "$1"}$0] -------------------------------------------------------------------------------- /snippets/clojurescript-mode/hiccup-link: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : hiccup-link 3 | #key : hiccup-link 4 | #contributor : jr0cket 5 | # -- 6 | [:a {:href "$1" 7 | :target "$2_blank"} 8 | "$3"] 9 | -------------------------------------------------------------------------------- /snippets/clojurescript-mode/repl-experiments: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : repl-experiments 3 | #key : repl-experiments 4 | #contributor : jr0cket 5 | # -- 6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 7 | ;; REPL Experiments 8 | 9 | $0 10 | -------------------------------------------------------------------------------- /snippets/emacs-lisp-mode/cider-dir-locals: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : cider-dir-locals 3 | #key : cider-dir-locals 4 | #contributor : practicalli 5 | # -- 6 | ((clojure-mode . ((cider-clojure-cli-global-options . "-A:$1") 7 | (cider-preferred-build-tool . "clojure-cli")))) 8 | -------------------------------------------------------------------------------- /snippets/lisp-data-mode/dir-local-clojure-aliases: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : dir-local-clojure-aliases 3 | #key : dir-local-clojure-aliases 4 | #contributor : John Stevenson 5 | # -- 6 | ((clojure-mode . ((cider-preferred-build-tool . clojure-cli) 7 | (cider-clojure-cli-aliases . ":${1:alias-name}")))) 8 | $0 9 | -------------------------------------------------------------------------------- /snippets/markdown-mode/article-signature: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : article-signature 3 | #key : article-signature 4 | #contributor : Practicalli 5 | # -- 6 | Thank you 7 | 8 | [practicalli GitHub profile](https://github.com/practicalli) I [@practical_li](https://twitter.com/practcial_li) 9 | -------------------------------------------------------------------------------- /snippets/markdown-mode/cc-license-name: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : cc-license-name 3 | #key : cc-license-name 4 | #contributor : jr0cket 5 | # -- 6 | Creative Commons Attribution Share-Alike 4.0 International -------------------------------------------------------------------------------- /snippets/markdown-mode/changelog-jira-link: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : changelog-jira-link 3 | #key : changelog-jira-link 4 | #contributor : practicalli 5 | # -- 6 | - [LD-$1 - $2](https://statsbomb.atlassian.net/browse/LD-$3) $0 7 | -------------------------------------------------------------------------------- /snippets/markdown-mode/code: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : code 3 | #key : code 4 | #contributor : jr0cket 5 | # -- 6 | ``` 7 | $0 8 | ``` 9 | -------------------------------------------------------------------------------- /snippets/markdown-mode/creative-commons-license: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : creative-commons-license 3 | #key : creative-commons-license 4 | #contributor : jr0cket 5 | # -- 6 | Creative Commons License
Spacemacs, Practicalli by John Stevenson is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Based on a work at Spacemacs, Practicalli on Gitub.
Permissions beyond the scope of this license may be available at @jr0cket. 7 | -------------------------------------------------------------------------------- /snippets/markdown-mode/cryogen-post-clojure: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: cryogen-post-clojure 3 | # key: cryogen-post-clojure 4 | # -- 5 | {:title "$1" 6 | :layout :post 7 | :date "2020-0$2" 8 | :topic "clojure" 9 | :tags ["clojure" "$3"]} 10 | 11 | $0 12 | 13 | -------------------------------------------------------------------------------- /snippets/markdown-mode/cryogen-post-ubuntu: -------------------------------------------------------------------------------- 1 | # key: cryogen-post-ubuntu 2 | # name: cryogen-post-ubuntu 3 | # -- 4 | {:title "$1" 5 | :layout :post 6 | :date "2020-0$2" 7 | :topic "ubuntu" 8 | :tags ["ubuntu" "$3"]} 9 | 10 | $0 11 | 12 | -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-cli-alias-m-replaced-a: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-cli-alias-m-replaced-a 3 | #key : gitbook-cli-alias-m-replaced-a 4 | #contributor : practicalli 5 | # -- 6 | > #### Hint::Use -M flag instead of -A 7 | > The `-M` flag has replaced the `-A` flag for including aliases when running Clojure main, which is the approach that the cider jack-in command uses. 8 | -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-collapse: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-collapse 3 | #key : gitbook-collapse 4 | #contributor : jr0cket 5 | # -- 6 | 7 | 8 | -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-hint: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-hint 3 | #key : gitbook-hint 4 | #contributor : jr0cket 5 | # -- 6 | > #### Hint:: 7 | > $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-hint-content-refactor: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-hint-content-refactor 3 | #key : gitbook-hint-content-refactor 4 | #contributor : practicalli 5 | # -- 6 | > #### Hint::content refactor 7 | > This page is being reviewed and updated 8 | -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-hint-p9i-deps-edn-repo: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-hint-p9i-deps-edn-repo 3 | #key : gitbook-hint-p9i-deps-edn-repo 4 | #contributor : practicalli 5 | # -- 6 | > #### Hint::Use practicalli/clojure-deps-edn to add common tools 7 | > fork and clone the [practicalli/clojure-deps-edn](https://github.com/practicalli/clojure-deps-edn) GitHub repository to `~/.clojure/` and instantly have access to dozens of tools for Clojure software development 8 | 9 | $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-note: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-note 3 | #key : gitbook-note 4 | #contributor : jr0cket 5 | # -- 6 | > #### Note::$0 7 | -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-siteurl: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-siteurl 3 | #key : gitbook-siteurl 4 | #contributor : John Stevenson 5 | # -- 6 | {{book.url}}$0 7 | -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-tab-cli-lein: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-tab-cli-lein 3 | #key : gitbook-tab-cli-lein 4 | #contributor : John Stevenson 5 | # -- 6 | {% tabs cli="Cloure CLI", lein="Leiningnen" %} 7 | 8 | {% content "cli" %} 9 | $0 10 | 11 | {% content "lein" %} 12 | 13 | 14 | {% endtabs %} 15 | -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-tabs-clojure-deps-edn: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-tabs-clojure-deps-edn 3 | #key : gitbook-tabs-clojure-deps-edn 4 | #contributor : practicalli 5 | # -- 6 | {% tabs practicalli="practicalli/clojure-deps-edn", manual="Manually add Alias" %} 7 | 8 | {% content "practicalli" %} 9 | 10 | {% content "manual" %} 11 | 12 | {% endtabs %} 13 | 14 | > Note: to have more than one set of tabs in a page, simply create unique id's for the tabs, e.g. practicalli2 15 | -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-tabs-deps-lein: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-tabs-deps-lein 3 | #key : gitbook-tabs-deps-lein 4 | #contributor : practicalli 5 | # -- 6 | 7 | {% tabs deps="deps.edn projects", lein="Leiningnen projects" %} 8 | 9 | {% content "deps" %} 10 | $0 11 | 12 | {% content "lein" %} 13 | 14 | 15 | {% endtabs %} 16 | -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-tabs-deps-lein-boot: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-tabs-deps-lein-boot 3 | #key : gitbook-tabs-deps-lein-boot 4 | #contributor : practicalli 5 | # -- 6 | {% tabs deps="Clojure CLI tools", lein="Leiningen", boot="Boot" %} 7 | 8 | {% content "deps" %} 9 | 10 | {% content "lein" %} 11 | 12 | {% content "boot" %} 13 | 14 | {% endtabs %} 15 | 16 | > Note: to have more than one set of tabs in a page, simply create unique id's for the tabs, e.g. practicalli2 17 | -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-tabs-repl-project: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-tabs-repl-project 3 | #key : gitbook-tabs-repl-project 4 | #contributor : practicalli 5 | # -- 6 | {% tabs repl="In the REPL", project="In a Clojure Project" %} 7 | 8 | {% content "repl" %} 9 | $0 10 | 11 | {% content "project" %} 12 | 13 | 14 | {% endtabs %} 15 | -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-todo: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-todo 3 | #key : gitbook-todo 4 | #contributor : jr0cket 5 | # -- 6 | > #### Todo::$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-todo-wip: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-todo-wip 3 | #key : gitbook-todo-wip 4 | #contributor : jr0cket 5 | # -- 6 | > #### TODO::work in progress, sorry -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-todo-wip-pr: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-todo-wip-pr 3 | #key : gitbook-todo-wip-pr 4 | #contributor : jr0cket 5 | # -- 6 | > #### TODO::work in progress, sorry 7 | > Pull requests are welcome 8 | -------------------------------------------------------------------------------- /snippets/markdown-mode/gitbook-youtube: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : gitbook-youtube 3 | #key : gitbook-youtube 4 | #contributor : jr0cket 5 | # -- 6 | {% youtube %} 7 | $1?autoplay=1loop=1 8 | {% endyoutube %} 9 | $0 10 | -------------------------------------------------------------------------------- /snippets/markdown-mode/image-linked: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : image-linked 3 | #key : image-linked 4 | #contributor : jr0cket 5 | # -- 6 | [![$1](/images/$2)](/images/$3) 7 | $0 8 | -------------------------------------------------------------------------------- /snippets/markdown-mode/kaocha-script: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : kaocha-script 3 | #key : kaocha-script 4 | #contributor : practicalli 5 | # -- 6 | #!/usr/bin/env bash 7 | 8 | ## Script to run the kaocha test runner 9 | clojure -A:test-runner-kaocha "$@" 10 | -------------------------------------------------------------------------------- /snippets/markdown-mode/klipse: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : klipse 3 | #key : klipse 4 | #contributor : jr0cket 5 | # -- 6 | ~~~klipse 7 | $0 8 | ~~~ 9 | -------------------------------------------------------------------------------- /snippets/markdown-mode/klipse-html: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : klipse-html 3 | #key : klipse-html 4 | #contributor : jr0cket 5 | # -- 6 | 7 |

 8 | $0
 9 | 
10 | -------------------------------------------------------------------------------- /snippets/markdown-mode/lighttable-keybindings-table: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : lighttable-keybindings-table 3 | #key : lighttable-keybindings-table 4 | #contributor : jr0cket 5 | # -- 6 | | Action | PC Keypress | Mac Keypress | 7 | |---------------------------------------------------------------|-------------------------------------------------------|------------------------------------------------------| 8 | | Evaluate all the code in a file | Ctrl - Shift - Enter | Cmd - Shift - Enter | 9 | | Evaluate an expression (put cursor after closing parentheses) | Ctrl - Enter | Cmd - Enter | 10 | -------------------------------------------------------------------------------- /snippets/markdown-mode/mini-challenge: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mini-challenge 3 | #key : mini-challenge 4 | #contributor : jr0cket 5 | # -- 6 | 7 | -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-content-tab: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-content-tab 3 | #key : mkdocs-content-tab 4 | #contributor : practicalli 5 | # -- 6 | === "${1:Tab Name}" 7 | $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-evil-jkhl-key-bindings: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-evil-jkhl-key-bindings 3 | #key : mkdocs-evil-jkhl-key-bindings 4 | #contributor : practicalli 5 | # -- 6 | ++"j"++,++"k"++,++"h"++,++"l"++$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-fontawesome-book: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-fontawesome-book 3 | #key : mkdocs-fontawesome-book 4 | #contributor : practicalli 5 | # -- 6 | :fontawesome-solid-book-open: -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-fontawesome-github: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-fontawesome-github 3 | #key : mkdocs-fontawesome-github 4 | #contributor : practicalli 5 | # -- 6 | :fontawesome-brands-github: -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-fontawesome-youtube: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-fontawesome-youtube 3 | #key : mkdocs-fontawesome-youtube 4 | #contributor : practicalli 5 | # -- 6 | :fontawesome-brands-youtube: -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-hint-title: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: mkdocs-hint-title 3 | # key: mkdocs-hint-title 4 | #contributor : practicalli 5 | # -- 6 | !!! HINT "${1:Optional Title}" 7 | ${2:Body of hint indented by 4 characters}$0 8 | 9 | -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-icon-globe: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-icon-globe 3 | #key : mkdocs-icon-globe 4 | #contributor : practicalli 5 | # -- 6 | :fontawesome-solid-globe: -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-iframe-youtube: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-iframe-youtube 3 | #key : mkdocs-iframe-youtube 4 | #contributor : practicalli 5 | # -- 6 |

7 | 8 |

9 | $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-image-align-left: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-image-align-left 3 | #key : mkdocs-image-align-left 4 | #contributor : practicalli 5 | # -- 6 | { align=left loading=lazy }$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-image-form-full: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: mkdocs-image-form-full 3 | # key: mkdocs-image-form-full 4 | # -- 5 | ![${1:image name}](${2:url}#only-dark){align=right$3 loading=lazy style="height:150px;width:150px"} 6 | $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-keys-comma-character: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-keys-comma-character 3 | #key : mkdocs-keys-comma-character 4 | #contributor : practicalli 5 | # -- 6 | ++comma++ ++"$1"++$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-keys-comma-single-quote: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-keys-comma-single-quote 3 | #key : mkdocs-keys-comma-single-quote 4 | #contributor : practicalli 5 | # -- 6 | ++comma++ ++single-quote++$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-keys-ctrl-c-ctrl-c: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-keys-ctrl-c-ctrl-c 3 | #key : mkdocs-keys-ctrl-c-ctrl-c 4 | #contributor : practicalli 5 | # -- 6 | ++ctrl+c+ctrl+"c"++$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-keys-meta-x: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-keys-meta-x 3 | #key : mkdocs-keys-meta-x 4 | #contributor : practicalli 5 | # -- 6 | ++meta+"x"++ $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-keys-spc-f-e-d: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-keys-spc-f-e-d 3 | #key : mkdocs-keys-spc-f-e-d 4 | #contributor : practicalli 5 | # -- 6 | ++spc++ ++"f"++ ++"e"++ ++"d"++$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-keys-spc-tab: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-keys-spc-tab 3 | #key : mkdocs-keys-spc-tab 4 | #contributor : practicalli 5 | # -- 6 | ++spc++ ++tab++$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-link-button: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-link-button 3 | #key : mkdocs-link-button 4 | #contributor : practicalli 5 | # -- 6 | { .md-button } -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-link-button-target-blank: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-link-button-target-blank 3 | #key : mkdocs-link-button-target-blank 4 | #contributor : practicalli 5 | # -- 6 | {target=_blank .md-button}$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-link-dark: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-link-dark 3 | #key : mkdocs-link-dark 4 | #contributor : practicalli 5 | # -- 6 | ![${1:title}](${2:url}#only-dark) -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-link-doom-emacs-config: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: mkdocs-link-doom-emacs-config 3 | # key: mkdocs-link-doom-emacs-config 4 | # contributor: practicalli 5 | # -- 6 | [practicalli/doom-emacs-config](https://github.com/practicalli/doom-emacs-config){target=_blank}$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-link-only-dark-tag: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-link-only-dark-tag 3 | #key : mkdocs-link-only-dark-tag 4 | #contributor : practicalli 5 | # -- 6 | #only-dark -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-link-p9i-clojure-cli-config: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | # name: mkdocs-link-p9i-clojure-cli-config 3 | # key: 4 | # -- 5 | [Practicalli Clojure CLI Config](https://practical.li/clojure/clojure-cli/practicalli-config/){target=_blank .md-button}$0 6 | -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-link-target-blank: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-link-target-blank 3 | #key : mkdocs-link-target-blank 4 | #contributor : practicalli 5 | # -- 6 | {target=_blank}$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-p9i-neovim-config-redux: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-p9i-neovim-config-redux 3 | #key : mkdocs-p9i-neovim-config-redux 4 | #contributor : practicalli 5 | # -- 6 | [practicalli/neovim-config-redux configuration](https://github.com/practicalli/neovim-config-redux){target=_blank}$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/mkdocs-p9i-spacemacs-d: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : mkdocs-p9i-spacemacs-d 3 | #key : mkdocs-p9i-spacemacs-d 4 | #contributor : practicalli 5 | # -- 6 | [practicalli/spacemacs.d](https://github.com/practicalli/spacemacs.d){target=_blank}$0 -------------------------------------------------------------------------------- /snippets/markdown-mode/orgtbl-keybinding-simple: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : orgtbl-keybinding-simple 3 | #key : orgtbl-keybinding-simple 4 | #contributor : jr0cket 5 | # -- 6 | | Keybinding | Description | 7 | |------------+-------------| 8 | | $0 | | 9 | | | | 10 | | | | 11 | | | | 12 | -------------------------------------------------------------------------------- /snippets/markdown-mode/section-separator: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : section-separator 3 | #key : section-separator 4 | #contributor : jr0cket 5 | # -- 6 | ------------------------------------------ 7 | -------------------------------------------------------------------------------- /snippets/markdown-mode/spacemacs-keybindings: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : spacemacs-keybindings 3 | #key : spacemacs-keybindings 4 | #contributor : jr0cket 5 | #comments: org-table tabs through sections so no need for placeholders 6 | # -- 7 | | Spacemacs | Evil normal | Command | Description | 8 | |-----------+-------------+---------+-------------| 9 | | $0 | | | | 10 | -------------------------------------------------------------------------------- /snippets/markdown-mode/todo-work-in-progress: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : todo-work-in-progress 3 | #key : todo-work-in-progress 4 | #contributor : jr0cket 5 | # -- 6 | > #### TODO::Work in progress 7 | -------------------------------------------------------------------------------- /snippets/markdown-mode/url-practicalli-clojure: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : url-practicalli-clojure 3 | #key : url-practicalli-clojure 4 | #contributor : practicalli 5 | # -- 6 | https://practical.li/clojure$0 7 | -------------------------------------------------------------------------------- /snippets/markdown-mode/youtube-live-broadcast: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : youtube-live-broadcast 3 | #key : youtube-live-broadcast 4 | #contributor : jr0cket 5 | # -- 6 | [![youtube live broadcast](/images/youtube-live-broadcast.png)]($1) 7 | $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/youtube-live-hangout: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : youtube-live-hangout 3 | #key : youtube-live-hangout 4 | #contributor : jr0cket 5 | # -- 6 | [![youtube live hangout on air](/images/youtube-live-hangout-on-air.png)]($1) 7 | $0 -------------------------------------------------------------------------------- /snippets/markdown-mode/youtube-recorded-broadcast: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : youtube-recorded-broadcast 3 | #key : youtube-recorded-broadcast 4 | #contributor : jr0cket 5 | # -- 6 | [![youtube live recorded broadcast](/images/youtube-live-recorded-broadcast.png)]($1) 7 | $0 8 | -------------------------------------------------------------------------------- /snippets/org-journal-mode/heading-with-checkboxes: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : heading-with-checkboxes 3 | #key : heading-with-checkboxes 4 | #contributor : practicalli 5 | # -- 6 | 7 | ** TODO $1 [/] 8 | - [ ] $0 9 | -------------------------------------------------------------------------------- /snippets/org-mode/hyperlink: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : hyperlink 3 | #key : hyperlink 4 | #contributor : jr0cket 5 | # -- 6 | [[$1][$2]]$0 -------------------------------------------------------------------------------- /snippets/org-mode/journal-entry: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : journal-entry 3 | #key : journal-entry 4 | #contributor : jr0cket 5 | # -- 6 | * 201912$1 7 | ** Thoughts for today 8 | $0 9 | ** Code commits 10 | *** . 11 | ** Activities in detail 12 | *** . 13 | -------------------------------------------------------------------------------- /snippets/sh-mode/kaocha-script: -------------------------------------------------------------------------------- 1 | # -*- mode: snippet -*- 2 | #name : kaocha-script 3 | #key : kaocha-script 4 | #contributor : practicalli 5 | # -- 6 | #!/usr/bin/env bash 7 | 8 | ## Script to run the kaocha test runner 9 | clojure -M:test/run "$@" 10 | -------------------------------------------------------------------------------- /theme-config.el: -------------------------------------------------------------------------------- 1 | ;; -*- mode: emacs-lisp; lexical-binding: t -*- 2 | 3 | ;; --------------------------------------- 4 | ;; Theme configuration 5 | ;; --------------------------------------- 6 | 7 | ;; --------------------------------------- 8 | ;; Theme Variants 9 | ;; (setq doom-gruvbox-light-variant "hard") 10 | ;; --------------------------------------- 11 | 12 | ;; --------------------------------------- 13 | ;; Doom-modeline 14 | (defun practicalli/setup-custom-doom-modeline () 15 | (doom-modeline-set-modeline 'practicalli-modeline 'default)) 16 | ;; 17 | (with-eval-after-load 'doom-modeline 18 | (doom-modeline-def-modeline 'practicalli-modeline 19 | '(workspace-name window-number modals persp-name buffer-info matches remote-host vcs) 20 | '(misc-info repl lsp buffer-position)) 21 | (practicalli/setup-custom-doom-modeline)) 22 | 23 | ;; Segments: 24 | ;; checker = flycheck results (not working) 25 | ;; buffer-position 26 | ;; word-count - number of words in current buffer 27 | ;; parrot 28 | ;; selection-info 29 | ;; repl - shows status of Cloure repl (not working) 30 | ;; process ?? 31 | ;; debug 32 | ;; misc-info - used for keycast 33 | ;; --------------------------------------- 34 | -------------------------------------------------------------------------------- /user-config.el: -------------------------------------------------------------------------------- 1 | ;; -*- mode: emacs-lisp; lexical-binding: t -*- 2 | 3 | ;; --------------------------------------- 4 | ;; General Configuration changes 5 | ;; --------------------------------------- 6 | 7 | ;; --------------------------------------- 8 | ;; Line numbers 9 | ;; native line numbers taking up lots of space? 10 | (setq-default display-line-numbers-width nil) 11 | ;; --------------------------------------- 12 | 13 | ;; --------------------------------------- 14 | ;; Searching 15 | ;; replace / search with helm-swoop in Evil normal state 16 | (evil-global-set-key 'normal "/" 'helm-swoop) 17 | ;; 18 | ;; --------------------------------------- 19 | 20 | ;; --------------------------------------- 21 | ;; Helm Descbinds 22 | ;; Recent release of helm-descbinds package breaks which-key menu 23 | ;; Remove helm-discbinds-mode from helm mode hook to avoid activating 24 | ;; https://github.com/syl20bnr/spacemacs/issues/16276 25 | (remove-hook 'helm-mode-hook 'helm-descbinds-mode) 26 | ;; --------------------------------------- 27 | -------------------------------------------------------------------------------- /version-control-config.el: -------------------------------------------------------------------------------- 1 | ;; --------------------------------------- 2 | ;; Version Control configuration - Git, etc 3 | ;; 4 | ;; https://develop.spacemacs.org/layers/+source-control/version-control/README.html 5 | ;; https://develop.spacemacs.org/layers/+source-control/git/README.html 6 | ;; Git Delta guide - https://dandavison.github.io/delta/ 7 | ;; --------------------------------------- 8 | 9 | ;; --------------------------------------- 10 | ;; Spacemacs as $EDITOR (or $GIT_EDITOR) for commit messages 11 | ;; for `git commit` on command line 12 | ;; (global-git-commit-mode t) 13 | ;; --------------------------------------- 14 | 15 | 16 | ;; --------------------------------------- 17 | ;; Magit - forge configuration 18 | 19 | ;; Set locations of all your Git repositories 20 | ;; with a number to define how many sub-directories to search 21 | ;; `SPC g L' - list all Git repositories in the defined paths, 22 | (setq magit-repository-directories 23 | '(("~/projects/" . 2))) 24 | 25 | ;; path for developer tokens (default ~/.authinfo) 26 | ;; Use XDG_CONFIG_HOME location or HOME 27 | (setq auth-sources (list 28 | (concat (getenv "XDG_CONFIG_HOME") "/authinfo.gpg") 29 | "~/.authinfo.gpg")) 30 | 31 | 32 | ;; Number of topics shown, open and closed values 33 | ;; - negative number toggles view of closed topics 34 | ;; using `SPC SPC forge-toggle-closed-visibility' 35 | ;; - set closed to 0 to never show closed issues 36 | ;; (setq forge-topic-list-limit '(100 . 0)) 37 | (setq forge-topic-list-limit '(100 . -10)) 38 | 39 | 40 | ;; GitHub user and organisation accounts owned 41 | ;; used by @ c f to create a fork 42 | (setq forge-owned-accounts 43 | '(("practicalli" "practicalli-john" 44 | "ClojureBridgeLondon" "ldnclj" 45 | "clojure-hacks"))) 46 | 47 | ;; Blacklist Forge accounts 48 | ;; - over-rides forge-owned-accounts 49 | ;; (setq forge-owned-blacklist 50 | ;; '(("bad-hacks" "really-bad-hacks"))) 51 | ;; --------------------------------------- 52 | --------------------------------------------------------------------------------