├── .gitignore ├── .neoconf.json ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── init.lua ├── lazy-lock.json ├── lazyvim.json ├── lua ├── config │ ├── autocmds.lua │ ├── highlight.lua │ ├── keymaps.lua │ ├── lazy.lua │ └── options.lua ├── extra │ └── ui.lua ├── plugin │ └── open-file.lua ├── plugins │ ├── ai.lua │ ├── align.lua │ ├── alpha.lua │ ├── animate.lua │ ├── auto-linenumber.lua │ ├── better-escape.lua │ ├── bookmark.lua │ ├── buffer.lua │ ├── case.lua │ ├── ccc.lua │ ├── cmp.lua │ ├── colorscheme.lua │ ├── command_center.lua │ ├── comment.lua │ ├── copilot.lua │ ├── core.lua │ ├── cursor-color.lua │ ├── debug.lua │ ├── dev.lua │ ├── diffview.lua │ ├── discord.lua │ ├── dropbar.lua │ ├── edgy.lua │ ├── explorer.lua │ ├── ft.lua │ ├── fzf.lua │ ├── git.lua │ ├── github.lua │ ├── heirline.lua │ ├── indent.lua │ ├── joy.lua │ ├── linting.lua │ ├── log.lua │ ├── lsp.lua │ ├── lualine.lua │ ├── markdown.lua │ ├── mini.lua │ ├── motion.lua │ ├── move.lua │ ├── multi-cursor.lua │ ├── notify.lua │ ├── npm.lua │ ├── pairs.lua │ ├── path.lua │ ├── perf.lua │ ├── project.lua │ ├── rayso.lua │ ├── repeat.lua │ ├── scrollview.lua │ ├── search_replace.lua │ ├── sentiment.lua │ ├── session.lua │ ├── sidebar.lua │ ├── snip.lua │ ├── statuscol.lua │ ├── surround.lua │ ├── swift.lua │ ├── switch.lua │ ├── tab.lua │ ├── telescope.lua │ ├── terminal.lua │ ├── treesitter.lua │ ├── treesj.lua │ ├── tsc.lua │ ├── typo.lua │ ├── undo.lua │ ├── utils.lua │ ├── vscode-like.lua │ ├── vscode.lua │ ├── wakatime.lua │ ├── wordmotion.lua │ ├── yank.lua │ └── zen.lua └── util │ ├── ft.lua │ ├── opts.lua │ ├── sorter.lua │ └── utils.lua ├── package.json ├── snippets ├── javascript.json └── package.json ├── spell ├── en.utf-8.add └── en.utf-8.add.spl ├── stylua.toml └── viml └── mapping.vim /.gitignore: -------------------------------------------------------------------------------- 1 | tt.* 2 | .tests 3 | doc/tags 4 | debug 5 | .repro 6 | foo.* 7 | *.log 8 | data 9 | -------------------------------------------------------------------------------- /.neoconf.json: -------------------------------------------------------------------------------- 1 | { 2 | "neodev": { 3 | "library": { 4 | "enabled": true, 5 | "plugins": true 6 | } 7 | }, 8 | "neoconf": { 9 | "plugins": { 10 | "lua_ls": { 11 | "enabled": true 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[json]": { 3 | "editor.formatOnSave": false, 4 | } 5 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 💤 LazyVim 2 | 3 | A starter template for [LazyVim](https://github.com/LazyVim/LazyVim). 4 | Refer to the [documentation](https://lazyvim.github.io/installation) to get started. 5 | 6 | ## Some Vscode Key Map (macOS) 7 | 8 | To use the mapping below, you must use the matching [kitty configuration](https://github.com/Innei/dotfiles/tree/master/tag-base/config/kitty). 9 | 10 | | Key Map | Modes | Markup | 11 | | ------------------- | ------- | ------------------- | 12 | | Command + C/V/X | (N/I/V) | Basic Coding | 13 | | Command + D | (N/I) | Select Current Word | 14 | | Command + P | (N/I) | Smart Open | 15 | | Command + Shift + F | (N/I) | Format Code | 16 | | Command + . | (N/I) | Code Action | 17 | | Command + A | (N/I) | Select All | 18 | | Command + B | (N/I) | Toggle File Tree | 19 | | Comment + / | (N/I/V) | Toggle Comment | 20 | | Comment + S | (N/I) | Save File | 21 | | Comment + Shift + S | (N/I) | Save All | 22 | | Comment + F | (N) | Find | 23 | | Comment + Shift + Z | (N/I) | Redo | 24 | | Comment + Z | (N/I) | Undo | 25 | 26 | ## Shots 27 | 28 | ![](https://cdn.jsdelivr.net/gh/Innei/fancy-2023@main/2023/0731144524.png) 29 | -------------------------------------------------------------------------------- /init.lua: -------------------------------------------------------------------------------- 1 | -- bootstrap lazy.nvim, LazyVim and your plugins 2 | require("config.lazy") 3 | -------------------------------------------------------------------------------- /lazy-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "ChatGPT.nvim": { "branch": "main", "commit": "2107f7037c775bf0b9bff9015eed68929fcf493e" }, 3 | "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, 4 | "LazyVim": { "branch": "main", "commit": "5646ee5191da244ff8ea57b9dba8a7e0d1dbdd42" }, 5 | "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, 6 | "SchemaStore.nvim": { "branch": "main", "commit": "f7cae6f1b38cb296f48ce1a9c5ed1a419d912a42" }, 7 | "SmoothCursor.nvim": { "branch": "main", "commit": "d60c1995b13e5d8c446c78a850fe8a587fa0ddd6" }, 8 | "accelerated-jk.nvim": { "branch": "main", "commit": "8fb5dad4ccc1811766cebf16b544038aeeb7806f" }, 9 | "advanced-git-search.nvim": { "branch": "main", "commit": "4cf50d2e5e3eb9b801689958be60c6dcf7cdeb84" }, 10 | "align.nvim": { "branch": "v2", "commit": "bc5d57df5f4c26f6abee6b6c8529308c2c126d2b" }, 11 | "alpha-nvim": { "branch": "main", "commit": "41283fb402713fc8b327e60907f74e46166f4cfd" }, 12 | "better-escape.nvim": { "branch": "master", "commit": "7e86edafb8c7e73699e0320f225464a298b96d12" }, 13 | "bigfile.nvim": { "branch": "main", "commit": "33eb067e3d7029ac77e081cfe7c45361887a311a" }, 14 | "bookmarks.nvim": { "branch": "main", "commit": "12bf1b32990c49192ff6e0622ede2177ac836f11" }, 15 | "bufferline.nvim": { "branch": "main", "commit": "f6f00d9ac1a51483ac78418f9e63126119a70709" }, 16 | "catppuccin": { "branch": "main", "commit": "a1439ad7c584efb3d0ce14ccb835967f030450fe" }, 17 | "ccc.nvim": { "branch": "main", "commit": "1283eef5494c092a047baa34ed3e667f3cb2715e" }, 18 | "cellular-automaton.nvim": { "branch": "main", "commit": "b7d056dab963b5d3f2c560d92937cb51db61cb5b" }, 19 | "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, 20 | "cmp-emoji": { "branch": "main", "commit": "e8398e2adf512a03bb4e1728ca017ffeac670a9f" }, 21 | "cmp-git": { "branch": "main", "commit": "b9603f18496bc3ca07e6bd474607081af709e750" }, 22 | "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, 23 | "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, 24 | "cmp-tailwind-colors": { "branch": "main", "commit": "8ad13923316e2b5ca00420c171268fc23f32c01d" }, 25 | "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, 26 | "command_center.nvim": { "branch": "main", "commit": "a5ee5220a8fcf495eecccd5980f3cc93e7020be0" }, 27 | "conform.nvim": { "branch": "master", "commit": "a6965ac128eba75537ec2bc5ddd5d5e357062bdc" }, 28 | "copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" }, 29 | "crates.nvim": { "branch": "main", "commit": "786d12a70c9b91fa2d0d102bb07df02be0db31a1" }, 30 | "cybu.nvim": { "branch": "main", "commit": "c0866ef6735a85f85d4cf77ed6d9bc92046b5a99" }, 31 | "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, 32 | "dressing.nvim": { "branch": "master", "commit": "18e5beb3845f085b6a33c24112b37988f3f93c06" }, 33 | "duck.nvim": { "branch": "main", "commit": "d8a6b08af440e5a0e2b3b357e2f78bb1883272cd" }, 34 | "export-to-vscode.nvim": { "branch": "main", "commit": "7746bb67d03f6a6891cdedc8c760c95a5714fe8c" }, 35 | "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, 36 | "flatten.nvim": { "branch": "main", "commit": "e420e531d2ab24aebcf7b3c9fca28e6c5c34964d" }, 37 | "gh-actions.nvim": { "branch": "main", "commit": "4e19683aa581d8670d99e74104610a673f11964d" }, 38 | "gitsigns.nvim": { "branch": "main", "commit": "7e38f07cab0e5387f9f41e92474db174a63a4725" }, 39 | "hlchunk.nvim": { "branch": "main", "commit": "882d1bc86d459fa8884398223c841fd09ea61b6b" }, 40 | "iswap.nvim": { "branch": "master", "commit": "ff4f4671909ad859366f96981a617acee3762641" }, 41 | "lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }, 42 | "licenses.nvim": { "branch": "master", "commit": "097c69f66505479b1f3fc3a051f4f9528abcb345" }, 43 | "lspsaga.nvim": { "branch": "main", "commit": "a4d442896a9ff1f83ee3db965d81b659ebc977d5" }, 44 | "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, 45 | "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, 46 | "mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" }, 47 | "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, 48 | "mini.ai": { "branch": "main", "commit": "ee9446a17c160aba6a04ff22097389c41872c878" }, 49 | "mini.bracketed": { "branch": "main", "commit": "65c7dfb51e832de9e279e5d5b0741e7af6755ab5" }, 50 | "mini.bufremove": { "branch": "main", "commit": "931a3bb514147d9e812767275c4beba6b779b1d3" }, 51 | "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" }, 52 | "move.nvim": { "branch": "main", "commit": "cccbd4ea9049ca5f99f025ffaddb7392359c7d6a" }, 53 | "neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, 54 | "neoconf.nvim": { "branch": "main", "commit": "19cd99ec623de29a9d0e649b606a13d1775058af" }, 55 | "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, 56 | "neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" }, 57 | "neogit": { "branch": "master", "commit": "0cae7abc30cb91d661f28257c331fcb5b5198e31" }, 58 | "noice.nvim": { "branch": "main", "commit": "0cbe3f88d038320bdbda3c4c5c95f43a13c3aa12" }, 59 | "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, 60 | "nvim-autopairs": { "branch": "master", "commit": "4f41e5940bc0443fdbe5f995e2a596847215cd2a" }, 61 | "nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" }, 62 | "nvim-lint": { "branch": "master", "commit": "f098232d70cebe90e27404928c9bc19ca7a5a7b5" }, 63 | "nvim-lsp-file-operations": { "branch": "master", "commit": "223aca86b737dc66e9c51ebcda8788a8d9cc6cf2" }, 64 | "nvim-lspconfig": { "branch": "master", "commit": "ed8b8a15acc441aec669f97d75f2c1f2ac8c8aa5" }, 65 | "nvim-luapad": { "branch": "master", "commit": "a5b3d6aa1fe5fe75e6124927392a9d3a60a0ecce" }, 66 | "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" }, 67 | "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, 68 | "nvim-numbertoggle": { "branch": "main", "commit": "c5827153f8a955886f1b38eaea6998c067d2992f" }, 69 | "nvim-scrollbar": { "branch": "main", "commit": "35f99d559041c7c0eff3a41f9093581ceea534e8" }, 70 | "nvim-spectre": { "branch": "master", "commit": "9653847cf2f225648967f6e9363643e327387579" }, 71 | "nvim-surround": { "branch": "main", "commit": "a4e30d33add8a9743b4f518b3a788b3c8e5def71" }, 72 | "nvim-treesitter": { "branch": "master", "commit": "bc808622986b0ba8eb64780b94d30cdfbd7c6a9f" }, 73 | "nvim-treesitter-context": { "branch": "master", "commit": "ba4289ad345ececd335a9cdd7b9616fd0bb6be92" }, 74 | "nvim-treesitter-textobjects": { "branch": "master", "commit": "23b820146956b3b681c19e10d3a8bc0cbd9a1d4c" }, 75 | "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, 76 | "nvim-ts-context-commentstring": { "branch": "main", "commit": "a6382f744f584bbf71d0a563af789af7190aabda" }, 77 | "nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" }, 78 | "octo.nvim": { "branch": "master", "commit": "5646539320cd62af6ff28f48ec92aeb724c68e18" }, 79 | "package-info.nvim": { "branch": "master", "commit": "45acce5b12ce824332d8000cc2c91805b6710446" }, 80 | "peepsight.nvim": { "branch": "main", "commit": "0cb7a4ebee31b44810212f81e8a2b4b230465bb5" }, 81 | "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" }, 82 | "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" }, 83 | "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, 84 | "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, 85 | "printer.nvim": { "branch": "master", "commit": "bdd5310075f9d4fe5d4270b7dc75188347fa9353" }, 86 | "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, 87 | "rayso.nvim": { "branch": "main", "commit": "debedaa7f0ed754ab16a292a45bbae8dcc3410c5" }, 88 | "rustaceanvim": { "branch": "master", "commit": "2a53e2fe911e971fa90341af27d2fe1447c0cbd2" }, 89 | "scrollEOF.nvim": { "branch": "master", "commit": "38fd5880021e90c15dc61fa325f714bd8077f0a6" }, 90 | "sentiment.nvim": { "branch": "main", "commit": "ecde8d877881bb78fdb90060c0991e76770dbdbc" }, 91 | "sibling-swap.nvim": { "branch": "main", "commit": "a9a0fbb734a8f767cd7cf4c99a78cb27aebe2f88" }, 92 | "smart-open.nvim": { "branch": "0.2.x", "commit": "a4a64ca3bbcb1a908507707361e251c825641240" }, 93 | "sqlite.lua": { "branch": "master", "commit": "40701b6151f8883980c1548647116de39b763540" }, 94 | "ssr.nvim": { "branch": "main", "commit": "bb323ba621ac647b4ac5638b47666e3ef3c279e1" }, 95 | "statuscol.nvim": { "branch": "main", "commit": "483b9a596dfd63d541db1aa51ee6ee9a1441c4cc" }, 96 | "swap-ternary.nvim": { "branch": "master", "commit": "0743ed2913ada154d4fa2bfb5e50c54ccf3a325d" }, 97 | "switch.vim": { "branch": "main", "commit": "68d269301181835788dcdcb6d5bca337fb954395" }, 98 | "telescope-all-recent.nvim": { "branch": "main", "commit": "b47ef2069e91f128d19c24ca231b204a553edfcf" }, 99 | "telescope-file-browser.nvim": { "branch": "master", "commit": "5ee5002373655fd684a4ad0d47a3de876ceacf9a" }, 100 | "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, 101 | "telescope-fzy-native.nvim": { "branch": "master", "commit": "282f069504515eec762ab6d6c89903377252bf5b" }, 102 | "telescope-import.nvim": { "branch": "main", "commit": "baa2d50be46c769a1cc942a9d5be049f314f4206" }, 103 | "telescope.nvim": { "branch": "master", "commit": "d00d9df48c00d8682c14c2b5da78bda7ef06b939" }, 104 | "text-case.nvim": { "branch": "main", "commit": "350cb1e180472da3f07fb2f591c408a4441f81f2" }, 105 | "todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" }, 106 | "toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" }, 107 | "tokyonight.nvim": { "branch": "main", "commit": "9bf9ec53d5e87b025e2404069b71e7ebdc3a13e5" }, 108 | "treesitter-current-functions": { "branch": "master", "commit": "179bbac0299d7c01c9de50130d7ca5c732372846" }, 109 | "treesj": { "branch": "main", "commit": "60e27280030f9cd8dfb6ceb335922c6ff76682cc" }, 110 | "trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" }, 111 | "tsc.nvim": { "branch": "main", "commit": "2576637ce46aed84240da33496eee6430b0f0248" }, 112 | "typo.nvim": { "branch": "main", "commit": "a162ec91d6cd1cf3db7a3fd05912302ba322ab99" }, 113 | "url-open": { "branch": "main", "commit": "9f8f4a56ac709f26aa17d8ef921b272bf2262a30" }, 114 | "vim-copy-filename": { "branch": "master", "commit": "86f39b8bbef3fe768c4cb96143e580197e50eda4" }, 115 | "vim-fetch": { "branch": "master", "commit": "bbb75c3172f766d1a62832df0ec7674c69a560ad" }, 116 | "vim-illuminate": { "branch": "master", "commit": "e522e0dd742a83506db0a72e1ced68c9c130f185" }, 117 | "vim-scriptease": { "branch": "master", "commit": "cdb5981d47ac98221a408ae2e7cae66524d9e872" }, 118 | "vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" }, 119 | "vim-visual-multi": { "branch": "master", "commit": "e2ff111f123da6cf97f95b96b10eb95854f953c9" }, 120 | "vim-wakatime": { "branch": "master", "commit": "5d11a253dd1ecabd4612a885175216032d814300" }, 121 | "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }, 122 | "wildfire.nvim": { "branch": "master", "commit": "1729faca1c6ae34520a6e531983a3737d3654ee1" }, 123 | "xbase": { "branch": "master", "commit": "30ed3e638434ee7a09d7dad46562fc6925300145" }, 124 | "yanky.nvim": { "branch": "main", "commit": "7c5cbf0122ff2dfbb6a92f14885894f65949cc8b" } 125 | } -------------------------------------------------------------------------------- /lazyvim.json: -------------------------------------------------------------------------------- 1 | { 2 | "extras": [ 3 | "lazyvim.plugins.extras.lang.rust", 4 | "lazyvim.plugins.extras.lang.yaml", 5 | "lazyvim.plugins.extras.lsp.none-ls" 6 | ], 7 | "news": { 8 | "NEWS.md": "3314" 9 | }, 10 | "version": 3 11 | } -------------------------------------------------------------------------------- /lua/config/autocmds.lua: -------------------------------------------------------------------------------- 1 | -- Autocmds are automatically loaded on the VeryLazy event 2 | -- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua 3 | -- Add any additional autocmds here 4 | -- 5 | 6 | vim.api.nvim_create_user_command("Qa", "qa", { bang = true }) 7 | vim.api.nvim_create_user_command("Q", "q", { bang = true }) 8 | vim.api.nvim_create_user_command("W", "w", { bang = true }) 9 | vim.api.nvim_create_user_command("Wq", "wq", { bang = true }) 10 | vim.api.nvim_create_user_command("Wqa", "wqa", { bang = true }) 11 | vim.api.nvim_create_user_command("WQ", "wq", { bang = true }) 12 | vim.api.nvim_create_user_command("Wq", "wq", { bang = true }) 13 | 14 | vim.fn.system(string.format("kitty @ set-tab-title %q", vim.fs.basename(vim.fn.getcwd()))) 15 | vim.api.nvim_create_autocmd({ "DirChanged" }, { 16 | pattern = "*", 17 | callback = function() 18 | vim.fn.system(string.format("kitty @ set-tab-title %q", vim.fs.basename(vim.fn.getcwd()))) 19 | end, 20 | }) 21 | 22 | vim.api.nvim_create_user_command("Finder", function() 23 | local path = vim.api.nvim_buf_get_name(0) 24 | os.execute("open -R " .. path) 25 | end, {}) 26 | 27 | vim.cmd([[ 28 | if !has('gui_running') 29 | augroup FastEscape 30 | autocmd! 31 | au InsertEnter * set timeoutlen=0 32 | au InsertLeave * set timeoutlen=300 33 | augroup END 34 | endif 35 | ]]) 36 | -------------------------------------------------------------------------------- /lua/config/highlight.lua: -------------------------------------------------------------------------------- 1 | vim.api.nvim_set_hl(0, "ISelection", { 2 | fg = "#111111", 3 | bg = "#38bdf8", 4 | }) 5 | 6 | return {} 7 | -------------------------------------------------------------------------------- /lua/config/keymaps.lua: -------------------------------------------------------------------------------- 1 | local mode_all = { "n", "v", "i" } 2 | local mode_nv = { "n", "v" } 3 | local mode_v = { "v" } 4 | local mode_i = { "i" } 5 | local mode_ni = { "n", "i" } 6 | 7 | local nmappings = { 8 | -- page scroll 9 | -- { 10 | -- 11 | -- from = "", 12 | -- to = "", 13 | -- mode = mode_nv, 14 | -- }, 15 | -- { from = "Q", to = ":bd" }, 16 | { 17 | from = ";", 18 | to = ":", 19 | mode = mode_nv, 20 | }, 21 | { from = "y", to = '"+y' }, 22 | { from = "y", to = '"+ygv', mode = mode_v }, 23 | { 24 | from = "`", 25 | to = "~", 26 | mode = mode_nv, 27 | }, 28 | 29 | { 30 | from = "", 31 | to = "", 32 | mode = mode_nv, 33 | }, 34 | { 35 | from = "-", 36 | to = "", 37 | }, 38 | { 39 | from = "=", 40 | to = "", 41 | }, 42 | { 43 | from = "", 44 | to = "", 45 | mode = mode_i, 46 | }, 47 | -- { from = "jj", 48 | -- to = "", 49 | -- mode = mode_i, 50 | -- }, 51 | -- { 52 | -- from = "jk", 53 | -- to = "", 54 | -- mode = mode_i, 55 | -- }, 56 | { 57 | from = "X", 58 | to = "r", 59 | }, 60 | { 61 | from = "r", 62 | to = "", 63 | }, 64 | -- 65 | 66 | { 67 | from = "cw", 68 | to = '"_ciw', 69 | }, 70 | { 71 | from = "!", 72 | to = "%", 73 | mode = mode_nv, 74 | }, 75 | { 76 | from = "0", 77 | to = "^", 78 | }, 79 | { 80 | from = ")", 81 | to = "g_", 82 | }, 83 | { 84 | from = "p", 85 | to = "P", 86 | mode = mode_v, 87 | }, 88 | { 89 | from = "x", 90 | to = '"_x', 91 | }, 92 | { 93 | from = "x", 94 | to = '"_x', 95 | mode = mode_v, 96 | }, 97 | { 98 | from = "c", 99 | to = '"_c', 100 | }, 101 | { 102 | from = "c", 103 | to = '"_c', 104 | mode = mode_v, 105 | }, 106 | 107 | -- undo 108 | { 109 | from = "", 110 | to = "ua", 111 | mode = mode_i, 112 | }, 113 | { 114 | from = " ", 115 | to = " u", 116 | mode = mode_i, 117 | }, 118 | { 119 | from = "(", 120 | to = "(u", 121 | mode = mode_i, 122 | }, 123 | { 124 | from = ")", 125 | to = ")u", 126 | mode = mode_i, 127 | }, 128 | { 129 | from = "<", 130 | to = "<u", 131 | mode = mode_i, 132 | }, 133 | { 134 | from = ">", 135 | to = ">u", 136 | mode = mode_i, 137 | }, 138 | { 139 | from = "/", 140 | to = "/u", 141 | mode = mode_i, 142 | }, 143 | { 144 | from = "=", 145 | to = "=u", 146 | mode = mode_i, 147 | }, 148 | -- 149 | -- { from = "rc", to = ":e ~/.config/nvim/init.lua" }, 150 | 151 | -- map , . 152 | { 153 | from = ",", 154 | to = "", 155 | }, 156 | { 157 | from = ".", 158 | to = "", 159 | }, 160 | { 161 | from = ",", 162 | to = "^", 163 | mode = mode_v, 164 | }, 165 | { 166 | from = ".", 167 | to = "g_", 168 | mode = mode_v, 169 | }, 170 | { 171 | from = "'", 172 | to = ".", 173 | mode = mode_nv, 174 | }, 175 | { 176 | from = "J", 177 | to = "", 178 | }, 179 | 180 | { 181 | from = "tc", 182 | to = function() 183 | vim.cmd([[tabclose]]) 184 | end, 185 | desc = "Tab close", 186 | }, 187 | 188 | -- vscode like mapping 189 | { 190 | from = "", 191 | to = "Vk", 192 | }, 193 | { 194 | from = "", 195 | to = "Vj", 196 | }, 197 | { 198 | from = "", 199 | to = "vh", 200 | }, 201 | { 202 | from = "", 203 | to = "vl", 204 | }, 205 | { 206 | from = "", 207 | to = "k", 208 | mode = mode_v, 209 | }, 210 | { 211 | from = "", 212 | to = "j", 213 | mode = mode_v, 214 | }, 215 | { 216 | from = "", 217 | to = "h", 218 | }, 219 | { 220 | from = "", 221 | to = "l", 222 | }, 223 | -- cursor move panel 224 | { 225 | from = "", 226 | to = "k", 227 | }, 228 | { 229 | from = "", 230 | to = "j", 231 | }, 232 | { 233 | from = "", 234 | to = "h", 235 | }, 236 | { 237 | from = "", 238 | to = "l", 239 | }, 240 | } 241 | 242 | -- vscode like mapping based on kitty keymap mapping 243 | if vim.g.vscode == nil then 244 | nmappings = vim.list_extend(nmappings, { 245 | { 246 | from = "", 247 | to = '"+di', 248 | mode = mode_v, 249 | }, 250 | { 251 | from = "", 252 | to = "viw", 253 | }, 254 | { 255 | from = "", 256 | to = '"+dd', 257 | }, 258 | { 259 | 260 | from = "", 261 | to = function() 262 | vim.cmd([[w]]) 263 | vim.cmd([[stopinsert]]) 264 | end, 265 | mode = mode_ni, 266 | }, 267 | { 268 | from = "", 269 | to = function() 270 | vim.cmd([[new]]) 271 | end, 272 | mode = mode_ni, 273 | }, 274 | { 275 | from = "", 276 | to = '"+ygv', 277 | mode = mode_v, 278 | }, 279 | { 280 | from = "", 281 | to = function() 282 | vim.cmd([[undo]]) 283 | end, 284 | mode = mode_ni, 285 | }, 286 | 287 | { 288 | from = "", 289 | to = function() 290 | vim.cmd([[redo]]) 291 | end, 292 | mode = mode_ni, 293 | }, 294 | { 295 | from = "", 296 | to = "", 297 | mode = mode_i, 298 | }, 299 | { from = "", to = "ggG", mode = mode_ni }, 300 | { 301 | from = "", 302 | to = "bi", 303 | mode = mode_ni, 304 | }, 305 | { 306 | from = "", 307 | to = "ea", 308 | mode = mode_ni, 309 | }, 310 | { 311 | from = "", 312 | to = ":m .-2==gi", 313 | mode = mode_ni, 314 | }, 315 | { 316 | from = "", 317 | to = ":m .+1==gi", 318 | mode = mode_ni, 319 | }, 320 | 321 | { 322 | from = "", 323 | to = vim.lsp.buf.code_action, 324 | mode = mode_nv, 325 | }, 326 | -- { 327 | -- from = "", 328 | -- to = function() 329 | -- require("spectre").open_file_search({ select_word = false }) 330 | -- end, 331 | -- }, 332 | { 333 | from = "", 334 | to = "", 335 | mode = mode_i, 336 | }, 337 | { 338 | from = "", 339 | to = function() 340 | vim.cmd("stopinsert") 341 | vim.lsp.buf.code_action({ 342 | context = { 343 | only = { 344 | "source", 345 | }, 346 | diagnostics = {}, 347 | }, 348 | }) 349 | end, 350 | mode = mode_i, 351 | }, 352 | -- { 353 | -- from = "", 354 | -- to = function() 355 | -- require("telescope.builtin").live_grep() 356 | -- end, 357 | -- mode = mode_ni, 358 | -- }, 359 | 360 | { 361 | from = "", 362 | to = function() 363 | local ok, api = pcall(require, "Comment.api") 364 | if not ok then 365 | return 366 | end 367 | 368 | local esc = vim.api.nvim_replace_termcodes("", true, false, true) 369 | 370 | vim.api.nvim_feedkeys(esc, "nx", false) 371 | api.toggle.linewise(vim.fn.visualmode()) 372 | end, 373 | mode = mode_v, 374 | }, 375 | 376 | { 377 | from = "", 378 | to = function() 379 | local ok, api = pcall(require, "Comment.api") 380 | if not ok then 381 | return 382 | end 383 | api.toggle.linewise.current() 384 | end, 385 | mode = mode_ni, 386 | }, 387 | { 388 | from = "", 389 | to = function() 390 | -- format code 391 | vim.lsp.buf.format() 392 | end, 393 | mode = mode_ni, 394 | }, 395 | 396 | { 397 | from = "", 398 | to = function() 399 | -- format code 400 | vim.lsp.buf.format() 401 | end, 402 | mode = mode_ni, 403 | }, 404 | { 405 | from = "", 406 | to = function() 407 | vim.cmd([[wa]]) 408 | end, 409 | mode = mode_ni, 410 | }, 411 | { 412 | from = "", 413 | to = "cc", 414 | mode = mode_i, 415 | }, 416 | }) 417 | end 418 | 419 | if vim.g.neovide then 420 | vim.keymap.set("n", "", '"+P') -- Paste normal mode 421 | vim.keymap.set("v", "", '"+P') -- Paste visual mode 422 | vim.keymap.set("c", "", "+") -- Paste command mode 423 | vim.keymap.set("i", "", 'l"+Pli') -- Paste insert mode 424 | 425 | -- Allow clipboard copy paste in neovim 426 | vim.api.nvim_set_keymap("", "", "+p", { noremap = true, silent = true }) 427 | vim.api.nvim_set_keymap("!", "", "+", { noremap = true, silent = true }) 428 | vim.api.nvim_set_keymap("t", "", "+", { noremap = true, silent = true }) 429 | vim.api.nvim_set_keymap("v", "", "+", { noremap = true, silent = true }) 430 | nmappings = vim.list_extend(nmappings, { 431 | { 432 | -- @see https://github.com/neovide/neovide/issues/1237 433 | from = "", 434 | to = function() 435 | -- format code 436 | vim.lsp.buf.format() 437 | end, 438 | mode = mode_ni, 439 | }, 440 | }) 441 | end 442 | 443 | for _, mapping in ipairs(nmappings) do 444 | vim.keymap.set( 445 | mapping.mode or "n", 446 | mapping.from, 447 | mapping.to, 448 | { noremap = mapping.noremap or true, silent = true, desc = mapping.desc } 449 | ) 450 | end 451 | 452 | -- delete lazynvim built-in keymaps 453 | vim.keymap.del({ "n", "x" }, "j") 454 | vim.keymap.del({ "n", "x" }, "k") 455 | 456 | vim.api.nvim_set_keymap("n", "j", "(accelerated_jk_gj)", {}) 457 | vim.api.nvim_set_keymap("n", "k", "(accelerated_jk_gk)", {}) 458 | -------------------------------------------------------------------------------- /lua/config/lazy.lua: -------------------------------------------------------------------------------- 1 | local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" 2 | if not vim.loop.fs_stat(lazypath) then 3 | -- bootstrap lazy.nvim 4 | -- stylua: ignore 5 | vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", 6 | lazypath }) 7 | end 8 | vim.opt.rtp:prepend(vim.env.LAZY or lazypath) 9 | 10 | require("lazy").setup({ 11 | spec = { 12 | -- add LazyVim and import its plugins 13 | { "LazyVim/LazyVim", import = "lazyvim.plugins" }, 14 | { import = "lazyvim.plugins.extras.lang.json" }, 15 | { import = "lazyvim.plugins.extras.linting.eslint" }, 16 | { import = "lazyvim.plugins.extras.lang.tailwind" }, 17 | { import = "lazyvim.plugins.extras.lang.typescript" }, 18 | 19 | -- { import = "lazyvim.plugins.extras.lsp.none-ls" }, 20 | { import = "lazyvim.plugins.extras.ui.alpha" }, 21 | 22 | { import = "lazyvim.plugins.extras.formatting.prettier" }, 23 | 24 | { import = "lazyvim.plugins.extras.vscode" }, 25 | { import = "lazyvim.plugins.extras.editor.navic" }, 26 | 27 | { import = "plugins" }, 28 | { import = "config.highlight" }, 29 | { import = "extra.ui" }, 30 | }, 31 | defaults = { 32 | -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. 33 | -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. 34 | lazy = false, 35 | -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, 36 | -- have outdated releases, which may break your Neovim install. 37 | version = false, -- always use the latest git commit 38 | -- version = "*", -- try installing the latest stable version for plugins that support semver 39 | }, 40 | install = { colorscheme = { "catppuccin" } }, 41 | checker = { enabled = true }, -- automatically check for plugin updates 42 | performance = { 43 | rtp = { 44 | -- disable some rtp plugins 45 | disabled_plugins = { 46 | "gzip", 47 | "matchit", 48 | "matchparen", 49 | "netrwPlugin", 50 | "tarPlugin", 51 | "tohtml", 52 | "tutor", 53 | "zipPlugin", 54 | }, 55 | }, 56 | }, 57 | }) 58 | -------------------------------------------------------------------------------- /lua/config/options.lua: -------------------------------------------------------------------------------- 1 | -- Options are automatically loaded before lazy.nvim startup 2 | -- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua 3 | -- Add any additional options here 4 | 5 | local opt = vim.opt 6 | 7 | vim.api.nvim_set_hl(0, "ICursorColor", { 8 | bg = "#7dd3fc", 9 | fg = "#000000", 10 | }) 11 | 12 | if vim.g.neovide ~= nil then 13 | opt.clipboard = "unnamedplus" 14 | end 15 | 16 | opt.signcolumn = "yes:1" 17 | opt.wrap = true 18 | opt.clipboard = "" 19 | -- opt.laststatus = 0 20 | opt.spelllang = "en,cjk" 21 | -- vim.opt.spell = true 22 | opt.spelloptions = "camel" 23 | opt.scrolloff = 10 24 | opt.indentexpr = "" 25 | opt.foldmethod = "indent" 26 | opt.foldlevel = 99 27 | opt.foldenable = true 28 | opt.foldlevelstart = 99 29 | opt.guicursor = 30 | "n:block,i-ci-ve-v-c:ver25,r-cr:hor20,o:hor50,a:blinkwait700-blinkoff400-blinkon250-ICursorColor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175" 31 | 32 | -- Undercurl 33 | vim.cmd([[let &t_Cs = "\e[4:3m"]]) 34 | vim.cmd([[let &t_Ce = "\e[4:0m"]]) 35 | 36 | if vim.g.neovide then 37 | vim.g.neovide_padding_right = 5 38 | vim.g.neovide_padding_left = 5 39 | vim.o.guifont = "ComicShannsMono Nerd Font Mono:h14" 40 | -- vim.g.neovide_transparency = 0.0 41 | -- vim.g.transparency = 0.8 42 | -- vim.g.neovide_background_color = "#0f1117" .. alpha() 43 | vim.g.neovide_cursor_animate_in_insert_mode = true 44 | vim.g.neovide_input_use_logo = 1 45 | vim.g.neovide_floating_blur_amount_x = 12.0 46 | vim.g.neovide_floating_blur_amount_y = 12.0 47 | end 48 | -------------------------------------------------------------------------------- /lua/extra/ui.lua: -------------------------------------------------------------------------------- 1 | vim.opt.pumblend = 0 2 | vim.opt.winblend = 0 3 | 4 | local float = require("util.opts").float 5 | 6 | return { 7 | -- editor 8 | { 9 | "gitsigns.nvim", 10 | opts = { 11 | preview_config = { 12 | border = float.border, 13 | }, 14 | }, 15 | }, 16 | { 17 | "folke/which-key.nvim", 18 | opts = { 19 | window = { 20 | border = float.border, 21 | winblend = float.winblend, 22 | }, 23 | icons = { 24 | breadcrumb = "»", -- symbol used in the command line area that shows your active key combo 25 | separator = "󰿟", -- symbol used between a key and it's label 26 | group = "+", -- symbol prepended to a group 27 | }, 28 | }, 29 | }, 30 | { 31 | "telescope.nvim", 32 | opts = { 33 | defaults = { 34 | winblend = float.winblend, 35 | }, 36 | }, 37 | }, 38 | 39 | -- coding 40 | { 41 | "nvim-cmp", 42 | opts = function(_, opts) 43 | local cmp = require("cmp") 44 | local win = require("util.opts").win 45 | 46 | local win_bordered = cmp.config.window.bordered({ 47 | border = float.border, 48 | winhighlight = win.winhighlight, 49 | }) 50 | 51 | opts.window = { 52 | completion = win_bordered, 53 | documentation = win_bordered, 54 | } 55 | end, 56 | }, 57 | 58 | -- lsp 59 | { 60 | "lspsaga.nvim", 61 | opts = { 62 | ui = { 63 | border = float.border, 64 | winblend = float.winblend, 65 | }, 66 | }, 67 | }, 68 | { 69 | "nvim-lspconfig", 70 | opts = { 71 | diagnostics = { 72 | float = { 73 | border = float.border, 74 | }, 75 | }, 76 | }, 77 | }, 78 | { 79 | "nvim-lspconfig", 80 | opts = function() 81 | require("lspconfig.ui.windows").default_options = { 82 | border = float.border, 83 | } 84 | end, 85 | }, 86 | { 87 | "mason.nvim", 88 | opts = { 89 | ui = { 90 | border = float.border, 91 | }, 92 | }, 93 | }, 94 | { 95 | "none-ls.nvim", 96 | opts = { 97 | border = float.border, 98 | }, 99 | }, 100 | 101 | -- ui 102 | { 103 | "noice.nvim", 104 | opts = { 105 | -- https://github.com/folke/noice.nvim/blob/main/lua/noice/config/views.lua 106 | views = { 107 | mini = { 108 | win_options = { 109 | winblend = float.winblend, 110 | }, 111 | }, 112 | }, 113 | presets = { 114 | lsp_doc_border = true, 115 | }, 116 | }, 117 | }, 118 | { 119 | "dressing.nvim", 120 | opts = { 121 | input = { 122 | win_options = { 123 | winblend = float.winblend, 124 | }, 125 | }, 126 | select = { 127 | nui = { 128 | win_options = { 129 | winblend = float.winblend, 130 | }, 131 | }, 132 | }, 133 | builtin = { 134 | win_options = { 135 | winblend = float.winblend, 136 | }, 137 | }, 138 | }, 139 | }, 140 | } 141 | -------------------------------------------------------------------------------- /lua/plugin/open-file.lua: -------------------------------------------------------------------------------- 1 | local M = {} 2 | 3 | local _temp_buf = vim.api.nvim_create_buf(false, true) 4 | --- @type nil | integer 5 | local _current_opened_win = nil 6 | 7 | vim.api.nvim_buf_set_keymap( 8 | _temp_buf, 9 | "i", 10 | "", 11 | ':lua require("plugin.open-file").jump()', 12 | { noremap = true, silent = true } 13 | ) 14 | 15 | local function create_win(buf) 16 | local editor_width = vim.api.nvim_get_option("columns") 17 | local editor_height = vim.api.nvim_get_option("lines") 18 | 19 | local win_width = math.floor(editor_width / 2) -- 宽度是当前窗口宽度的一半 20 | local win_height = 10 -- 高度是10 21 | 22 | local row = math.floor((editor_height - win_height) / 2) -- 垂直居中 23 | local col = math.floor((editor_width - win_width) / 2) -- 水平居中 24 | 25 | -- set buffer ft 26 | vim.api.nvim_buf_set_option(buf, "filetype", "") 27 | -- hide line number 28 | vim.api.nvim_buf_set_option(buf, "buflisted", false) 29 | vim.api.nvim_buf_set_option(buf, "bufhidden", "wipe") 30 | vim.api.nvim_buf_set_option(buf, "swapfile", false) 31 | vim.api.nvim_buf_set_option(buf, "buftype", "nofile") 32 | 33 | local win = vim.api.nvim_open_win(buf, true, { 34 | relative = "editor", 35 | row = row, -- 置顶 36 | col = col, -- 从最左侧开始 37 | width = 80, 38 | height = 1, 39 | border = "rounded", 40 | zindex = 250, 41 | focusable = true, 42 | }) 43 | 44 | -- hide status columns 45 | vim.api.nvim_win_set_option(win, "number", false) 46 | 47 | return win 48 | end 49 | 50 | function M.open_file() 51 | vim.api.nvim_buf_set_lines(_temp_buf, 0, -1, false, {}) -- 清空 buffer 的内容 52 | _current_opened_win = create_win(_temp_buf) 53 | vim.api.nvim_feedkeys("i", "n", false) 54 | end 55 | 56 | function M.jump() 57 | if not _current_opened_win then 58 | return 59 | end 60 | 61 | vim.api.nvim_win_close(_current_opened_win, false) 62 | local rel_path = vim.api.nvim_buf_get_lines(_temp_buf, 0, -1, false)[1] 63 | local rel_path_without_pos = string.gsub(rel_path, "[#:]%d+[#:]?%d*$", "") 64 | local abs_path = vim.fn.getcwd() .. "/" .. rel_path_without_pos 65 | local is_invalid_path = vim.fn.filereadable(abs_path) == 0 66 | if is_invalid_path then 67 | return vim.notify("路径不存在,请重试", vim.log.levels.ERROR) 68 | end 69 | vim.api.nvim_command("edit " .. abs_path) 70 | 71 | local target_line, target_col = rel_path:match("[#:](%d+)[#:](%d+)$") 72 | if not target_line then 73 | target_line = rel_path:match("[#:](%d+)$") 74 | end 75 | 76 | local jumped_win = vim.api.nvim_get_current_win() 77 | vim.api.nvim_win_set_cursor(jumped_win, { tonumber(target_line), tonumber(target_col or 0) }) 78 | vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("", true, true, true), "n", false) 79 | vim.cmd([[normal! zz]]) 80 | end 81 | 82 | return M 83 | -------------------------------------------------------------------------------- /lua/plugins/ai.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 3 | { 4 | "jackMort/ChatGPT.nvim", 5 | event = "VeryLazy", 6 | commit = "2107f7037c775bf0b9bff9015eed68929fcf493e", 7 | config = function() 8 | local home = vim.fn.expand("$HOME") 9 | require("chatgpt").setup({ 10 | api_key_cmd = "cat " .. home .. "/openai.key", 11 | }) 12 | end, 13 | dependencies = { 14 | "MunifTanjim/nui.nvim", 15 | "nvim-lua/plenary.nvim", 16 | "nvim-telescope/telescope.nvim", 17 | }, 18 | }, 19 | } 20 | -------------------------------------------------------------------------------- /lua/plugins/align.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "Vonr/align.nvim", 3 | event = "BufRead", 4 | branch = "v2", 5 | config = function() 6 | local NS = { noremap = true, silent = true } 7 | 8 | -- Aligns to 1 character 9 | vim.keymap.set("x", "aa", function() 10 | require("align").align_to_char({ 11 | length = 1, 12 | }) 13 | end, NS) 14 | 15 | -- Aligns to 2 characters with previews 16 | vim.keymap.set("x", "ad", function() 17 | require("align").align_to_char({ 18 | preview = true, 19 | length = 2, 20 | }) 21 | end, NS) 22 | 23 | -- Aligns to a string with previews 24 | vim.keymap.set("x", "aw", function() 25 | require("align").align_to_string({ 26 | preview = true, 27 | regex = false, 28 | }) 29 | end, NS) 30 | 31 | -- Aligns to a Vim regex with previews 32 | vim.keymap.set("x", "ar", function() 33 | require("align").align_to_string({ 34 | preview = true, 35 | regex = true, 36 | }) 37 | end, NS) 38 | 39 | -- Example gawip to align a paragraph to a string with previews 40 | vim.keymap.set("n", "gaw", function() 41 | local a = require("align") 42 | a.operator(a.align_to_string, { 43 | regex = false, 44 | preview = true, 45 | }) 46 | end, NS) 47 | 48 | -- Example gaaip to align a paragraph to 1 character 49 | vim.keymap.set("n", "gaa", function() 50 | local a = require("align") 51 | a.operator(a.align_to_char) 52 | end, NS) 53 | end, 54 | } 55 | -------------------------------------------------------------------------------- /lua/plugins/alpha.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "goolord/alpha-nvim", 3 | enabled = true, 4 | opts = function(_, opts) 5 | opts.section.header.val = { 6 | [[]], 7 | [[ ▀████▀▄▄ ▄█ ]], 8 | [[ █▀ ▀▀▄▄▄▄▄ ▄▄▀▀█ ]], 9 | [[ ▄ █ ▀▀▀▀▄ ▄▀ ]], 10 | [[ ▄▀ ▀▄ ▀▄ ▀▄▀ ]], 11 | [[ ▄▀ █ █▀ ▄█▀▄ ▄█ ]], 12 | [[ ▀▄ ▀▄ █ ▀██▀ ██▄█ ]], 13 | [[ ▀▄ ▄▀ █ ▄██▄ ▄ ▄ ▀▀ █ ]], 14 | [[ █ ▄▀ █ ▀██▀ ▀▀ ▀▀ ▄▀ ]], 15 | [[ █ █ █ ▄▄ ▄▀ ]], 16 | } 17 | return opts 18 | end, 19 | } 20 | -------------------------------------------------------------------------------- /lua/plugins/animate.lua: -------------------------------------------------------------------------------- 1 | return { 2 | -- { 3 | -- "echasnovski/mini.animate", 4 | -- version = "*", 5 | -- event = "VeryLazy", 6 | -- config = function() 7 | -- require("mini.animate").setup({ 8 | -- scroll = { 9 | -- enable = true, 10 | -- timing = function(_, n) 11 | -- return 150 / n 12 | -- end, 13 | -- }, 14 | -- cursor = { 15 | -- enable = false, 16 | -- }, 17 | -- }) 18 | -- end, 19 | -- }, 20 | { 21 | "gen740/SmoothCursor.nvim", 22 | enabled = true, 23 | config = function() 24 | require("smoothcursor").setup({ 25 | cursor = "ω", 26 | 27 | priority = 1, -- set marker priority 28 | fancy = { 29 | enable = true, 30 | head = { cursor = "ಥ", texthl = "SmoothCursor", linehl = nil }, 31 | body = { 32 | -- (•̀ᴗ• ) ̑̑ 33 | { cursor = "♡", texthl = "SmoothCursorRed" }, 34 | { cursor = "•̀", texthl = "SmoothCursorOrange" }, 35 | { cursor = "ᴗ", texthl = "SmoothCursorYellow" }, 36 | { cursor = "•", texthl = "SmoothCursorGreen" }, 37 | { cursor = "ɷ", texthl = "SmoothCursorAqua" }, 38 | { cursor = "ᴥ", texthl = "SmoothCursorBlue" }, 39 | { cursor = "ω", texthl = "SmoothCursorPurple" }, 40 | }, 41 | tail = { cursor = nil, texthl = "SmoothCursor" }, 42 | }, 43 | disable_float_win = true, 44 | 45 | disabled_filetypes = require("util.ft").exclude_ft, -- this option will be skipped if enabled_filetypes is set. example: { "TelescopePrompt", "NvimTree" } 46 | }) 47 | end, 48 | event = "BufRead", 49 | }, 50 | } 51 | -------------------------------------------------------------------------------- /lua/plugins/auto-linenumber.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "sitiom/nvim-numbertoggle", 3 | event = "VeryLazy", 4 | enabled = true, 5 | } 6 | -------------------------------------------------------------------------------- /lua/plugins/better-escape.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 3 | "max397574/better-escape.nvim", 4 | -- enabled = false, 5 | vscode = true, 6 | config = function() 7 | require("better_escape").setup({ 8 | mapping = { "jk", "jj", "kk" }, -- a table with mappings to use 9 | timeout = vim.o.timeoutlen, -- the time in which the keys must be hit in ms. Use option timeoutlen by default 10 | clear_empty_lines = false, -- clear line after escaping if there is only whitespace 11 | keys = "", 12 | }) 13 | end, 14 | } 15 | -------------------------------------------------------------------------------- /lua/plugins/bookmark.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "tomasky/bookmarks.nvim", 4 | event = "VeryLazy", 5 | dependencies = { 6 | "nvim-telescope/telescope.nvim", 7 | }, 8 | config = function() 9 | require("bookmarks").setup({ 10 | save_file = vim.fn.expand("$HOME/.local/share/nvim/bookmarks"), -- bookmarks save file path 11 | keywords = { 12 | ["@t"] = "☑️ ", -- mark annotation startswith @t ,signs this icon as `Todo` 13 | ["@w"] = "⚠️ ", -- mark annotation startswith @w ,signs this icon as `Warn` 14 | ["@f"] = "⛏ ", -- mark annotation startswith @f ,signs this icon as `Fix` 15 | ["@n"] = " ", -- mark annotation startswith @n ,signs this icon as `Note` 16 | }, 17 | on_attach = function(bufnr) 18 | local bm = require("bookmarks") 19 | local map = vim.keymap.set 20 | map("n", "mm", bm.bookmark_toggle) -- add or remove bookmark at current line 21 | map("n", "mi", bm.bookmark_ann) -- add or edit mark annotation at current line 22 | map("n", "mc", bm.bookmark_clean) -- clean all marks in local buffer 23 | map("n", "mn", bm.bookmark_next) -- jump to next mark in local buffer 24 | map("n", "mp", bm.bookmark_prev) -- jump to previous mark in local buffer 25 | map("n", "ml", bm.bookmark_list) -- show marked file list in quickfix window 26 | end, 27 | }) 28 | 29 | require("telescope").load_extension("bookmarks") 30 | end, 31 | }, 32 | } 33 | -------------------------------------------------------------------------------- /lua/plugins/buffer.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "akinsho/bufferline.nvim", 4 | event = "VeryLazy", 5 | enabled = true, 6 | keys = { 7 | { 8 | "bq", 9 | function() 10 | local buffers = vim.fn.getbufinfo({ buflisted = true }) 11 | local changed_buffers = vim.tbl_filter(function(buf) 12 | return buf.changed == 1 13 | end, buffers) 14 | if #changed_buffers == 0 then 15 | vim.cmd([[BufferLineCloseOthers]]) 16 | else 17 | vim.notify("There are unsaved buffers", vim.log.levels.WARN) 18 | end 19 | end, 20 | desc = "Delete other buffers", 21 | }, 22 | { 23 | "Q", 24 | function() 25 | require("mini.bufremove").delete(nil, false) 26 | end, 27 | desc = "Delete buffer", 28 | }, 29 | { 30 | "", 31 | function() 32 | require("mini.bufremove").delete(nil, false) 33 | end, 34 | desc = "Delete buffer", 35 | }, 36 | { 37 | "", 38 | function() 39 | require("mini.bufremove").delete(nil, false) 40 | end, 41 | desc = "Delete buffer", 42 | }, 43 | 44 | { 45 | "bs", 46 | function() 47 | vim.cmd([[BufferLinePick]]) 48 | end, 49 | 50 | desc = "Pick buffer", 51 | }, 52 | 53 | { 54 | "bS", 55 | function() 56 | vim.cmd([[BufferLinePickClose]]) 57 | end, 58 | desc = "Pick buffer and close", 59 | }, 60 | }, 61 | 62 | config = function() 63 | vim.cmd([[ 64 | nnoremap BufferLineGoToBuffer 1 65 | nnoremap BufferLineGoToBuffer 2 66 | nnoremap BufferLineGoToBuffer 3 67 | nnoremap BufferLineGoToBuffer 4 68 | nnoremap BufferLineGoToBuffer 5 69 | nnoremap BufferLineGoToBuffer 6 70 | nnoremap BufferLineGoToBuffer 7 71 | nnoremap BufferLineGoToBuffer 8 72 | nnoremap BufferLineGoToBuffer 9 73 | ]]) 74 | 75 | vim.o.mousemoveevent = true 76 | require("bufferline").setup({ 77 | 78 | options = { 79 | 80 | offsets = { 81 | { 82 | filetype = "neo-tree", 83 | text = "Neo-tree", 84 | highlight = "Directory", 85 | text_align = "left", 86 | }, 87 | }, 88 | always_show_bufferline = true, 89 | indicator = { 90 | icon = "▎", -- this should be omitted if indicator style is not 'icon' 91 | style = "underline", 92 | }, 93 | diagnostics_indicator = function(count, level, diagnostics_dict, context) 94 | -- only show warning and error 95 | local s = " " 96 | for e, n in pairs(diagnostics_dict) do 97 | local sym = e == "error" and " " or (e == "warning" and " " or "") 98 | s = s .. sym .. n 99 | end 100 | return s 101 | end, 102 | hover = { 103 | 104 | delay = 36, 105 | reveal = { "close" }, 106 | enabled = true, 107 | }, 108 | style_preset = "slant", 109 | }, 110 | }) 111 | end, 112 | }, 113 | { 114 | "romgrk/barbar.nvim", 115 | enabled = false, 116 | event = "VeryLazy", 117 | keys = { 118 | { "bq", "BufferCloseAllButCurrent", desc = "Delete other buffers" }, 119 | { 120 | "Q", 121 | "BufferClose", 122 | desc = "Delete buffer", 123 | }, 124 | { 125 | "", 126 | "BufferClose", 127 | 128 | desc = "Delete buffer", 129 | }, 130 | }, 131 | config = function() 132 | local map = vim.api.nvim_set_keymap 133 | local opts = { noremap = true, silent = true } 134 | map("n", "", "BufferGoto 1", opts) 135 | map("n", "", "BufferGoto 2", opts) 136 | map("n", "", "BufferGoto 3", opts) 137 | map("n", "", "BufferGoto 4", opts) 138 | map("n", "", "BufferGoto 5", opts) 139 | map("n", "", "BufferGoto 6", opts) 140 | map("n", "", "BufferGoto 7", opts) 141 | map("n", "", "BufferGoto 8", opts) 142 | map("n", "", "BufferGoto 9", opts) 143 | map("n", "", "BufferLast", opts) 144 | 145 | map("n", "", "BufferPrevious", opts) 146 | map("n", "", "BufferNext", opts) 147 | map("n", "", "BufferMovePrevious", opts) 148 | map("n", ">", "BufferMoveNext", opts) 149 | 150 | vim.g.barbar_auto_setup = false -- disable auto-setup 151 | 152 | require("barbar").setup({ 153 | highlight_alternate = false, 154 | 155 | -- Disable highlighting file icons in inactive buffers 156 | highlight_inactive_file_icons = false, 157 | 158 | -- Enable highlighting visible buffers 159 | highlight_visible = true, 160 | -- animation = false, 161 | sidebar_filetypes = { 162 | -- Use the default values: {event = 'BufWinLeave', text = nil} 163 | NvimTree = true, 164 | -- Or, specify the text used for the offset: 165 | undotree = { text = "undotree" }, 166 | -- Or, specify the event which the sidebar executes when leaving: 167 | -- ["neo-tree"] = { event = "BufWipeout" }, 168 | ["neo-tree"] = true, 169 | -- Or, specify both 170 | Outline = { event = "BufWinLeave", text = "symbols-outline" }, 171 | }, 172 | letters = "asdfjkl;ghnmxcvbziowerutyqpASDFJKLGHNMXCVBZIOWERUTYQP", 173 | 174 | icons = { 175 | button = "×", 176 | separator = { left = "▎", right = "" }, 177 | modified = { button = "●" }, 178 | pinned = { button = "", filename = true }, 179 | 180 | highlight_inactive_file_icons = true, 181 | }, 182 | diagnostic = { 183 | [vim.diagnostic.severity.ERROR] = { enabled = true }, 184 | }, 185 | -- Enable/disable auto-hiding the tab bar when there is a single buffer 186 | auto_hide = false, 187 | -- Enable/disable current/total tabpages indicator (top right corner) 188 | 189 | tabpages = true, 190 | }) 191 | end, 192 | }, 193 | } 194 | -------------------------------------------------------------------------------- /lua/plugins/case.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "xlboy/text-case.nvim", 3 | 4 | event = "BufRead", 5 | dependencies = { "nvim-telescope/telescope.nvim" }, 6 | config = function() 7 | require("textcase").setup({}) 8 | require("telescope").load_extension("textcase") 9 | vim.api.nvim_set_keymap("n", "ga.", "TextCaseOpenTelescopeLSPChange", { desc = "Telescope" }) 10 | vim.api.nvim_set_keymap("v", "ga.", "TextCaseOpenTelescopeLSPChange", { desc = "Telescope" }) 11 | vim.api.nvim_set_keymap( 12 | "n", 13 | "gaa", 14 | "TextCaseOpenTelescopeQuickChange", 15 | { desc = "Telescope Quick Change" } 16 | ) 17 | end, 18 | } 19 | -------------------------------------------------------------------------------- /lua/plugins/ccc.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "NvChad/nvim-colorizer.lua", 4 | -- event = "VeryLazy", 5 | lazy = false, 6 | priority = 9999, 7 | 8 | cmd = { "ColorizerToggle", "ColorizerAttachToBuffer", "ColorizerDetachFromBuffer", "ColorizerReloadAllBuffers" }, 9 | enabled = false, 10 | init = function() 11 | local done = false 12 | vim.api.nvim_create_autocmd("LspAttach", { 13 | callback = function(args) 14 | local client = vim.lsp.get_client_by_id(args.data.client_id) 15 | if client.name == "tailwindcss" and done == false then 16 | vim.cmd("ColorizerToggle") 17 | done = true 18 | end 19 | end, 20 | }) 21 | end, 22 | opts = { 23 | filetypes = { "*" }, 24 | user_default_options = { 25 | RGB = true, -- #RGB hex codes 26 | RRGGBB = true, -- #RRGGBB hex codes 27 | names = false, -- "Name" codes like Blue or blue 28 | RRGGBBAA = false, -- #RRGGBBAA hex codes 29 | AARRGGBB = true, -- 0xAARRGGBB hex codes 30 | rgb_fn = false, -- CSS rgb() and rgba() functions 31 | hsl_fn = false, -- CSS hsl() and hsla() functions 32 | css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB 33 | css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn 34 | -- Available modes for `mode`: foreground, background, virtualtext 35 | mode = "background", -- Set the display mode. 36 | -- Available methods are false / true / "normal" / "lsp" / "both" 37 | -- True is same as normal 38 | tailwind = true, 39 | sass = { enable = false }, 40 | virtualtext = "■", 41 | }, 42 | -- all the sub-options of filetypes apply to buftypes 43 | buftypes = {}, 44 | }, 45 | }, 46 | 47 | { 48 | "uga-rosa/ccc.nvim", 49 | enabled = true, 50 | cmd = { "CccPick", "CccConvert", "CccHighlighterEnable" }, 51 | event = "FileType typescript,typescriptreact,javascript,javascriptreact,json,yaml", 52 | keys = { 53 | { "zc", "CccConvert", desc = "Convert color" }, 54 | { "zp", "CccPick", desc = "Pick Color" }, 55 | }, 56 | opts = { 57 | highlighter = { 58 | auto_enable = true, 59 | lsp = true, 60 | }, 61 | }, 62 | config = function(_, opts) 63 | require("ccc").setup(opts) 64 | if opts.highlighter and opts.highlighter.auto_enable then 65 | vim.cmd.CccHighlighterEnable() 66 | local target_count = 0 67 | local target_lsp_names = { "tsserver", "tailwindcss" } 68 | vim.api.nvim_create_autocmd("LspAttach", { 69 | callback = function(args) 70 | local bufnr = args.buf 71 | local client = vim.lsp.get_client_by_id(args.data.client_id) 72 | if vim.tbl_contains(target_lsp_names, client.name) then 73 | target_count = target_count + 1 74 | end 75 | if target_count == 2 then 76 | local refresh_steps = { "startinsert", "", "bufdo ezz" } 77 | local refresh_code = vim.api.nvim_replace_termcodes(table.concat(refresh_steps, ""), true, false, true) 78 | vim.api.nvim_feedkeys(refresh_code, "t", true) 79 | end 80 | end, 81 | }) 82 | end 83 | end, 84 | }, 85 | } 86 | -------------------------------------------------------------------------------- /lua/plugins/cmp.lua: -------------------------------------------------------------------------------- 1 | local icons = { 2 | Keyword = "󰌋", 3 | Operator = "󰆕", 4 | 5 | Text = "", 6 | Value = "󰎠", 7 | Constant = "󰏿", 8 | 9 | Method = "", 10 | Function = "󰊕", 11 | Constructor = "", 12 | 13 | Class = "", 14 | Interface = "", 15 | Module = "", 16 | 17 | Variable = "", 18 | Property = "󰜢", 19 | Field = "󰜢", 20 | 21 | Struct = "󰙅", 22 | Enum = "", 23 | EnumMember = "", 24 | 25 | Snippet = "", 26 | 27 | File = "", 28 | Folder = "", 29 | 30 | Reference = "󰈇", 31 | Event = "", 32 | Color = "", 33 | Unit = "󰑭", 34 | TypeParameter = "", 35 | } 36 | 37 | return { 38 | { 39 | "petertriho/cmp-git", 40 | event = "VeryLazy", 41 | config = function() 42 | local format = require("cmp_git.format") 43 | local sort = require("cmp_git.sort") 44 | 45 | require("cmp_git").setup({ 46 | -- defaults 47 | filetypes = { "gitcommit", "octo", "NeogitCommitMessage" }, 48 | remotes = { "upstream", "origin" }, -- in order of most to least prioritized 49 | enableRemoteUrlRewrites = false, -- enable git url rewrites, see https://git-scm.com/docs/git-config#Documentation/git-config.txt-urlltbasegtinsteadOf 50 | git = { 51 | commits = { 52 | limit = 100, 53 | sort_by = sort.git.commits, 54 | format = format.git.commits, 55 | }, 56 | }, 57 | github = { 58 | hosts = {}, -- list of private instances of github 59 | issues = { 60 | fields = { "title", "number", "body", "updatedAt", "state" }, 61 | filter = "all", -- assigned, created, mentioned, subscribed, all, repos 62 | limit = 100, 63 | state = "open", -- open, closed, all 64 | sort_by = sort.github.issues, 65 | format = format.github.issues, 66 | }, 67 | mentions = { 68 | limit = 100, 69 | sort_by = sort.github.mentions, 70 | format = format.github.mentions, 71 | }, 72 | pull_requests = { 73 | fields = { "title", "number", "body", "updatedAt", "state" }, 74 | limit = 100, 75 | state = "open", -- open, closed, merged, all 76 | sort_by = sort.github.pull_requests, 77 | format = format.github.pull_requests, 78 | }, 79 | }, 80 | gitlab = { 81 | hosts = {}, -- list of private instances of gitlab 82 | issues = { 83 | limit = 100, 84 | state = "opened", -- opened, closed, all 85 | sort_by = sort.gitlab.issues, 86 | format = format.gitlab.issues, 87 | }, 88 | mentions = { 89 | limit = 100, 90 | sort_by = sort.gitlab.mentions, 91 | format = format.gitlab.mentions, 92 | }, 93 | merge_requests = { 94 | limit = 100, 95 | state = "opened", -- opened, closed, locked, merged 96 | sort_by = sort.gitlab.merge_requests, 97 | format = format.gitlab.merge_requests, 98 | }, 99 | }, 100 | trigger_actions = { 101 | { 102 | debug_name = "git_commits", 103 | trigger_character = ":", 104 | action = function(sources, trigger_char, callback, params, git_info) 105 | return sources.git:get_commits(callback, params, trigger_char) 106 | end, 107 | }, 108 | { 109 | debug_name = "gitlab_issues", 110 | trigger_character = "#", 111 | action = function(sources, trigger_char, callback, params, git_info) 112 | return sources.gitlab:get_issues(callback, git_info, trigger_char) 113 | end, 114 | }, 115 | { 116 | debug_name = "gitlab_mentions", 117 | trigger_character = "@", 118 | action = function(sources, trigger_char, callback, params, git_info) 119 | return sources.gitlab:get_mentions(callback, git_info, trigger_char) 120 | end, 121 | }, 122 | { 123 | debug_name = "gitlab_mrs", 124 | trigger_character = "!", 125 | action = function(sources, trigger_char, callback, params, git_info) 126 | return sources.gitlab:get_merge_requests(callback, git_info, trigger_char) 127 | end, 128 | }, 129 | { 130 | debug_name = "github_issues_and_pr", 131 | trigger_character = "#", 132 | action = function(sources, trigger_char, callback, params, git_info) 133 | return sources.github:get_issues_and_prs(callback, git_info, trigger_char) 134 | end, 135 | }, 136 | { 137 | debug_name = "github_mentions", 138 | trigger_character = "@", 139 | action = function(sources, trigger_char, callback, params, git_info) 140 | return sources.github:get_mentions(callback, git_info, trigger_char) 141 | end, 142 | }, 143 | }, 144 | }) 145 | end, 146 | }, 147 | { 148 | "hrsh7th/nvim-cmp", 149 | event = "VeryLazy", 150 | dependencies = { "hrsh7th/cmp-emoji", "zbirenbaum/copilot.lua", "petertriho/cmp-git" }, 151 | ---@param opts cmp.ConfigSchema 152 | opts = function(_, opts) 153 | local luasnip = require("luasnip") 154 | local cmp = require("cmp") 155 | opts.sources = cmp.config.sources({ 156 | { name = "nvim_lsp" }, 157 | { name = "git" }, 158 | { name = "luasnip" }, 159 | { 160 | name = "buffer", 161 | option = { 162 | get_bufnrs = function() 163 | local bufs = {} 164 | for _, win in ipairs(vim.api.nvim_list_wins()) do 165 | local buf = vim.api.nvim_win_get_buf(win) 166 | local buffer_byte_size = vim.api.nvim_buf_get_offset(buf, vim.api.nvim_buf_line_count(buf)) 167 | if buffer_byte_size > 1024 * 100 then -- 100 kb max 168 | return {} 169 | end 170 | bufs[buf] = true 171 | end 172 | return vim.tbl_keys(bufs) 173 | end, 174 | }, 175 | }, 176 | 177 | { name = "path" }, 178 | }) 179 | 180 | -- local cmp_autopairs = require("nvim-autopairs.completion.cmp") 181 | -- cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) 182 | 183 | opts.formatting.format = function(entry, item) 184 | if item.kind == "Color" then 185 | item = require("cmp-tailwind-colors").format(entry, item) 186 | 187 | if item.kind ~= "Color" then 188 | item.menu = nil 189 | return item 190 | end 191 | end 192 | 193 | item.kind = icons[item.kind] or item.kind 194 | item.menu = nil 195 | 196 | local truncated = vim.fn.strcharpart(item.abbr, 0, 30) 197 | if truncated ~= item.abbr then 198 | item.abbr = truncated .. "…" 199 | end 200 | 201 | return item 202 | end 203 | 204 | opts.mapping = vim.tbl_extend("force", opts.mapping, { 205 | [""] = cmp.mapping(function(fallback) 206 | if cmp.visible() then 207 | -- You could replace select_next_item() with confirm({ select = true }) to get VS Code autocompletion behavior 208 | cmp.confirm({ 209 | select = true, 210 | }) 211 | -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() 212 | -- this way you will only jump inside the snippet region 213 | elseif require("copilot.suggestion").is_visible() then 214 | require("copilot.suggestion").accept() 215 | elseif luasnip.expand_or_locally_jumpable() then 216 | luasnip.expand_or_jump() 217 | else 218 | fallback() 219 | end 220 | end, { "i", "s" }), 221 | [""] = cmp.mapping(function(fallback) 222 | if cmp.visible() then 223 | cmp.select_prev_item() 224 | elseif luasnip.jumpable(-1) then 225 | luasnip.jump(-1) 226 | else 227 | fallback() 228 | end 229 | end, { "i", "s" }), 230 | [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), 231 | [""] = cmp.mapping.complete(), 232 | [""] = cmp.mapping({ 233 | i = function(fallback) 234 | fallback() 235 | end, 236 | }), 237 | [""] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }), 238 | [""] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }), 239 | [""] = cmp.mapping(cmp.mapping.select_prev_item(), { "i", "c" }), 240 | [""] = cmp.mapping(cmp.mapping.select_next_item(), { "i", "c" }), 241 | [""] = cmp.mapping({ 242 | i = function(fallback) 243 | fallback() 244 | end, 245 | }), 246 | 247 | [""] = cmp.mapping({ 248 | i = function(fallback) 249 | if cmp.visible() then 250 | cmp.confirm() 251 | else 252 | fallback() 253 | end 254 | end, 255 | }), 256 | }) 257 | end, 258 | }, 259 | } 260 | -------------------------------------------------------------------------------- /lua/plugins/colorscheme.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "catppuccin/nvim", 4 | name = "catppuccin", 5 | priority = 1000, 6 | config = function() 7 | local transparent_background = true 8 | -- if vim.g.neovide then 9 | -- transparent_background = false 10 | -- end 11 | require("catppuccin").setup({ 12 | flavour = "mocha", -- latte, frappe, macchiato, mocha 13 | background = { -- :h background 14 | light = "latte", 15 | dark = "mocha", 16 | }, 17 | no_bold = true, 18 | 19 | custom_highlights = function(colors) 20 | local macchiato = require("catppuccin.palettes").get_palette("macchiato") 21 | 22 | return { 23 | Visual = { bg = colors.surface1 }, 24 | CursorLine = { bg = macchiato.crust }, 25 | CursorIM = { 26 | bg = colors.sky, 27 | fg = colors.sky, 28 | }, 29 | } 30 | end, 31 | transparent_background = transparent_background, -- disables setting the background color. 32 | 33 | integrations = { 34 | nvimtree = false, 35 | neotree = true, 36 | gitsigns = true, 37 | illuminate = true, 38 | bufferline = true, 39 | telescope = true, 40 | treesitter = true, 41 | treesitter_context = true, 42 | mini = true, 43 | flash = false, 44 | rainbow_delimiters = false, 45 | barbar = false, 46 | dropbar = true, 47 | 48 | -- cmp = true, 49 | native_lsp = { 50 | enabled = true, 51 | underlines = { 52 | errors = { "undercurl" }, 53 | hints = { "undercurl" }, 54 | warnings = { "undercurl" }, 55 | information = { "underdotted" }, 56 | }, 57 | }, 58 | -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations) 59 | }, 60 | }) 61 | end, 62 | }, 63 | { 64 | "folke/tokyonight.nvim", 65 | event = "VeryLazy", 66 | config = function() 67 | require("tokyonight").setup({ 68 | -- your configuration comes here 69 | -- or leave it empty to use the default settings 70 | style = "night", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day` 71 | light_style = "day", -- The theme is used when the background is set to light 72 | transparent = true, -- Enable this to disable setting the background color 73 | terminal_colors = true, -- Configure the colors used when opening a `:terminal` in [Neovim](https://github.com/neovim/neovim) 74 | styles = { 75 | -- Style to be applied to different syntax groups 76 | -- Value is any valid attr-list value for `:help nvim_set_hl` 77 | comments = { italic = true }, 78 | keywords = { italic = true }, 79 | functions = {}, 80 | variables = {}, 81 | -- Background styles. Can be "dark", "transparent" or "normal" 82 | sidebars = "dark", -- style for sidebars, see below 83 | floats = "dark", -- style for floating windows 84 | }, 85 | sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]` 86 | day_brightness = 0.3, -- Adjusts the brightness of the colors of the **Day** style. Number between 0 and 1, from dull to vibrant colors 87 | hide_inactive_statusline = false, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**. 88 | dim_inactive = false, -- dims inactive windows 89 | lualine_bold = false, -- When `true`, section headers in the lualine theme will be bold 90 | 91 | --- You can override specific color groups to use other groups or a hex color 92 | --- function will be called with a ColorScheme table 93 | ---@param colors ColorScheme 94 | on_colors = function(colors) end, 95 | 96 | --- You can override specific highlights to use other groups or a hex color 97 | --- function will be called with a Highlights and ColorScheme table 98 | ---@param highlights Highlights 99 | ---@param colors ColorScheme 100 | on_highlights = function(highlights, colors) end, 101 | }) 102 | end, 103 | -- enabled = false, 104 | }, 105 | { 106 | "navarasu/onedark.nvim", 107 | 108 | event = "VeryLazy", 109 | enabled = false, 110 | config = function() 111 | require("onedark").setup({ 112 | -- Main options -- 113 | style = "dark", -- Default theme style. Choose between 'dark', 'darker', 'cool', 'deep', 'warm', 'warmer' and 'light' 114 | transparent = true, -- Show/hide background 115 | term_colors = true, -- Change terminal color as per the selected theme style 116 | ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden 117 | cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu 118 | 119 | -- toggle theme style --- 120 | toggle_style_key = nil, -- keybind to toggle theme style. Leave it nil to disable it, or set it to a string, for example "ts" 121 | toggle_style_list = { "dark", "darker", "cool", "deep", "warm", "warmer", "light" }, -- List of styles to toggle between 122 | 123 | -- Change code style --- 124 | -- Options are italic, bold, underline, none 125 | -- You can configure multiple style with comma separated, For e.g., keywords = 'italic,bold' 126 | code_style = { 127 | comments = "italic", 128 | keywords = "none", 129 | functions = "none", 130 | strings = "none", 131 | variables = "none", 132 | }, 133 | 134 | -- Lualine options -- 135 | lualine = { 136 | transparent = false, -- lualine center bar transparency 137 | }, 138 | 139 | -- Custom Highlights -- 140 | colors = {}, -- Override default colors 141 | highlights = {}, -- Override highlight groups 142 | 143 | -- Plugins Config -- 144 | diagnostics = { 145 | darker = true, -- darker colors for diagnostic 146 | undercurl = true, -- use undercurl instead of underline for diagnostics 147 | background = true, -- use background color for virtual text 148 | }, 149 | }) 150 | 151 | require("onedark").load() 152 | end, 153 | }, 154 | } 155 | -------------------------------------------------------------------------------- /lua/plugins/command_center.lua: -------------------------------------------------------------------------------- 1 | return { 2 | 3 | { 4 | "FeiyouG/command_center.nvim", 5 | dependencies = { "nvim-telescope/telescope.nvim" }, 6 | keys = { 7 | { 8 | "", 9 | function() 10 | vim.cmd([[Telescope commander]]) 11 | end, 12 | desc = "Command Center", 13 | }, 14 | }, 15 | 16 | lazy = true, 17 | config = function() 18 | local command_center = require("commander") 19 | command_center.add({ 20 | { 21 | desc = "Copy current file path (absolute)", 22 | cmd = function() 23 | local file_path = vim.api.nvim_buf_get_name(0) 24 | vim.fn.system("echo -n" .. file_path .. " | pbcopy") 25 | end, 26 | }, 27 | { 28 | desc = "Copy current file path & line (relative to cwd)", 29 | cmd = function() 30 | local file_path = vim.api.nvim_buf_get_name(0) 31 | local relative_path = vim.fn.fnamemodify(file_path, ":~:." .. vim.fn.getcwd() .. ":.") 32 | local current_line = vim.api.nvim_win_get_cursor(0)[1] 33 | local file_path_and_line = relative_path .. "#" .. current_line 34 | vim.fn.system("echo -n " .. file_path_and_line .. " | pbcopy") 35 | end, 36 | }, 37 | { 38 | desc = "Restart LSP server", 39 | cmd = function() 40 | vim.cmd([[LspStop]]) 41 | vim.cmd([[LspStart]]) 42 | end, 43 | }, 44 | { 45 | desc = "Reload Buffer", 46 | cmd = "bufdo ezz", 47 | }, 48 | { 49 | desc = "Reload Window", 50 | cmd = "windo ezz", 51 | }, 52 | { 53 | desc = "Advanced git search", 54 | cmd = "AdvancedGitSearch", 55 | }, 56 | { 57 | desc = "Neogit", 58 | cmd = "Neogit", 59 | }, 60 | { 61 | desc = "Refresh TSHighlight", 62 | cmd = function() 63 | vim.cmd([[TSDisable highlight]]) 64 | vim.cmd([[TSEnable highlight]]) 65 | end, 66 | }, 67 | { 68 | desc = "Open the specified file (relative to cwd)", 69 | cmd = function() 70 | require("plugin.open-file").open_file() 71 | end, 72 | }, 73 | -- { 74 | -- desc = "Reload plugins host", 75 | -- cmd = function() 76 | -- local plugins = require("lazy").plugins() 77 | -- 78 | -- for _, plugin in ipairs(plugins) do 79 | -- vim.cmd("Lazy reload " .. plugin.name) 80 | -- end 81 | -- end, 82 | -- }, 83 | }) 84 | 85 | command_center.setup({ 86 | components = { 87 | "DESC", 88 | "KEYS", 89 | "CAT", 90 | }, 91 | sort_by = { 92 | "DESC", 93 | "KEYS", 94 | "CAT", 95 | "CMD", 96 | }, 97 | -- Change the separator used to separate each component 98 | separator = " ", 99 | 100 | -- When set to true, 101 | -- The desc component will be populated with cmd if desc is empty or missing. 102 | auto_replace_desc_with_cmd = true, 103 | 104 | -- Default title of the prompt 105 | prompt_title = "Commander", 106 | integration = { 107 | telescope = { 108 | enable = true, 109 | }, 110 | lazy = { 111 | enable = true, 112 | }, 113 | }, 114 | }) 115 | -- telescope.setup({ 116 | -- extensions = { 117 | -- command_center = { 118 | -- components = { 119 | -- command_center.component.DESC, 120 | -- command_center.component.KEYS, 121 | -- }, 122 | -- auto_replace_desc_with_cmd = false, 123 | -- }, 124 | -- }, 125 | -- }) 126 | 127 | -- telescope.load_extension("command_center") 128 | end, 129 | }, 130 | } 131 | -------------------------------------------------------------------------------- /lua/plugins/comment.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "numToStr/Comment.nvim", 4 | event = "BufRead", 5 | config = function() 6 | require("Comment").setup({ 7 | ---Add a space b/w comment and the line 8 | padding = true, 9 | ---Whether the cursor should stay at its position 10 | sticky = true, 11 | ---Lines to be ignored while (un)comment 12 | ignore = nil, 13 | ---LHS of toggle mappings in NORMAL mode 14 | ---Enable keybindings 15 | ---NOTE: If given `false` then the plugin won't create any mappings 16 | mappings = { 17 | basic = true, 18 | }, 19 | ---Function to call before (un)comment 20 | pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(), 21 | ---Function to call after (un)comment 22 | post_hook = nil, 23 | }) 24 | end, 25 | }, 26 | { 27 | "echasnovski/mini.comment", 28 | enabled = false, 29 | }, 30 | { 31 | "danymat/neogen", 32 | dependencies = "nvim-treesitter/nvim-treesitter", 33 | config = function() 34 | require("neogen").setup({ snippet_engine = "luasnip" }) 35 | end, 36 | cmd = "Neogen", 37 | keys = { 38 | { 39 | "ng", 40 | function() 41 | require("neogen").generate({}) 42 | end, 43 | desc = "Neogen", 44 | }, 45 | }, 46 | }, 47 | } 48 | -------------------------------------------------------------------------------- /lua/plugins/copilot.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "zbirenbaum/copilot.lua", 4 | cmd = "Copilot", 5 | event = "VeryLazy", 6 | config = function() 7 | require("copilot").setup({ 8 | 9 | suggestion = { 10 | enabled = true, 11 | auto_trigger = true, 12 | debounce = 75, 13 | keymap = { 14 | accept = "", 15 | accept_word = false, 16 | accept_line = false, 17 | next = "", 18 | prev = "", 19 | dismiss = "", 20 | }, 21 | }, 22 | }) 23 | end, 24 | }, 25 | } 26 | -------------------------------------------------------------------------------- /lua/plugins/core.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "LazyVim/LazyVim", 4 | -- commit = "61f1c308bf6b87c51a2b49c314c7c7379f19a27e", 5 | opts = { 6 | colorscheme = "catppuccin", 7 | }, 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /lua/plugins/cursor-color.lua: -------------------------------------------------------------------------------- 1 | return { 2 | "mvllow/modes.nvim", 3 | event = "BufEnter", 4 | enabled = false, 5 | config = function() 6 | require("modes").setup({ 7 | colors = { 8 | insert = "#75C2F6", 9 | visual = "#FF2171", 10 | }, 11 | 12 | -- Set opacity for cursorline and number background 13 | line_opacity = 0.3, 14 | 15 | -- Enable cursor highlights 16 | set_cursor = true, 17 | 18 | -- Enable cursorline initially, and disable cursorline for inactive windows 19 | -- or ignored filetypes 20 | set_cursorline = true, 21 | 22 | -- Enable line number highlights to match cursorline 23 | set_number = true, 24 | 25 | -- Disable modes highlights in specified filetypes 26 | -- Please PR commonly ignored filetypes 27 | ignore_filetypes = require("util.ft").exclude_ft, 28 | }) 29 | end, 30 | } 31 | -------------------------------------------------------------------------------- /lua/plugins/debug.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "tpope/vim-scriptease", 4 | cmd = { 5 | "Verbose", 6 | }, 7 | }, 8 | } 9 | -------------------------------------------------------------------------------- /lua/plugins/dev.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "rafcamlet/nvim-luapad", 4 | cmd = { "Lua", "Luapad" }, 5 | config = function() 6 | require("luapad").setup({ 7 | count_limit = 150000, 8 | error_indicator = false, 9 | eval_on_move = true, 10 | error_highlight = "WarningMsg", 11 | split_orientation = "horizontal", 12 | on_init = function() 13 | print("Hello from Luapad!") 14 | end, 15 | context = { 16 | the_answer = 42, 17 | shout = function(str) 18 | return (string.upper(str) .. "!") 19 | end, 20 | }, 21 | }) 22 | end, 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /lua/plugins/diffview.lua: -------------------------------------------------------------------------------- 1 | return { "sindrets/diffview.nvim", cmd = { "DiffviewOpen", "DiffviewFileHistory" } } 2 | -------------------------------------------------------------------------------- /lua/plugins/discord.lua: -------------------------------------------------------------------------------- 1 | return { 2 | { 3 | "andweeb/presence.nvim", 4 | 5 | event = "VeryLazy", 6 | config = function() 7 | require("presence").setup({ 8 | -- General options 9 | auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`) 10 | neovim_image_text = "NeoVim YYDS", -- Text displayed when hovered over the Neovim image 11 | main_image = "file", -- Main image display (either "neovim" or "file") 12 | client_id = "793271441293967371", -- Use your own Discord application client id (not recommended) 13 | log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error") 14 | debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(, true)`) 15 | enable_line_number = true, -- Displays the current line number instead of the current project 16 | blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches 17 | buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "