├── .gitignore ├── .markdownlint.yaml ├── LICENSE ├── README.md ├── fnl └── config │ ├── init.fnl │ ├── macro.fnl │ ├── plugin.fnl │ ├── plugin │ ├── autopairs.fnl │ ├── cmp.fnl │ ├── conjure.fnl │ ├── diffview.fnl │ ├── easy-align.fnl │ ├── fugitive.fnl │ ├── gitsigns.fnl │ ├── lspcolors.fnl │ ├── lspconfig.fnl │ ├── lua-snip.fnl │ ├── lualine.fnl │ ├── neoclip.fnl │ ├── neogit.fnl │ ├── numb.fnl │ ├── nvim-comment.fnl │ ├── nvim-surround.fnl │ ├── nvim-tree.fnl │ ├── octo.fnl │ ├── orgmode.fnl │ ├── project.fnl │ ├── sexp.fnl │ ├── startup.fnl │ ├── symbols-outline.fnl │ ├── telescope.fnl │ ├── theme-gruvbox.fnl │ ├── theme-lualine.fnl │ ├── theme-newpaper.fnl │ ├── theme-tokyonight.fnl │ ├── theme.fnl │ ├── todocomments.fnl │ ├── toggleterm.fnl │ ├── treesitter.fnl │ ├── trouble.fnl │ ├── web-devicons.fnl │ └── which-key.fnl │ └── util.fnl ├── icons.txt ├── init.lua ├── notes.md └── snippets ├── clojure.json ├── global.json ├── markdown.json └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | lua/ 2 | 3 | -------------------------------------------------------------------------------- /.markdownlint.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | # Example markdownlint configuration with properties set to their default value 3 | 4 | # Default state for all rules 5 | default: true 6 | 7 | # Path to configuration file to extend 8 | extends: null 9 | 10 | # MD001/heading-increment/header-increment - Heading levels should only increment by one level at a time 11 | MD001: true 12 | 13 | # MD002/first-heading-h1/first-header-h1 - First heading should be a top-level heading 14 | MD002: 15 | # Heading level 16 | level: 1 17 | 18 | # MD003/heading-style/header-style - Heading style 19 | MD003: 20 | # Heading style 21 | style: "consistent" 22 | 23 | # MD004/ul-style - Unordered list style 24 | MD004: 25 | # List style 26 | style: "consistent" 27 | 28 | # MD005/list-indent - Inconsistent indentation for list items at the same level 29 | MD005: true 30 | 31 | # MD006/ul-start-left - Consider starting bulleted lists at the beginning of the line 32 | MD006: true 33 | 34 | # MD007/ul-indent - Unordered list indentation 35 | MD007: 36 | # Spaces for indent 37 | indent: 2 38 | # Whether to indent the first level of the list 39 | start_indented: false 40 | # Spaces for first level indent (when start_indented is set) 41 | start_indent: 2 42 | 43 | # MD009/no-trailing-spaces - Trailing spaces 44 | MD009: 45 | # Spaces for line break 46 | # br_spaces: 2 47 | # Allow spaces for empty lines in list items 48 | list_item_empty_lines: false 49 | # Include unnecessary breaks 50 | strict: false 51 | 52 | # MD010/no-hard-tabs - Hard tabs 53 | MD010: 54 | # Include code blocks 55 | code_blocks: true 56 | # Fenced code languages to ignore 57 | ignore_code_languages: [] 58 | # Number of spaces for each hard tab 59 | spaces_per_tab: 1 60 | 61 | # MD011/no-reversed-links - Reversed link syntax 62 | MD011: true 63 | 64 | # MD012/no-multiple-blanks - Multiple consecutive blank lines 65 | MD012: 66 | # Consecutive blank lines 67 | maximum: 2 68 | 69 | # MD013/line-length - Line length 70 | MD013: 71 | # Number of characters 72 | line_length: 420 73 | # Number of characters for headings 74 | heading_line_length: 60 75 | # Number of characters for code blocks 76 | code_block_line_length: 180 77 | # Include code blocks 78 | code_blocks: false 79 | # Include tables 80 | tables: false 81 | # Include headings 82 | headings: true 83 | # Include headings 84 | headers: true 85 | # Strict length checking 86 | strict: false 87 | # Stern length checking 88 | stern: false 89 | 90 | # MD014/commands-show-output - Dollar signs used before commands without showing output 91 | MD014: true 92 | 93 | # MD018/no-missing-space-atx - No space after hash on atx style heading 94 | MD018: true 95 | 96 | # MD019/no-multiple-space-atx - Multiple spaces after hash on atx style heading 97 | MD019: true 98 | 99 | # MD020/no-missing-space-closed-atx - No space inside hashes on closed atx style heading 100 | MD020: true 101 | 102 | # MD021/no-multiple-space-closed-atx - Multiple spaces inside hashes on closed atx style heading 103 | MD021: true 104 | 105 | # MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines 106 | MD022: 107 | # Blank lines above heading 108 | lines_above: 1 109 | # Blank lines below heading 110 | lines_below: 1 111 | 112 | # MD023/heading-start-left/header-start-left - Headings must start at the beginning of the line 113 | MD023: true 114 | 115 | # MD024/no-duplicate-heading/no-duplicate-header - Multiple headings with the same content 116 | MD024: 117 | # Only check sibling headings 118 | allow_different_nesting: false 119 | # Only check sibling headings 120 | siblings_only: false 121 | 122 | # MD025/single-title/single-h1 - Multiple top-level headings in the same document 123 | MD025: 124 | # Heading level 125 | level: 1 126 | # RegExp for matching title in front matter 127 | front_matter_title: "^\\s*title\\s*[:=]" 128 | 129 | # MD026/no-trailing-punctuation - Trailing punctuation in heading 130 | MD026: 131 | # Punctuation characters not allowed at end of headings 132 | punctuation: ".,;:!。,;:!" 133 | 134 | # MD027/no-multiple-space-blockquote - Multiple spaces after blockquote symbol 135 | MD027: true 136 | 137 | # MD028/no-blanks-blockquote - Blank line inside blockquote 138 | MD028: true 139 | 140 | # MD029/ol-prefix - Ordered list item prefix 141 | MD029: 142 | # List style 143 | style: "one_or_ordered" 144 | 145 | # MD030/list-marker-space - Spaces after list markers 146 | MD030: 147 | # Spaces for single-line unordered list items 148 | ul_single: 1 149 | # Spaces for single-line ordered list items 150 | ol_single: 1 151 | # Spaces for multi-line unordered list items 152 | ul_multi: 1 153 | # Spaces for multi-line ordered list items 154 | ol_multi: 1 155 | 156 | # MD031/blanks-around-fences - Fenced code blocks should be surrounded by blank lines 157 | MD031: 158 | # Include list items 159 | list_items: true 160 | 161 | # MD032/blanks-around-lists - Lists should be surrounded by blank lines 162 | MD032: true 163 | 164 | # MD033/no-inline-html - Inline HTML 165 | MD033: 166 | # Allowed elements 167 | allowed_elements: [ "a", "div", "iframe", "img", "p" ] 168 | 169 | # MD034/no-bare-urls - Bare URL used 170 | MD034: true 171 | 172 | # MD035/hr-style - Horizontal rule style 173 | MD035: 174 | # Horizontal rule style 175 | style: "consistent" 176 | 177 | # MD036/no-emphasis-as-heading/no-emphasis-as-header - Emphasis used instead of a heading 178 | MD036: 179 | # Punctuation characters 180 | punctuation: ".,;:!?。,;:!?" 181 | 182 | # MD037/no-space-in-emphasis - Spaces inside emphasis markers 183 | MD037: true 184 | 185 | # MD038/no-space-in-code - Spaces inside code span elements 186 | MD038: false 187 | 188 | # MD039/no-space-in-links - Spaces inside link text 189 | MD039: true 190 | 191 | # MD040/fenced-code-language - Fenced code blocks should have a language specified 192 | MD040: 193 | # List of languages 194 | allowed_languages: [] 195 | # Require language only 196 | language_only: false 197 | 198 | # MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading 199 | MD041: 200 | # Heading level 201 | level: 1 202 | # RegExp for matching title in front matter 203 | front_matter_title: "^\\s*title\\s*[:=]" 204 | 205 | # MD042/no-empty-links - No empty links 206 | MD042: true 207 | 208 | # MD043/required-headings/required-headers - Required heading structure 209 | MD043: false 210 | # List of headings 211 | # headings: [] 212 | # List of headings 213 | # headers: [] 214 | # Match case of headings 215 | # match_case: false 216 | 217 | # MD044/proper-names - Proper names should have the correct capitalization 218 | MD044: 219 | # List of proper names 220 | names: [] 221 | # Include code blocks 222 | code_blocks: true 223 | # Include HTML elements 224 | html_elements: true 225 | 226 | # MD045/no-alt-text - Images should have alternate text (alt text) 227 | MD045: true 228 | 229 | # MD046/code-block-style - Code block style 230 | MD046: false 231 | # Block style 232 | # style: "consistent" 233 | 234 | # MD047/single-trailing-newline - Files should end with a single newline character 235 | MD047: true 236 | 237 | # MD048/code-fence-style - Code fence style 238 | MD048: 239 | # Code fence style 240 | style: "consistent" 241 | 242 | # MD049/emphasis-style - Emphasis style should be consistent 243 | MD049: 244 | # Emphasis style should be consistent 245 | style: "consistent" 246 | 247 | # MD050/strong-style - Strong style should be consistent 248 | MD050: 249 | # Strong style should be consistent 250 | style: "consistent" 251 | 252 | # MD051/link-fragments - Link fragments should be valid 253 | MD051: true 254 | 255 | # MD052/reference-links-images - Reference links and images should use a label that is defined 256 | MD052: true 257 | 258 | # MD053/link-image-reference-definitions - Link and image reference definitions should be needed 259 | MD053: 260 | # Ignored definitions 261 | ignored_definitions: 262 | - "//" 263 | -------------------------------------------------------------------------------- /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 Neovim Configuration 2 | 3 | ## ARCHIVED PROJECT 4 | practicalli/neovim-config-redux is now archived project. 5 | 6 | [Practicalli Neovim book](https://practical.li/neovim) was updated to use the AstroNvim configuration for Neovim, providing a wide range of plugins with a highly flexible configuration via the Lazy Package plugin manager. 7 | 8 | The author of Aniseed is making a significant change to how Fennel is used and creating the [nfnl project](https://github.com/olical/nfnl). A new fennel based configuration may be created in the future to replace this project (although it woud be a huge investment to replicate everything that AstroNvim provides). 9 | 10 | 11 | ## Overview 12 | 13 | A Fennel configuration for Neovim 0.8.0 or greater, with a focus on Clojure REPL driven development with Conjure as well as general development workflow. A complete configuration to transform your Neovim in a simple, powerful and fun to use Clojure IDE 14 | 15 | The key bindings (mappings) are evolving and trying to follow a Spacemacs style mnemonic approach (`SPC f f` to open a file browser). A which-key text menu is also provided to help discover key bindings. Using mnemonic keybinding will make Neovim more accessible to Spacemacs users (like myself) and those less familiar with the ways of interacting with a Vim editor, i.e. the `:` commands approach. 16 | 17 | [Practicalli Neovim book](https://practical.li/neovim/) uses this configuration as it describes using Neovim, there is also (WIP) a description of this configuration in more detail. 18 | 19 | 20 | ## Derived work 21 | 22 | This project owes it existence to the contributions and guidance of [rafaeldelboni](https://github.com/rafaeldelboni/) and the amazing work on Aniseed and Conjure by Olical 23 | 24 | * [rafaeldelboni/nvim-fennel-lsp-conjure-as-clojure-ide](https://github.com/rafaeldelboni/nvim-fennel-lsp-conjure-as-clojure-ide) - clearly documented configuration for those starting with Neovim and Clojure 25 | * [rafaeldelboni/dotfiles](https://github.com/rafaeldelboni/dotfiles) - more advanced and updated configurations 26 | * [Olical/dotfiles](https://github.com/Olical/dotfiles/tree/main/stowed/.config/nvim) - Neovim configuration from the author of Aniseed and Conjure (and many other wonderful things) 27 | 28 | Support has also been provided in the #vim channel of the Clojurians Slack community. 29 | 30 | 31 | ## Prerequisites 32 | 33 | * [git](https://git-scm.com/downloads) 34 | * [Neovim 0.8.0](https://neovim.io/) or greater 35 | * C compiler - e.g. gcc on Linux, clang on Termux(Android) - required for Neovim Treesitter 36 | * [ripgrep](https://github.com/BurntSushi/ripgrep) to search for files 37 | * [Clojure CLI](https://clojure.org/) 38 | * [practicalli/clojure-deps-edn](https://clojure.org/) user level aliases adding a range of community tools 39 | * [clojure-lsp](https://github.com/clojure-lsp/clojure-lsp) Language Server Protocol implementation for Clojure 40 | 41 | > Ubuntu Neovim 0.8.0 Install: use `*.deb` file from [Neovim releases page](https://github.com/neovim/neovim/releases) on GitHub 42 | 43 | 44 | ## How to use 45 | 46 | Move `$HOME/.config/nvim` if you have an existing Neovim configuration 47 | 48 | ```bash 49 | mv $HOME/.config/nvim $HOME/backup/nvim 50 | ``` 51 | 52 | Clone the repository to the `$HOME/.config/nvim` directory 53 | 54 | ```bash 55 | git clone git@github.com:practicalli/neovim-config-redux.git $HOME/.config/nvim 56 | ``` 57 | 58 | Run `nvim` without opening any files and press `RTN` at the warning message. 59 | 60 | When starting `nvim` for the first time, the download packer and aniseed plugins are downloaded and some errors occur as there are more packages to download using the Packer tool. 61 | 62 | In Neovim, press `:` and type `PackerInstall` (or type `Pack` and press `TAB` to cycle through the menu of completions). 63 | 64 | `RET` will run :PackerInstall, opening a new window (split) showing the progress of the install. 65 | 66 | All the plugins declared in `fnl/config/plugin.fnl` should be installed 67 | 68 | `:q!` to close neovim and use the `nvim` command open Neovim again, hopefully without errors this time. 69 | 70 | > Should errors persist, try `:PackerUpdate` in neovim and quit / restart. 71 | 72 | ## Plugins 73 | 74 | * [packer](https://github.com/wbthomason/packer.nvim) *Plugin/package management* 75 | * [aniseed](https://github.com/Olical/aniseed) *Bridges between fennel and nvim* 76 | * [conjure](https://github.com/Olical/conjure) *Interactive repl based evaluation for nvim* 77 | * [telescope](https://github.com/nvim-telescope/telescope.nvim) *Find, Filter, Preview, Pick* 78 | * [telescope-file-browser](https://github.com/nvim-telescope/telescope-file-browser.nvim) *file management - create, delete, rename and move files and directories* 79 | * [telescope-env](https://github.com/LinArcX/telescope-env.nvim) *list/search environment variables* 80 | * [telescope-project.nvim](https://github.com/nvim-telescope/telescope-project.nvim) *list, switch between, create and delete projects* 81 | * [ports](https://github.com/LinArcX/telescope-ports.nvim) *show ports being used and kill associated processes* 82 | * [telescope-headings](https://github.com/crispgm/telescope-heading.nvim) - jump to headings in markdown, asciidoc, etc. 83 | * [telescope-terraform-doc](https://github.com/ANGkeith/telescope-terraform-doc.nvim) - search for terraform docs, open in browser 84 | * [treesitter](https://github.com/nvim-treesitter/nvim-treesitter) *Incremental parsing system for highlighting, indentation, or folding* 85 | * [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) *Quickstart configurations for the Nvim LSP client* 86 | * [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) *Autocompletion plugin* 87 | * [github-nvim-theme](https://github.com/projekt0n/github-nvim-theme) *Github theme for Neovim* 88 | * [tpope-vim-sexp-bundle](https://github.com/tpope/vim-sexp-mappings-for-regular-people) *sexp mappings for regular people* 89 | * [lualine](https://github.com/nvim-lualine/lualine.nvim) *neovim statusline plugin written in pure lua* 90 | * [luasnip](https://github.com/L3MON4D3/LuaSnip) *Snippet Engine for Neovim written in Lua.* 91 | * [startup](https://github.com/startup-nvim/startup.nvim) *startup themes - using default dashboard* 92 | * [simrat39/symbols-outline.nvim](https://github.com/simrat39/symbols-outline.nvim) - tree view of symbols using LSP 93 | * [pwntester/octo.nvim](https://github.com/pwntester/octo.nvim) *GitHub Issues & PRs via GitHub CLI* 94 | * [nvim-comment](https://github.com/terrortylor/nvim-comment) *toggle line comments with visual selection and motions* (replaces [tpope/commentary.vim](https://github.com/tpope/vim-commentary)) 95 | * [Todo Comments](https://github.com/folke/todo-comments.nvim) *Highlight and search for todo comments (TODO, NOTE, WARNING, FIX, HACK, PERF - specify in options)* 96 | * [neogit](https://github.com/TimUntersberger/neogit) *Magit clone - WIP with lots of useful features already* 97 | * [octo](https://github.com/pwntester/octo.nvim) *GitHub Issues and Pull Requests* 98 | * [orgmode](https://github.com/nvim-orgmode/orgmode) *excellent note taking and agenda management* 99 | * [tpope/fugitive](https://github.com/tpope/vim-fugitive) *Git command line* installed, no key bindings yet (using neogit instead - although may need both) 100 | * [gitsigns](https://github.com/lewis6991/gitsigns.nvim) *Git highlights in gutter - adding fugitive controls* 101 | * [Dockerfile.vim](https://github.com/ekalinin/Dockerfile.vim) *Dockerfile syntax highlighting and snipMate snippets* 102 | * [terryma/vim-expand-region](https://github.com/terryma/vim-expand-region) *Visually select regions based on semantic units, `+` to expand, `-` to contract* 103 | * [neoclip](https://github.com/AckslD/nvim-neoclip.lua) *clipboard history - with telescope popup* 104 | * [akinsho/nvim-toggleterm.lua](https://github.com/akinsho/toggleterm.nvim) - toggle terminal popup window 105 | 106 | ### themes 107 | 108 | * [sainnhe/gruvbox-material](https://github.com/sainnhe/gruvbox-material) a softer contrast version of Gruvbox theme `:help gruvbox-material.txt` 109 | * [feline-nvim/feline.nvim](https://github.com/feline-nvim/feline.nvim) - status bar theme 110 | 111 | Supporting plugins 112 | 113 | * supports Todo Comments 114 | * 115 | 116 | 117 | * [nvim-neorg/neorg](https://github.com/nvim-neorg/neorg) - a variation on org mode for neovim - neovim 0.8.* required 118 | * [mfussenegger/nvim-dap](https://github.com/mfussenegger/nvim-dap) *Debug Adapter Protocol client* - neovim 8.0 required 119 | * [ktock/buildg](https://github.com/ktock/buildg) *DAP for Dockerfile* 120 | * - simplify use of nvim-cmp and LSP config, install language servers using 121 | * - package manger for external editor tools, e.g. LSP & DAP servers, linters, formatters, 122 | 123 | * - trim whitespace 124 | * [ms-jpq/chadtree](https://github.com/ms-jpq/chadtree) - file manager 125 | * [ggandor/lightspeed.nvim](https://github.com/ggandor/lightspeed.nvim) - 7 126 | * [leap.nvim](https://github.com/ggandor/leap.nvim) - general purpose motions for moving around the visible area of buffers 127 | * - trim whitespace 128 | 129 | * - cycle through kill ring (and other stuff) 130 | 131 | * [ggandor/leap.nvim](https://github.com/ggandor/leap.nvim) motions (replacement for lightspeed), alternative to easy-motions ?? 132 | * [kevinhwang91/rnvimr](https://github.com/kevinhwang91/rnvimr) *ranger in a floating window* 133 | * [dadbod.vim](https://github.com/tpope/vim-dadbod) interact with database - connect `:DB postgresql:///connection-string` or run a single expression 134 | * [vim-dadbob-ui](https://github.com/kristijanhusak/vim-dadbod-ui) - navigate database connections and save queries 135 | * [heroku.vim](https://github.com/tpope/vim-heroku) wraps the [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) and provides tab complete of commands 136 | * [p00f/nvim-ts-rainbow](https://github.com/p00f/nvim-ts-rainbow) *treesitter based rainbow parens* 137 | 138 | * share github links 139 | 140 | 141 | #### Telescope extensions to try 142 | 143 | * 144 | * 145 | * 146 | * 147 | * 148 | * 149 | * 150 | * 151 | * 152 | * - search Maven Central - maybe useful for finding jdbc driver versions, postgresql 153 | * - search for open source licenses 154 | * - switch between and close tabs, optional preview 155 | 156 | ## Neovim configurations 157 | 158 | * [NvChad](https://nvchad.com/) 159 | * [LunaVim](https://www.lunarvim.org/) 160 | * [CodeArt](https://github.com/artart222/CodeArt) 161 | * [Astro Nvim](https://astronvim.github.io/) 162 | 163 | 164 | ## Plugin Not used 165 | 166 | * - use Octo 167 | * ntpeters/vim-better-whitespace - vim plugin Whitespace hightlighting / removal - overly complicated to configure in fennel 168 | 169 | 170 | # Using Neovim 171 | 172 | ## Starting Neovim 173 | 174 | `nvim` runs Neovim on the command line and if no files are given as arguments then the startup dashboard is displayed, providing easy access to previously opened files and other common actions. 175 | 176 | ![Neovim startup plugin with dashboard theme](https://raw.githubusercontent.com/practicalli/graphic-design/live/neovim/screenshots/neovim-startup-dashboard-theme-light.png) 177 | 178 | 179 | ## Projects and files 180 | 181 | Telescope and project plugin 182 | 183 | TODO: configure telescope to respect the global gitignore patterns 184 | 185 | Project key bindings - 186 | 187 | 188 | ## Comments 189 | 190 | [commentary.vim](https://github.com/tpope/vim-commentary) toggles a comment for lines, visual selections or for motions 191 | 192 | `gcc` comment current line, `4gcc` comment current line and next 4 lines 193 | 194 | `gc` comment region or use with motion e.g. `gcap` comment paragraph, 195 | 196 | gc in operator pending mode to target a comment `TODO:` what is operator pending mode 197 | 198 | `:7,17Commentary` comment a range 199 | 200 | `:g/TODO/Commentary` as part of a :global invocation 201 | 202 | `gcgc` removes comments from a set of adjacent commented lines. 203 | 204 | ## Version Control 205 | 206 | Neogit provides a Magit style client. 207 | 208 | > fugitive package provides a command line experience (no keybinding) 209 | 210 | `gs` opens Git Status, by running `:Neogit` 211 | 212 | Other commands to map 213 | 214 | ``` 215 | :Neogit kind= " override kind 216 | :Neogit cwd= " override cwd 217 | :Neogit commit" open commit popup 218 | ``` 219 | 220 | ## GitHub interaction 221 | 222 | Work with GitHub issues and Pull Requests from the comfort of Neovim. 223 | 224 | Requires the [GitHub CLI](https://cli.github.com/) for authentication to GitHub, using a developer personal access token that should be added to your GitHub account 225 | 226 | TODO: Review [Octo.nvim configuration settings](https://github.com/pwntester/octo.nvim#%EF%B8%8F-configuration) 227 | 228 | Command line form: `Octo [arguments]` - [Object, Action and Arguments commands](https://github.com/pwntester/octo.nvim#-commands) 229 | 230 | List issues from current project (optionally add a specific repository) 231 | 232 | ```sh 233 | :Octo issue list 234 | ``` 235 | 236 | Create a pull requests from current project 237 | 238 | ```sh 239 | :Octo pr create 240 | ``` 241 | 242 | Add a comment to the current topic (issue/pr) 243 | 244 | ```sh 245 | :Octo comment add 246 | 247 | ``` 248 | 249 | ```sh 250 | :Octo gist list 251 | ``` 252 | 253 | ## Files 254 | 255 | ## [init.lua](init.lua) 256 | 257 | Wrapper responsible for two things: 258 | 259 | * Download and setup our package manager ([packer.nvim](https://github.com/wbthomason/packer.nvim)) and our fennel helper/interface ([aniseed](https://github.com/Olical/aniseed)) 260 | * Set the entrypoint for NVIM read our config files, in our case `fnl/config/init.fnl`. 261 | 262 | ## [fnl/config/init.fnl](fnl/config/init.fnl) 263 | 264 | * Set basic global vim configurations and general keymaps. 265 | * Load plugin configuration namespace. 266 | 267 | > In this file among other settings I do set the leader key as `space` and local-leader as `,` for the sake of the examples of how use this configuration I will use this as basis for the commands. 268 | 269 | 270 | ## [fnl/config/plugin.fnl](fnl/config/plugin.fnl) 271 | 272 | Here we define the plugins we want packer to download and load for us, we define here a private function called `use` 273 | which will search in the plugin map for the keyword `:mod` and load the namespace defined in its value. 274 | 275 | For example in the line we define that we need telescope we have this map: 276 | 277 | ```clojure 278 | :nvim-telescope/telescope.nvim 279 | {:requires [:nvim-lua/popup.nvim 280 | :nvim-lua/plenary.nvim] 281 | :mod :telescope} 282 | ``` 283 | 284 | This will state to packer download `nvim-telescope/telescope.nvim` and all the required plugins in `:requires` and search for the namespace `telescope` 285 | in file located in the following path `fnl/config/plugin/telescope`, where I usually add plugin specific configuration like keymaps and settings. 286 | 287 | ## [fnl/config/plugin/conjure.fnl](fnl/config/plugin/conjure.fnl) 288 | 289 | Conjure specifics settings, I like to remap the doc work keymap to be `K` instead the only `K`, to not conflict with the LSP docs `K`. 290 | 291 | ## [fnl/config/plugin/telescope.fnl](fnl/config/plugin/telescope.fnl) 292 | 293 | Settings like ignore `node_modules` and everything in `.gitignore` to be listed in the file finder. 294 | Keymaps: 295 | 296 | * `pf` open the find files 297 | * `p/` open the fuzzy finder 298 | * `bb` open the find open buffer 299 | * `h/` open the nvim help fuzzy finder 300 | 301 | ## [fnl/config/plugin/treesitter.fnl](fnl/config/plugin/treesitter.fnl) 302 | 303 | Settings to select which treesitter's features we want enabled and which language extension we want to ensure they will be always installed. 304 | 305 | ## [fnl/config/plugin/lspconfig.fnl](fnl/config/plugin/lspconfig.fnl) 306 | 307 | All about nvim's lsp settings and keymaps. 308 | 309 | ### LSP Configuration 310 | 311 | * In the first session, we define which symbols to show for lsp diagnostics. 312 | * Later we describe which features and server settings we want to enable/customize. 313 | * Handler defines features and how we want to render the server outputs. 314 | * Capabilities we link with our autocompletion plugin (nvim-cmp), to say to the lsp servers that we have this feature enabled. 315 | * On_Attach we customize our interaction with the LSP server, here we define the following keymaps: 316 | * `gd` Go to definition 317 | * `K` Show documentations 318 | * `ld` Function declarations 319 | * `lt` Type Definitions 320 | * `lh` Signature Help 321 | * `ln` Rename 322 | * `le` Show line diagnostics 323 | * `lq` Show all diagnostics information 324 | * `lf` Auto format 325 | * `lj` Go to next diagnostic 326 | * `lk` Go to previous diagnostic 327 | * `la` Open code actions menu (Using telescope plugin interface) 328 | * `la` Open code actions menu for the selected text in **VISUAL mode** (Using telescope plugin interface) 329 | * `lw` Open workspace diagnostics list (Using telescope plugin interface) 330 | * `lr` Show all references list for item under the cursor (Using telescope plugin interface) 331 | * `lr` Show all implementations list for item under the cursor (Using telescope plugin interface) 332 | * Lastly we configure to use all settings above in clojure-lsp server instance. 333 | 334 | ### [fnl/config/plugin/cmp.fnl](fnl/config/plugin/cmp.fnl) 335 | 336 | Here settings of which sources we want to show up in the autocomple menu like (conjure, lsp, buffer) and some mapping to navigate in the menu. 337 | 338 | ## [fnl/config/plugin/theme.fnl](fnl/config/plugin/theme.fnl) 339 | 340 | This configuration uses the [Neovim GitHub theme](https://github.com/projekt0n/github-nvim-theme) which gives 3 dark and 3 light themes to choose from. Individual colors and styles can be configured to change specific parts of the theme. 341 | 342 | The light theme is used by default, with a softer background colour that is slightly red-shifted. 343 | 344 | Options are specified in the `theme.setup` function, where the option names are keywords and the values are strings, boolean or hash-map of more option keywords and values. 345 | 346 | ``` 347 | (theme.setup {:theme_style "light" 348 | :colors {:bg "#f8f2e6"} 349 | :comment_style "italic"}) 350 | ``` 351 | 352 | The colors (Hex values) for each theme are in the [github-nvim-theme/lua/github-theme/palette](https://github.com/projekt0n/github-nvim-theme/tree/main/lua/github-theme/palette) with the overal theme definition in [github-nvim-theme/lua/github-theme/theme.lua](https://github.com/projekt0n/github-nvim-theme/blob/main/lua/github-theme/theme.lua) 353 | 354 | 355 | ## [fnl/config/plugin/sexp.fnl](fnl/config/plugin/sexp.fnl) 356 | 357 | Settings for vim-sexp like enabling it for another lisp languages like Fennel and Jannet 358 | 359 | ### [fnl/config/plugin/lualine.fnl](fnl/config/plugin/lualine.fnl) 360 | 361 | Configure the status line (lualine) that shows at the bottom of Neovim, defining colors and elements that appear on that line. 362 | 363 | The Neovim GitHub theme includes definitions to set the look of the status line. 364 | 365 | ## Neovim in action 366 | 367 | ### Telescope - Find Files 368 | 369 | ![telescope-find-files](docs/telescope-find-files.gif) 370 | **`ff`** 371 | 372 | ### Lsp - Syntax check 373 | 374 | ![lsp-syntax-check](docs/lsp-syntax-check.gif) 375 | **`le`** 376 | 377 | ### Lsp - Go to definition 378 | 379 | ![lsp-go-to-definition](docs/lsp-go-to-definition.gif) 380 | **`gd`** 381 | 382 | ### Lsp - Document/Signature Help 383 | 384 | ![lsp-document](docs/lsp-document.gif) 385 | **`K`/`lh`** 386 | 387 | ### Lsp - Find definition/references 388 | 389 | ![lsp-find-references](docs/lsp-find-references.gif) 390 | **`lr`** 391 | 392 | ### Lsp - Formatting 393 | 394 | ![lsp-format](docs/lsp-format.gif) 395 | **`lf`** 396 | 397 | ### Lsp - Code actions 398 | 399 | ![lsp-code-actions](docs/lsp-code-actions.gif) 400 | **`la`** 401 | 402 | ### Lsp - Refactorings 403 | 404 | ![lsp-refactorings](docs/lsp-refactorings.gif) 405 | **`la`** 406 | 407 | ### Lsp - Rename 408 | 409 | ![lsp-rename](docs/lsp-rename.gif) 410 | **`ln`** 411 | 412 | ### Conjure - Eval 413 | 414 | ![conjure-eval](docs/conjure-eval.gif) 415 | **`er`** 416 | 417 | ### Conjure - Repl 418 | 419 | ![conjure-repl](docs/conjure-repl.gif) 420 | **`lv`** 421 | 422 | ### Conjure - Document 423 | 424 | ![conjure-document](docs/conjure-document.gif) 425 | **`K`** 426 | 427 | ### Completion 428 | 429 | ![auto-complete](docs/auto-complete.gif) 430 | 431 | ## Contributing 432 | 433 | Please raise an issue for anything other than trivial changes 434 | 435 | 436 | ## License 437 | 438 | Creative Commons Attribution Share-Alike 4.0 International 439 | 440 | 441 | ## Environment variables 442 | 443 | `:Telescope env` list all the environment variables on the operating system, type patters to narrow the list 444 | 445 | 446 | ## Getting help 447 | 448 | `:h` menu followed by feature name that help is needed for, e.g. `:h conjure` 449 | 450 | `h/` list and preview help via telescope 451 | 452 | 453 | ## Visual select tips 454 | 455 | `ve` select to end of word 456 | 457 | 458 | ## Where is 459 | 460 | Where is the neovim configuration? 461 | 462 | ```vim 463 | :echo stdpath('config') 464 | ``` 465 | 466 | 467 | ## Configuration to try 468 | 469 | syntax highlight code block in markdown - built-in neovim 470 | 471 | * does this actually need setting in neovim - some basic highlighting already happens without it. 472 | 473 | ```vim 474 | -- Give me some fenced codeblock goodness 475 | g.markdown_fenced_languages = { "html", "javascript", "typescript", "css", "scss", "lua", "vim" } 476 | ``` 477 | 478 | Lets try this with some Clojure code 479 | 480 | ```clojure 481 | (def fish "I am a string") 482 | 483 | (defn blah 484 | "doc string" 485 | [args] 486 | (map inc args) 487 | ``` 488 | 489 | 490 | 😈 `cmd` + `ctrl` + `spc` in Kitty terminal brings up an emoji selector - is this emoji menu MacOS specific ? How to get this on Linux? 491 | -------------------------------------------------------------------------------- /fnl/config/init.fnl: -------------------------------------------------------------------------------- 1 | (module config.init 2 | {autoload {core aniseed.core 3 | nvim aniseed.nvim 4 | util config.util 5 | str aniseed.string}}) 6 | 7 | 8 | ;; -------------------- 9 | ;; Key bindings (mappings) 10 | 11 | ;; generic mapping leaders configuration 12 | (nvim.set_keymap :n : : {:noremap true}) 13 | (set nvim.g.mapleader " ") 14 | (set nvim.g.maplocalleader ",") 15 | 16 | ;; Insert mode: fd as Escape short cut 17 | (nvim.set_keymap :i :fd "" {:noremap true}) 18 | 19 | ;; killring / registers 20 | ;; clipboard history 21 | (util.lnnoremap :ch "Telescope neoclip") 22 | 23 | ;; terminal 24 | (util.lnnoremap :. "ToggleTerm") 25 | 26 | ;; Tabs 27 | (util.lnnoremap :tt "Telescope tele_tabby list") ;; Visual tab switch 28 | (util.lnnoremap :td "tabclose") 29 | (util.lnnoremap :tn "tabnext") 30 | (util.lnnoremap :tp "tabprevious") 31 | (util.lnnoremap :to "tabonly") ;; Only show active tab 32 | (util.lnnoremap :tm "tab sp") ;; Creates a new split as a tab ?? 33 | 34 | ;;;; Windows 35 | ;; Move cursor between windows 36 | (util.lnnoremap :wh "wincmd h") 37 | (util.lnnoremap :wj "wincmd j") 38 | (util.lnnoremap :wk "wincmd k") 39 | (util.lnnoremap :wl "wincmd l") 40 | ;; Maximise window (or is this tab?) 41 | (util.lnnoremap :wm "only") 42 | (util.lnnoremap :ws "split") ;; Horizontal window split 43 | (util.lnnoremap :wv "vsplit") ;; Vertical window split 44 | 45 | ;; Buffers 46 | ;; Toggle between current and last active buffer 47 | (util.lnnoremap : "b#") 48 | (util.lnnoremap :ba "ball") 49 | (util.lnnoremap :bb "Telescope buffers") 50 | (util.lnnoremap :bd "bdelete") 51 | (util.lnnoremap :bn "bnext") 52 | (util.lnnoremap :bp "bprevious") 53 | 54 | ;; Projects and files 55 | ;; - moved to which-key 56 | 57 | ;; Help and documentation 58 | (util.lnnoremap :hh "Telescope help_tags") 59 | (util.lnnoremap :jh "Telescope heading") 60 | 61 | (util.lnnoremap :dtb "Telescope terraform_doc") 62 | 63 | ;; Colors and themes 64 | (util.lnnoremap :cs "Telescope colorscheme") 65 | (util.lnnoremap :cd "NewpaperDark") 66 | (util.lnnoremap :cl "NewpaperLight") 67 | 68 | ;; Package Manager 69 | ;; list packages 70 | (util.lnnoremap :Pl "Telescope packer") 71 | (util.lnnoremap :Pi "PackerInstall") 72 | (util.lnnoremap :Ps "PackerSync") 73 | (util.lnnoremap :Pu "PackerUpdate") 74 | 75 | ;; Treesitter parsers update 76 | (util.lnnoremap :Ptu "TSUpdate") 77 | ;; Treesitter parsers install status 78 | (util.lnnoremap :Pti "TSInstallInfo") 79 | 80 | ;; Quit 81 | (util.lnnoremap :qa "quitall") 82 | (util.lnnoremap :qq "quit") 83 | (util.lnnoremap :qQ "quit!") 84 | 85 | ;; Git Version control 86 | (util.lnnoremap :gd "DiffviewOpen") 87 | (util.lnnoremap :gs "Neogit") 88 | 89 | ;; GitHub - requires `gh auth login` 90 | 91 | (util.lnnoremap :gga "Octo actions") 92 | (util.lnnoremap :gggl "Octo gist list") 93 | 94 | (util.lnnoremap :ggib "Octo issue browser") 95 | (util.lnnoremap :ggic "Octo issue create") 96 | (util.lnnoremap :ggil "Octo issue list") 97 | (util.lnnoremap :ggis "Octo issue search") 98 | (util.lnnoremap :ggiu "Octo issue url") 99 | 100 | (util.lnnoremap :ggpb "Octo pr browser") 101 | (util.lnnoremap :ggpc "Octo pr create") 102 | (util.lnnoremap :ggpl "Octo pr list") 103 | (util.lnnoremap :ggps "Octo pr search") 104 | (util.lnnoremap :ggpu "Octo pr url") 105 | 106 | (util.lnnoremap :ggrb "Octo repo browse") 107 | (util.lnnoremap :ggrf "Octo repo fork") 108 | (util.lnnoremap :ggrl "Octo repo list") 109 | (util.lnnoremap :ggru "Octo repo url") 110 | 111 | 112 | 113 | 114 | ;; Clojure Reader macro 115 | (util.lnnoremap :cc "(i#_") 116 | (util.lnnoremap :cu "let s=@/l?\\v(#_)+dgn:let @/=s") 117 | 118 | ;; escape from terminal normal mode 119 | (nvim.set_keymap :t : "" {:noremap true}) 120 | 121 | 122 | ;; -------------------- 123 | ;; Filetype configuration 124 | 125 | ;; Set Conjure and other filetype line comments to ;; 126 | (vim.api.nvim_create_autocmd 127 | :FileType 128 | {:group (vim.api.nvim_create_augroup :commentary_config {:clear true}) 129 | :pattern [:lisp :clojure :racket :fennel] 130 | :callback (fn [] (set vim.opt_local.commentstring ";; %s") nil)}) 131 | 132 | ;; set filetypes filename extensions for Clojure 133 | ;; autocmd BufNewFile,BufRead .edn,clj,.cljstyle set filetype=clojure 134 | (nvim.ex.autocmd "BufNewFile,BufRead" ".edn,.clj,.cljstyle" "set filetype=clojure") 135 | 136 | ;; clear symbol highlighting on enter in normal mode 137 | (util.nnoremap : "noh") 138 | 139 | 140 | ;; -------------------- 141 | ;; Neovim global variables 142 | 143 | ;; Markdown mode conceal links 144 | ;; DRAGONS: conceal not working by default and this config doesnt work either :sadface 145 | (util.set-global-variable vim_markdown_conceal 2) 146 | 147 | 148 | ;; -------------------- 149 | ;; Neovim - global editor options 150 | 151 | ;; refresh changed content 152 | (nvim.ex.autocmd "FocusGained,BufEnter" "*" ":checktime") 153 | 154 | ;; Line settings - don't wrap lines 155 | (nvim.ex.set :nowrap) 156 | 157 | (let [options 158 | { 159 | :encoding "utf-8" 160 | :spelllang "en_gb" 161 | ;; :backspace "2" 162 | ;; Visual column indicator 163 | ;; :colorcolumn "80" 164 | :errorbells false 165 | ;; :backup false 166 | ;; :swapfile false 167 | ;; :showmode false 168 | ;; show line numbers 169 | ;; :number true 170 | :relativenumber true 171 | ;show line and column number 172 | :ruler true 173 | ;settings needed for compe autocompletion 174 | :completeopt "menuone,noselect" 175 | ;turn on the wild menu, auto complete for commands in command line 176 | :wildmenu true 177 | :wildignore "*/tmp/*,*.so,*.swp,*.zip" 178 | ;case insensitive search 179 | :ignorecase true 180 | ;smart search case 181 | :smartcase true 182 | ;shared clipboard 183 | :clipboard "unnamedplus" 184 | ;show invisible characters 185 | :list false 186 | :listchars (str.join "," ["tab:▶-" "trail:•" "extends:»" "precedes:«" "eol:¬"]) 187 | ;tabs is space 188 | :expandtab true 189 | ;tab/indent size 190 | ;; :tabstop 2 191 | ;; :shiftwidth 2 192 | ;; :softtabstop 2 193 | ;persistent undo 194 | ;; :undofile true 195 | ;open new horizontal panes on down pane 196 | :splitbelow true 197 | ;open new vertical panes on right pane 198 | :splitright true 199 | ;enable highlighting search 200 | :hlsearch true 201 | ;; single column for signs(icons) and line numbers 202 | :signcolumn "number" 203 | ;; Width of gutter (number + sign columns) 204 | ;; :numberwidth 3 ;; relative numbers should only need 2 columns 205 | 206 | ;; syntax highlight code blocks in markdown 207 | ;; :markdown_fenced_languages ["clojure" "html" "json" "css" "scss" "lua" "vim" "yaml"] 208 | 209 | }] 210 | (each [option value (pairs options)] 211 | (util.set-global-option option value))) 212 | 213 | ;; ------------ Global variables 214 | 215 | ;; Disable Language Providers to remove warning in :checkhealth 216 | ;; (util.set-global-variable loaded_perl_provider 0) 217 | 218 | ;import plugin.fnl 219 | (require :config.plugin) 220 | -------------------------------------------------------------------------------- /fnl/config/macro.fnl: -------------------------------------------------------------------------------- 1 | ;; https://github.com/D00mch/dotfiles/blob/master/.config/nvim/fnl/macros.fnl 2 | 3 | {:augroup 4 | (fn [name ...] 5 | `(do 6 | (nvim.ex.augroup ,(tostring name)) 7 | (nvim.ex.autocmd_) 8 | ,(list `do ...) 9 | (nvim.ex.augroup :END))) 10 | 11 | :autocmd 12 | (fn [...] 13 | `(nvim.ex.autocmd ,...))} 14 | -------------------------------------------------------------------------------- /fnl/config/plugin.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin 2 | {autoload {nvim aniseed.nvim 3 | a aniseed.core 4 | util config.util 5 | packer packer}}) 6 | 7 | (defn- safe-require-plugin-config [name] 8 | (let [(ok? val-or-err) (pcall require (.. :config.plugin. name))] 9 | (when (not ok?) 10 | (print (.. "config error: " val-or-err))))) 11 | 12 | (defn- use [...] 13 | "Iterates through the arguments as pairs and calls packer's use function for 14 | each of them. Works around Fennel not liking mixed associative and sequential 15 | tables as well." 16 | (let [pkgs [...]] 17 | (packer.startup 18 | (fn [use] 19 | (for [i 1 (a.count pkgs) 2] 20 | (let [name (. pkgs i) 21 | opts (. pkgs (+ i 1))] 22 | (-?> (. opts :mod) (safe-require-plugin-config)) 23 | (use (a.assoc opts 1 name))))))) 24 | nil) 25 | 26 | ;;;; Neovim Plugins 27 | ;; :mod specifies namespace under plugin directory that contains modification options 28 | 29 | (use 30 | ;;;; System 31 | 32 | ;; plugin Manager 33 | :wbthomason/packer.nvim {} 34 | ;; nvim config and plugins in Fennel 35 | :Olical/aniseed {:branch :develop} 36 | 37 | ;;;; Menu system & Neovim control 38 | :folke/which-key.nvim {:mod :which-key} 39 | 40 | ;;;; themes and icons 41 | ;; Development related icons 42 | :kyazdani42/nvim-web-devicons {:mod :web-devicons} 43 | 44 | ;; Startup screen 45 | :startup-nvim/startup.nvim 46 | {:requires [:nvim-telescope/telescope.nvim 47 | :nvim-lua/plenary.nvim] 48 | :mod :startup} 49 | 50 | 51 | ;; Pretty list for all your troubles 52 | :folke/trouble.nvim {:mod :trouble} 53 | ;; Add missing colours for themes 54 | :folke/lsp-colors.nvim {:mod :lspcolors} 55 | 56 | ;; Hightlight TODOs - :TodoQuickFix 57 | :folke/todo-comments.nvim 58 | {:requires [:nvim-lua/plenary.nvim] 59 | :mod :todocomments} 60 | 61 | 62 | ;; Newspaper - subtle light and dark themes 63 | :yorik1984/newpaper.nvim {:mod :theme-newpaper} 64 | 65 | ;; Gruvbox theme with treesitter support 66 | ;; :luisiacc/gruvbox-baby {} 67 | 68 | ;; :sainnhe/gruvbox-material {} 69 | 70 | ;; GitHub themes - dark and light variations configured in plugins/theme.fnl 71 | ;; :projekt0n/github-nvim-theme {:mod :theme} 72 | 73 | ;; Omni dark theme for Neovim - https://github.com/getomni/neovim 74 | ;; :getomni/neovim {} 75 | 76 | ;; Palenightfall dark theme for Neovim - https://github.com/JoosepAlviste/palenightfall.nvim 77 | ;; DRAGONS: causes treesitter bug when markdown parser enabled 78 | ;; :JoosepAlviste/palenightfall.nvim {} 79 | 80 | ;; One dark & light theme for Neovim - https://github.com/disrupted/one.nvim 81 | ;; :disrupted/one.nvim {} 82 | 83 | ;;dark & light theme with wide plugin support 84 | ;; :folke/tokyonight.nvim {} 85 | 86 | ;; gruvbox theme - to set up plugin/theme.fnl before this works 87 | ;; :morhetz/gruvbox {:mod :theme-gruvbox} 88 | ;; Gruvbox contrast options to try: :soft :medium :hard 89 | ;; {:background :light :gruvbox-contrast-light :soft} 90 | ;; :morhetz/gruvbox {:mod :theme} 91 | 92 | ;; Light theme - may require plugin/theme.fnl or smilar to work 93 | ;; :ingram1107/vim-zhi {} 94 | 95 | ;; :overcache/NeoSolarized {} 96 | 97 | ;;;; status line 98 | :nvim-lualine/lualine.nvim 99 | {:requires [:kyazdani42/nvim-web-devicons] 100 | :mod :theme-lualine} 101 | 102 | ;;;; Navigation 103 | 104 | ;; project management (lua plugin) 105 | ;; projects cant be created on the fly or renamed it seems 106 | ;; use project telescope extention, 107 | ;; rather than the projects telexcope extention project.nvim provides 108 | ;; :ahmedkhalf/project.nvim {:mod :project} 109 | 110 | ;; peek at a line number 111 | :nacro90/numb.nvim {:mod :numb} 112 | 113 | ;; Projects and file navigation 114 | :kyazdani42/nvim-tree.lua 115 | {:requires [:kyazdani42/nvim-web-devicons] 116 | :tag :nightly 117 | :mod :nvim-tree} 118 | 119 | :nvim-telescope/telescope.nvim 120 | {:requires [:nvim-lua/popup.nvim 121 | :nvim-lua/plenary.nvim 122 | :rcarriga/nvim-notify ;; ports extension 123 | 124 | ;; Extensions 125 | :nvim-telescope/telescope-file-browser.nvim 126 | :LinArcX/telescope-env.nvim 127 | :crispgm/telescope-heading.nvim 128 | :LinArcX/telescope-ports.nvim 129 | :nvim-telescope/telescope-packer.nvim 130 | :nvim-telescope/telescope-project.nvim 131 | :TC72/telescope-tele-tabby.nvim 132 | :ANGkeith/telescope-terraform-doc.nvim 133 | :nvim-telescope/telescope-ui-select.nvim] 134 | :mod :telescope} 135 | 136 | ;; Documentation 137 | :nvim-orgmode/orgmode {:mod :orgmode} 138 | 139 | ;;;; Version control 140 | ;; diff view 141 | :sindrets/diffview.nvim 142 | {:requires [:nvim-lua/plenary.nvim] 143 | :mod :diffview} 144 | 145 | :lewis6991/gitsigns.nvim 146 | { 147 | ;; :tag :release 148 | :mod :gitsigns} 149 | 150 | ;; GitHub Issues and Pull Requests 151 | :pwntester/octo.nvim 152 | {:requires [:nvim-lua/plenary.nvim 153 | :nvim-telescope/telescope.nvim 154 | :kyazdani42/nvim-web-devicons] 155 | :mod :octo} 156 | 157 | ;; magit style 158 | :TimUntersberger/neogit 159 | {:requires [:nvim-lua/plenary.nvim 160 | :sindrets/diffview.nvim] 161 | :mod :neogit} 162 | 163 | :tpope/vim-fugitive {:mod :fugitive} 164 | 165 | ;; ---------------------- 166 | ;; Markdown 167 | :ixru/nvim-markdown {} 168 | 169 | :simrat39/symbols-outline.nvim {:mod :symbols-outline} 170 | 171 | ;; --------------------- 172 | ;; LISP related features 173 | 174 | ;; repl tools 175 | :clojure-vim/clojure.vim {} 176 | :clojure-vim/vim-jack-in {} 177 | :Olical/conjure {:mod :conjure} 178 | 179 | ;; sexp and vim-style editing 180 | ;; :guns/vim-sexp {:mod :sexp} 181 | :windwp/nvim-autopairs {:mod :autopairs} 182 | 183 | :tpope/vim-abolish {} 184 | ;; :tpope/vim-commentary {} 185 | :terrortylor/nvim-comment {:mod :nvim-comment} 186 | 187 | 188 | ;; ---------------------- 189 | ;; Database Client :DB 190 | :tpope/vim-dadbod {} 191 | :tpope/vim-dispatch {} 192 | 193 | 194 | ;; ---------------------- 195 | ;; Text manipulation 196 | 197 | ;; Selectable Clipboard history (telescope) 198 | :AckslD/nvim-neoclip.lua 199 | {:requires [:nvim-telescope/telescope.nvim] 200 | :mod :neoclip} 201 | 202 | :tpope/vim-repeat {} 203 | :tpope/vim-sexp-mappings-for-regular-people {} 204 | :tpope/vim-sleuth {} 205 | ;; :tpope/vim-surround {} 206 | :kylechui/nvim-surround {:mod :nvim-surround} 207 | 208 | :tpope/vim-unimpaired {} 209 | 210 | ;; semantic visual selection 211 | :terryma/vim-expand-region {} 212 | 213 | ;; text alignment 214 | :junegunn/vim-easy-align {:mod :easy-align} 215 | 216 | ;; multicursor selector 217 | :mg979/vim-visual-multi {} 218 | 219 | 220 | ;; ---------------------- 221 | ;; Dockerfile 222 | :ekalinin/Dockerfile.vim {} 223 | 224 | 225 | ;; ---------------------- 226 | ;; parsing system 227 | :nvim-treesitter/nvim-treesitter 228 | {:run ":TSUpdate" 229 | :mod :treesitter} 230 | 231 | ;; lsp 232 | :neovim/nvim-lspconfig {:mod :lspconfig} 233 | 234 | ;; DAP 235 | :mfussenegger/nvim-dap {} 236 | 237 | ; snippets 238 | :L3MON4D3/LuaSnip 239 | {:requires [:rafamadriz/friendly-snippets 240 | :saadparwaiz1/cmp_luasnip] 241 | :mod :lua-snip} 242 | 243 | ;; autocomplete 244 | :hrsh7th/nvim-cmp {:requires [:hrsh7th/cmp-buffer 245 | :hrsh7th/cmp-nvim-lsp 246 | :PaterJason/cmp-conjure] 247 | :mod :cmp} 248 | 249 | :jamessan/vim-gnupg {} 250 | 251 | :akinsho/toggleterm.nvim {:tag "*" 252 | :mod :toggleterm}) 253 | 254 | 255 | -------------------------------------------------------------------------------- /fnl/config/plugin/autopairs.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.autopairs 2 | {autoload {autopairs nvim-autopairs}}) 3 | 4 | ;; https://github.com/windwp/nvim-autopairs 5 | 6 | (autopairs.setup 7 | {}) 8 | 9 | -------------------------------------------------------------------------------- /fnl/config/plugin/cmp.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.cmp 2 | {autoload {nvim aniseed.nvim 3 | cmp cmp 4 | luasnip luasnip}}) 5 | 6 | ;; Sources for autocompletion 7 | 8 | (def- cmp-src-menu-items 9 | {:buffer "buff" 10 | :conjure "conj" 11 | :nvim_lsp "lsp" 12 | :vsnip "vsnp" 13 | :luasnip "lsnp"}) 14 | 15 | (def- cmp-srcs 16 | [{:name :nvim_lsp} 17 | {:name :conjure} 18 | {:name :buffer} 19 | {:name :vsnip} 20 | {:name :luasnip}]) 21 | 22 | 23 | 24 | (fn has-words-before [] 25 | (let [(line col) (unpack (vim.api.nvim_win_get_cursor 0))] 26 | (and (not= col 0) 27 | (= (: (: (. (vim.api.nvim_buf_get_lines 0 (- line 1) line true) 1) :sub col col) :match "%s") nil)))) 28 | 29 | (cmp.setup {:formatting 30 | {:format (fn [entry item] 31 | (set item.menu (or (. cmp-src-menu-items entry.source.name) "")) 32 | item)} 33 | :mapping {: (cmp.mapping.select_prev_item) 34 | : (cmp.mapping.select_next_item) 35 | : (cmp.mapping.scroll_docs (- 4)) 36 | : (cmp.mapping.scroll_docs 4) 37 | : (cmp.mapping.complete) 38 | : (cmp.mapping.close) 39 | : (cmp.mapping.confirm {:behavior cmp.ConfirmBehavior.Insert 40 | :select true}) 41 | : (cmp.mapping (fn [fallback] 42 | (if 43 | (cmp.visible) (cmp.select_next_item) 44 | (luasnip.expand_or_jumpable) (luasnip.expand_or_jump) 45 | (has-words-before) (cmp.complete) 46 | :else (fallback))) 47 | {1 :i 2 :s}) 48 | : (cmp.mapping (fn [fallback] 49 | (if 50 | (cmp.visible) (cmp.select_prev_item) 51 | (luasnip.jumpable -1) (luasnip.jump -1) 52 | :else (fallback))) 53 | {1 :i 2 :s})} 54 | :snippet {:expand (fn [args] 55 | (luasnip.lsp_expand args.body))} 56 | :sources cmp-srcs}) 57 | -------------------------------------------------------------------------------- /fnl/config/plugin/conjure.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.conjure 2 | {autoload {nvim aniseed.nvim}}) 3 | 4 | ;; TODO: review conjure options 5 | 6 | ;; :help conjure - configuration section 7 | 8 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 9 | ;;;; REPL Clients 10 | 11 | ;; Initialise Conjure for specified filetypes 12 | ;; Default: `["clojure", "fennel", "janet", "racket", "scheme"]` 13 | ;; (set nvim.g.conjure#filetypes [:clojure :fennel]) 14 | 15 | ;; Client to use for `clojure` buffers. 16 | ;; Help: |conjure-client-clojure-nrepl| 17 | ;; Default: `"conjure.client.clojure.nrepl"` 18 | ;; (set nvim.g.conjure#filetype#clojure :conjure.client.clojure.nrepl) 19 | 20 | ;; Client to use for `fennel` buffers. 21 | ;; Help: |conjure-client-fennel-aniseed|, |conjure-client-fennel-stdio| 22 | ;; Default: use aniseed from within Neovim 23 | ;; (set nvim.g.conjure#filetype#fennel :conjure.client.fennel.aniseed) 24 | ;; Alterntative: use Fennel outside of Neovim in an external lua process 25 | ;; (set nvim.g.conjure#filetype#fennel :conjure.client.fennel.stdio) 26 | 27 | ;; Client to use for `janet` buffers. 28 | ;; Help: |conjure-client-janet-netrepl| 29 | ;; Default: `"conjure.client.janet.netrepl"` 30 | ;; (set nvim.g.conjure#filetype#janet :conjure.client.janet.netrepl) 31 | 32 | 33 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 34 | ;;;; Evaluation 35 | 36 | ;; Every Conjure evaluation result is placed in a Neovim register 37 | ;; `"cp` to paste the result into a buffer `c` in insert mode. 38 | ;; Alternative register suggestions: 39 | ;; * `"\""` or `"*"` the default register for easy access. 40 | ;; * `"C"` if you want to keep your lower case registers clear. 41 | ;; * `"_"` the black hole when you don't want this at all. 42 | ;; Default: `"c"` 43 | ;; Set to `e` register for evaluation (or could use r for result) 44 | (set nvim.g.conjure#eval#result_register :e) 45 | 46 | ;; Inline evaluation results (display results after expression) 47 | ;; Default: `true` 48 | ;; (set nvim.g.conjure#eval#inline_results true) 49 | 50 | ;; Set highlight group used for the inline results - :help highlight-groups 51 | ;; Default: `"Comment"` 52 | ;; (set nvim.g.conjure#eval#inline#highlight :Comment) 53 | 54 | ;; Set prefix used for inline results 55 | ;; Default: `"=> "` 56 | ;; (set nvim.g.conjure#eval#inline#prefix "=> ") 57 | 58 | ;; Comment prefix used for "eval and insert result as comment" 59 | ;; Default: `nil` (use language filetype comment character) 60 | ;; (set nvim.g.conjure#eval#comment_prefix nil) 61 | 62 | ;; Lua `string.gsub` modifications made before is evaluated 63 | ;; Define a key to name the substitution (shown if there is an error) 64 | ;; Define a Lua pattern to match against, followed by its replacement value 65 | ;; Reference: Lua patterns: https://www.lua.org/pil/20.2.html 66 | ;; NOTE: substitution not required on :develop branch from 2022-07-02 67 | ;; Evaluation forms commented with Reader Macro comment #_ 68 | ;; (set nvim.g.conjure#eval#gsubs {:eval-reader-comment ["#_" ""]}) 69 | ;; Treat comment as do expression - No longer required 70 | ;; (set nvim.g.conjure#eval#gsubs {:do-comment ["^%(comment[%s%c]" "(do "]}) ; eval comment as do 71 | ;; (set nvim.g.conjure#eval#gsubs {:do-comment ["^%(comment[%s%c]" "(do "]}) ; eval comment as do 72 | 73 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 74 | ;;;; Key bindings / mappings 75 | 76 | ;; Set Cojure specific local leader 77 | ;; Default: `""` 78 | ;; (set nvim.g.conjure#mapping#prefix "") 79 | 80 | ;; Open log in horizontal split 81 | ;; Default: `"ls"` 82 | ;; (set nvim.g.conjure#mapping#log_split "ls") 83 | 84 | ;; Opens the log in a vertical split. 85 | ;; Default: `"lv"` 86 | ;; (set nvim.g.conjure#mapping#log_vsplit "lv") 87 | 88 | ;; Open log in a new tab 89 | ;; Default: `"lt"` 90 | ;; (set nvim.g.conjure#mapping#log_tab "lt") 91 | 92 | ;; Opens the log in the current window. 93 | ;; Default: `"le"` 94 | ;; (set nvim.g.conjure#mapping#log_buf "le") 95 | 96 | ;; Toggle log using the last used vertical or horizontal split command 97 | ;; Default: `"lg"` 98 | ;; (set nvim.g.conjure#mapping#log_toggle "lg") 99 | 100 | ;; Soft reset the log buffer by wiping the contents. 101 | ;; Default: `"lr"` 102 | ;; (set nvim.g.conjure#mapping#log_reset_soft "lr") 103 | 104 | ;; Hard reset the log buffer by deleting the entire buffer. 105 | ;; Default: `"lR"` 106 | ;; (set nvim.g.conjure#mapping#log_reset_hard "lR") 107 | 108 | ;; Jump to top of latest evaluation result in log 109 | ;; Default: `"ll"` 110 | ;; (set nvim.g.conjure#mapping#log_jump_to_latest "ll") 111 | 112 | ;; Close all visible log windows 113 | ;; Default: `"lq"` 114 | ;; (set nvim.g.conjure#mapping#log_close_visible "lq") 115 | 116 | ;; Evaluates the form under the cursor 117 | ;; Default: `"ee"` 118 | ;; (set nvim.g.conjure#mapping#eval_current_form "ee") 119 | 120 | ;; Evaluate form under the cursor & inserts result as comment. 121 | ;; Default: `"ece"` 122 | ;; (set nvim.g.conjure#mapping#eval_comment_current_form "ece") 123 | 124 | ;; Evaluate root form under the cursor 125 | ;; Default: `"er"` 126 | (set nvim.g.conjure#mapping#eval_root_form "ef") 127 | 128 | ;; Evaluate root form under the cursor & insert result as comment 129 | ;; Default: `"ecr"` 130 | (set nvim.g.conjure#mapping#eval_comment_root_form "e;") 131 | 132 | ;; Evaluate word under cursor 133 | ;; Default: `"ew"` 134 | ;; (set nvim.g.conjure#mapping#eval_word "ew") 135 | 136 | ;; Evaluate word under the cursor and insert result as comment 137 | ;; Default: `"ecw"` 138 | ;; (set nvim.g.conjure#mapping#eval_comment_word "ecw") 139 | 140 | ;; Evaluates the form under the cursor and replace with the result. 141 | ;; Default: `"e!"` 142 | ;; (set nvim.g.conjure#mapping#eval_replace_form "e!") 143 | 144 | ;; Evaluates the form at the marks location. 145 | ;; Default: `"em"` 146 | ;; (set nvim.g.conjure#mapping#eval_marked_form "em") 147 | 148 | ;; Evaluate form under the cursor & display result as a comment 149 | ;; Default: `"ec"` 150 | ;; (set nvim.g.conjure#mapping#eval_comment_form "ec") 151 | 152 | ;; Evaluate file loaded from disk 153 | ;; Default: `"ef"` 154 | (set nvim.g.conjure#mapping#eval_file "el") 155 | 156 | ;; Evaluates the buffer from memory. 157 | ;; Default: `"eb"` 158 | ;; (set nvim.g.conjure#mapping#eval_buf "eb") 159 | 160 | ;; Evaluates the visual selection. 161 | ;; Default: `"E"` 162 | ;; (set nvim.g.conjure#mapping#eval_visual "eE") 163 | 164 | ;; Evaluates the following motion. 165 | ;; Default: `"E"` 166 | ;; (set nvim.g.conjure#mapping#eval_motion "eE") 167 | 168 | 169 | ;; TODO: review conjure bindings with respect to LSP 170 | 171 | ;; Jump to definition of the word under the cursor. 172 | ;; Default: `"gd"` 173 | ;; (set nvim.g.conjure#mapping#def_word "ed") 174 | 175 | ;; Documentation for word under cursor 176 | ;; Default: `["K"]` 177 | ;; (set nvim.g.conjure#mapping#doc_word "K") 178 | 179 | 180 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 181 | ;;;; Visual aspects 182 | 183 | ;; Enable highlighting of evaluated forms, requires highlight API in Neovim 0.5+. 184 | ;; Default: `false` 185 | ;; (set nvim.g.conjure#highlight#enabled true) 186 | 187 | ;; Syntax group to highlight forms 188 | ;; Default: `"IncSearch"` 189 | ;; (set nvim.g.conjure#highlight#group "IncSearch") 190 | 191 | ;; Highlight duration in milliseconds 192 | ;; Default: `500` 193 | ;; (set nvim.g.conjure#highlight#timeout 500) 194 | 195 | ;; Width of HUD as percentage of the editor width 196 | ;; A float between 0.0 and 1.0. 197 | ;; Default: `0.42` 198 | (set nvim.g.conjure#log#hud#width 1) 199 | 200 | ;; Height of HUD as a percentage of editor height 201 | ;; A float between 0.0 and 1.0. 202 | ;; Default: `0.3` 203 | ;; (set nvim.g.conjure#log#hud#height 0.3) 204 | 205 | ;; Display HUD 206 | ;; Default: `true` 207 | (set nvim.g.conjure#log#hud#enabled false) 208 | 209 | ;; Delay closing HUD passively (milliseconds) e.g. after cursor move 210 | ;; Default: `0` - closes HUD instantly 211 | ;; (set nvim.g.conjure#log#hud#passive_close_delay 0) 212 | 213 | ;; Duration HUD must be open before passively closed from cursor movement 214 | ;; Evaluations involving cursor movement do not close HUD the moment it displays 215 | ;; Default: `20` (milliseconds) 216 | ;; (set nvim.g.conjure#log#hud#minimum_lifetime_ms 20) 217 | 218 | ;; HUD window padding for cursor detection, moving HUD to opposite side of screen 219 | ;; Default: `0.1` (float between 0.0 and 1.0.) 220 | ;; (set nvim.g.conjure#log#hud#overlap_padding 0.1) 221 | 222 | ;; Preferred corner position for the HUD, over-ridden by HUD cursor detection 223 | ;; Example: Set to `"SE"` and HUD width to `1.0` for full width HUD at bottom of screen 224 | ;; Default: `"NE"` 225 | (set nvim.g.conjure#log#hud#anchor "SE") 226 | 227 | ;; HUD border style - see `border` parameter in `:h nvim_open_win()` 228 | ;; `"none"` for no border 229 | ;; Default: `"single"` 230 | ;; (set nvim.g.conjure#log#hud#border "single") 231 | 232 | ;; Show HUD for "low priority" messages, e.g. `stdout` & `stderr` for Clojure 233 | ;; Default: `false` 234 | ;; (set nvim.g.conjure#log#hud#ignore_low_priority false) 235 | 236 | ;; Open log at bottom or far right of editor, using full width or height 237 | ;; Default: `false` 238 | (set nvim.g.conjure#log#botright true) 239 | 240 | ;; Character length of comment between log results 241 | ;; Default: `80` 242 | ;; (set nvim.g.conjure#log#break_length 80) 243 | 244 | ;; Log line count before results trimmed 245 | ;; Default: `10000` 246 | ;; (set nvim.g.conjure#log#trim#at 10000) 247 | 248 | ;; Number of lines to trim the log down to 249 | ;; Default: `7000` 250 | ;; (set nvim.g.conjure#log#trim#to 7000) 251 | 252 | ;; Line limit for stripping ANSI escape sequences from text appended to the log 253 | ;; `0` to use ANSI escape sequence highlight plugin to display colours in the log 254 | ;; Default: `100` 255 | ;; (set nvim.g.conjure#log#strip_ansi_escape_sequences_line_limit 100) 256 | 257 | ;; Enable line wrapping in the HUD and log. 258 | ;; Default: `false` 259 | ;; (set nvim.g.conjure#log#wrap false) 260 | 261 | ;; Enable or disable folding of results. 262 | ;; Default: `false` 263 | ;; (set nvim.g.conjure#log#fold#enabled false) 264 | 265 | ;; Fold results greater than fold line number 266 | ;; Default: `10` 267 | ;; (set nvim.g.conjure#log#fold#lines 10) 268 | 269 | ;; Marker representing start of a log fold 270 | ;; Default: `"~~~%{"` 271 | ;; (set nvim.g.conjure#log#fold#marker#start "~~~%{") 272 | 273 | ;; Marker to use to represent the end of a log fold. 274 | ;; Default: `"}%~~~"` 275 | ;; (set nvim.g.conjure#log#fold#marker#end "}%~~~") 276 | 277 | ;; Log buffer - set cursor to the top of the latest evaluation output 278 | ;; Default: `false` 279 | ;; (set nvim.g.conjure#log#jump_to_latest#enabled false) 280 | 281 | ;; Scroll log window to set cursor location after jumping to latest entry 282 | ;; `top`, `center`, `bottom` and `none` (no scroll) 283 | ;; Default: `"top"` 284 | ;; (set nvim.g.conjure#log#jump_to_latest#cursor_scroll_position "top") 285 | 286 | ;; Number of lines to check for `ns` form, used for setting evaluation context 287 | ;; `b:conjure#context` to override a specific buffer that isn't finding the context 288 | ;; Default: `24` 289 | (set nvim.g.conjure#extract#context_header_lines 100) 290 | 291 | ;; Character pairs to search for when evaluating forms. 292 | ;; Closest matching pair when evaluating current form, furthest matching pair for root forms 293 | ;; Structure of each item is `[start end escape?]` where the first two are characters 294 | ;; and the third is an optional boolean to enable escaping for use in |searchpairpos()|. 295 | ;; Default: `[["(" ")"] ["{" "}"] ["[" "]" true]]` 296 | ;; (set nvim.g.conjure#extract#form_pairs [["(" ")"] ["{" "}"] ["[" "]" true]]) 297 | 298 | ;; Tree-sitter support for extracting code from the buffer by non-Lisp clients, 299 | ;; to find appropriate chunk of code under the cursor to evaluate. 300 | ;; Experimental. More information: https://github.com/Olical/conjure/issues/246 301 | ;; Default: `true` 302 | ;; (set nvim.g.conjure#extract#tree_sitter#enabled true) 303 | 304 | ;; Size of code preview for evaluated form, as percentage width of editor 305 | ;; Also affects the preview in folded results. 306 | ;; A float between 0.0 and 1.0. 307 | ;; Default: `0.3` 308 | ;; (set nvim.g.conjure#preview#sample_limit 0.3) 309 | 310 | ;; Resolve absolute file paths to a relative, for docker containers or remote file systems 311 | ;; e.g resolve file paths relative to a sub-directory under Neovim current working directory. 312 | ;; (set nvim.g.conjure#relative_file_root "/sub-project") 313 | ;; `/foo/bar/sub-project/baz.clj` would be `baz.clj` if Neovim CWD was `/foo/bar`. 314 | ;; See also `g:conjure#path_subs`. 315 | ;; Default: `undefined` 316 | ;; (set nvim.g.conjure#relative_file_root :undefined) 317 | 318 | ;; Modify paths for "go to definition" and "eval file", using Lua `string.gsub` 319 | ;; Keys of the `path_subs` table are patterns, values are the replacements. 320 | ;; Lua pattern documentation: https://www.lua.org/pil/20.2.html 321 | ;; {"/root/.m2" "/home/ollie/.m2" 322 | ;; "/src/app" "." 323 | ;; "^(/home)/foo" "%1/bar"} 324 | ;; Used when connecting to REPLs outside of local machine or within Docker containers 325 | ;; where the filesystems don't quite match up. 326 | ;; Default: `undefined` 327 | ;; (set nvim.g.conjure#path_subs :undefined) 328 | 329 | ;; Display debug information in any client 330 | ;; Default: `false` 331 | ;; (set nvim.g.conjure#debug false) 332 | 333 | 334 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 335 | ;;;; Conjure Client Clojure nrepl configuration 336 | 337 | ;; CONFIGURATION *conjure-client-clojure-nrepl-configuration* 338 | 339 | ;; All configuration can be set as described in |conjure-configuration|. 340 | 341 | ;; Would this be useful to set if always using a remote host? 342 | ;; Or if a specific IP address is required? 343 | ;; When connecting to port files or via `:ConjureConnect` this is the default host to use. 344 | ;; Default: `"localhost"` 345 | ;; (set nvim.g.conjure#client#clojure#nrepl#connection#default_host "localhost") 346 | 347 | ;; List of file paths to check when starting up or hitting `cf` (by default). 348 | ;; They're checked in order, the first file to exist has it's contents parsed as a number. 349 | ;; Conjure will then connect to that port at the host specified by `connection.default-host`. 350 | ;; Conjure checks every directory above your current one as well as `~/.config/conjure`, so you can place a default `.nrepl-port`file in there to always have a default port to attempt. 351 | ;; Default: `[".nrepl-port" ".shadow-cljs/nrepl.port"]` 352 | ;; (set nvim.g.conjure#client#clojure#nrepl#connection#port_files [".nrepl-port" ".shadow-cljs/nrepl.port"]) 353 | 354 | 355 | ;; Start "auto-repl" process, eg. babashka 356 | ;; when Conjure unable to find candidate REPL process via to an existing nREPL connection 357 | ;; Default: `true` 358 | (set nvim.g.conjure#client#clojure#nrepl#connection#auto_repl#enabled false) 359 | 360 | ;; Hide auto-repl buffer when triggered, to avoid the need to interact with that buffer 361 | ;; Default: `false` 362 | (set nvim.g.conjure#client#clojure#nrepl#connection#auto_repl#hidden true) 363 | 364 | ;; Command to start the auto-repl 365 | ;; Default: `"bb nrepl-server localhost:8794"` 366 | (set nvim.g.conjure#client#clojure#nrepl#connection#auto_repl#cmd nil) 367 | 368 | ;; REPL port and file name to write port number for the auto-repl 369 | ;; File deleted on auto-repl exit if port in file is same as auto-repl port 370 | ;; Default: `".nrepl-port"`, `"8794"` 371 | ;; (set nvim.g.conjure#client#clojure#nrepl#connection#auto_repl#port "8794") 372 | ;; (set nvim.g.conjure#client#clojure#nrepl#connection#auto_repl#port_file ".nrepl-port") 373 | 374 | ;; Pretty printed results by the nREPL server, using `clojure.pprint/write` 375 | ;; Default: `true` 376 | ;; (set nvim.g.conjure#client#clojure#nrepl#eval#pretty_print true) 377 | 378 | ;; Print raw evaluation result, suppressing prefix for stdout lines `; (out)` 379 | ;; Default: `false` 380 | (set nvim.g.conjure#client#clojure#nrepl#eval#raw_out true) 381 | 382 | ;; A hard limit on the number of bytes printed for each value. 383 | ;; Default: `nil` 384 | ;; (set nvim.g.conjure#client#clojure#nrepl#eval#print_quota nil) 385 | 386 | ;; Size of buffer when streaming results. Defaults to 1024 within nREPL itself. 387 | ;; Increase value to reduce the amount message splitting by nREPL for large results. 388 | ;; Default: `nil` 389 | ;; (set nvim.g.conjure#client#clojure#nrepl#eval#print_buffer_size nil) 390 | 391 | ;; A fully-qualified symbol naming a var whose function to use for printing. 392 | ;; Must point to a function with signature [value writer options]. 393 | ;; Default: `"conjure.internal/pprint"` 394 | ;; (set nvim.g.conjure#client#clojure#nrepl#eval#print_function "conjure.internal/pprint") 395 | 396 | ;; Automatically require namespace of new buffer or current buffer after connection 397 | ;; Ensures buffers are loaded, required code to compile and (re)loadable. 398 | ;; Default: `true` 399 | (set nvim.g.conjure#client#clojure#nrepl#eval#auto_require false) 400 | 401 | ;; Maximum depth of evaluation result with pretty printer. Elide output after number of lines. 402 | ;; Set it to `false` to disable this limit. 403 | ;; Default: `50` 404 | ;; (set nvim.g.conjure#client#clojure#nrepl#eval#print_options#level 50) 405 | 406 | ;; Limit evaluation output, Elide output surpasses the number of items 407 | ;; i.e for preventing infinite lazy sequences from melting the CPU 408 | ;; Set to `false` to disable limit. 409 | ;; Default: `500` 410 | 411 | ;; How many characters to show of the code you just interrupted as a preview in the log. The value is based on a percentage of the width of the full editor. 412 | ;; Default: `0.3` 413 | ;; (set nvim.g.conjure#client#clojure#nrepl#interrupt#sample_limit 0.3) 414 | 415 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 416 | ;;;; Reloading code 417 | 418 | ;; Function to call on refresh (reloading) the log, namespace-qualified name of a zero-arity 419 | ;; e.g. lifecycle management: Integrant, mount, etc. 420 | ;; Default: `nil` 421 | ;; (set nvim.g.conjure#client#clojure#nrepl#refresh#after nil) 422 | 423 | ;; The namespace-qualified name of a zero-arity function to call before reloading. 424 | ;; Default: `nil` 425 | ;; (set nvim.g.conjure#client#clojure#nrepl#refresh#before nil) 426 | 427 | ;; List of directories to scan. If no directories given, defaults to all directories on the classpath. 428 | ;; Default: `nil` 429 | ;; (set nvim.g.conjure#client#clojure#nrepl#refresh#dirs nil) 430 | 431 | 432 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 433 | ;;;; Unit tests 434 | 435 | ;; List of keywords used to decide if current root form is a test to run 436 | ;; Default: `["deftest"]` 437 | ;; (set nvim.g.conjure#client#clojure#nrepl#test#current_form_names ["deftest"]) 438 | 439 | ;; Test runner called from the test key mappings 440 | ;; * `"clojure"` 441 | ;; * `"clojurescript" (cljs.test instead of clojure.test)` 442 | ;; * `"kaocha"` 443 | ;; Default: `"clojure"` 444 | (set nvim.g.conjure#client#clojure#nrepl#test#runner "kaocha") 445 | 446 | ;; Print raw test evaluation result, suppressing prefix for stdout lines `; (out)` 447 | ;; Default: `true` 448 | (set nvim.g.conjure#client#clojure#nrepl#test#raw_out true) 449 | 450 | ;; Override string appended to the end of the test runner calls 451 | ;; Not used by default `clojure` test runner 452 | ;; `koacha` default is `"{:kaocha/color? false}"`, you can replace this to change the configuration file: 453 | ;; "{:kaocha/color? false, :config-file \"tests.local.edn\"}" 454 | ;; This string is inserted into the code as is, so you can insert Clojure code to add conditional logic 455 | ;; Default: `nil` 456 | ;; (set nvim.g.conjure#client#clojure#nrepl#test#call_suffix nil) 457 | 458 | 459 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 460 | ;;;; Key bindings (mappings) 461 | 462 | ;; Key binding to disconnect from the current nREPL server. 463 | ;; Default: `cd` 464 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#disconnect "cd") 465 | 466 | ;; Connect to a local server via a port file. 467 | ;; Default: `cf` 468 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#connect_port_file "cf") 469 | 470 | ;; Interrupt an evaluation. 471 | ;; Default: `ei` 472 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#interrupt "ei") 473 | 474 | ;; View the last exception. 475 | ;; Default: `ve` 476 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#last_exception "ve") 477 | 478 | ;; View the most recent result. 479 | ;; Default: `v1` 480 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#result_1 "vl") 481 | 482 | ;; View the 2nd most recent result. 483 | ;; Default: `v2` 484 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#result_2 "v2") 485 | 486 | ;; View the 3rd most recent result. 487 | ;; Default: `v3` 488 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#result_3 "v3") 489 | 490 | ;; View the source of the symbol under the cursor. 491 | ;; Default: `vs` 492 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#view_source "vs") 493 | 494 | ;; Clone the current session. 495 | ;; Default: `sc` 496 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#session_clone "sc") 497 | 498 | ;; Create a fresh session. 499 | ;; Default: `sf` 500 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#session_fresh "sf") 501 | 502 | ;; Close the current session. 503 | ;; Default: `sq` 504 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#session_close "sq") 505 | 506 | ;; Close all sessions. 507 | ;; Default: `sQ` 508 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#session_close_all "sQ") 509 | 510 | ;; List all current sessions. 511 | ;; Default: `sl` 512 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#session_list "sl") 513 | 514 | ;; Assume the next session in the list. 515 | ;; Default: `sn` 516 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#session_next "sn") 517 | 518 | ;; Assume the previous session in the list. 519 | ;; Default: `sp` 520 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#session_prev "sp") 521 | 522 | ;; Select a session from the list with an interactive prompt. 523 | ;; Default: `ss` 524 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#session_select "ss") 525 | 526 | ;; Run all loaded tests. 527 | ;; Default: `ta` 528 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#run_all_tests "ta") 529 | 530 | ;; Run all tests within the current namespace. 531 | ;; Default: `tn` 532 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#run_current_ns_tests "tn") 533 | 534 | ;; Run all tests within alternate namespace. 535 | ;; Executing in `foo.bar` would test `foo.bar-test` and the other way around. 536 | ;; Default: `tN` 537 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#run_alternate_ns_tests "tN") 538 | 539 | ;; Run the test under the cursor, can be used from anywhere within the form. 540 | ;; Default: `tc` 541 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#run_current_test "tc") 542 | 543 | ;; Refresh changed namespaces. 544 | ;; Default: `rr` 545 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#refresh_changed "rr") 546 | 547 | ;; Refresh all namespaces. 548 | ;; Default: `ra` 549 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#refresh_all "ra") 550 | 551 | ;; Clear the namespace refresh cache. 552 | ;; Default: `rc` 553 | ;; (set nvim.g.conjure#client#clojure#nrepl#mapping#refresh_clear "rc") 554 | 555 | ;; Use `clj-suitable` to improve cljs completion. 556 | ;; Default: `true` 557 | ;; (set nvim.g.conjure#client#clojure#nrepl#completion#cljs#use_suitable true) 558 | 559 | ;; Extract the root form surrounding the cursor as you type, 560 | ;; providingt local context aware completions (such as local let block items). 561 | ;; Potential huge performance hit on slower machines in large buffers with lots of top level forms. 562 | ;; Default: `false` 563 | ;; (set nvim.g.conjure#client#clojure#nrepl#completion#with_context true) 564 | -------------------------------------------------------------------------------- /fnl/config/plugin/diffview.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.diffview 2 | {autoload {diffview diffview}}) 3 | 4 | ;; https://github.com/sindrets/diffview.nvim 5 | 6 | (diffview.setup 7 | {:diff_binaries false 8 | :enhanced_diff_hl true ;; See ':h diffview-config-enhanced_diff_hl' 9 | 10 | ;; :git_cmd = { "git" } ;; The git executable followed by default args. 11 | 12 | :use_icons true ;; Requires nvim-web-devicons 13 | 14 | ;; Only applies when use_icons is true. 15 | :icons 16 | {:folder_closed "" 17 | :folder_open ""}}) 18 | -------------------------------------------------------------------------------- /fnl/config/plugin/easy-align.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.easy-align 2 | {autoload {nvim aniseed.nvim}}) 3 | 4 | ;start interactive EasyAlign in visual mode (e.g. vipga) 5 | (nvim.set_keymap :x :ea "(EasyAlign)" {}) 6 | ;start interactive EasyAlign for a motion/text object (e.g. gaip) 7 | (nvim.set_keymap :n :ea "(EasyAlign)" {}) 8 | -------------------------------------------------------------------------------- /fnl/config/plugin/fugitive.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.fugitive 2 | {autoload {util config.util}}) 3 | 4 | ;; (util.lnnoremap :gs "Git") 5 | ;; (util.lnnoremap :gb "Git blame") 6 | ;; (util.lnnoremap :gd "Gdiff") 7 | ;; (util.lnnoremap :gp "Git push") 8 | ;; (util.lnnoremap :gl "Git pull") 9 | ;; (util.lnnoremap :gf "Git fetch") 10 | ;; (util.lnnoremap :gcc "Git commit --verbose") 11 | ;; (util.lnnoremap :gca "Git commit --all --verbose") 12 | ;; (util.lnnoremap :gdl "diffget LOCAL") 13 | ;; (util.lnnoremap :gdr "diffget REMOTE") 14 | -------------------------------------------------------------------------------- /fnl/config/plugin/gitsigns.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.gitsigns 2 | {autoload {gitsigns gitsigns}}) 3 | 4 | ;; https://github.com/lewis6991/gitsigns.nvim 5 | 6 | (gitsigns.setup 7 | {:signs 8 | {:add {:hl :GitSignsAdd :text "│" :numhl :GitSignsAddNr :linehl :GitSignsAddLn} 9 | :change {:hl :GitSignsChange :ftext "│" :numhl :GitSignsChangeNr :linehl :GitSignsChangeLn} 10 | :delete {:hl :GitSignsDelete :ftext "_" :numhl :GitSignsDeleteNr :linehl :GitSignsDeleteLn} 11 | :topdelete {:hl :GitSignsDelete :ftext "‾" :numhl :GitSignsDeleteNr :linehl :GitSignsDeleteLn} 12 | :changedelete {:hl :GitSignsChange :text "~" :numhl :GitSignsChangeNr :linehl :GitSignsChangeLn}} 13 | 14 | :sign_priority 6 15 | 16 | ;; Highlighting changes 17 | 18 | ;; Add signs in Neovim gutter (over-rides other signs and numbers if signcolumn set to number) 19 | ;; Toggle with `:Gitsigns toggle_signs` (default:true) 20 | :signcolumn false 21 | 22 | ;; Hightlight line number in gutter for lines that contain a change 23 | ;; Toggle with `:Gitsigns toggle_numhl` (default: false) 24 | :numhl true 25 | 26 | ;; Highlight lines in buffer that contain a change 27 | ;; Toggle with `:Gitsigns toggle_linehl` (default: false) 28 | :linehl false 29 | 30 | ;; Highlight words that have changed in a line that have changed 31 | ;; Toggle with `:Gitsigns toggle_word_diff` (default: false) 32 | :word_diff false 33 | 34 | :watch_gitdir {:interval 1000 :follow_files true} 35 | 36 | :attach_to_untracked true 37 | 38 | ;; Toggle with `:Gitsigns toggle_current_line_blame` 39 | :current_line_blame false 40 | 41 | :current_line_blame_opts 42 | {:virt_text true 43 | :virt_text_pos :eol ;; :eol | :overlay | :right_align 44 | :delay 1000 45 | :ignore_whitespace false} 46 | 47 | ;; TODO: blame formatter key expects function 48 | ;; :current_line_blame_formatter ", - " 49 | :sign_priority 6 50 | :update_debounce 100 51 | :status_formatter nil ;; Use default 52 | :max_file_length 40000 ;; Disable if file is longer than this (in lines) 53 | :preview_config 54 | {;; Options passed to nvim_open_win 55 | :border :single 56 | :style :minimal 57 | :relative :cursor 58 | :row 0 59 | :col 1} 60 | 61 | :yadm {:enable false}}) 62 | -------------------------------------------------------------------------------- /fnl/config/plugin/lspcolors.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.lspcolors 2 | {autoload {lspcolors lsp-colors}}) 3 | 4 | ;; https://github.com/folke/lsp-colors.nvim 5 | 6 | (lspcolors.setup 7 | { 8 | ;; :Error "#db4b4b", 9 | ;; :Warning "#e0af68", 10 | ;; :Information "#0db9d7", 11 | ;; :Hint "#10B981" 12 | }) -------------------------------------------------------------------------------- /fnl/config/plugin/lspconfig.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.lspconfig 2 | {autoload {nvim aniseed.nvim 3 | lsp lspconfig 4 | cmplsp cmp_nvim_lsp}}) 5 | 6 | 7 | ;; gutter icons for lsp diagnostics 8 | ;; :help vim.lsp.diagnostic.set_signs 9 | (defn define-signs 10 | [prefix] 11 | (let [error (.. prefix "SignError") 12 | warn (.. prefix "SignWarn") 13 | info (.. prefix "SignInfo") 14 | hint (.. prefix "SignHint")] 15 | (vim.fn.sign_define error {:text "" :texthl error}) 16 | (vim.fn.sign_define warn {:text "" :texthl warn}) 17 | (vim.fn.sign_define info {:text "" :texthl info}) 18 | (vim.fn.sign_define hint {:text "" :texthl hint}))) 19 | 20 | ;; LSP naming changed between neovim 0.6 and 0.7 onward 21 | (if (= (nvim.fn.has "nvim-0.6") 1) 22 | (define-signs "Diagnostic") 23 | (define-signs "LspDiagnostics")) 24 | 25 | 26 | ;; Configure server features 27 | (let [handlers {"textDocument/publishDiagnostics" 28 | (vim.lsp.with 29 | vim.lsp.diagnostic.on_publish_diagnostics 30 | {:severity_sort true 31 | :update_in_insert false 32 | :underline true 33 | :virtual_text false}) 34 | "textDocument/hover" 35 | (vim.lsp.with 36 | vim.lsp.handlers.hover 37 | {:border "single"}) 38 | "textDocument/signatureHelp" 39 | (vim.lsp.with 40 | vim.lsp.handlers.signature_help 41 | {:border "single"})} 42 | capabilities (cmplsp.default_capabilities) 43 | on_attach (fn [client bufnr] 44 | (do 45 | (nvim.buf_set_keymap bufnr :n :gd "lua vim.lsp.buf.definition()" {:noremap true}) 46 | (nvim.buf_set_keymap bufnr :n :K "lua vim.lsp.buf.hover()" {:noremap true}) 47 | (nvim.buf_set_keymap bufnr :n :ld "lua vim.lsp.buf.declaration()" {:noremap true}) 48 | (nvim.buf_set_keymap bufnr :n :lt "lua vim.lsp.buf.type_definition()" {:noremap true}) 49 | (nvim.buf_set_keymap bufnr :n :lh "lua vim.lsp.buf.signature_help()" {:noremap true}) 50 | (nvim.buf_set_keymap bufnr :n :ln "lua vim.lsp.buf.rename()" {:noremap true}) 51 | (nvim.buf_set_keymap bufnr :n :le "lua vim.diagnostic.open_float()" {:noremap true}) 52 | (nvim.buf_set_keymap bufnr :n :lq "lua vim.diagnostic.setloclist()" {:noremap true}) 53 | (nvim.buf_set_keymap bufnr :n :lf "lua vim.lsp.buf.formatting()" {:noremap true}) 54 | (nvim.buf_set_keymap bufnr :n :lj "lua vim.diagnostic.goto_next()" {:noremap true}) 55 | (nvim.buf_set_keymap bufnr :n :lk "lua vim.diagnostic.goto_prev()" {:noremap true}) 56 | (nvim.buf_set_keymap bufnr :n :la "lua vim.lsp.buf.code_action()" {:noremap true}) 57 | (nvim.buf_set_keymap bufnr :v :la "lua vim.lsp.buf.range_code_action() " {:noremap true}) 58 | ;telescope 59 | (nvim.buf_set_keymap bufnr :n :lw ":lua require('telescope.builtin').lsp_workspace_diagnostics()" {:noremap true}) 60 | (nvim.buf_set_keymap bufnr :n :lr ":lua require('telescope.builtin').lsp_references()" {:noremap true}) 61 | (nvim.buf_set_keymap bufnr :n :li ":lua require('telescope.builtin').lsp_implementations()" {:noremap true})))] 62 | 63 | ;; Clojure LSP Server setup 64 | (lsp.clojure_lsp.setup {:on_attach on_attach 65 | :handlers handlers 66 | :capabilities capabilities}) 67 | 68 | ;; C/Cpp 69 | (lsp.clangd.setup {:on_attach on_attach 70 | :handlers handlers 71 | :capabilities capabilities}) 72 | 73 | ;; JavaScript and TypeScript 74 | (lsp.tsserver.setup {:on_attach on_attach 75 | :handlers handlers 76 | :capabilities capabilities}) 77 | 78 | ;; html / css / json 79 | 80 | (lsp.cssls.setup {:on_attach on_attach 81 | :handlers handlers 82 | :capabilities capabilities 83 | :cmd ["vscode-css-languageserver" "--stdio"]}) 84 | 85 | (lsp.html.setup {:on_attach on_attach 86 | :handlers handlers 87 | :capabilities capabilities 88 | :cmd ["vscode-html-languageserver" "--stdio"]}) 89 | 90 | (lsp.jsonls.setup {:on_attach on_attach 91 | :handlers handlers 92 | :capabilities capabilities 93 | :cmd ["vscode-json-languageserver" "--stdio"]})) 94 | 95 | 96 | 97 | ;; (vim.lsp.protocol.CompletionItemKind 98 | ;; {"  (Text) ", 99 | ;; "  (Method)", 100 | ;; "  (Function)", 101 | ;; "  (Constructor)", 102 | ;; " ﴲ (Field)", 103 | ;; "[] (Variable)", 104 | ;; "  (Class)", 105 | ;; " ﰮ (Interface)", 106 | ;; "  (Module)", 107 | ;; " 襁 (Property)", 108 | ;; "  (Unit)", 109 | ;; "  (Value)", 110 | ;; " 練 (Enum)", 111 | ;; "  (Keyword)", 112 | ;; "  (Snippet)", 113 | ;; "  (Color)", 114 | ;; "  (File)", 115 | ;; "  (Reference)", 116 | ;; "  (Folder)", 117 | ;; "  (EnumMember)", 118 | ;; " ﲀ (Constant)", 119 | ;; " ﳤ (Struct)", 120 | ;; "  (Event)", 121 | ;; "  (Operator)", 122 | ;; "  (TypeParameter)"}) 123 | -------------------------------------------------------------------------------- /fnl/config/plugin/lua-snip.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.lua-snip 2 | {autoload {vscode luasnip.loaders.from_vscode}}) 3 | 4 | ;; Load local snippets - relative to user config root 5 | (vscode.lazy_load {:paths ["./snippets"]}) 6 | 7 | -------------------------------------------------------------------------------- /fnl/config/plugin/lualine.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.lualine 2 | {autoload {core aniseed.core 3 | lualine lualine 4 | lsp config.plugin.lspconfig}}) 5 | 6 | (defn lsp_connection [] 7 | (if (vim.tbl_isempty (vim.lsp.buf_get_clients 0)) "" "")) 8 | 9 | (def github-lua-theme 10 | (core.assoc 11 | (require :lualine.themes.auto) 12 | :inactive {:a {:bg "#19181e" :fg "#a4a3a6"} 13 | :b {:bg "#19181e" :fg "#a4a3a6"} 14 | :c {:bg "#19181e" :fg "#a4a3a6"}} 15 | :normal {:a {:bg "#131217" :fg "#24292e"} 16 | :b {:bg "#131217" :fg "#3b8eea"} 17 | :c {:bg "#19181e" :fg "#d1d5da"}} 18 | :command {:a {:bg "#131217" :fg "#24292e"} 19 | :b {:bg "#131217" :fg "#ccbed8"} 20 | :c {:bg "#19181e" :fg "#d1d5da"}} 21 | :visual {:a {:bg "#131217" :fg "#24292e"} 22 | :b {:bg "#131217" :fg "#ced4b1"} 23 | :c {:bg "#19181e" :fg "#d1d5da"}} 24 | :replace {:a {:bg "#131217" :fg "#24292e"} 25 | :b {:bg "#131217" :fg "#d1b6bd"} 26 | :c {:bg "#19181e" :fg "#d1d5da"}} 27 | :insert {:a {:bg "#131217" :fg "#24292e"} 28 | :b {:bg "#131217" :fg "#a8d1c9"} 29 | :c {:bg "#19181e" :fg "#d1d5da"}})) 30 | 31 | (lualine.setup 32 | {:options {:theme github-lua-theme 33 | :icons_enabled true 34 | :section_separators ["" ""] 35 | :component_separators ["" ""]} 36 | :sections {:lualine_a [] 37 | :lualine_b [[:mode {:upper true}]] 38 | :lualine_c [["FugitiveHead"] 39 | [:filename {:filestatus true 40 | :path 1}]] 41 | :lualine_x [[:diagnostics {:sections [:error 42 | :warn 43 | :info 44 | :hint] 45 | :sources [:nvim_lsp]}] 46 | [lsp_connection] 47 | :location 48 | :filetype] 49 | :lualine_y [:encoding] 50 | :lualine_z []} 51 | :inactive_sections {:lualine_a [] 52 | :lualine_b [] 53 | :lualine_c [[:filename {:filestatus true 54 | :path 1}]] 55 | :lualine_x [] 56 | :lualine_y [] 57 | :lualine_z []}}) 58 | -------------------------------------------------------------------------------- /fnl/config/plugin/neoclip.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.neoclip 2 | {autoload {neoclip neoclip}}) 3 | 4 | ;; https://github.com/pwntester/octo.nvim#%EF%B8%8F-configuration 5 | 6 | (neoclip.setup 7 | {}) 8 | 9 | 10 | 11 | ;; AckslD/nvim-neoclip.lua 12 | -------------------------------------------------------------------------------- /fnl/config/plugin/neogit.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.neogit 2 | {autoload {neogit neogit}}) 3 | 4 | ;; https://github.com/TimUntersberger/neogit#configuration 5 | 6 | (neogit.setup 7 | {:disable_signs false 8 | 9 | ;; Disable key binding hints on top of panel 10 | :disable_hint true 11 | 12 | ;; Show scope of change relative to cursor position 13 | :disable_context_highlighting false 14 | 15 | ;; Commit without confirmation on buffer save 16 | :disable_commit_confirmation true 17 | 18 | ;; Normal mode when opening commit message buffer 19 | ;; false for insert mode by default 20 | :disable_insert_on_commit true 21 | 22 | ;; Automatically refresh Git state on changes to files (disable for very large repositories) 23 | :auto_refresh true 24 | 25 | :disable_builtin_notifications false 26 | 27 | ;; F key binding to pull (fetch) from remote repositories 28 | ;; defalut: false 29 | :use_magit_keybindings true 30 | 31 | ;; Where to open Neogit: "tab" (default) or "split" (window) 32 | :kind "tab" 33 | 34 | ;; Where to open the commit popup 35 | :commit_popup {:kind "split"} 36 | 37 | ;; Where to open popups 38 | :popup {:kind "split"} 39 | 40 | ;; status buffer section signs { Closed, Opened } 41 | :signs 42 | {:section ["" ""] ;; staged, unstaged, etc 43 | :item ["" ""] ;; files 44 | :hunk ["﮵" "﮴"]} ;; git hunks 45 | 46 | ;; Neogit provides inline diffs 47 | ;; `sindrets/diffview.nvim` integration enables diff popup around 48 | :integrations {:diffview true} 49 | 50 | ;; Setting any section to `false` will make the section not render at all 51 | :sections 52 | {:untracked {:folded false} 53 | :unstaged {:folded false} 54 | :staged {:folded false} 55 | :stashes {:folded true} 56 | :unpulled {:folded true} 57 | :unmerged {:folded false} 58 | :recent {:folded true}} 59 | 60 | ;; override/add mappings 61 | :mappings { 62 | ;; modify status buffer mappings 63 | :status { 64 | ;; Adds a mapping with "B" as key that does the "BranchPopup" command 65 | ;; :B "BranchPopup" 66 | ;; Removes the default mapping of "s" 67 | ;; :s "" 68 | } 69 | } 70 | } 71 | ) 72 | -------------------------------------------------------------------------------- /fnl/config/plugin/numb.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.numb 2 | {autoload {numb numb}}) 3 | 4 | ;; https://github.com/nacro90/numb.nvim 5 | 6 | (numb.setup {:show_numbers true 7 | :show_cursorline true 8 | :number_only true 9 | :centered_peeking true}) 10 | -------------------------------------------------------------------------------- /fnl/config/plugin/nvim-comment.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.nvim-comment 2 | {autoload {nvim-comment nvim_comment}}) 3 | 4 | ;; https://github.com/terrortylor/nvim-comment#configure 5 | 6 | (nvim-comment.setup 7 | { 8 | ;; Linters prefer comment and line to have a space in between markers 9 | :marker_padding true 10 | 11 | ;; comment out empty or whitespace only lines 12 | :comment_empty true 13 | 14 | ;; trim empty comment whitespace 15 | :comment_empty_trim_whitespace true 16 | 17 | ;; Should key mappings be created 18 | :create_mappings true 19 | 20 | ;; Normal mode mapping left hand side 21 | :line_mapping "gcc" 22 | 23 | ;; Visual/Operator mapping left hand side 24 | :operator_mapping "gc" 25 | 26 | ;; text object mapping, comment chunk,, 27 | :comment_chunk_text_object "ic" 28 | 29 | ;; Hook function to call before commenting takes place 30 | :hook nil 31 | }) 32 | -------------------------------------------------------------------------------- /fnl/config/plugin/nvim-surround.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.nvim-surround 2 | {autoload {surround nvim-surround}}) 3 | 4 | ;; https://github.com/kylechui/nvim-surround 5 | 6 | ;; default configuration 7 | ;; https://github.com/kylechui/nvim-surround/blob/main/lua/nvim-surround/config.lua 8 | 9 | (surround.setup 10 | {}) 11 | -------------------------------------------------------------------------------- /fnl/config/plugin/nvim-tree.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.nvim-tree 2 | {autoload {tree nvim-tree}}) 3 | 4 | ;; https://github.com/kyazdani42/nvim-tree.lua 5 | 6 | (tree.setup 7 | {:sort_by "case_sensitive" 8 | :view {:adaptive_size true 9 | :mappings {:list [{:key "u" :action "dir_up"}]}} 10 | :renderer {:group_empty true} 11 | :filters {:dotfiles false} 12 | }) 13 | 14 | 15 | ;; sort_by = "case_sensitive", 16 | ;; view = { 17 | ;; adaptive_size = true, 18 | ;; mappings = { 19 | ;; list = { 20 | ;; { key = "u", action = "dir_up" }, 21 | ;; }, 22 | ;; }, 23 | ;; }, 24 | ;; renderer = { 25 | ;; group_empty = true, 26 | ;; }, 27 | ;; filters = { 28 | ;; dotfiles = true, 29 | ;; }, 30 | -------------------------------------------------------------------------------- /fnl/config/plugin/octo.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.octo 2 | {autoload {octo octo}}) 3 | 4 | ;; https://github.com/pwntester/octo.nvim#%EF%B8%8F-configuration 5 | 6 | (octo.setup 7 | {}) -------------------------------------------------------------------------------- /fnl/config/plugin/orgmode.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.orgmode 2 | {autoload {orgmode orgmode}}) 3 | 4 | ;; https://github.com/nvim-orgmode/orgmode#setup 5 | 6 | (orgmode.setup_ts_grammar) 7 | 8 | ;; TODO: add orgmode as nvim-cmp source 9 | ;; orgmode highlight, indent and ensure_installed set in treesitter.fnl configuration 10 | 11 | (orgmode.setup 12 | {:org_agenda_files {"~/Documents/org/*" "~/projects/**/*"} 13 | :org_default_notes_file "~/Documents/org/refile.org"}) -------------------------------------------------------------------------------- /fnl/config/plugin/project.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.project 2 | {autoload {project project_nvim}}) 3 | 4 | 5 | (project.setup 6 | { 7 | ;; Manual mode doesn't automatically change your root directory, so you have 8 | ;; the option to manually do so using `:ProjectRoot` command. 9 | ;; :manual_mode false 10 | 11 | ;; Methods of detecting the root directory. **"lsp"** uses the native neovim 12 | ;; lsp, while **"pattern"** uses vim-rooter like glob pattern matching. Here 13 | ;; order matters: if one is not detected, the other is used as fallback. You 14 | ;; can also delete or rearangne the detection methods. 15 | ;; :detection_methods ["lsp", "pattern"] 16 | 17 | ;; All the patterns used to detect root dir, when **"pattern"** is in 18 | ;; detection_methods 19 | ;; :patterns [".git", "_darcs", ".hg", ".bzr", ".svn", "Makefile", "package.json"], 20 | ;; :patterns [".git" "deps.edn" "Makefile" "package.json"] 21 | 22 | ;; Table of lsp clients to ignore by name 23 | ;; eg: { "efm", ... } 24 | ;; :ignore_lsp [] 25 | 26 | ;; Don't calculate root dir on specific directories 27 | ;; Ex: { "~/.cargo/*", ... } 28 | ;; :exclude_dirs [] 29 | 30 | ;; Show hidden files in telescope 31 | ;; :show_hidden false 32 | 33 | ;; When set to false, you will get a message when project.nvim changes your 34 | ;; directory. 35 | ;; :silent_chdir true 36 | 37 | ;; Path where project.nvim will store the project history for use in 38 | ;; telescope 39 | ;; :datapath (vim.fn.stdpath "data") 40 | 41 | }) 42 | -------------------------------------------------------------------------------- /fnl/config/plugin/sexp.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.sexp 2 | {autoload {nvim aniseed.nvim}}) 3 | 4 | (set nvim.g.sexp_filetypes "clojure,scheme,lisp,timl,fennel,janet") 5 | -------------------------------------------------------------------------------- /fnl/config/plugin/startup.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.startup 2 | {autoload {startup startup 3 | functions startup_nvim.functions}}) 4 | 5 | ;; https://github.com/startup-nvim/startup.nvim 6 | 7 | (startup.setup 8 | {:logo-neovim 9 | {:type "text" 10 | :oldfiles_directory false 11 | :align "center" 12 | :title "Header" 13 | :margin 5 14 | :content 15 | [ " ███╗ ██╗ ███████╗ ██████╗ ██╗ ██╗ ██╗ ███╗ ███╗" 16 | " ████╗ ██║ ██╔════╝██╔═══██╗ ██║ ██║ ██║ ████╗ ████║" 17 | " ██╔██╗ ██║ █████╗ ██║ ██║ ██║ ██║ ██║ ██╔████╔██║" 18 | " ██║╚██╗██║ ██╔══╝ ██║ ██║ ╚██╗ ██╔╝ ██║ ██║╚██╔╝██║" 19 | " ██║ ╚████║ ███████╗╚██████╔╝ ╚████╔╝ ██║ ██║ ╚═╝ ██║" 20 | " ╚═╝ ╚═══╝ ╚══════╝ ╚═════╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝"] 21 | :highlight "TSTag" 22 | :default_color "" 23 | :oldfiles_amount 0} 24 | 25 | :logo-lambda 26 | {:type "text" 27 | :oldfiles_directory false 28 | :align "center" 29 | :title "Header" 30 | :margin 5 31 | :content 32 | ["⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣠⣤⣤⣴⣦⣤⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ " 33 | "⠀⠀⠀⠀⠀⠀⢀⣤⣾⣿⣿⣿⣿⠿⠿⠿⠿⣿⣿⣿⣿⣶⣤⡀⠀⠀⠀⠀⠀⠀ " 34 | "⠀⠀⠀⠀⣠⣾⣿⣿⡿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⢿⣿⣿⣶⡀⠀⠀⠀⠀ " 35 | "⠀⠀⠀⣴⣿⣿⠟⠁⠀⠀⠀⣶⣶⣶⣶⡆⠀⠀⠀⠀⠀⠀⠈⠻⣿⣿⣦⠀⠀⠀ " 36 | "⠀⠀⣼⣿⣿⠋⠀⠀⠀⠀⠀⠛⠛⢻⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣧⠀⠀ " 37 | "⠀⢸⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣷⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣿⡇⠀ " 38 | "⠀⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣇⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⠀ " 39 | "⠀⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⡟⢹⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⣹⣿⣿⠀ " 40 | "⠀⣿⣿⣷⠀⠀⠀⠀⠀⠀⣰⣿⣿⠏⠀⠀⢻⣿⣿⡄⠀⠀⠀⠀⠀⠀⣿⣿⡿⠀ " 41 | "⠀⢸⣿⣿⡆⠀⠀⠀⠀⣴⣿⡿⠃⠀⠀⠀⠈⢿⣿⣷⣤⣤⡆⠀⠀⣰⣿⣿⠇⠀ " 42 | "⠀⠀⢻⣿⣿⣄⠀⠀⠾⠿⠿⠁⠀⠀⠀⠀⠀⠘⣿⣿⡿⠿⠛⠀⣰⣿⣿⡟⠀⠀ " 43 | "⠀⠀⠀⠻⣿⣿⣧⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⠏⠀⠀⠀ " 44 | "⠀⠀⠀⠀⠈⠻⣿⣿⣷⣤⣄⡀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⠟⠁⠀⠀⠀⠀ " 45 | "⠀⠀⠀⠀⠀⠀⠈⠛⠿⣿⣿⣿⣿⣿⣶⣶⣿⣿⣿⣿⣿⠿⠋⠁⠀⠀⠀⠀⠀⠀ " 46 | "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠛⠛⠛⠛⠛⠛⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ "] 47 | :highlight "TSTag" 48 | :default_color "" 49 | :oldfiles_amount 0} 50 | 51 | :header 52 | {:type "text" 53 | :oldfiles_directory false 54 | :align "center" 55 | :title "Header" 56 | :margin 5 57 | :content ["practical.li/neovim" 58 | "Spiced Neovim - a Fennel driven experience"] 59 | :highlight "Function" 60 | :default_color "" 61 | :oldfiles_amount 0} 62 | 63 | :menu 64 | {:type "mapping" 65 | :oldfiles_directory false 66 | :align "center" 67 | :fold_section false 68 | :title "Command Menu" 69 | :margin 5 70 | :content [[" File Browser" "Telescope file_browser" "ff"] 71 | [" Find File" "Telescope find_files" "pf"] 72 | [" Find Word" "Telescope live_grep" "lg"] 73 | [" Recent Files" "Telescope oldfiles" "of"] 74 | [" Colorschemes" "Telescope colorscheme" "cs"] 75 | [" New File" "lua require'startup'.new_file()" "nf"]] 76 | :highlight "String" 77 | :default_color "" 78 | :oldfiles_amount 0} 79 | 80 | :footer 81 | {:type "text" 82 | :oldfiles_directory false 83 | :align "center" 84 | :title "Footer" 85 | :margin 5 86 | :content [" practicalli 2022" 87 | " Creative Commons Attribution Share-Alike"] 88 | :highlight "Function" 89 | :default_color "" 90 | :oldfiles_amount 0} 91 | 92 | :options 93 | {:mapping_keys true 94 | :cursor_column 0.5 95 | :empty_lines_between_mappings true 96 | :paddings [1 3 3 0]} 97 | 98 | :mappings 99 | {:execute_command "" 100 | :open_file "o" 101 | :open_file_split "" 102 | :open_section "" 103 | :open_help "?"} 104 | 105 | :colors 106 | {:background "#f8f2e6" 107 | :folded_section "#56b6c2" } 108 | 109 | :parts [:logo-lambda :header :menu :footer] 110 | }) 111 | -------------------------------------------------------------------------------- /fnl/config/plugin/symbols-outline.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.symbols-outline 2 | {autoload {symbols symbols-outline}}) 3 | 4 | ;; https://github.com/simrat39/symbols-outline.nvim 5 | 6 | (symbols.setup 7 | {}) 8 | 9 | 10 | ;; highlight_hovered_item = true, 11 | ;; show_guides = true, 12 | ;; auto_preview = false, 13 | ;; position = 'right', 14 | ;; relative_width = true, 15 | ;; width = 25, 16 | ;; auto_close = false, 17 | ;; show_numbers = false, 18 | ;; show_relative_numbers = false, 19 | ;; show_symbol_details = true, 20 | ;; preview_bg_highlight = 'Pmenu', 21 | ;; autofold_depth = nil, 22 | ;; auto_unfold_hover = true, 23 | ;; fold_markers = { '', '' }, 24 | ;; wrap = false, 25 | ;; keymaps = { -- These keymaps can be a string or a table for multiple keys 26 | ;; close = {"", "q"}, 27 | ;; goto_location = "", 28 | ;; focus_location = "o", 29 | ;; hover_symbol = "", 30 | ;; toggle_preview = "K", 31 | ;; rename_symbol = "r", 32 | ;; code_actions = "a", 33 | ;; fold = "h", 34 | ;; unfold = "l", 35 | ;; fold_all = "W", 36 | ;; unfold_all = "E", 37 | ;; fold_reset = "R", 38 | ;; }, 39 | ;; lsp_blacklist = {}, 40 | ;; symbol_blacklist = {}, 41 | ;; symbols = { 42 | ;; File = {icon = "", hl = "TSURI"}, 43 | ;; Module = {icon = "", hl = "TSNamespace"}, 44 | ;; Namespace = {icon = "", hl = "TSNamespace"}, 45 | ;; Package = {icon = "", hl = "TSNamespace"}, 46 | ;; Class = {icon = "𝓒", hl = "TSType"}, 47 | ;; Method = {icon = "ƒ", hl = "TSMethod"}, 48 | ;; Property = {icon = "", hl = "TSMethod"}, 49 | ;; Field = {icon = "", hl = "TSField"}, 50 | ;; Constructor = {icon = "", hl = "TSConstructor"}, 51 | ;; Enum = {icon = "ℰ", hl = "TSType"}, 52 | ;; Interface = {icon = "ﰮ", hl = "TSType"}, 53 | ;; Function = {icon = "", hl = "TSFunction"}, 54 | ;; Variable = {icon = "", hl = "TSConstant"}, 55 | ;; Constant = {icon = "", hl = "TSConstant"}, 56 | ;; String = {icon = "𝓐", hl = "TSString"}, 57 | ;; Number = {icon = "#", hl = "TSNumber"}, 58 | ;; Boolean = {icon = "⊨", hl = "TSBoolean"}, 59 | ;; Array = {icon = "", hl = "TSConstant"}, 60 | ;; Object = {icon = "⦿", hl = "TSType"}, 61 | ;; Key = {icon = "🔐", hl = "TSType"}, 62 | ;; Null = {icon = "NULL", hl = "TSType"}, 63 | ;; EnumMember = {icon = "", hl = "TSField"}, 64 | ;; Struct = {icon = "𝓢", hl = "TSType"}, 65 | ;; Event = {icon = "🗲", hl = "TSType"}, 66 | ;; Operator = {icon = "+", hl = "TSOperator"}, 67 | ;; TypeParameter = {icon = "𝙏", hl = "TSParameter"} 68 | ;; } 69 | ;; 70 | -------------------------------------------------------------------------------- /fnl/config/plugin/telescope.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.telescope 2 | {autoload {nvim aniseed.nvim 3 | telescope telescope 4 | actions telescope.actions 5 | themes telescope.themes}}) 6 | 7 | (telescope.setup 8 | {:defaults {:file_ignore_patterns ["node_modules"] 9 | ;; Esc closes telescope popup immediately 10 | ;; otherwise Esc first goes to normal mode 11 | ;; :mappings {:i {: actions.close}} 12 | } 13 | :extensions {:file_browser {:hidden true} ;; C-h/h toggle in popup 14 | :env {} 15 | :heading {:treesitter true} 16 | :ui-select {1 (themes.get_dropdown {})} 17 | :tele_tabby {:use_highlighter false} 18 | :packer {} 19 | :project {:sync_with_nvim_tree true}} 20 | :pickers {:find_files {:find_command ["rg" "--files" "--iglob" "!.git"]}}}) 21 | 22 | ;; Load Extensions 23 | 24 | ;; List environment variables 25 | (telescope.load_extension "env") 26 | 27 | ;; List headings with preview in markdown, asciidoc, etc. 28 | (telescope.load_extension "heading") 29 | 30 | ;; File browsing - create files and directories 31 | (telescope.load_extension "file_browser") 32 | 33 | 34 | (telescope.load_extension "neoclip") 35 | 36 | ;; Manage packages 37 | (telescope.load_extension "packer") 38 | 39 | ;; List network ports currently in use 40 | (telescope.load_extension "ports") 41 | 42 | ;; Create, delete and switch between projects - setting path 43 | (telescope.load_extension "project") 44 | 45 | ;; List currently open tabs and switch between them 46 | (telescope.load_extension "tele_tabby") 47 | 48 | ;; Terraform 49 | (telescope.load_extension "terraform_doc") 50 | 51 | 52 | (telescope.load_extension "ui-select") 53 | 54 | ;; ;; TODO: define a picker that shows hidden files "--hidden" or files excluded by git (removing "!.git") 55 | ;; (telescope.setup {:defaults {:file_ignore_patterns ["node_modules"]} 56 | ;; :extensions {:ui-select {1 (themes.get_dropdown {})} 57 | ;; :project {} 58 | ;; } 59 | ;; :pickers {:find_files {:find_command ["rg" "--files" "--iglob" "!.git" "--hidden"]}}}) 60 | -------------------------------------------------------------------------------- /fnl/config/plugin/theme-gruvbox.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.theme-gruvbox 2 | {autoload {theme gruvbox}}) 3 | 4 | ;; Theme variants: dark/dimmed/dark_default/dark_colorblind/light/light_default/light_colorblind 5 | 6 | (theme.setup {:theme_style "light" 7 | :comment_style "italic"}) 8 | -------------------------------------------------------------------------------- /fnl/config/plugin/theme-lualine.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.theme-lualine 2 | {autoload {core aniseed.core 3 | lualine lualine 4 | lsp config.plugin.lspconfig}}) 5 | 6 | 7 | ;; Icon for LSP session 8 | (defn lsp_connection [] 9 | (if (vim.tbl_isempty (vim.lsp.buf_get_clients 0)) "" "")) 10 | 11 | 12 | (lualine.setup 13 | {:options {:theme :newpaper 14 | :icons_enabled true 15 | :section_separators ["" ""] 16 | :component_separators ["" ""]} 17 | 18 | :sections {:lualine_a [[:mode {:upper true}]] 19 | :lualine_b [[:filename {:filestatus true 20 | :path 1}]] 21 | :lualine_c [[:branch] 22 | [:diff 23 | {:diff_color 24 | {:added :GitSignsAdd 25 | :modified :GitSignsChange 26 | :removed :GitSignsDelete} 27 | :symbols {:added " " 28 | :modified " " 29 | :removed " "} 30 | }]] 31 | :lualine_x [[:diagnostics 32 | {:sections [:error :warn :info :hint] 33 | :diagnostics_color 34 | {:error :LualineDiagnosticError 35 | :warn :LualineDiagnosticWarn 36 | :info :LualineDiagnosticInfo 37 | :hint :LualineDiagnosticHint} 38 | :symbols {:error " " 39 | :warn " " 40 | :info " " 41 | :hint " "} 42 | ;; :sources [:nvim_lsp] 43 | :sources [:nvim_diagnostic] 44 | }] 45 | [lsp_connection]] 46 | :lualine_y [:location] 47 | :lualine_z [:filetype]} 48 | 49 | :inactive_sections {:lualine_a [] 50 | :lualine_b [] 51 | :lualine_c [[:filename {:filestatus true 52 | :path 1}]] 53 | :lualine_x [] 54 | :lualine_y [] 55 | :lualine_z []}}) 56 | -------------------------------------------------------------------------------- /fnl/config/plugin/theme-newpaper.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.theme-newpaper 2 | {autoload {theme newpaper}}) 3 | 4 | ;; https://github.com/yorik1984/newpaper.nvim 5 | 6 | (theme.setup 7 | {:style :dark 8 | :italic_comments false 9 | :borders false}) 10 | 11 | -------------------------------------------------------------------------------- /fnl/config/plugin/theme-tokyonight.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.theme-tokyonight 2 | {autoload {tokyo tokyonight}}) 3 | 4 | ;; https://github.com/folke/tokyonight.nvim 5 | 6 | (tokyo.setup 7 | {:tokyonight_style "storm"}) 8 | 9 | 10 | ;; theme styles: "storm", "night", "day" 11 | ;; :tokyonight_style "storm" 12 | ;; :tokyonight_terminal_colors true 13 | ;; :tokyonight_italic_comments true 14 | ;; :tokyonight_italic_keywords true 15 | ;; :tokyonight_italic_functions false 16 | ;; :tokyonight_italic_variables false 17 | ;; :tokyonight_transparent false 18 | 19 | ;; replace inactive statuslines with thin border 20 | ;; :tokyonight_hide_inactive_statusline false 21 | 22 | ;; Set darker background on sidebar-like windows. e.g. ["qf", "vista_kind", "terminal", "packer"] 23 | ;; :tokyonight_sidebars {} 24 | 25 | ;; Sidebar like windows like NvimTree get a transparent background 26 | ;; :tokyonight_transparent_sidebar false 27 | 28 | ;; Sidebar like windows like NvimTree get a darker background 29 | ;; :tokyonight_dark_sidebar true 30 | 31 | ;; Float windows like the lsp diagnostics windows get a darker background 32 | ;; :tokyonight_dark_float true 33 | 34 | ;; You can override specific color groups to use other groups or a hex color 35 | ;; :tokyonight_colors {} 36 | 37 | ;; Adjust brightness of Day style colors, range 0 dull to 1 vibrant 38 | ;; :tokyonight_day_brightness 0.3 39 | 40 | ;; When true, section headers in the lualine theme will be bold 41 | ;; :tokyonight_lualine_bold false 42 | -------------------------------------------------------------------------------- /fnl/config/plugin/theme.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.theme 2 | {autoload {theme github-theme}}) 3 | 4 | ;; Theme variants: dark/dimmed/dark_default/dark_colorblind/light/light_default/light_colorblind 5 | 6 | ;; Set theme - Neovim 9 onward 7 | ;; vim.cmd('colorscheme github_dark') 8 | 9 | (theme.setup {;; :theme_style "dark" 10 | ;; :colors {:bg "#f8f2e6"} 11 | ;; :comment_style "italic" 12 | }) 13 | -------------------------------------------------------------------------------- /fnl/config/plugin/todocomments.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.todocomments 2 | {autoload {todos todo-comments}}) 3 | 4 | ;; https://github.com/folke/todo-comments.nvim 5 | ;; PERF: performance review 6 | ;; HACK: to be improved 7 | ;; TODO: task to be done 8 | ;; DONE: completed task 9 | ;; NOTE: a reminder or info to remember 10 | ;; FIX: a known thing that is broken 11 | ;; WARN: warning 12 | ;; DRAGONS: here be dragons 13 | 14 | (todos.setup 15 | {;; Show todo icons in the gutter 16 | :signs true 17 | ;; Priority of display in gutter, 1-9, highest number wins 18 | :sign_priority 5 19 | 20 | ;; match keywords in comments only 21 | :comments_only true 22 | 23 | ;; Customisation of todo, adding alternate match and icon 24 | :keywords 25 | {:TODO {:icon ""} 26 | :DONE {:icon ""} 27 | :WARN {:icon "" 28 | :alt ["WARNING" "XXX" "DRAGONS"]}}}) 29 | -------------------------------------------------------------------------------- /fnl/config/plugin/toggleterm.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.toggleterm 2 | {autoload {toggleterm toggleterm}}) 3 | 4 | 5 | (toggleterm.setup 6 | {}) 7 | -------------------------------------------------------------------------------- /fnl/config/plugin/treesitter.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.treesitter 2 | {autoload {treesitter nvim-treesitter.configs}}) 3 | 4 | (treesitter.setup 5 | {:ensure_installed ["clojure" "fennel" "markdown" "org" "html"] 6 | :sync_install true 7 | :highlight {:enable true} 8 | :indent {:enable true}}) 9 | -------------------------------------------------------------------------------- /fnl/config/plugin/trouble.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.trouble 2 | {autoload {trouble trouble}}) 3 | 4 | ;; https://github.com/folke/trouble.nvim 5 | 6 | (trouble.setup 7 | {}) -------------------------------------------------------------------------------- /fnl/config/plugin/web-devicons.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.web-devicons 2 | {autoload {icons nvim-web-devicons}}) 3 | 4 | ;; https://github.com/kyazdani42/nvim-web-devicons 5 | 6 | (icons.setup 7 | {}) 8 | -------------------------------------------------------------------------------- /fnl/config/plugin/which-key.fnl: -------------------------------------------------------------------------------- 1 | (module config.plugin.which-key 2 | {autoload {which-key which-key}}) 3 | 4 | (which-key.register 5 | {: 6 | {:b {:name "Buffers"} 7 | :c {:name "Color-clipboard"} 8 | :e {:name "Errors"} 9 | :f {:name "Files" 10 | :/ [":Telescope live_grep" "Grep"] 11 | :b [":Telescope file_browser" "Explorer"] 12 | :f [":Telescope find_files" "Grep"] 13 | :s [":write" "Save"] 14 | :t {:name "Tree" 15 | :s [":NvimTreeFindFile" "Select in Tree"] 16 | :t [":NvimTreeToggle" "Tree toggle"]} 17 | :D [":call delete(@%) | bdelete!" "Delete"]} 18 | :g {:name "Git/Version Control"} 19 | :h {:name "Help"} 20 | :i {:name "Insertion"} 21 | :j {:name "Jump"} 22 | :l {:name "Layouts"} 23 | :n {:name "Narrow/Numbers"} 24 | :o {:name "User Bindings"} 25 | :p {:name "Projects" 26 | :p [":Telescope project" "Project List"] 27 | :t [":TodoTelescope" "TODOs"]} 28 | :q {:name "Quit"} 29 | :t {:name "Tabs"} 30 | :T {:name "Toggle"} 31 | :w {:name "Windows"}}}) 32 | 33 | 34 | (which-key.setup 35 | {:plugins 36 | {;; show list of your marks on ' and ` 37 | :marks true 38 | ;; shows registers with `"` NORMAL or `` INSERT mode 39 | :registers true 40 | 41 | :spelling 42 | {;; `z=` to select spelling suggestions 43 | :enabled false 44 | ;; number of spelling suggestions to show 45 | :suggestions 20} 46 | 47 | ;; presets plugin adds help for several default keybindings in Neovim 48 | :presets 49 | {;; help for `d`, `y` operators and registers for motion / text object completion 50 | :operators true 51 | ;; help for motions 52 | :motions true 53 | ;; help for text objects triggered after entering an operator 54 | :text_objects true 55 | ;; default bindings on 56 | :windows true 57 | ;; misc bindings to work with windows 58 | :nav true 59 | ;; bindings for folds, spelling and others prefixed with z 60 | :z true 61 | ;; bindings for prefixed with g 62 | :g true}} 63 | 64 | ;; add operators that will trigger motion and text object completion 65 | ;; to enable all native operators, set the preset / operators plugin above 66 | :operators {:gc "Comments"} 67 | 68 | ;; override the label used to display specified key or sub-menu 69 | ;; Use register() function to define menu key and group names 70 | :key_labels 71 | {[""] "RET" 72 | [""] "SPC" 73 | [""] "TAB"} 74 | 75 | :icons 76 | {;; symbol used in the command line area that shows your active key combo 77 | :breadcrumb "»" 78 | ;; symbol used between a key and it's label 79 | :separator "➜" 80 | ;; symbol prepended to a group 81 | :group "+"} 82 | 83 | :popup_mappings 84 | {;; binding to scroll down inside the popup 85 | :scroll_down "" 86 | ;; binding to scroll up inside the popup 87 | :scroll_up ""} 88 | 89 | :window 90 | {;; none, single, double, shadow 91 | :border "none" 92 | ;; bottom, top 93 | :position "bottom" 94 | ;; extra window margin [top, right, bottom, left] 95 | :margin [1 0 1 0] 96 | ;; extra window padding [top, right, bottom, left] 97 | :padding [2 2 2 2] 98 | :winblend 0} 99 | 100 | :layout 101 | {;; min and max height of the columns 102 | :height {:min 4 :max 25} 103 | ;; min and max width of the columns 104 | :width {:min 20 :max 50} 105 | ;; spacing between columns 106 | :spacing 3 107 | ;; align columns left, center or right 108 | :align "left"} 109 | 110 | ;; enable this to hide mappings for which you didn't specify a label 111 | :ignore_missing false 112 | 113 | ;; hide mapping boilerplate 114 | :hidden ["" "" "" "" "call" "lua" "^:" "^ "] 115 | 116 | ;; show help message on the command line when the popup is visible 117 | :show_help true 118 | 119 | ;; automatically setup triggers 120 | :triggers "auto" 121 | 122 | ;; triggers = {""} -- or specify a list manually 123 | :triggers_blacklist 124 | {;; list of mode / prefixes that should never be hooked by WhichKey 125 | ;; this is mostly relevant for key maps that start with a native binding 126 | ;; most people should not need to change this 127 | :i ["j" "k"] 128 | :v ["j" "k"]}}) 129 | -------------------------------------------------------------------------------- /fnl/config/util.fnl: -------------------------------------------------------------------------------- 1 | (module config.util 2 | {autoload {core aniseed.core 3 | nvim aniseed.nvim}}) 4 | 5 | (defn insert-keymap [from to] 6 | (let [map-opts {:noremap true} 7 | to (.. ":" to "")] 8 | (nvim.set_keymap :i from to map-opts))) 9 | 10 | (defn nnoremap [from to opts] 11 | (let [map-opts {:noremap true} 12 | to (.. ":" to "")] 13 | (if (core.get opts :local?) 14 | (nvim.buf_set_keymap 0 :n from to map-opts) 15 | (nvim.set_keymap :n from to map-opts)))) 16 | 17 | (defn lnnoremap [from to] 18 | (nnoremap (.. "" from) to)) 19 | 20 | (defn expand [path] 21 | (nvim.fn.expand path)) 22 | 23 | (defn glob [path] 24 | (nvim.fn.glob path true true true)) 25 | 26 | (defn exists? [path] 27 | (= (nvim.fn.filereadable path) 1)) 28 | 29 | (defn lua-file [path] 30 | (nvim.ex.luafile path)) 31 | 32 | (def config-path (nvim.fn.stdpath "config")) 33 | 34 | (defn set-global-option [key value] 35 | "Sets a nvim global options" 36 | (core.assoc nvim.o key value)) 37 | 38 | (defn set-global-variable [key value] 39 | "Sets a nvim global variables" 40 | (core.assoc nvim.g key value)) 41 | 42 | 43 | ;; To evaluate 44 | ;; https://github.com/D00mch/dotfiles/blob/master/.config/nvim/fnl/util.fnl 45 | 46 | (defn exists? [path] 47 | (= (nvim.fn.filereadable path) 1)) 48 | 49 | (defn lua-file [path] 50 | (nvim.ex.luafile path)) 51 | 52 | (def config-path (nvim.fn.stdpath "config")) 53 | 54 | (defn +docs [opts to] 55 | (core.update opts :desc (fn [desc] (or desc to)))) 56 | 57 | (defn +buffer [opts buffer] 58 | (core.update opts :buffer (fn [b] (or b buffer)))) 59 | 60 | (defn kset [modes from to opts] 61 | (let [opts (if 62 | (= (type opts) "table") opts 63 | (= (type opts) "string") {:desc opts})] 64 | (vim.keymap.set modes from to (+docs opts to)))) 65 | 66 | ;; opts could be options map or just a buffer 67 | (defn bkset [modes from to opts] 68 | (let [opts (if 69 | (= (type opts) "table") (+buffer opts 0) 70 | (= (type opts) "number") {:buffer opts} 71 | (= (type opts) "string") {:desc opts} 72 | {:buffer 0})] 73 | (vim.keymap.set modes from to (+docs opts to)))) 74 | 75 | ;; maps operation to visual, rows only 76 | (defn vis-op [op args] 77 | #(op 78 | [(vim.fn.line ".") (vim.fn.line "v")] 79 | args)) 80 | 81 | ;; maps operation to visual 82 | (defn vis-op+ [op args] 83 | #(op 84 | [(vim.api.nvim_buf_get_mark 0 "<") 85 | (vim.api.nvim_buf_get_mark 0 ">")] 86 | args)) 87 | -------------------------------------------------------------------------------- /icons.txt: -------------------------------------------------------------------------------- 1 |              2 |         3 |    4 |  5 |  6 |   7 |   8 |   9 |      10 |  11 |  12 | ﲲ ﲱ ﲰ 13 |  14 | ﮴ ﮵ 15 |      16 |        17 |  18 |  19 |    20 |         21 |    22 |  23 |     24 | ⏻ 25 |    26 |  27 |  28 | ךּ 29 | 30 | מּ 31 |    32 |  33 |   34 |  35 |  36 |    37 |            38 |             39 |  40 |  41 |     42 |  43 |  44 | 45 | -------------------------------------------------------------------------------- /init.lua: -------------------------------------------------------------------------------- 1 | -- Neovim configuration Entrypoint 2 | -- Bootstrap packer package manager 3 | -- Aniseed compiles and loads fnl/config/init.fnl and required namespaces 4 | 5 | -- nvim_tree: disable netrw at the very start of init.lua (strongly advised) 6 | vim.g.loaded_netrw = 1 7 | vim.g.loaded_netrwPlugin = 1 8 | 9 | local execute = vim.api.nvim_command 10 | local fn = vim.fn 11 | 12 | -- Language providers 13 | -- https://practical.li/neovim/reference/neovim/language-providers/ 14 | -- Uncomment to disable a specific provider 15 | -- vim.g.loaded_node_provider = 0 16 | -- vim.g.loaded_perl_provider = 0 17 | -- vim.g.loaded_python3_provider = 0 18 | -- vim.g.loaded_ruby_provider = 0 19 | 20 | -- Packer configuration 21 | local pack_path = fn.stdpath("data") .. "/site/pack" 22 | local fmt = string.format 23 | 24 | function ensure (user, repo) 25 | -- Ensures a given github.com/USER/REPO is cloned in the pack/packer/start directory. 26 | local install_path = fmt("%s/packer/start/%s", pack_path, repo, repo) 27 | if fn.empty(fn.glob(install_path)) > 0 then 28 | execute(fmt("!git clone https://github.com/%s/%s %s", user, repo, install_path)) 29 | execute(fmt("packadd %s", repo)) 30 | end 31 | end 32 | 33 | -- Bootstrap essential plugins required for installing and loading the rest. 34 | ensure("wbthomason", "packer.nvim") 35 | ensure("Olical", "aniseed") 36 | 37 | -- Enable Aniseed's automatic compilation and loading of Fennel source code. 38 | vim.g["aniseed#env"] = { 39 | module = "config.init", 40 | compile = true 41 | } 42 | -------------------------------------------------------------------------------- /notes.md: -------------------------------------------------------------------------------- 1 | # Notes 2 | 3 | example plugins and configuration 4 | https://medium.com/geekculture/neovim-configuration-for-beginners-part-two-fb3834da91b8 5 | 6 | 7 | autocommand runs commands when creating a buffer 8 | 9 | If you want to know more about anything on vim, just use :help name 10 | 11 | 12 | ## Keybindings 13 | 14 | 15 | ``` 16 | inoremap: maps the key in insert mode 17 | nnoremap: maps the key in normal mode 18 | vnoremap: maps the key in visual mode 19 | ``` 20 | : represents Control key 21 | : Alt key 22 | 23 | " copies filepath to clipboard by pressing yf 24 | ``` 25 | :nnoremap yf :let @+=expand('%:p') 26 | ``` 27 | 28 | " copies pwd to clipboard: command yd 29 | ``` 30 | :nnoremap yd :let @+=expand('%:p:h') 31 | ``` 32 | 33 | " Vim jump to the last position when reopening a file 34 | ``` 35 | if has("autocmd") 36 | au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") 37 | \| exe "normal! g'\"" | endif 38 | endif 39 | ``` 40 | 41 | ## Snippets 42 | 43 | Example json based snippets for markdown 44 | 45 | https://github.com/rafamadriz/friendly-snippets/blob/main/snippets/markdown.json 46 | -------------------------------------------------------------------------------- /snippets/clojure.json: -------------------------------------------------------------------------------- 1 | { 2 | "comment header": { 3 | "prefix": "comment-header", 4 | "body": [ 5 | ";; ---------------------------------------------------------\n;; ${1:Heading summary title}\n;;\n;; ${2:Brief description}\n;; ---------------------------------------------------------\n\n$0" 6 | ], 7 | "description": "Comment Header" 8 | }, 9 | "comment section": { 10 | "prefix": "comment-section", 11 | "body": [ 12 | ";; ---------------------------------------------------------\n;; ${1:Section title}\n\n$0\n\n\n;; End of $1\n;; ---------------------------------------------------------\n\n" 13 | ], 14 | "description": "Comment Header" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /snippets/global.json: -------------------------------------------------------------------------------- 1 | {} 2 | 3 | -------------------------------------------------------------------------------- /snippets/markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "mkdocs button tag": { 3 | "prefix": "mkdocs-button", 4 | "body": ["{.md-button} ${0}"], 5 | "description": "MkDocs Button tag" 6 | }, 7 | "mkdocs button target blank tag": { 8 | "prefix": "mkdocs-link-target-blank-tag", 9 | "body": ["{target=_blank .md-button} ${0}"], 10 | "description": "MkDocs Button target blank tag" 11 | }, 12 | "mkdocs button form": { 13 | "prefix": "mkdocs-button-form", 14 | "body": ["[${1:link text}](${2:URL}){target=_blank .md-button} ${0}"], 15 | "description": "MkDocs Button form" 16 | }, 17 | "mkdocs link target blank tag": { 18 | "prefix": "mkdocs-link-target-blank-tag", 19 | "body": ["{target=_blank} ${0}"], 20 | "description": "MkDocs Link target blank tag" 21 | }, 22 | "mkdocs link form": { 23 | "prefix": "mkdocs-link-form", 24 | "body": ["[${1:link text}](${2:URL}){target=_blank .mkdocs-button} ${0}"], 25 | "description": "MkDocs Link form" 26 | }, 27 | "mkdocs youtube embed": { 28 | "prefix": "mkdocs-youtube-embed", 29 | "body": [ 30 | "

\n \n

${0}" 31 | ], 32 | "description": "MkDocs YouTube Embed" 33 | }, 34 | "mkdocs icon book": { 35 | "prefix": "mkdocs-icon-book", 36 | "body": [":fontawesome-solid-book-open:${0}"], 37 | "description": "MkDocs link target blank" 38 | }, 39 | "mkdocs icon github": { 40 | "prefix": "mkdocs-icon-github", 41 | "body": [":fontawesome-brands-github:${0}"], 42 | "description": "MkDocs link target blank" 43 | }, 44 | "mkdocs icon globe": { 45 | "prefix": "mkdocs-icon-globe", 46 | "body": [":globe_with_meridians:${0}"], 47 | "description": "MkDocs link target blank" 48 | }, 49 | "mkdocs image github base url": { 50 | "prefix": "mkdocs-image-github-base-url", 51 | "body": [ 52 | "https://raw.githubusercontent.com/practicalli/graphic-design/live/${0}" 53 | ], 54 | "description": "MkDocs image GitHub base URL" 55 | }, 56 | "mkdocs image form": { 57 | "prefix": "mkdocs-image-form", 58 | "body": [ 59 | "![${1:alternative text}](${2:url}#only-dark#{3}){align=left${4} loading=lazy style=\"height:150px;width:150px\"}${0}" 60 | ], 61 | "description": "MkDocs Image form" 62 | }, 63 | "mkdocs image GitHub form": { 64 | "prefix": "mkdocs-image-github-form", 65 | "body": [ 66 | "![${1:alternative text}](https://raw.githubusercontent.com/practicalli/graphic-design/live/${2:URL}#only-dark${3}){align=left${4} loading=lazy style=\"height:150px;width:150px\"}" 67 | ], 68 | "description": "MkDocs Image GitHub form" 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /snippets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "practicalli-snippets", 3 | "engines": { 4 | "vscode": "^1.11.0" 5 | }, 6 | "contributes": { 7 | "snippets": [ 8 | { 9 | "language": [ 10 | "markdown", 11 | "global", 12 | "all" 13 | ], 14 | "comment": "snippets accross several languages", 15 | "path": "./global.json" 16 | }, 17 | { 18 | "language": "markdown", 19 | "path": "./clojure.json" 20 | }, 21 | { 22 | "language": "markdown", 23 | "path": "./markdown.json" 24 | } 25 | ] 26 | } 27 | } 28 | --------------------------------------------------------------------------------