diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cc5457a --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +tt.* +.tests +doc/tags +debug +.repro +foo.* +*.log +data diff --git a/.neoconf.json b/.neoconf.json new file mode 100644 index 0000000..7c48087 --- /dev/null +++ b/.neoconf.json @@ -0,0 +1,15 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + } +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..185280b --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# ๐Ÿ’ค LazyVim + +A starter template for [LazyVim](https://github.com/LazyVim/LazyVim). +Refer to the [documentation](https://lazyvim.github.io/installation) to get started. diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..2514f9e --- /dev/null +++ b/init.lua @@ -0,0 +1,2 @@ +-- bootstrap lazy.nvim, LazyVim and your plugins +require("config.lazy") diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 0000000..e062ec7 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,131 @@ +{ + "LazyVim": { "branch": "main", "commit": "3c6357815c354ee2bb82b4162a484c1de6d575dc" }, + "LuaSnip": { "branch": "master", "commit": "e650efa2255990193454f43af828a3d8f4fe66ba" }, + "alpha-nvim": { "branch": "main", "commit": "4b0ba68022d8612b04b26844f1ce5e708c0d23b0" }, + "autolist.nvim": { "branch": "main", "commit": "f8b4c11b79b0fef77a64b03810839a1abbbc67d5" }, + "better-digraphs.nvim": { "branch": "master", "commit": "2deb190707274fbbc01edaea1822235e836a2887" }, + "catppuccin": { "branch": "main", "commit": "5e2c9cf8277c42fb634007126c36d765fd176f4a" }, + "cder.nvim": { "branch": "main", "commit": "a6e925d7342116de46e75b463bc12b908e260a73" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" }, + "cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp-tabnine": { "branch": "main", "commit": "a6cb553143573861d2d98da86ceb3074c87fc536" }, + "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, + "colorful-winsep.nvim": { "branch": "main", "commit": "4958d55259b489105dcd0fb70f1176648a1561cd" }, + "crates.nvim": { "branch": "main", "commit": "c33aae75745877ee1ef16f5781478f4f2f120623" }, + "dial.nvim": { "branch": "master", "commit": "5020da900cc5dfd7067f181ee2ebd872ca7c84e8" }, + "diffview.nvim": { "branch": "main", "commit": "cce67317f62f04f8bbb41f57ac75d1a37f30493c" }, + "dressing.nvim": { "branch": "master", "commit": "5f44f829481640be0f96759c965ae22a3bcaf7ce" }, + "flit.nvim": { "branch": "main", "commit": "4c1739137acd3e7f03e2065a7be8a4dc41c7e461" }, + "friendly-snippets": { "branch": "main", "commit": "009887b76f15d16f69ae1341f86a7862f61cf2a1" }, + "gitlinker.nvim": { "branch": "master", "commit": "cc59f732f3d043b626c8702cb725c82e54d35c25" }, + "gitsigns.nvim": { "branch": "main", "commit": "b1f9cf7c5c5639c006c937fc1819e09f358210fc" }, + "glance.nvim": { "branch": "master", "commit": "bbded06ea23faad779297122e93b1c0dcdb2a770" }, + "go.nvim": { "branch": "master", "commit": "1844fd11a143aba3eec644c2e2099a20f79c1ec1" }, + "hlargs.nvim": { "branch": "main", "commit": "a7ad6ed8d6e27ea4dd13fda63fa732e9196ba4ea" }, + "icon-picker.nvim": { "branch": "master", "commit": "66d37ceae84099ca76235de44466829eb37118c2" }, + "incline.nvim": { "branch": "main", "commit": "71a03756a5f750c79a2889a80fcd8bbff7083690" }, + "indent-blankline.nvim": { "branch": "master", "commit": "018bd04d80c9a73d399c1061fa0c3b14a7614399" }, + "iron.nvim": { "branch": "master", "commit": "f4131638454aeb96cbd92652dd8c396e48eb4118" }, + "lazy.nvim": { "branch": "main", "commit": "14075657131b9a19883a8845c47f1ab65461cd6f" }, + "lazygit.nvim": { "branch": "main", "commit": "32bffdebe273e571588f25c8a708ca7297928617" }, + "leap.nvim": { "branch": "main", "commit": "d34680b16af977928228e57c68e5a162f1649e3c" }, + "lspkind.nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" }, + "lualine.nvim": { "branch": "master", "commit": "e99d733e0213ceb8f548ae6551b04ae32e590c80" }, + "marks.nvim": { "branch": "master", "commit": "76aca5069c5ce5c0099e30168649e6393e494f26" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a31e011135a79d63c71254c250c9158e1056a1cb" }, + "mason-null-ls.nvim": { "branch": "main", "commit": "c35a40cbf276611c8fadbbffc4a31c20a0b05dcc" }, + "mason.nvim": { "branch": "main", "commit": "3ee3174e30e33c9d58fa07b0a73a6e180474b59c" }, + "matchparen.nvim": { "branch": "main", "commit": "dc511ea561bb34c99d0fad9a6fd08bb0e4187a5e" }, + "middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" }, + "mini.ai": { "branch": "main", "commit": "ce822c6e6fe3aaf7cb29874e669b2d96febc97e5" }, + "mini.bufremove": { "branch": "main", "commit": "8464390c932556dbb298ccf8a7587d6ef765e94f" }, + "mini.comment": { "branch": "main", "commit": "5e8c7f75c48d958ef84ed75772b0263284c8621d" }, + "mini.indentscope": { "branch": "main", "commit": "7998edc970610c05598c7aea3d21ece8dd87ed52" }, + "mini.pairs": { "branch": "main", "commit": "0256717c9364ad6b5384c37b4f96fb4f7cc74867" }, + "mini.surround": { "branch": "main", "commit": "b7c2f4bea1f60af8dfee71f696319d045d986ce6" }, + "neoconf.nvim": { "branch": "main", "commit": "c2604560ea764ad5f72e52f38c52ef7fc2d1be98" }, + "neodev.nvim": { "branch": "main", "commit": "c6b8ff8f0d261c8fb99a55ec7cc5dcf9cb928293" }, + "neodim": { "branch": "master", "commit": "c346344ade2ce709e6bd282f10e43778672b861e" }, + "neoterm": { "branch": "master", "commit": "e1148589b8b9e1e72ef755d4495286c3b8516771" }, + "noice.nvim": { "branch": "main", "commit": "c22651651da01239fc4afac4cdb7261797d5f02e" }, + "nui.nvim": { "branch": "main", "commit": "0dc148c6ec06577fcf06cbab3b7dac96d48ba6be" }, + "null-ls.nvim": { "branch": "main", "commit": "900c38cfa91eb7ff2716da70f2f2c1d33741cf0a" }, + "nvim-bqf": { "branch": "main", "commit": "b71e6bc220ea2ef8f09d5e6b39d52609a965f322" }, + "nvim-cmp": { "branch": "main", "commit": "feed47fd1da7a1bad2c7dca456ea19c8a5a9823a" }, + "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" }, + "nvim-comment": { "branch": "main", "commit": "e9ac16ab056695cad6461173693069ec070d2b23" }, + "nvim-cursorline": { "branch": "main", "commit": "804f0023692653b2b2368462d67d2a87056947f9" }, + "nvim-databasehelper": { "branch": "master", "commit": "dceb296bebce1570aa198970f6456290cde2c3c9" }, + "nvim-dev-container": { "branch": "main", "commit": "4eba3f26d4ece275ad693452cb1a84de968518ab" }, + "nvim-hlslens": { "branch": "main", "commit": "5e3e9088fba7508cee3612ee50b14dfdd3ab19af" }, + "nvim-lspconfig": { "branch": "master", "commit": "1a2d5f5224c65b0709bf5da0ccd9cad29272083a" }, + "nvim-navic": { "branch": "master", "commit": "cdd24539bcf114a499827e9b32869fe74836efe7" }, + "nvim-nonicons": { "branch": "main", "commit": "ceda07dc7339f35444b5f4c4016f76a9eb42ac16" }, + "nvim-notify": { "branch": "master", "commit": "281e4d793c550c866bea3fb85d39de1f0188fb50" }, + "nvim-pqf": { "branch": "main", "commit": "d15582d3d0c09280f371fa5f21537cf4530ed330" }, + "nvim-recorder": { "branch": "main", "commit": "89c1fb1139fac0a4b42faf54beaf363be104550b" }, + "nvim-regexplainer": { "branch": "main", "commit": "f7ceb71176a892e24349b6f9bc30b3088fde9ac6" }, + "nvim-scrollview": { "branch": "main", "commit": "c0699da2f00976943d39c7b32c015c768f68e74b" }, + "nvim-spectre": { "branch": "master", "commit": "b71b64afe9fedbfdd25a8abec897ff4af3bd553a" }, + "nvim-surround": { "branch": "main", "commit": "8680311f6de05d45b010883db7cc1912b7f0d0e4" }, + "nvim-tree.lua": { "branch": "master", "commit": "59e65d88db177ad1e6a8cffaafd4738420ad20b6" }, + "nvim-treehopper": { "branch": "master", "commit": "5a28bff46c05d28bdb4bcaef67e046eb915a9390" }, + "nvim-treesitter": { "branch": "master", "commit": "94f9a569736fea4c4128216800612a733e59b083" }, + "nvim-treesitter-endwise": { "branch": "master", "commit": "0cf4601c330cf724769a2394df555a57d5fd3f34" }, + "nvim-treesitter-refactor": { "branch": "master", "commit": "75f5895cc662d61eb919da8050b7a0124400d589" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "f5f13206ec33e55b16c8e1a9dec301e8bead4835" }, + "nvim-treesitter-textsubjects": { "branch": "master", "commit": "b913508f503527ff540f7fe2dcf1bf1d1f259887" }, + "nvim-ts-autotag": { "branch": "main", "commit": "fdefe46c6807441460f11f11a167a2baf8e4534b" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "729d83ecb990dc2b30272833c213cc6d49ed5214" }, + "nvim-ufo": { "branch": "main", "commit": "9e829d5cfa3de6a2ff561d86399772b0339ae49d" }, + "nvim-various-textobjs": { "branch": "main", "commit": "e8e33497b757ac789b1b5f5fbc0c6d82ff713829" }, + "nvim-web-devicons": { "branch": "master", "commit": "4af94fec29f508159ceab5413383e5dedd6c24e3" }, + "obsidian.nvim": { "branch": "main", "commit": "5ecf680cf8fc49c6881126f4242a496d79c6f6f7" }, + "overseer.nvim": { "branch": "master", "commit": "9de57c625fce4a810f07970bcf99e849149b893c" }, + "peek.nvim": { "branch": "master", "commit": "7fb50a540edf28a99e8f3871e093dff65d5e493d" }, + "persistence.nvim": { "branch": "main", "commit": "adcf6913693a0434665d162ee45a186230496f8a" }, + "playground": { "branch": "master", "commit": "4044b53c4d4fcd7a78eae20b8627f78ce7dc6f56" }, + "plenary.nvim": { "branch": "master", "commit": "253d34830709d690f013daf2853a9d21ad7accab" }, + "project.nvim": { "branch": "main", "commit": "1c2e9c93c7c85126c2197f5e770054f53b1926fb" }, + "promise-async": { "branch": "main", "commit": "7fa127fa80e7d4d447e0e2c78e99af4355f4247b" }, + "rainbow_csv": { "branch": "master", "commit": "7453a3f9679f0c753ec9d77f9ea8588778f35aeb" }, + "rust-tools.nvim": { "branch": "master", "commit": "71d2cf67b5ed120a0e31b2c8adb210dd2834242f" }, + "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, + "schemastore.nvim": { "branch": "main", "commit": "db73ffdeafb3296e9e9dc45d6976b4b396f3bea8" }, + "sqlite.lua": { "branch": "master", "commit": "93ff5824682ecc874200e338fd8ca9ccd08508f8" }, + "sqls.nvim": { "branch": "main", "commit": "a0048b7018c99b68456f91b4aa42ce288f0c0774" }, + "tabby.nvim": { "branch": "main", "commit": "9065c65138b59ea8182024216a5bbcf0d77baebb" }, + "tailiscope.nvim": { "branch": "main", "commit": "d756e166cc1fec4eb06549b218b275c21d652e1e" }, + "telescope-bookmarks.nvim": { "branch": "main", "commit": "2a7b848cfce1b944da2470bb1979e10877e865e5" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "61b3769065131129716974f7fb63f82ee409bd80" }, + "telescope-frecency.nvim": { "branch": "master", "commit": "e5696afabd8753d772987ea48434d9c0d8b0aa6b" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" }, + "telescope-github.nvim": { "branch": "master", "commit": "ee95c509901c3357679e9f2f9eaac3561c811736" }, + "telescope-project.nvim": { "branch": "master", "commit": "8e8ee37b7210761502cdf2c3a82b5ba8fb5b2972" }, + "telescope-symbols.nvim": { "branch": "master", "commit": "f2060117d965df4a626f068a4ebbd8ee051aa076" }, + "telescope.nvim": { "branch": "master", "commit": "a3f17d3baf70df58b9d3544ea30abe52a7a832c2" }, + "tint.nvim": { "branch": "master", "commit": "f6a259861ba8c0d88afc2ef05140ddf345eb0296" }, + "todo-comments.nvim": { "branch": "main", "commit": "74c7d28cb50b0713c881ef69bcb6cdd77d8907d1" }, + "toggleterm.nvim": { "branch": "main", "commit": "31d38d11390bcd35a568fcc65a79b7d6ec89de62" }, + "tokyonight.nvim": { "branch": "main", "commit": "a310c1ddb3a7d8b940834238f79f7bfd494ba76a" }, + "trouble.nvim": { "branch": "main", "commit": "67337644e38144b444d026b0df2dc5fa0038930f" }, + "undotree": { "branch": "master", "commit": "485f01efde4e22cb1ce547b9e8c9238f36566f21" }, + "vim-cool": { "branch": "master", "commit": "80c19445728d70595c2f72d0436527e28292ebd9" }, + "vim-dadbod": { "branch": "master", "commit": "389a2b0120f82b13d51ff7c07f5c13f9bc9f412f" }, + "vim-dadbod-completion": { "branch": "master", "commit": "e71eb6140556c5ced80de6299a1fdfe22bd3c1b1" }, + "vim-dadbod-ui": { "branch": "master", "commit": "caf45f54dad6150970331ac115e531524e418c7c" }, + "vim-database": { "branch": "master", "commit": "51e4f128fbb06fd5aa4808264438479c15ee86eb" }, + "vim-illuminate": { "branch": "master", "commit": "49062ab1dd8fec91833a69f0a1344223dd59d643" }, + "vim-projectionist": { "branch": "master", "commit": "e5144baa1f5937de3081c38122b6906e094b2b24" }, + "vim-rails": { "branch": "master", "commit": "959e94b76e6ebdf984acef61649ba7d0f62bd425" }, + "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, + "vim-silicon": { "branch": "master", "commit": "4a93122ae2139a12e2a56f064d086c05160b6835" }, + "vim-startuptime": { "branch": "master", "commit": "6580cf539c33a212f4f5542068a3b4dd2b3ad834" }, + "vim-wordmotion": { "branch": "master", "commit": "81d9bd298376ab0dc465c85d55afa4cb8d5f47a1" }, + "which-key.nvim": { "branch": "main", "commit": "fb027738340502b556c3f43051f113bcaa7e8e63" }, + "windows.nvim": { "branch": "main", "commit": "c7492552b23d0ab30325e90b56066ec51242adc8" }, + "winresizer": { "branch": "master", "commit": "9bd559a03ccec98a458e60c705547119eb5350f3" }, + "yanky.nvim": { "branch": "main", "commit": "2ccd52506dd0d9374c845e52b5373e901227639e" } +} \ No newline at end of file diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua new file mode 100644 index 0000000..81790ca --- /dev/null +++ b/lua/config/autocmds.lua @@ -0,0 +1,26 @@ +-- Autocmds are automatically loaded on the VeryLazy event +-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua +-- Add any additional autocmds here +-- +-- Use 'q' to quit from common plugins +vim.api.nvim_create_autocmd({ "FileType" }, { + pattern = { "qf", "help", "man", "lspinfo", "spectre_panel", "lir", "dbout" }, + callback = function() + vim.cmd([[ + nnoremap q :close + set nobuflisted + ]]) + end, +}) + +-- Set wrap and spell in markdown and gitcommit +vim.api.nvim_create_autocmd({ "FileType" }, { + pattern = { "gitcommit", "markdown" }, + callback = function() + vim.opt_local.wrap = true + vim.opt_local.spell = true + end, +}) + +vim.cmd("autocmd FileType dbui nmap j") +vim.cmd("autocmd FileType dbui nmap k") diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua new file mode 100644 index 0000000..a13602d --- /dev/null +++ b/lua/config/keymaps.lua @@ -0,0 +1,85 @@ +-- Keymaps are automatically loaded on the VeryLazy event +-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua +-- Add any additional keymaps here +-- Shorten function name +local keymap = vim.keymap.set +-- Silent keymap option +local opts = { silent = true } +keymap("n", "", ":tabn", opts) +keymap("n", "", ":tabp", opts) + +keymap("n", "ww", "w! %", opts) +keymap("n", "qq", "qa!", opts) +keymap("n", "", ":Ttoggle", opts) +keymap("t", "", ":Tclose", opts) +keymap("t", "", "j", opts) +keymap("t", "", "k", opts) + +keymap("n", "", "Telescope help_tags", opts) + +-- Stay in indent mode +keymap("v", "<", "", ">gv", opts) + +-- NvimTree +keymap("n", "", ":NvimTreeToggle", opts) + +-- Glance +keymap("n", "gr", "Glance references", opts) +keymap("n", "", require("dial.map").inc_normal(), { noremap = true }) +keymap("n", "", require("dial.map").dec_normal(), { noremap = true }) +keymap("v", "", require("dial.map").inc_visual(), { noremap = true }) +keymap("v", "", require("dial.map").dec_visual(), { noremap = true }) +keymap("v", "g", require("dial.map").inc_gvisual(), { noremap = true }) +keymap("v", "g", require("dial.map").dec_gvisual(), { noremap = true }) +keymap("n", "a", "Alpha", opts) + +-- Yanky +keymap({ "n", "x" }, "p", "(YankyPutAfter)") +keymap({ "n", "x" }, "P", "(YankyPutBefore)") +keymap("n", "n", "(YankyCycleForward)") +keymap("n", "p", "(YankyCycleBackward)") + +keymap( + "n", + "", + "lua require('telescope.builtin').find_files(require('telescope.themes').get_dropdown{previewer = false})", + opts +) + +keymap( + "n", + "e", + "lua require('telescope').extensions.file_browser.file_browser({path = '%:p:h', grouped = true})", + opts +) + +keymap("i", "", "", opts) +keymap("i", "", "", opts) + +--deal with lazyvim defaults +keymap("n", "ww", "w %", { desc = "Save current file" }) +keymap("n", "qq", "qa!", opts) +keymap("n", "ws", "s", { desc = "Split window horizontally" }) +keymap("n", "wv", "v", { desc = "Split window vertically" }) +keymap("n", "wt", "tabnew", { desc = "New Tab" }) + +vim.keymap.del("n", "wd") +keymap("n", "wd", "bd", { desc = "Close current buffer" }) + +vim.keymap.del({ "n", "i" }, "") +vim.keymap.del("n", "bb") +vim.keymap.del("n", "`") +vim.keymap.del("n", "fn") +vim.keymap.del("n", "ft") +vim.keymap.del("n", "fT") +vim.keymap.del("n", "w-") +vim.keymap.del("n", "w|") +vim.keymap.del("n", "-") +vim.keymap.del("n", "|") +vim.keymap.del("n", "l") +vim.keymap.del("n", "f") +vim.keymap.del("n", "") +vim.keymap.del("n", "]") +vim.keymap.del("n", "d") +vim.keymap.del("n", "[") diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua new file mode 100644 index 0000000..884616c --- /dev/null +++ b/lua/config/lazy.lua @@ -0,0 +1,43 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + -- bootstrap lazy.nvim + -- stylua: ignore + vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) +end +vim.opt.rtp:prepend(vim.env.LAZY or lazypath) + +require("config.statuscolumn") + +require("lazy").setup({ + spec = { + { "LazyVim/LazyVim" }, + { import = "lazyvim.plugins" }, + { import = "plugins" }, + }, + defaults = { + -- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup. + -- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default. + lazy = false, + -- It's recommended to leave version=false for now, since a lot the plugin that support versioning, + -- have outdated releases, which may break your Neovim install. + version = false, -- always use the latest git commit + -- version = "*", -- try installing the latest stable version for plugins that support semver + }, + install = { colorscheme = { "launch_scout", "tokyonight" } }, + checker = { enabled = true }, -- automatically check for plugin updates + performance = { + rtp = { + -- disable some rtp plugins + disabled_plugins = { + "gzip", + -- "matchit", + -- "matchparen", + -- "netrwPlugin", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + }, + }, + }, +}) diff --git a/lua/config/options.lua b/lua/config/options.lua new file mode 100644 index 0000000..e002afa --- /dev/null +++ b/lua/config/options.lua @@ -0,0 +1,62 @@ +-- Options are automatically loaded before lazy.nvim startup +-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua +-- Add any additional options here +-- +vim.opt.autowrite = false +vim.opt.backup = false -- creates a backup file +vim.opt.clipboard = "unnamedplus" -- allows neovim to access the system clipboard +vim.opt.cmdheight = 0 -- more space in the neovim command line for displaying messages +vim.opt.conceallevel = 0 -- so that `` is visible in markdown files +vim.opt.confirm = false +vim.opt.fileencoding = "utf-8" -- the encoding written to a file +vim.opt.fillchars = [[eob: ,fold: ,foldopen:๎ชด,foldsep: ,foldclose:๎ชถ]] +vim.opt.fillchars.eob = " " +vim.opt.foldcolumn = "0" +vim.opt.foldenable = true +vim.opt.foldlevelstart = 99 +vim.opt.guicursor = "n-v-c:block-Cursor/lCursor-blinkon0,i-ci:ver25-Cursor/lCursor,r-cr:hor20-Cursor/lCursor" +vim.opt.guifont = { "Caskaydia Cove Nerd Font Complete", ":h17" } +vim.opt.hlsearch = true -- highlight all matches on previous search pattern +vim.opt.laststatus = 3 +vim.opt.list = true +vim.opt.mouse = "nv" -- allow the mouse to be used in neovim +vim.opt.mousemodel = "extend" +vim.opt.number = true -- set numbered lines +vim.opt.numberwidth = 4 -- set number column width to 4 +vim.opt.pumheight = 10 -- pop up menu height +vim.opt.relativenumber = true +vim.opt.ruler = false +vim.opt.shiftwidth = 2 -- the number of spaces inserted for each indentation +vim.opt.showtabline = 0 -- always show tabs +vim.opt.signcolumn = "yes" +vim.opt.smartindent = false +vim.opt.swapfile = true -- creates a swapfile +vim.opt.timeoutlen = 300 -- time to wait for a mapped sequence to complete (in milliseconds) +vim.opt.undofile = true -- enable persistent undo +vim.opt.updatetime = 200 -- faster completion (4000ms default) +vim.opt.whichwrap:append("<,>,[,],h,l") +vim.opt.wildmenu = false +vim.opt.wrap = true -- display lines as one long line +vim.opt.writebackup = false -- if a file is being edited by another program (or was written to file while editing with another program), it is not allowed to be edited +-- Requires nightly +vim.opt.splitkeep = "screen" + +vim.g.do_filetype_lua = 1 + +vim.g.context_add_mappings = 0 -- disable vim.context keybindings + +vim.g["test#neovim#start_normal"] = 1 +vim.g["test#neovim#term_position"] = "belowright" + +vim.cmd([[ + let g:vsnip_filetypes = {} + let g:vsnip_filetypes.elixir = ['eelixir', 'heex'] +]]) + +vim.g.db_ui_auto_execute_table_helpers = 1 +vim.g.db_ui_use_nerd_fonts = 1 + +vim.g.neoterm_default_mod = "belowright" + +vim.g.python3_host_prog = "/usr/bin/python" +vim.g.loaded_perl_provider = 0 diff --git a/lua/config/statuscolumn.lua b/lua/config/statuscolumn.lua new file mode 100644 index 0000000..c097553 --- /dev/null +++ b/lua/config/statuscolumn.lua @@ -0,0 +1,32 @@ +local M = {} +_G.Status = M + +---@return {name:string, text:string, texthl:string}[] +function M.get_signs() + local buf = vim.api.nvim_win_get_buf(vim.g.statusline_winid) + return vim.tbl_map(function(sign) + return vim.fn.sign_getdefined(sign.name)[1] + end, vim.fn.sign_getplaced(buf, { group = "*", lnum = vim.v.lnum })[1].signs) +end + +function M.column() + local sign, git_sign + for _, s in ipairs(M.get_signs()) do + if s.name:find("GitSign") then + git_sign = s + else + sign = s + end + end + local components = { + sign and ("%#" .. sign.texthl .. "#" .. sign.text .. "%*") or " ", + [[%=]], + [[%{&nu?(&rnu&&v:relnum?v:relnum:v:lnum):''} ]], + git_sign and ("%#" .. git_sign.texthl .. "#" .. git_sign.text .. "%*") or " ", + } + return table.concat(components, "") +end + +vim.opt.statuscolumn = [[%!v:lua.Status.column()]] + +return M diff --git a/lua/plugins/core.lua b/lua/plugins/core.lua new file mode 100644 index 0000000..1d252dd --- /dev/null +++ b/lua/plugins/core.lua @@ -0,0 +1,227 @@ +return { + --Lazyvim and ignore default plugins + { + "LazyVim/LazyVim", + opts = { + colorscheme = "launch_scout", + }, + }, + { + "akinsho/bufferline.nvim", + enabled = false, + }, + { + "nvim-neo-tree/neo-tree.nvim", + enabled = false, + }, + + -- Disable builtin map so supertab works + { + "L3MON4D3/LuaSnip", + keys = function() + return {} + end, + }, + + "nvim-lua/plenary.nvim", + + -- { + -- "monkoose/matchparen.nvim", + -- config = true, + -- }, + + { + "rcarriga/nvim-notify", + opts = function() + local nonicons_extension = require("nvim-nonicons.extentions.nvim-notify") + return { + top_down = true, + timeout = 3500, + render = "compact", + stages = "fade", + background_color = { bg = "#a6e3a1" }, + icons = nonicons_extension.icons, + } + end, + }, + + { + "terrortylor/nvim-comment", + config = function() + require("nvim_comment").setup() + end, + }, + + { + "kylechui/nvim-surround", + config = true, + }, + + "chaoren/vim-wordmotion", + + "mbbill/undotree", + + { + "segeljakt/vim-silicon", + cmd = { "Silicon" }, + }, + + { + "chentoast/marks.nvim", + opts = { + -- whether to map keybinds or not. default true + default_mappings = true, + -- disables mark tracking for specific filetypes. default {} + excluded_filetypes = { + "prompt", + "ultestsummary", + "spectre_panel", + "toggleterm", + "pr", + "help", + "telescope", + "dbout", + "dbui", + "sql", + "neoterm", + "noice", + }, + }, + }, + + { + "monaqa/dial.nvim", + config = function() + local augend = require("dial.augend") + require("dial.config").augends:register_group({ + default = { + augend.integer.alias.decimal_int, -- nonnegative decimal number (0, 1, 2, 3, ...) + augend.date.alias["%Y-%m-%d"], + augend.date.alias["%Y/%m/%d"], -- date (2022/02/19, etc.) + augend.date.alias["%m/%d/%Y"], -- date (02/19/2022, etc.) + augend.constant.new({ + elements = { "and", "or" }, + word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc. + cyclic = true, -- "or" is incremented into "and". + }), + augend.constant.new({ + elements = { "true", "false" }, + word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc. + cyclic = true, -- "or" is incremented into "and". + }), + augend.constant.new({ elements = { "&&", "||" }, word = false, cyclic = true }), + }, + }) + end, + }, + + { + "bennypowers/nvim-regexplainer", + config = true, + dependencies = { + "nvim-treesitter/nvim-treesitter", + "MunifTanjim/nui.nvim", + }, + }, + + "tpope/vim-projectionist", + + { + url = "https://codeberg.org/esensar/nvim-dev-container", + config = true, + }, + + "simeji/winresizer", + + { + "nvim-tree/nvim-tree.lua", + dependencies = { + "nvim-tree/nvim-web-devicons", -- optional, for file icons + }, + tag = "nightly", -- optional, updated every week. (see issue #1193) */ + opts = function() + local nonicons_extention = require("nvim-nonicons.extentions.nvim-tree") + + local nvim_tree = require("nvim-tree") + local tree_cb = require("nvim-tree.config").nvim_tree_callback + return { + disable_netrw = false, + hijack_netrw = false, + respect_buf_cwd = true, + sync_root_with_cwd = true, + hijack_directories = { enable = false, auto_open = false }, + actions = { open_file = { quit_on_open = true } }, + renderer = { + root_folder_modifier = ":t", + icons = { + glyphs = nonicons_extention.glyphs, + }, + }, + diagnostics = { + enable = true, + show_on_dirs = true, + icons = { hint = "๏ ด", info = "๏š", warning = "๏ฑ", error = "๏—" }, + }, + view = { + width = 35, + side = "left", + mappings = { + list = { + { key = { "l", "", "o" }, cb = tree_cb("edit") }, + { key = "h", cb = tree_cb("close_node") }, + { key = "v", cb = tree_cb("vsplit") }, + }, + }, + }, + filters = {}, + update_cwd = true, + update_focused_file = { enable = true, update_root = true }, + } + end, + }, + + { + "chrisgrieser/nvim-recorder", + opts = { + -- Named registers where macros are saved. The first register is the default + -- register/macro-slot used after startup. + slots = { "a", "b", "c", "d" }, + -- default keymaps, see README for description what the commands do + mapping = { + startStopRecording = "q", + playMacro = "Q", + switchSlot = "", + editMacro = "cq", + yankMacro = "yq", -- also decodes it for turning macros to mappings + addBreakPoint = "##", -- โš ๏ธ this should be a string you don't use in insert mode during a macro + }, + -- clears all macros-slots on startup + clear = false, + -- log level used for any notification, mostly relevant for nvim-notify + -- (note that by default, nvim-notify does not show the levels trace and debug.) + logLevel = vim.log.levels.INFO, + -- experimental, see README + dapSharedKeymaps = false, + }, + }, + + "kassio/neoterm", + + { + "akinsho/toggleterm.nvim", + opts = { + size = 20, + open_mapping = [[]], + hide_numbers = true, + shade_terminals = true, + shading_factor = 2, + start_in_insert = true, + insert_mappings = true, + persist_size = true, + direction = "float", + close_on_exit = true, + shell = vim.o.shell, + float_opts = { border = "curved" }, + }, + }, +} diff --git a/lua/plugins/git.lua b/lua/plugins/git.lua new file mode 100644 index 0000000..67559c1 --- /dev/null +++ b/lua/plugins/git.lua @@ -0,0 +1,17 @@ +return { + "kdheepak/lazygit.nvim", + { + "ruifm/gitlinker.nvim", + dependencies = "nvim-lua/plenary.nvim", + + config = function() + require("gitlinker").setup({ mappings = nil }) + end, + }, + + { + "sindrets/diffview.nvim", + dependencies = "nvim-lua/plenary.nvim", + cmd = { "DiffviewOpen", "DiffviewClose", "DiffviewToggleFiles" }, + }, +} diff --git a/lua/plugins/languages.lua b/lua/plugins/languages.lua new file mode 100644 index 0000000..8e0c9e6 --- /dev/null +++ b/lua/plugins/languages.lua @@ -0,0 +1,192 @@ +return { + + --Markdown + { + "toppair/peek.nvim", + build = "deno task --quiet build:fast", + }, + + { + "gaoDean/autolist.nvim", + ft = { "markdown", "text", "tex", "plaintex" }, + config = function() + local autolist = require("autolist") + autolist.setup() + autolist.create_mapping_hook("i", "", autolist.new) + autolist.create_mapping_hook("i", "", autolist.indent) + autolist.create_mapping_hook("i", "", autolist.indent, "") + autolist.create_mapping_hook("n", "o", autolist.new) + autolist.create_mapping_hook("n", "O", autolist.new_before) + autolist.create_mapping_hook("n", ">>", autolist.indent) + autolist.create_mapping_hook("n", "<<", autolist.indent) + autolist.create_mapping_hook("n", "", autolist.force_recalculate) + autolist.create_mapping_hook("n", "x", autolist.invert_entry, "") + vim.api.nvim_create_autocmd("TextChanged", { + pattern = "*", + callback = function() + vim.cmd.normal({ + autolist.force_recalculate(nil, nil), + bang = false, + }) + end, + }) + end, + }, + + { + "epwalsh/obsidian.nvim", + config = function() + require("obsidian").setup({ + dir = "~/.vault", + notes_subdir = "notes", + daily_notes = { folder = "dailies" }, + completion = { + nvim_cmp = true, -- if using nvim-cmp, otherwise set to false + }, + }) + end, + }, + + --Ruby on Rails + "tpope/vim-rails", + + -- Go + { + "ray-x/go.nvim", + ft = { "go" }, + config = function() + require("go").setup() + end, + }, + + --Rust + { + "saecki/crates.nvim", + ft = { "rust" }, + dependencies = { { "nvim-lua/plenary.nvim" } }, + config = function() + require("crates").setup({ + null_ls = { enabled = true, name = "crates.nvim" }, + }) + end, + }, + + { + "simrat39/rust-tools.nvim", + dependencies = { "nvim-lua/plenary.nvim", "rust-lang/rust.vim" }, + lazy = true, + ft = { "rust" }, + }, + + --Databases + { + "tpope/vim-dadbod", + lazy = true, + dependencies = { + "kristijanhusak/vim-dadbod-ui", + "kristijanhusak/vim-dadbod-completion", + "abenz1267/nvim-databasehelper", + }, + config = function() + local function db_completion() + require("cmp").setup.buffer({ sources = { { name = "vim-dadbod-completion" } } }) + end + + vim.g.db_ui_save_location = vim.fn.stdpath("config") .. require("plenary.path").path.sep .. "db_ui" + + vim.api.nvim_create_autocmd("FileType", { + pattern = { + "sql", + }, + command = [[setlocal omnifunc=vim_dadbod_completion#omni]], + }) + + vim.api.nvim_create_autocmd("FileType", { + pattern = { + "sql", + "mysql", + "plsql", + }, + callback = function() + vim.schedule(db_completion) + end, + }) + end, + cmd = { + "DBUIToggle", + "DBUI", + "DBUIAddConnection", + "DBUIFindBuffer", + "DBUIRenameBuffer", + "DBUILastQueryInfo", + }, + }, + + { + "nanotee/sqls.nvim", + cmd = { + "SqlsExecuteQuery", + "SqlsExecuteQueryVertical", + "SqlsShowDatabases", + "SqlsShowSchemas", + "SqlsShowConnections", + "SqlsSwitchDatabase", + "SqlsSwitchConnection", + }, + }, + { + "dinhhuy258/vim-database", + cmd = { "VDToggleDatabase", "VDToggleQuery", "VimDatabaseListTablesFzf" }, + }, + + --REPL + { + "hkupty/iron.nvim", + config = function() + local view = require("iron.view") + require("iron.core").setup({ + config = { + should_map_plug = false, + scratch_repl = true, + repl_definition = { sh = { command = { "zsh" } } }, + repl_open_cmd = view.split("40%"), + }, + keymaps = { + send_motion = "sc", + visual_send = "sc", + send_file = "sf", + send_line = "sl", + send_mark = "sm", + cr = "s", + interrupt = "s", + exit = "sq", + clear = "cl", + }, + }) + end, + }, + + --VSCode Tasks + { + "stevearc/overseer.nvim", + lazy = true, + cmd = { + "OverseerToggle", + "OverseerOpen", + "OverseerRun", + "OverseerBuild", + "OverseerClose", + "OverseerLoadBundle", + "OverseerSaveBundle", + "OverseerDeleteBundle", + "OverseerRunCmd", + "OverseerQuickAction", + "OverseerTaskAction", + }, + config = function() + require("overseer").setup({ + templates = { "builtin", "user.run_script" }, + }) + end, + }, +} diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua new file mode 100644 index 0000000..f30b554 --- /dev/null +++ b/lua/plugins/lsp.lua @@ -0,0 +1,507 @@ +return { + + { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-nvim-lua", + "hrsh7th/cmp-path", + "onsails/lspkind.nvim", + "L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", + { + "tzachar/cmp-tabnine", + build = "bash install.sh", + config = function() + local tabnine = require("cmp_tabnine.config") + tabnine:setup({ + max_lines = 1000, + max_num_results = 2, + sort = true, + run_on_every_keystroke = true, + snippet_placeholder = "..", + ignored_file_types = { -- default is not to ignore + -- uncomment to ignore in lua: + -- lua = true + }, + show_prediction_strength = false, + }) + end, + }, + }, + opts = function(_, opts) + local cmp = require("cmp") + local lspkind = require("lspkind") + local luasnip = require("luasnip") + local has_words_before = function() + unpack = unpack or table.unpack + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil + end + return { + snippet = { + expand = function(args) + require("luasnip").lsp_expand(args.body) + end, + }, + completion = { + completeopt = "menu,menuone", + }, + mapping = { + [""] = cmp.mapping({ + i = function(fallback) + if cmp.visible() then + cmp.select_next_item({ behavior = cmp.SelectBehavior.Select }) + else + fallback() + end + end, + }), + + [""] = cmp.mapping({ + i = function(fallback) + if cmp.visible() then + cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select }) + else + fallback() + end + end, + }), + + [""] = cmp.mapping({ + i = function(fallback) + if cmp.visible() then + cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }) + elseif luasnip.expand_or_locally_jumpable() then + luasnip.expand_or_jump() + else + fallback() + end + end, + s = function(fallback) + if luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + else + cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }) + end + end, + }), + + [""] = cmp.mapping({ + i = function(fallback) + if luasnip.locally_jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, + s = function(fallback) + if luasnip.locally_jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, + }), + + [""] = cmp.mapping(cmp.mapping.complete(), { "i", "c" }), + + [""] = cmp.mapping({ i = cmp.mapping.close(), c = cmp.mapping.close() }), + + [""] = cmp.mapping({ + i = function(fallback) + if cmp.visible() then + cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }) + else + fallback() + end + end, + s = function() + cmp.confirm({ select = true }) + end, + }), + }, + sources = cmp.config.sources({ + { name = "nvim_lsp", group_index = 1 }, + { name = "cmp_tabnine", group_index = 1 }, + { name = "luasnip", group_index = 1, max_item_count = 4, option = { show_autosnippets = false } }, + { name = "buffer", group_index = 2 }, + { name = "path", group_index = 2 }, + }), + formatting = { + fields = { "kind", "abbr", "menu" }, + format = lspkind.cmp_format({ + mode = "symbol_text", -- options: 'text', 'text_symbol', 'symbol_text', 'symbol' + maxwidth = 50, -- prevent the popup from showing more than provided characters (e.g 50 will not show more than 50 characters) + menu = { -- showing type in menu + nvim_lsp = "[LSP]", + path = "[Path]", + buffer = "[Buffer]", + vsnip = "[Snip]", + }, + before = function(entry, vim_item) -- for tailwind css autocomplete + if vim_item.kind == "Color" and entry.completion_item.documentation then + local _, _, r, g, b = string.find(entry.completion_item.documentation, "^rgb%((%d+), (%d+), (%d+)") + if r then + local color = string.format("%02x", r) .. string.format("%02x", g) .. string.format("%02x", b) + local group = "Tw_" .. color + if vim.fn.hlID(group) < 1 then + vim.api.nvim_set_hl(0, group, { fg = "#" .. color }) + end + vim_item.kind = "โ– " -- or "โฌค" or anything + vim_item.kind_hl_group = group + return vim_item + end + end + -- vim_item.kind = icons[vim_item.kind] and (icons[vim_item.kind] .. vim_item.kind) or vim_item.kind + -- or just show the icon + vim_item.kind = lspkind.symbolic(vim_item.kind) and lspkind.symbolic(vim_item.kind) or vim_item.kind + return vim_item + end, + }), + }, + experimental = { + ghost_text = { + hl_group = "LspCodeLens", + }, + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + view = { + entries = "custom", + }, + } + end, + }, + + { + "dnlhc/glance.nvim", + opts = function() + local glance = require("glance") + local actions = glance.actions + + return { + height = 18, -- Height of the window + zindex = 45, + preview_win_opts = { -- Configure preview window options + cursorline = true, + number = true, + wrap = true, + }, + border = { + enable = true, -- Show window borders. Only horizontal borders allowed + top_char = "โ€•", + bottom_char = "โ€•", + }, + list = { + position = "right", -- Position of the list window 'left'|'right' + width = 0.33, -- 33% width relative to the active window, min 0.1, max 0.5 + }, + theme = { -- This feature might not work properly in nvim-0.7.2 + enable = true, -- Will generate colors for the plugin based on your current colorscheme + mode = "auto", -- 'brighten'|'darken'|'auto', 'auto' will set mode based on the brightness of your colorscheme + }, + mappings = { + list = { + ["j"] = actions.next, -- Bring the cursor to the next item in the list + ["k"] = actions.previous, -- Bring the cursor to the previous item in the list + [""] = actions.next, + [""] = actions.previous, + [""] = actions.next_location, -- Bring the cursor to the next location skipping groups in the list + [""] = actions.previous_location, -- Bring the cursor to the previous location skipping groups in the list + [""] = actions.preview_scroll_win(5), + [""] = actions.preview_scroll_win(-5), + ["v"] = actions.jump_vsplit, + ["s"] = actions.jump_split, + ["t"] = actions.jump_tab, + [""] = actions.jump, + ["o"] = actions.jump, + [""] = actions.enter_win("preview"), -- Focus preview window + ["q"] = actions.close, + ["Q"] = actions.close, + -- [''] = false -- disable a mapping + }, + preview = { + ["Q"] = actions.close, + [""] = actions.next_location, + [""] = actions.previous_location, + [""] = actions.enter_win("list"), -- Focus list window + }, + }, + hooks = { + before_open = function(results, open, jump, method) + local uri = vim.uri_from_bufnr(0) + if #results == 1 then + local target_uri = results[1].uri or results[1].targetUri + + if target_uri == uri then + jump(results[1]) + else + open(results) + end + else + open(results) + end + end, + }, + folds = { + fold_closed = "๏™", + fold_open = "๏˜ฟ", + folded = false, -- Automatically fold list on startup + }, + indent_lines = { enable = true, icon = "โ”‚" }, + winbar = { + enable = true, -- Available strating from nvim-0.8+ + }, + } + end, + }, + + { + "neovim/nvim-lspconfig", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + }, + opts = function() + local util = require("lspconfig/util") + return { + -- options for vim.diagnostic.config() + diagnostics = { + underline = true, + update_in_insert = true, + virtual_text = { spacing = 4, prefix = "โ—" }, + severity_sort = true, + }, + -- Automatically format on save + autoformat = true, + -- options for vim.lsp.buf.format + -- `bufnr` and `filter` is handled by the LazyVim formatter, + -- but can be also overridden when specified + format = { + formatting_options = nil, + timeout_ms = nil, + }, + -- LSP Server Settings + ---@type lspconfig.options + servers = { + gopls = {}, + html = { filetypes = { "html", "eruby" } }, + cssls = {}, + jsonls = { + settings = { + json = { + schemas = require("schemastore").json.schemas(), + validate = { enable = true }, + }, + }, + }, + pyright = { analysis = { typeCheckingMode = "off" } }, + -- pylsp = {}, -- Integration with rope for refactoring - https://github.com/python-rope/pylsp-rope + rust_analyzer = { + settings = { + ["rust-analyzer"] = { + cargo = { allFeatures = true }, + checkOnSave = { command = "clippy", extraArgs = { "--no-deps" } }, + }, + }, + }, + tsserver = { + disable_formatting = true, + filetyptes = { + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + }, + }, + vimls = {}, + yamlls = { + schemastore = { enable = true }, + settings = { + yaml = { + hover = true, + completion = true, + validate = true, + schemas = require("schemastore").json.schemas(), + }, + }, + }, + sqls = { + settings = { + sqls = { + connections = { + { + driver = "postgresql", + dataSourceName = "host=127.0.0.1 port=5432 user=postgres password=postgres dbname=coa_opal_dev", + }, + }, + }, + }, + }, + tailwindcss = { + init_options = { userLanguages = { heex = "html", elixir = "html" } }, + settings = { + tailwindCSS = { + hovers = true, + suggestions = true, + codeActions = true, + }, + }, + root_dir = function(fname) + return util.root_pattern("tailwind.config.js", "tailwind.config.ts")(fname) + or util.root_pattern("postcss.config.js", "postcss.config.ts")(fname) + or M.find_package_assets_ancestor(fname) + or util.find_node_modules_ancestor(fname) + or util.find_git_ancestor(fname) + or util.find_package_json_ancestor(fname) + end, + }, + lua_ls = { + -- cmd = { "/home/folke/projects/lua-language-server/bin/lua-language-server" }, + single_file_support = true, + settings = { + Lua = { + workspace = { + checkThirdParty = false, + }, + completion = { + workspaceWord = true, + callSnippet = "Both", + }, + misc = { + parameters = { + "--log-level=trace", + }, + }, + diagnostics = { + -- enable = false, + globals = { "vim" }, + groupSeverity = { + strong = "Warning", + strict = "Warning", + }, + groupFileStatus = { + ["ambiguity"] = "Opened", + ["await"] = "Opened", + ["codestyle"] = "None", + ["duplicate"] = "Opened", + ["global"] = "Opened", + ["luadoc"] = "Opened", + ["redefined"] = "Opened", + ["strict"] = "Opened", + ["strong"] = "Opened", + ["type-check"] = "Opened", + ["unbalanced"] = "Opened", + ["unused"] = "Opened", + }, + unusedLocalExclude = { "_*" }, + }, + format = { + enable = false, + defaultConfig = { + indent_style = "space", + indent_size = "2", + continuation_indent_size = "2", + }, + }, + }, + }, + }, + jdtls = {}, + dockerls = {}, + graphql = {}, + bashls = {}, + omnisharp = {}, + elixirls = {}, + kotlin_language_server = {}, + emmet_ls = {}, + marksman = {}, + angularls = {}, + }, + -- you can do any additional lsp server setup here + -- return true if you don't want this server to be setup with lspconfig + ---@type table + setup = { + -- example to setup with typescript.nvim + -- tsserver = function(_, opts) + -- require("typescript").setup({ server = opts }) + -- return true + -- end, + -- Specify * to use this function as a fallback for any server + -- ["*"] = function(server, opts) end, + }, + } + end, + config = function(_, opts) + -- setup autoformat + require("lazyvim.plugins.lsp.format").autoformat = opts.autoformat + -- setup formatting and keymaps + require("lazyvim.util").on_attach(function(client, buffer) + require("lazyvim.plugins.lsp.format").on_attach(client, buffer) + require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer) + end) + + -- diagnostics + for name, icon in pairs(require("lazyvim.config").icons.diagnostics) do + name = "DiagnosticSign" .. name + vim.fn.sign_define(name, { text = icon, texthl = name, numhl = "" }) + end + vim.diagnostic.config(opts.diagnostics) + + local servers = opts.servers + local capabilities = require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()) + + local function setup(server) + local server_opts = vim.tbl_deep_extend("force", { + capabilities = vim.deepcopy(capabilities), + }, servers[server] or {}) + + if opts.setup[server] then + if opts.setup[server](server, server_opts) then + return + end + elseif opts.setup["*"] then + if opts.setup["*"](server, server_opts) then + return + end + end + require("lspconfig")[server].setup(server_opts) + end + + -- temp fix for lspconfig rename + -- https://github.com/neovim/nvim-lspconfig/pull/2439 + local mappings = require("mason-lspconfig.mappings.server") + if not mappings.lspconfig_to_package.lua_ls then + mappings.lspconfig_to_package.lua_ls = "lua-language-server" + mappings.package_to_lspconfig["lua-language-server"] = "lua_ls" + end + + local mlsp = require("mason-lspconfig") + local available = mlsp.get_available_servers() + + local ensure_installed = {} ---@type string[] + for server, server_opts in pairs(servers) do + if server_opts then + server_opts = server_opts == true and {} or server_opts + -- run manual setup if mason=false or if this is a server that cannot be installed with mason-lspconfig + if server_opts.mason == false or not vim.tbl_contains(available, server) then + setup(server) + else + ensure_installed[#ensure_installed + 1] = server + end + end + end + + require("mason-lspconfig").setup({ ensure_installed = ensure_installed }) + require("mason-lspconfig").setup_handlers({ setup }) + end, + }, + + "jay-babu/mason-null-ls.nvim", + "b0o/schemastore.nvim", +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 0000000..5c00c29 --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,220 @@ +return { + { + "nvim-telescope/telescope.nvim", + version = false, -- telescope did only one release, so use HEAD for now + event = "VimEnter", + dependencies = { + { + "nvim-telescope/telescope-fzf-native.nvim", + build = "make", + }, + "nvim-telescope/telescope-project.nvim", + "danielvolchek/tailiscope.nvim", + "nvim-telescope/telescope-file-browser.nvim", + { + "ahmedkhalf/project.nvim", + config = function() + require("project_nvim").setup({ + detection_methods = { "pattern", "lsp" }, + patterns = { ".git" }, + ignore_lsp = { "null-ls" }, + }) + end, + }, + "dhruvmanila/telescope-bookmarks.nvim", + "nvim-telescope/telescope-github.nvim", + "Zane-/cder.nvim", + { + "nvim-telescope/telescope-frecency.nvim", + dependencies = { "kkharji/sqlite.lua" }, + }, + "nvim-telescope/telescope-symbols.nvim", + }, + keys = { + { "b", "Telescope buffers show_all_buffers=true", desc = "Switch Buffer" }, + { ":", "Telescope command_history", desc = "Command History" }, + { "", "Telescope commands", desc = "Commands" }, + -- find + { "fb", "Telescope buffers", desc = "Buffers" }, + { "fr", "Telescope oldfiles", desc = "Recent" }, + -- git + { "gc", "Telescope git_commits", desc = "commits" }, + { "gs", "Telescope git_status", desc = "status" }, + -- search + { "sa", "Telescope autocommands", desc = "Auto Commands" }, + { "sb", "Telescope current_buffer_fuzzy_find", desc = "Buffer" }, + { "sc", "Telescope command_history", desc = "Command History" }, + { "sd", "Telescope diagnostics", desc = "Diagnostics" }, + { "sh", "Telescope help_tags", desc = "Help Pages" }, + { "sH", "Telescope highlights", desc = "Search Highlight Groups" }, + { "sk", "Telescope keymaps", desc = "Key Maps" }, + { "sM", "Telescope man_pages", desc = "Man Pages" }, + { "sm", "Telescope marks", desc = "Jump to Mark" }, + { "so", "Telescope vim_options", desc = "Options" }, + { "sR", "Telescope resume", desc = "Resume" }, + }, + config = function() + local actions = require("telescope.actions") + local fb_actions = require("telescope").extensions.file_browser.actions + local telescope = require("telescope") + local trouble = require("trouble.providers.telescope") + local icons = require("nvim-nonicons") + -- Custom previewer + local previewers = require("telescope.previewers") + local Job = require("plenary.job") + local preview_maker = function(filepath, bufnr, opts) + filepath = vim.fn.expand(filepath) + Job:new({ + command = "file", + args = { "--mime-type", "-b", filepath }, + on_exit = function(j) + local mime_type = vim.split(j:result()[1], "/")[1] + + if mime_type == "text" then + -- Check file size + vim.loop.fs_stat(filepath, function(_, stat) + if not stat then + return + end + if stat.size > 500000 then + return + else + previewers.buffer_previewer_maker(filepath, bufnr, opts) + end + end) + else + vim.schedule(function() + vim.api.nvim_buf_set_lines(bufnr, 0, -1, false, { "BINARY FILE" }) + end) + end + end, + }):sync() + end + telescope.setup({ + defaults = { + -- layout_strategy = "bottom_pane", + sorting_strategy = "ascending", + dynamic_preview_titles = true, + layout_config = { bottom_pane = { height = 0.45 } }, + buffer_previewer_maker = preview_maker, + -- preview = { + -- treesitter = false + -- }, + entry_prefix = " ", + selection_caret = " โฏ ", + prompt_prefix = " " .. icons.get("telescope") .. " ", + -- path_display = { "smart" }, + mappings = { + i = { + [""] = actions.cycle_history_next, + [""] = actions.cycle_history_prev, + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = actions.close, + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + [""] = actions.select_default, + [""] = actions.select_default, + [""] = actions.select_horizontal, + [""] = actions.select_vertical, + [""] = actions.select_tab, + [""] = actions.preview_scrolling_up, + [""] = actions.preview_scrolling_down, + [""] = actions.results_scrolling_up, + [""] = actions.results_scrolling_down, + [""] = actions.toggle_selection, + [""] = actions.toggle_selection, + [""] = actions.send_to_qflist + actions.open_qflist, + [""] = actions.send_selected_to_qflist + actions.open_qflist, + [""] = actions.complete_tag, + [""] = actions.which_key, -- keys from pressing + [""] = trouble.open_with_trouble, + [""] = actions.close, + }, + n = { + ["q"] = actions.close, + [""] = actions.close, + [""] = actions.select_default, + [""] = actions.select_default, + [""] = actions.select_horizontal, + [""] = actions.select_vertical, + [""] = actions.select_tab, + [""] = actions.toggle_selection, + [""] = actions.toggle_selection, + [""] = actions.send_to_qflist + actions.open_qflist, + [""] = actions.send_selected_to_qflist + actions.open_qflist, + ["j"] = actions.move_selection_next, + ["k"] = actions.move_selection_previous, + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + ["H"] = actions.move_to_top, + ["M"] = actions.move_to_middle, + ["L"] = actions.move_to_bottom, + [""] = actions.move_selection_next, + [""] = actions.move_selection_previous, + ["gg"] = actions.move_to_top, + ["G"] = actions.move_to_bottom, + [""] = actions.preview_scrolling_up, + [""] = actions.preview_scrolling_down, + [""] = actions.results_scrolling_up, + [""] = actions.results_scrolling_down, + ["?"] = actions.which_key, + [""] = trouble.open_with_trouble, + }, + }, + pickers = { + tailiscope = { theme = "dropdown" }, + file_browser = { + cwd_to_path = true, + grouped = true, + hijack_netrw = true, + mappings = { n = { ["q"] = actions.close } }, + }, + }, + extensions = { + fzf = { + fuzzy = true, -- false will only do exact matching + override_generic_sorter = true, -- override the generic sorter + override_file_sorter = true, -- override the file sorter + case_mode = "smart_case", -- or "ignore_case" or "respect_case" + -- the default case_mode is "smart_case" + }, + file_browser = { + cwd_to_path = true, + prompt_position = "top", + grouped = true, + hijack_netrw = true, + mappings = { + ["n"] = { + ["h"] = fb_actions.goto_parent_dir, + ["l"] = actions.select_default, + }, + }, + }, + bookmarks = { + selected_browser = "firefox", + url_open_command = nil, + url_open_plugin = "open_browser", + full_path = true, + firefox_profile_name = nil, + }, + project = { hidden_files = false }, + }, + }, + }) + telescope.load_extension("fzf") + telescope.load_extension("project") -- telescope-project.nvim + telescope.load_extension("file_browser") + telescope.load_extension("projects") -- project.nvim + telescope.load_extension("yank_history") + telescope.load_extension("bookmarks") + telescope.load_extension("projects") -- project.nvim + telescope.load_extension("yank_history") + telescope.load_extension("bookmarks") + telescope.load_extension("gh") + telescope.load_extension("cder") + telescope.load_extension("tailiscope") + telescope.load_extension("frecency") + end, + }, +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua new file mode 100644 index 0000000..c838d64 --- /dev/null +++ b/lua/plugins/treesitter.lua @@ -0,0 +1,139 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + opts = { + -- One of "all", "maintained" (parsers with maintainers), or a list of languages + ensure_installed = "all", + -- Install languages synchronously (only applied to `ensure_installed`) + sync_install = false, + refactor = { + highlight_current_scope = { enable = false }, + smart_rename = { enable = true, keymaps = { smart_rename = "grr" } }, + highlight_definitions = { + enable = false, + -- Set to false if you have an `updatetime` of ~100. + clear_on_cursor_move = true, + }, + }, + highlight = { + enable = true, + disable = { "lua" }, + additional_vim_regex_highlighting = { "markdown" }, + }, + textobjects = { + swap = { + enable = true, + swap_next = { ["lsl"] = "@parameter.inner" }, + swap_previous = { ["lsh"] = "@parameter.inner" }, + }, + select = { + enable = true, + -- Automatically jump forward to textobj, similar to targets.vim + lookahead = true, + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ["af"] = { + query = "@function.outer", + desc = "Select outer part of a function region", + }, + ["if"] = { + query = "@function.inner", + desc = "Select inner part of a function region", + }, + ["ac"] = { + query = "@class.outer", + desc = "Select outer part of a class region", + }, + ["ic"] = { + query = "@class.inner", + desc = "Select inner part of a class region", + }, + ["ab"] = { + query = "@block.outer", + desc = "Select outer part of a block", + }, + ["ib"] = { + query = "@block.inner", + desc = "Select inner part of a block", + }, + }, + include_surrounding_whitespace = true, + }, + }, + rainbow = { enable = true, extended_mode = true, max_file_lines = nil }, + incremental_selection = { enable = false }, + indent = { enable = true, disable = { "python", "css", "yaml" } }, + -- vim-matchup + matchup = { enable = true }, + -- nvim-treesitter-textsubjects + textsubjects = { + enable = true, + prev_selection = ",", -- (Optional) keymap to select the previous selection + keymaps = { + ["."] = "textsubjects-smart", + [";"] = "textsubjects-container-outer", + ["i;"] = "textsubjects-container-inner", + }, + }, + -- endwise + endwise = { enable = false }, + -- autotag + autotag = { + enable = true, + filetypes = { + "html", + "javascript", + "typescript", + "javascriptreact", + "typescriptreact", + "svelte", + "vue", + "tsx", + "jsx", + "rescript", + "html-heex", + "elixir", + "heex", + "xml", + "php", + "markdown", + "glimmer", + "handlebars", + "hbs", + }, + }, + -- context_commentstring + context_commentstring = { + enable = true, + -- enable_autocmd = false, + }, + -- indent + -- yati = { enable = true }, + }, + dependencies = { + "nvim-treesitter/playground", + "nvim-treesitter/nvim-treesitter-refactor", + "windwp/nvim-ts-autotag", + "nvim-treesitter/nvim-treesitter-textobjects", + "chrisgrieser/nvim-various-textobjs", + "JoosepAlviste/nvim-ts-context-commentstring", + "RRethy/nvim-treesitter-textsubjects", + "RRethy/nvim-treesitter-endwise", + + { + "mfussenegger/nvim-treehopper", + config = function() + local keymap = vim.keymap.set + local kopts = { noremap = true, silent = true } + keymap("v", "m", ":lua require('tsht').nodes()", kopts) + end, + }, + }, + }, + + { + "windwp/nvim-ts-autotag", + config = true, + }, +} diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua new file mode 100644 index 0000000..f218c0b --- /dev/null +++ b/lua/plugins/ui.lua @@ -0,0 +1,749 @@ +return { + + "romainl/vim-cool", + "mechatroner/rainbow_csv", + + { + dir = "/home/andrew/projects/launch_scout.nvim", + config = function() + require("launch_scout").setup({ + style = "night", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day` + light_style = "day", -- The theme is used when the background is set to light + terminal_colors = true, -- Configure the colors used when opening a `:terminal` in Neovim + styles = { + -- Style to be applied to different syntax groups + -- Value is any valid attr-list value for `:help nvim_set_hl` + comments = { italic = false }, + keywords = { italic = false }, + functions = {}, + variables = {}, + -- Background styles. Can be "dark", "transparent" or "normal" + sidebars = "dark", -- style for sidebars, see below + floats = "dark", -- style for floating windows + }, + sidebars = { "qf", "help" }, -- Set a darker background on sidebar-like windows. For example: `["qf", "vista_kind", "terminal", "packer"]` + }) + end, + }, + + { + "folke/noice.nvim", + event = "VeryLazy", + opts = { + popupmenu = { enabled = false }, + cmdline = { + enabled = true, -- enables the Noice cmdline UI + view = "cmdline_popup", -- view for rendering the cmdline. Change to `cmdline` to get a classic cmdline at the bottom + opts = { buf_options = { filetype = "vim" } }, + icons = { + ["?"] = { icon = "โ—€๏ธ ", hl_group = "DiagnosticWarn" }, + [":"] = { + icon = "๏„  ", + hl_group = "DiagnosticInfo", + firstc = false, + }, + }, + }, + -- hacks = { + -- -- due to https://github.com/neovim/neovim/issues/20416 + -- -- messages are resent during a redraw. Noice detects this in most cases, but + -- -- some plugins (mostly vim plugns), can still cause loops. + -- -- When a loop is detected, Noice exits. + -- -- Enable this option to simply skip duplicate messages instead. + -- skip_duplicate_messages = true, + -- }, + notify = { enabled = true }, + lsp = { + progress = { + enabled = true, + -- Lsp Progress is formatted using the builtins for lsp_progress. See config.format.builtin + -- See the section on formatting for more details on how to customize. + format = "lsp_progress", + format_done = "lsp_progress_done", + throttle = 1000 / 30, -- frequency to update lsp progress message + view = "mini", + }, + override = { + -- override the default lsp markdown formatter with Noice + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + -- override the lsp markdown formatter with Noice + ["vim.lsp.util.stylize_markdown"] = true, + -- override cmp documentation with Noice (needs the other options to work) + ["cmp.entry.get_documentation"] = true, + }, + hover = { + enabled = true, + view = nil, -- when nil, use defaults from documentation + opts = {}, -- merged with defaults from documentation + }, + signature = { + enabled = true, + auto_open = { + enabled = true, + trigger = true, -- Automatically show signature help when typing a trigger character from the LSP + throttle = 50, -- Debounce lsp signature help request by 50ms + }, + view = nil, -- when nil, use defaults from documentation + opts = {}, -- merged with defaults from documentation + }, + message = { + -- Messages shown by lsp servers + enabled = true, + view = "notify", + opts = {}, + }, + -- defaults for hover and signature help + documentation = { + view = "hover", + opts = { + lang = "markdown", + replace = true, + render = "plain", + format = { "{message}" }, + win_options = { concealcursor = "n", conceallevel = 3 }, + }, + }, + }, + presets = { + -- you can enable a preset by setting it to true, or a table that will override the preset config + -- you can also add custom presets that you can enable/disable with enabled=true + long_message_to_split = true, + bottom_search = false, -- use a classic bottom cmdline for search + command_palette = false, -- position the cmdline and popupmenu together + lsp_doc_border = true, -- add a border to hover docs and signature help + }, + redirect = { { view = "popup", filter = { event = "msg_show" } } }, + routes = { + { + view = "notify", + filter = { find = "No information available" }, + opts = { skip = true }, + }, + { + view = "notify", + filter = { find = "Recording" }, + opts = { skip = true }, + }, + { + view = "notify", + filter = { find = "Recorded" }, + opts = { skip = true }, + }, + { + view = "notify", + filter = { find = "signcolumn" }, + opts = { skip = true }, + }, + { + view = "notify", + filter = { find = "macro" }, + opts = { skip = true }, + }, + { + filter = { event = "msg_show", kind = "search_count" }, + opts = { skip = true }, + }, + { filter = { event = "cmdline", find = "^%s*[/?]" }, view = "cmdline" }, + }, + }, + -- stylua: ignore + keys = { + { + "snl", + function() require("noice").cmd("last") end, + desc = + "Noice Last Message" + }, + { + "snh", + function() require("noice").cmd("history") end, + desc = + "Noice History" + }, + { "sna", function() require("noice").cmd("all") end, desc = "Noice All" }, + { + "", + function() if not require("noice.lsp").scroll(4) then return "" end end, + silent = true, + expr = true, + desc = + "Scroll forward", + mode = { + "i", "n", "s" } + }, + { + "", + function() if not require("noice.lsp").scroll(-4) then return "" end end, + silent = true, + expr = true, + desc = + "Scroll backward", + mode = { + "i", "n", "s" } + }, + }, + }, + + { + "rcarriga/nvim-notify", + opts = function() + local nonicons_extension = require("nvim-nonicons.extentions.nvim-notify") + return { + top_down = true, + timeout = 3500, + render = "compact", + stages = "fade", + background_color = { bg = "#a6e3a1" }, + icons = nonicons_extension.icons, + } + end, + }, + + { + "NVChad/nvim-colorizer.lua", + config = function() + require("colorizer").setup({ + filetypes = { + "*", -- Highlight all files, but customize some others. + }, + user_default_options = { + mode = "background", + names = false, + css = true, + css_fn = true, + tailwind = true, + }, + }) + end, + }, + + { + "goolord/alpha-nvim", + lazy = false, + priority = 100, + init = function() end, + config = function() + local colors = require("launch_scout.colors").setup() + + local dashboard = require("alpha.themes.dashboard") + dashboard.section.header.val = { + [[ _ _ _ _ _ _ _ ]], + [[ _\ \ / /\ /\_\ /\ \ _ /\ \ / /\ / /\]], + [[ /\__ \ / / \ / / / _ / \ \ /\_\ / \ \ / / / / / /]], + [[ / /_ \_\ / / /\ \ \ \ \__ /\_\ / /\ \ \_/ / // /\ \ \ / /_/ / / / ]], + [[ / / /\/_/ / / /\ \ \ \ \___\ / / // / /\ \___/ // / /\ \ \ / /\ \__/ / / ]], + [[ / / / / / / \ \ \ \__ / / / // / / \/____// / / \ \_\ / /\ \___\/ / ]], + [[ / / / / / /___/ /\ \ / / / / / // / / / / // / / \/_/ / / /\/___/ / ]], + [[ / / / ____ / / /_____/ /\ \ / / / / / // / / / / // / / / / / / / / ]], + [[ / /_/_/ ___/\ / /_________/\ \ \ / / /___/ / // / / / / // / /________ / / / / / / ]], + [[ /_______/\__\// / /_ __\ \_\/ / /____\/ // / / / / // / /_________\/ / / / / / ]], + [[ \_______\/ \_\___\ /____/_/\/_________/ \/_/ \/_/ \/____________/\/_/ \/_/ ]], + [[ ]], + [[ ]], + [[ _ _ _ _ _ ]], + [[ / /\ /\ \ /\ \ /\_\ /\ \ ]], + [[ / / \ / \ \ / \ \ / / / _ \_\ \ ]], + [[ / / /\ \__ / /\ \ \ / /\ \ \\ \ \__ /\_\ /\__ \ ]], + [[ / / /\ \___\ / / /\ \ \ / / /\ \ \\ \___\ / / // /_ \ \ ]], + [[ \ \ \ \/___// / / \ \_\ / / / \ \_\\__ / / / // / /\ \ \ ]], + [[ \ \ \ / / / \/_/ / / / / / // / / / / // / / \/_/ ]], + [[ _ \ \ \ / / / / / / / / // / / / / // / / ]], + [[ /_/\__/ / / / / /________ / / /___/ / // / /___/ / // / / ]], + [[ \ \/___/ / / / /_________\/ / /____\/ // / /____\/ //_/ / ]], + [[ \_____\/ \/____________/\/_________/ \/_________/ \_\/ ]], + } + + dashboard.section.buttons.val = { + dashboard.button("p", "๏ป Find project", ":Telescope projects "), + dashboard.button("o", "๐ŸŽ›๏ธ Obsidian Today", ":ObsidianToday"), + dashboard.button("c", "๐ŸŽš๏ธ Configuration", ":e ~/.config/nvim/init.lua "), + dashboard.button("q", "๐Ÿ‘ฃ Quit Neovim", ":qa"), + } + + local function footer() + -- NOTE: requires the fortune-mod package to work + local handle = io.popen("fortune -s | cowsay -n -f vader") + local fortune = handle:read("*a") + handle:close() + return fortune + end + + dashboard.section.footer.val = footer() + + dashboard.section.footer.opts.hl = "AlphaFooter" + dashboard.section.header.opts.hl = "AlphaHeader" + dashboard.section.buttons.opts.hl = "AlphaButtons" + + dashboard.opts.opts.noautocmd = true + -- vim.cmd([[autocmd User AlphaReady echo 'ready']]) + local opts = dashboard.opts + + require("alpha").setup(opts) + + -- Remove statusline and tabline when in Alpha + vim.api.nvim_create_autocmd({ "User" }, { + pattern = { "VeryLazy" }, + callback = function() + vim.cmd([[ + set showtabline=0 + set laststatus=0 + ]]) + end, + }) + + vim.api.nvim_create_autocmd({ "User" }, { + pattern = { "AlphaClosed" }, + callback = function() + vim.cmd([[ + set showtabline=2 + set laststatus=3 + ]]) + end, + }) + end, + }, + + { + "lukas-reineke/indent-blankline.nvim", + event = { "BufReadPost", "BufNewFile" }, + opts = { + -- char = "โ–", + char = "โ”‚", + filetype_exclude = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy" }, + show_trailing_blankline_indent = false, + space_char_blankline = " ", + show_current_context = true, + show_current_context_start = true, + }, + }, + + { + "dstein64/nvim-scrollview", + opts = { + excluded_filetypes = { "NvimTree" }, + on_startup = true, + auto_workarounds = true, + current_only = true, + base = "right", + column = 2, + }, + }, + + { + "anuvyklack/windows.nvim", + dependencies = "anuvyklack/middleclass", + config = true, + }, + + { + "b0o/incline.nvim", + opts = function() + local colors = require("launch_scout.colors").setup() -- pass in any of the config options as explained above + return { + hide = { only_win = false, focused_win = false, cursorline = true }, + ignore = { + buftypes = "special", + filetypes = { "sql" }, + floating_wins = true, + unlisted_buffers = true, + wintypes = "special", + }, + render = function(props) + -- generate name + local bufname = vim.api.nvim_buf_get_name(props.buf) + if bufname == "" then + return "[No name]" + else + -- ":." is the filename relative to the PWD (=project) + -- bufname = vim.fn.fnamemodify(bufname, ":.") + bufname = vim.fn.fnamemodify(bufname, ":p:h:h:t") + .. "/" + .. vim.fn.fnamemodify(bufname, ":p:h:t") + .. "/" + .. vim.fn.fnamemodify(bufname, ":t") + end + + local icon = require("nvim-web-devicons").get_icon(bufname, nil, { default = true }) + + local max_len = vim.api.nvim_win_get_width(props.win) / 2 + + if #bufname > max_len then + return { + " " .. icon .. " โ€ฆ" .. string.sub(bufname, #bufname - max_len, -1) .. " ", + guibg = colors.yellow, + guifg = colors.bg_dark, + } + else + return { + " " .. icon .. " " .. bufname .. " ", + guibg = colors.yellow, + guifg = colors.bg_dark, + } + end + end, + window = { + zindex = 2, + width = "fit", + placement = { horizontal = "right", vertical = "top" }, + options = { + signcolumn = true, + wrap = false, + }, + margin = { + horizontal = { left = 1, right = 1 }, + vertical = { bottom = 0, top = 1 }, + }, + padding = { left = 1, right = 2 }, + padding_char = " ", + }, + } + end, + }, + + { + "yamatsum/nvim-nonicons", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = true, + }, + + { + "kevinhwang91/nvim-hlslens", + config = function() + require("hlslens").setup() + local kopts = { noremap = true, silent = true } + vim.api.nvim_set_keymap("n", "*", [[*lua require('hlslens').start()]], kopts) + vim.api.nvim_set_keymap("n", "#", [[#lua require('hlslens').start()]], kopts) + vim.api.nvim_set_keymap("n", "g*", [[g*lua require('hlslens').start()]], kopts) + vim.api.nvim_set_keymap("n", "g#", [[g#lua require('hlslens').start()]], kopts) + end, + }, + + { + "lukas-reineke/indent-blankline.nvim", + dependencies = "chrisgrieser/nvim-recorder", + opts = { + indent_blankline_char_list = { "|", "ยฆ", "โ”†", "โ”Š" }, + char_highlight_list = { + "IndentBlanklineIndent1", + "IndentBlanklineIndent2", + "IndentBlanklineIndent3", + "IndentBlanklineIndent4", + "IndentBlanklineIndent5", + "IndentBlanklineIndent6", + }, + char = "แง", + context_char_blankline = "โ–", + context_char = "โ–", + show_trailing_blankline_indent = false, + show_first_indent_level = true, + use_treesitter = true, + use_treesitter_scope = true, + char_blankline = " ", + space_char_blankline = " ", + show_current_context = true, + show_current_context_start = false, + buftype_exclude = { "terminal", "nofile" }, + filetype_exclude = { "help", "lazy", "NvimTree" }, + }, + config = function() + vim.cmd([[highlight IndentBlanklineIndent1 guifg=#6042BC gui=nocombine]]) + vim.cmd([[highlight IndentBlanklineIndent2 guifg=#9b74e8 gui=nocombine]]) + vim.cmd([[highlight IndentBlanklineIndent3 guifg=#8ad3e3 gui=nocombine]]) + vim.cmd([[highlight IndentBlanklineIndent4 guifg=#f7a006 gui=nocombine]]) + vim.cmd([[highlight IndentBlanklineIndent5 guifg=#f90b66 gui=nocombine]]) + vim.cmd([[highlight IndentBlanklineIndent6 guifg=#9ece6a gui=nocombine]]) + vim.cmd([[highlight IndentBlanklineContextStart guisp=#9b74e8 gui=underline]]) + vim.cmd([[highlight IndentBlanklineContextChar guifg=#9b74e8 gui=nocombine]]) + end, + }, + + { + "nvim-lualine/lualine.nvim", + opts = function() + local colors = require("launch_scout.colors").setup() -- pass in any of the config options as explained above + local navic = require("nvim-navic") + local recorder = require("recorder") + + local icons = require("nvim-nonicons") + local nonicons_extention = require("nvim-nonicons.extentions.lualine") + return { + options = { + theme = "launch_scout", + component_separators = "|", + section_separators = { left = "๎‚ด", right = "๎‚ถ" }, + }, + sections = { + lualine_a = { nonicons_extention.mode }, + lualine_b = { + { "filename", color = { fg = colors.orange, bg = colors.bg } }, + { + "branch", + color = { fg = colors.orange, bg = colors.bg }, + icon = icons.get("git-branch"), + }, + }, + lualine_c = { + { + navic.get_location, + cond = navic.is_available, + color = { fg = colors.orange, bg = colors.bg }, + }, + }, + lualine_x = { + { recorder.recordingStatus }, + { recorder.displaySlots }, + { "diagnostics", color = { fg = colors.orange, bg = colors.bg } }, + }, + lualine_y = { + { "filetype", color = { fg = colors.orange, bg = colors.bg } }, + { "progress", color = { fg = colors.orange, bg = colors.bg } }, + }, + lualine_z = { + { + "location", + separator = { right = "๎‚ด" }, + left_padding = 2, + color = { fg = colors.orange, bg = colors.bg }, + }, + }, + }, + tabline = {}, + extensions = {}, + } + end, + }, + + { + "yamatsum/nvim-cursorline", + config = function() + require("nvim-cursorline").setup({ + cursorline = { enable = false }, + cursorword = { + enable = true, + min_length = 3, + hl = { underline = true }, + }, + }) + end, + }, + + { + "m-demare/hlargs.nvim", + config = function() + require("hlargs").setup() + end, + }, + + { + "gbprod/yanky.nvim", + config = function() + require("yanky").setup({ + ring = { + history_length = 100, + storage = "shada", + sync_with_numbered_registers = true, + cancel_event = "update", + }, + highlight = { on_put = true, on_yank = true, timer = 500 }, + }) + end, + }, + + { + "nanozuki/tabby.nvim", + opts = function() + local util = require("tabby.util") + + local tab_name = require("tabby.feature.tab_name").get + local colors = require("launch_scout.colors").setup() -- pass in any of the config options as explained above + local hl_tabline = { fg = colors.blue, bg = colors.bg } + local hl_tabline_sel = { fg = colors.bg_dark, bg = colors.blue } + local hl_tabline_fill = { fg = colors.blue, bg = colors.bg_dark } + + local function tab_label(tabid, active) + local icon = active and "๏ƒˆ" or "๏‚–" + local number = vim.api.nvim_tabpage_get_number(tabid) + local name = tab_name(tabid) + return string.format(" %s %d: %s ", icon, number, name) + end + + local tabline = { + hl = "lualine_c_normal", + layout = "tab_only", + head = { + { " ๎Ÿ… ", hl = { fg = hl_tabline.fg, bg = hl_tabline.bg } }, + { "๎‚ผ", hl = { fg = hl_tabline.bg, bg = hl_tabline_fill.bg } }, + }, + active_tab = { + label = function(tabid) + return { + tab_label(tabid, true), + hl = { + fg = hl_tabline_sel.fg, + bg = hl_tabline_sel.bg, + style = "bold", + }, + } + end, + left_sep = { + "๎‚ถ", + hl = { fg = hl_tabline_sel.bg, bg = hl_tabline_fill.bg }, + }, + right_sep = { + "๎‚ด", + hl = { fg = hl_tabline_sel.bg, bg = hl_tabline_fill.bg }, + }, + }, + inactive_tab = { + label = function(tabid) + return { + tab_label(tabid, false), + hl = { fg = hl_tabline.fg, bg = hl_tabline_fill.bg }, + } + end, + left_sep = { " ", hl = { fg = hl_tabline.bg, bg = hl_tabline_fill.bg } }, + right_sep = { " ", hl = { fg = hl_tabline.bg, bg = hl_tabline_fill.bg } }, + }, + } + return { + tabline = tabline, + } + end, + }, + + { + "SmiteshP/nvim-navic", + opts = { depth_limit = 2, highlight = true }, + }, + + { + "zbirenbaum/neodim", + opts = { + alpha = 0.75, + blend_color = "#000000", + update_in_insert = { + enable = true, + delay = 100, + }, + hide = { + virtual_text = true, + signs = true, + underline = true, + }, + }, + }, + + "kevinhwang91/nvim-bqf", + + { + url = "https://gitlab.com/yorickpeterse/nvim-pqf", + config = function() + local icons = require("nvim-nonicons.mapping") + + local function get(name) + return vim.fn.nr2char(icons[name]) + end + require("pqf").setup({ + signs = { + error = get("fire"), + warning = get("warning"), + info = get("information"), + hint = get("pencil"), + }, + }) + end, + }, + + { + "kevinhwang91/nvim-ufo", + dependencies = "kevinhwang91/promise-async", + config = function() + local handler = function(virtText, lnum, endLnum, width, truncate) + local newVirtText = {} + local suffix = (" ๏• %d "):format(endLnum - lnum) + local sufWidth = vim.fn.strdisplaywidth(suffix) + local targetWidth = width - sufWidth + local curWidth = 0 + for _, chunk in ipairs(virtText) do + local chunkText = chunk[1] + local chunkWidth = vim.fn.strdisplaywidth(chunkText) + if targetWidth > curWidth + chunkWidth then + table.insert(newVirtText, chunk) + else + chunkText = truncate(chunkText, targetWidth - curWidth) + local hlGroup = chunk[2] + table.insert(newVirtText, { chunkText, hlGroup }) + chunkWidth = vim.fn.strdisplaywidth(chunkText) + -- str width returned from truncate() may less than 2nd argument, need padding + if curWidth + chunkWidth < targetWidth then + suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth) + end + break + end + curWidth = curWidth + chunkWidth + end + table.insert(newVirtText, { suffix, "MoreMsg" }) + return newVirtText + end + require("ufo").setup({ + provider_selector = function(bufnr, filetype, buftype) + return { "treesitter", "indent" } + end, + fold_virt_text_handler = handler, + }) + vim.keymap.set("n", "zR", require("ufo").openAllFolds) + vim.keymap.set("n", "zM", require("ufo").closeAllFolds) + vim.keymap.set("n", "zr", require("ufo").openFoldsExceptKinds) + vim.keymap.set("n", "zm", require("ufo").closeFoldsWith) -- closeAllFolds == closeFoldsWith(0) + end, + }, + + { + "nvim-zh/colorful-winsep.nvim", + config = function() + require("colorful-winsep").setup({ + -- timer refresh rate + interval = 30, + -- This plugin will not be activated for filetype in the following table. + no_exec_files = { + "TelescopePrompt", + "mason", + "CompetiTest", + "NvimTree", + "prompt", + "ultestsummary", + "spectre_panel", + "toggleterm", + "pr", + "help", + "telescope", + "dbout", + "dbui", + "sql", + "csv", + "neoterm", + "noice", + "guihua", + "alpha", + }, + -- Symbols for separator lines, the order: horizontal, vertical, top left, top right, bottom left, bottom right. + symbols = { "โ”", "โ”ƒ", "โ”", "โ”“", "โ”—", "โ”›" }, + }) + end, + }, + + "protex/better-digraphs.nvim", + + { + "ziontee113/icon-picker.nvim", + cmd = { "IconPickerNormal", "IconPickerYank", "IconPickerInsert" }, + opts = { + disable_legacy_commands = true, + }, + }, + + { + "levouh/tint.nvim", + config = true, + }, +} diff --git a/lua/plugins/which_key.lua b/lua/plugins/which_key.lua new file mode 100644 index 0000000..c536496 --- /dev/null +++ b/lua/plugins/which_key.lua @@ -0,0 +1,85 @@ +return { + { + "folke/which-key.nvim", + opts = function() + local wk = require("which-key") + local keymaps = { + mode = { "n", "v" }, + ["g"] = { name = "+goto" }, + ["gz"] = { name = "+surround" }, + ["]"] = { name = "+next" }, + ["["] = { name = "+prev" }, + [""] = { "b#", "Previous window" }, + ["a"] = { "Alpha", "Alpha" }, + ["c"] = { name = "+code" }, + ["f"] = { name = "+file/find" }, + ["g"] = { name = "Git" }, + ["gh"] = { name = "+hunks" }, + ["q"] = { name = "+quit/session" }, + ["s"] = { name = "+search" }, + ["u"] = { name = "+ui" }, + ["w"] = { name = "+window" }, + ["x"] = { name = "+diagnostics/quickfix" }, + ["sn"] = { name = "+noice" }, + } + wk.register(keymaps) + end, + config = function() + local wk = require("which-key") + wk.setup({ + plugins = { + marks = true, -- shows a list of your marks on ' and ` + registers = true, -- shows your registers on " in NORMAL or in INSERT mode + spelling = { + enabled = true, -- enabling this will show WhichKey when pressing z= to select spelling suggestions + suggestions = 20, -- how many suggestions should be shown in the list? + }, + -- the presets plugin, adds help for a bunch of default keybindings in Neovim + -- No actual key bindings are created + presets = { + operators = true, -- adds help for operators like d, y, ... and registers them for motion / text object completion + motions = true, -- adds help for motions + text_objects = true, -- help for text objects triggered after entering an operator + windows = false, -- default bindings on + nav = false, -- misc bindings to work with windows + z = true, -- bindings for folds, spelling and others prefixed with z + g = true, -- bindings for prefixed with g + }, + }, + icons = { + breadcrumb = "ยป", -- symbol used in the command line area that shows your active key combo + separator = "โžœ", -- symbol used between a key and it's label + group = "+", -- symbol prepended to a group + }, + popup_mappings = { + scroll_down = "", -- binding to scroll down inside the popup + scroll_up = "", -- binding to scroll up inside the popup + }, + window = { + border = "rounded", -- none, single, double, shadow + position = "bottom", -- bottom, top + margin = { 1, 0, 1, 0 }, -- extra window margin [top, right, bottom, left] + padding = { 2, 2, 2, 2 }, -- extra window padding [top, right, bottom, left] + winblend = 0, + }, + layout = { + height = { min = 4, max = 25 }, -- min and max height of the columns + width = { min = 20, max = 50 }, -- min and max width of the columns + spacing = 3, -- spacing between columns + align = "left", -- align columns left, center or right + }, + hidden = { "", "", "", "", "call", "lua", "^:", "^ " }, -- hide mapping boilerplate + show_help = false, -- show help message on the command line when the popup is visible + -- triggers = "auto", -- automatically setup triggers + triggers = { "" }, -- or specify a list manually + triggers_blacklist = { + -- list of mode / prefixes that should never be hooked by WhichKey + -- this is mostly relevant for key maps that start with a native binding + -- most people should not need to change this + i = { "j", "k" }, + v = { "j", "k" }, + }, + }) + end, + }, +} diff --git a/stylua.toml b/stylua.toml new file mode 100644 index 0000000..5d6c50d --- /dev/null +++ b/stylua.toml @@ -0,0 +1,3 @@ +indent_type = "Spaces" +indent_width = 2 +column_width = 120 \ No newline at end of file