From 0d2f1439e4b8627784e87786fdbfe75572fc9c60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20=F0=9F=9A=B6?= Date: Thu, 20 Jun 2024 21:31:15 +1000 Subject: [PATCH] New lazyvim config Backup the old config --- back.lazyvim/.gitignore | 8 + back.lazyvim/.neoconf.json | 15 + back.lazyvim/LICENSE | 201 +++++++++++++ back.lazyvim/README.md | 4 + back.lazyvim/init.lua | 2 + back.lazyvim/lazy-lock.json | 58 ++++ back.lazyvim/lazyvim.json | 9 + back.lazyvim/lua/config/autocmds.lua | 3 + back.lazyvim/lua/config/keymaps.lua | 5 + back.lazyvim/lua/config/lazy.lua | 51 ++++ back.lazyvim/lua/config/options.lua | 6 + .../lua/plugins/dashboard.lua | 0 back.lazyvim/lua/plugins/example.lua | 265 ++++++++++++++++++ back.lazyvim/lua/plugins/statusline.lua | 8 + .../lua/plugins/theme.lua | 0 {lazyvim => back.lazyvim}/lua/plugins/ui.lua | 0 {lazyvim => back.lazyvim}/spell/en.utf-8.add | 0 back.lazyvim/stylua.toml | 3 + lazyvim/cspell.json | 1 + lazyvim/lazy-lock.json | 97 +++---- lazyvim/lazyvim.json | 4 +- lazyvim/lua/config/lazy.lua | 16 +- lazyvim/lua/config/options.lua | 3 - lazyvim/lua/plugins/cspell.lua | 31 ++ lazyvim/lua/plugins/example.lua | 74 +---- lazyvim/lua/plugins/extras.lua | 3 + 26 files changed, 723 insertions(+), 144 deletions(-) create mode 100644 back.lazyvim/.gitignore create mode 100644 back.lazyvim/.neoconf.json create mode 100644 back.lazyvim/LICENSE create mode 100644 back.lazyvim/README.md create mode 100644 back.lazyvim/init.lua create mode 100644 back.lazyvim/lazy-lock.json create mode 100644 back.lazyvim/lazyvim.json create mode 100644 back.lazyvim/lua/config/autocmds.lua create mode 100644 back.lazyvim/lua/config/keymaps.lua create mode 100644 back.lazyvim/lua/config/lazy.lua create mode 100644 back.lazyvim/lua/config/options.lua rename {lazyvim => back.lazyvim}/lua/plugins/dashboard.lua (100%) create mode 100644 back.lazyvim/lua/plugins/example.lua create mode 100644 back.lazyvim/lua/plugins/statusline.lua rename {lazyvim => back.lazyvim}/lua/plugins/theme.lua (100%) rename {lazyvim => back.lazyvim}/lua/plugins/ui.lua (100%) rename {lazyvim => back.lazyvim}/spell/en.utf-8.add (100%) create mode 100644 back.lazyvim/stylua.toml create mode 100644 lazyvim/cspell.json create mode 100644 lazyvim/lua/plugins/cspell.lua create mode 100644 lazyvim/lua/plugins/extras.lua diff --git a/back.lazyvim/.gitignore b/back.lazyvim/.gitignore new file mode 100644 index 0000000..cc5457a --- /dev/null +++ b/back.lazyvim/.gitignore @@ -0,0 +1,8 @@ +tt.* +.tests +doc/tags +debug +.repro +foo.* +*.log +data diff --git a/back.lazyvim/.neoconf.json b/back.lazyvim/.neoconf.json new file mode 100644 index 0000000..7c48087 --- /dev/null +++ b/back.lazyvim/.neoconf.json @@ -0,0 +1,15 @@ +{ + "neodev": { + "library": { + "enabled": true, + "plugins": true + } + }, + "neoconf": { + "plugins": { + "lua_ls": { + "enabled": true + } + } + } +} diff --git a/back.lazyvim/LICENSE b/back.lazyvim/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/back.lazyvim/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/back.lazyvim/README.md b/back.lazyvim/README.md new file mode 100644 index 0000000..185280b --- /dev/null +++ b/back.lazyvim/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/back.lazyvim/init.lua b/back.lazyvim/init.lua new file mode 100644 index 0000000..2514f9e --- /dev/null +++ b/back.lazyvim/init.lua @@ -0,0 +1,2 @@ +-- bootstrap lazy.nvim, LazyVim and your plugins +require("config.lazy") diff --git a/back.lazyvim/lazy-lock.json b/back.lazyvim/lazy-lock.json new file mode 100644 index 0000000..2c66ad0 --- /dev/null +++ b/back.lazyvim/lazy-lock.json @@ -0,0 +1,58 @@ +{ + "LazyVim": { "branch": "main", "commit": "879e29504d43e9f178d967ecc34d482f902e5a91" }, + "LuaSnip": { "branch": "master", "commit": "57c9f5c31b3d712376c704673eac8e948c82e9c1" }, + "SchemaStore.nvim": { "branch": "main", "commit": "84f22450913d05da3e7c5488a9761e1034fb43b6" }, + "bufferline.nvim": { "branch": "main", "commit": "e48ce1805697e4bb97bc171c081e849a65859244" }, + "catppuccin": { "branch": "main", "commit": "4fbab1f01488718c3d54034a473d0346346b90e3" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "conform.nvim": { "branch": "master", "commit": "8b407bb6175846cdc4c499e2a8d28109615a2089" }, + "dashboard-nvim": { "branch": "master", "commit": "63df28409d940f9cac0a925df09d3dc369db9841" }, + "dressing.nvim": { "branch": "master", "commit": "8b7ae53d7f04f33be3439a441db8071c96092d19" }, + "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, + "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, + "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, + "indent-blankline.nvim": { "branch": "master", "commit": "3084950d1b66426d207064a509477cbfa96362c6" }, + "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, + "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "9e82ded0515186edd4f69e4ce6b1a5f1b55b47e9" }, + "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, + "mini.ai": { "branch": "main", "commit": "f7787cff9cc42004f722ca1e64e6af4e64e34177" }, + "mini.bufremove": { "branch": "main", "commit": "020243bfed8c8b941f2c20626faf3ea39c0c0e1b" }, + "mini.comment": { "branch": "main", "commit": "67f00d3ebbeae15e84584d971d0c32aad4f4f3a4" }, + "mini.indentscope": { "branch": "main", "commit": "5a8369475cd7cd6f207a4d288406d03b0fc48bdb" }, + "mini.pairs": { "branch": "main", "commit": "552062017ff207e1f35f7028bfb3f27c7421d22d" }, + "mini.surround": { "branch": "main", "commit": "7bf8915ba15d7a4f3c2afe7868d3c15a858d73f1" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "77d9f484b88fd380386b46ed9206e5374d69d9d8" }, + "neoconf.nvim": { "branch": "main", "commit": "64437787dba70fce50dad7bfbb97d184c5bc340f" }, + "neodev.nvim": { "branch": "main", "commit": "93ab59d5d436b36698c14d0374150a7e5e7bccb6" }, + "noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" }, + "nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" }, + "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, + "nvim-dap": { "branch": "master", "commit": "f0dca670fa059eb89dda8869a6310c804241345c" }, + "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, + "nvim-lint": { "branch": "master", "commit": "32f98300881f38f4e022391f240188fec42f74db" }, + "nvim-lspconfig": { "branch": "master", "commit": "9099871a7c7e1c16122e00d70208a2cd02078d80" }, + "nvim-notify": { "branch": "master", "commit": "ba1f59dccc584dddd138da870d0ee99b3f04ce54" }, + "nvim-spectre": { "branch": "master", "commit": "d8906855f1949ac97b1e77aaf8d3fe12ed158ddc" }, + "nvim-treesitter": { "branch": "master", "commit": "d496c5e08e853dadedc7f5d0a6541288d0441fd3" }, + "nvim-treesitter-context": { "branch": "master", "commit": "c9f2b429a1d63023f7a33b5404616f4cd2a109c5" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, + "nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" }, + "nvim-web-devicons": { "branch": "master", "commit": "aff5f50b34754335a312c9b3dc5b245f605ce437" }, + "persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" }, + "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, + "telescope.nvim": { "branch": "master", "commit": "f336f8cfab38a82f9f00df380d28f0c2a572f862" }, + "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, + "tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" }, + "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, + "vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" }, + "vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" }, + "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } +} \ No newline at end of file diff --git a/back.lazyvim/lazyvim.json b/back.lazyvim/lazyvim.json new file mode 100644 index 0000000..ff6a139 --- /dev/null +++ b/back.lazyvim/lazyvim.json @@ -0,0 +1,9 @@ +{ + "extras": [ + + ], + "news": { + "NEWS.md": "2123" + }, + "version": 2 +} \ No newline at end of file diff --git a/back.lazyvim/lua/config/autocmds.lua b/back.lazyvim/lua/config/autocmds.lua new file mode 100644 index 0000000..27e9e06 --- /dev/null +++ b/back.lazyvim/lua/config/autocmds.lua @@ -0,0 +1,3 @@ +-- 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 diff --git a/back.lazyvim/lua/config/keymaps.lua b/back.lazyvim/lua/config/keymaps.lua new file mode 100644 index 0000000..cf1cfee --- /dev/null +++ b/back.lazyvim/lua/config/keymaps.lua @@ -0,0 +1,5 @@ +-- 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 + +vim.keymap.set("i", "jk", "", { silent = true }) diff --git a/back.lazyvim/lua/config/lazy.lua b/back.lazyvim/lua/config/lazy.lua new file mode 100644 index 0000000..9724ab5 --- /dev/null +++ b/back.lazyvim/lua/config/lazy.lua @@ -0,0 +1,51 @@ +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("lazy").setup({ + spec = { + -- add LazyVim and import its plugins + { "LazyVim/LazyVim", import = "lazyvim.plugins" }, + -- import any extras modules here + { import = "lazyvim.plugins.extras.dap.core" }, + { import = "lazyvim.plugins.extras.lang.typescript" }, + { import = "lazyvim.plugins.extras.lang.json" }, + { import = "lazyvim.plugins.extras.linting.eslint" }, + { import = "lazyvim.plugins.extras.formatting.prettier" }, + -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, + -- import/override with your plugins + { import = "lazyvim.plugins.extras.vscode" }, + { 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 = { "tokyonight", "habamax" } }, + 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/back.lazyvim/lua/config/options.lua b/back.lazyvim/lua/config/options.lua new file mode 100644 index 0000000..bd0b2ca --- /dev/null +++ b/back.lazyvim/lua/config/options.lua @@ -0,0 +1,6 @@ +-- 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 + +-- https://miikanissi.com/blog/grammar-and-spell-checker-in-nvim/ +vim.opt.spellfile = vim.fn.stdpath("config") .. "/spell/en.utf-8.add" diff --git a/lazyvim/lua/plugins/dashboard.lua b/back.lazyvim/lua/plugins/dashboard.lua similarity index 100% rename from lazyvim/lua/plugins/dashboard.lua rename to back.lazyvim/lua/plugins/dashboard.lua diff --git a/back.lazyvim/lua/plugins/example.lua b/back.lazyvim/lua/plugins/example.lua new file mode 100644 index 0000000..f84ebdc --- /dev/null +++ b/back.lazyvim/lua/plugins/example.lua @@ -0,0 +1,265 @@ +-- since this is just an example spec, don't actually load anything here and return an empty spec +-- stylua: ignore +if true then return {} end + +-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim +-- +-- In your plugin files, you can: +-- * add extra plugins +-- * disable/enabled LazyVim plugins +-- * override the configuration of LazyVim plugins +return { + -- add gruvbox + { "ellisonleao/gruvbox.nvim" }, + + -- Configure LazyVim to load gruvbox + { + "LazyVim/LazyVim", + opts = { + colorscheme = "gruvbox", + }, + }, + + -- change trouble config + { + "folke/trouble.nvim", + -- opts will be merged with the parent spec + opts = { use_diagnostic_signs = true }, + }, + + -- disable trouble + { "folke/trouble.nvim", enabled = false }, + + -- add symbols-outline + { + "simrat39/symbols-outline.nvim", + cmd = "SymbolsOutline", + keys = { { "cs", "SymbolsOutline", desc = "Symbols Outline" } }, + config = true, + }, + + -- override nvim-cmp and add cmp-emoji + { + "hrsh7th/nvim-cmp", + dependencies = { "hrsh7th/cmp-emoji" }, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, { name = "emoji" }) + end, + }, + + -- change some telescope options and a keymap to browse plugin files + { + "nvim-telescope/telescope.nvim", + keys = { + -- add a keymap to browse plugin files + -- stylua: ignore + { + "fp", + function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end, + desc = "Find Plugin File", + }, + }, + -- change some options + opts = { + defaults = { + layout_strategy = "horizontal", + layout_config = { prompt_position = "top" }, + sorting_strategy = "ascending", + winblend = 0, + }, + }, + }, + + -- add telescope-fzf-native + { + "telescope.nvim", + dependencies = { + "nvim-telescope/telescope-fzf-native.nvim", + build = "make", + config = function() + require("telescope").load_extension("fzf") + end, + }, + }, + + -- add pyright to lspconfig + { + "neovim/nvim-lspconfig", + ---@class PluginLspOpts + opts = { + ---@type lspconfig.options + servers = { + -- pyright will be automatically installed with mason and loaded with lspconfig + pyright = {}, + }, + }, + }, + + -- add tsserver and setup with typescript.nvim instead of lspconfig + { + "neovim/nvim-lspconfig", + dependencies = { + "jose-elias-alvarez/typescript.nvim", + init = function() + require("lazyvim.util").on_attach(function(_, buffer) + -- stylua: ignore + vim.keymap.set( "n", "co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) + vim.keymap.set("n", "cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer }) + end) + end, + }, + ---@class PluginLspOpts + opts = { + ---@type lspconfig.options + servers = { + -- tsserver will be automatically installed with mason and loaded with lspconfig + tsserver = {}, + }, + -- 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, + }, + }, + }, + + -- for typescript, LazyVim also includes extra specs to properly setup lspconfig, + -- treesitter, mason and typescript.nvim. So instead of the above, you can use: + { import = "lazyvim.plugins.extras.lang.typescript" }, + + -- add more treesitter parsers + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "bash", + "html", + "javascript", + "json", + "lua", + "markdown", + "markdown_inline", + "python", + "query", + "regex", + "tsx", + "typescript", + "vim", + "yaml", + }, + }, + }, + + -- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above + -- would overwrite `ensure_installed` with the new value. + -- If you'd rather extend the default config, use the code below instead: + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + -- add tsx and treesitter + vim.list_extend(opts.ensure_installed, { + "tsx", + "typescript", + }) + end, + }, + + -- the opts function can also be used to change the default opts: + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function(_, opts) + table.insert(opts.sections.lualine_x, "😄") + end, + }, + + -- or you can return new options to override all the defaults + { + "nvim-lualine/lualine.nvim", + event = "VeryLazy", + opts = function() + return { + --[[add your custom lualine config here]] + } + end, + }, + + -- use mini.starter instead of alpha + { import = "lazyvim.plugins.extras.ui.mini-starter" }, + + -- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc + { import = "lazyvim.plugins.extras.lang.json" }, + + -- add any tools you want to have installed below + { + "williamboman/mason.nvim", + opts = { + ensure_installed = { + "stylua", + "shellcheck", + "shfmt", + "flake8", + }, + }, + }, + + -- Use for completion and snippets (supertab) + -- first: disable default and behavior in LuaSnip + { + "L3MON4D3/LuaSnip", + keys = function() + return {} + end, + }, + -- then: setup supertab in cmp + { + "hrsh7th/nvim-cmp", + dependencies = { + "hrsh7th/cmp-emoji", + }, + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + 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 + + local luasnip = require("luasnip") + local cmp = require("cmp") + + opts.mapping = vim.tbl_extend("force", opts.mapping, { + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() + -- this way you will only jump inside the snippet region + elseif luasnip.expand_or_jumpable() then + luasnip.expand_or_jump() + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, { "i", "s" }), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_prev_item() + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) + else + fallback() + end + end, { "i", "s" }), + }) + end, + }, +} diff --git a/back.lazyvim/lua/plugins/statusline.lua b/back.lazyvim/lua/plugins/statusline.lua new file mode 100644 index 0000000..4ebefe7 --- /dev/null +++ b/back.lazyvim/lua/plugins/statusline.lua @@ -0,0 +1,8 @@ +return { + { + "nvim-lualine/lualine.nvim", + opts = { + options = { section_separators = '', component_separators = '' } + } + } +} diff --git a/lazyvim/lua/plugins/theme.lua b/back.lazyvim/lua/plugins/theme.lua similarity index 100% rename from lazyvim/lua/plugins/theme.lua rename to back.lazyvim/lua/plugins/theme.lua diff --git a/lazyvim/lua/plugins/ui.lua b/back.lazyvim/lua/plugins/ui.lua similarity index 100% rename from lazyvim/lua/plugins/ui.lua rename to back.lazyvim/lua/plugins/ui.lua diff --git a/lazyvim/spell/en.utf-8.add b/back.lazyvim/spell/en.utf-8.add similarity index 100% rename from lazyvim/spell/en.utf-8.add rename to back.lazyvim/spell/en.utf-8.add diff --git a/back.lazyvim/stylua.toml b/back.lazyvim/stylua.toml new file mode 100644 index 0000000..5d6c50d --- /dev/null +++ b/back.lazyvim/stylua.toml @@ -0,0 +1,3 @@ +indent_type = "Spaces" +indent_width = 2 +column_width = 120 \ No newline at end of file diff --git a/lazyvim/cspell.json b/lazyvim/cspell.json new file mode 100644 index 0000000..d6e759f --- /dev/null +++ b/lazyvim/cspell.json @@ -0,0 +1 @@ +{"words":["autocmds","stdpath"],"version":"0.2","flagWords":[],"language":"en"} \ No newline at end of file diff --git a/lazyvim/lazy-lock.json b/lazyvim/lazy-lock.json index 2c66ad0..be71987 100644 --- a/lazyvim/lazy-lock.json +++ b/lazyvim/lazy-lock.json @@ -1,58 +1,47 @@ { - "LazyVim": { "branch": "main", "commit": "879e29504d43e9f178d967ecc34d482f902e5a91" }, - "LuaSnip": { "branch": "master", "commit": "57c9f5c31b3d712376c704673eac8e948c82e9c1" }, - "SchemaStore.nvim": { "branch": "main", "commit": "84f22450913d05da3e7c5488a9761e1034fb43b6" }, - "bufferline.nvim": { "branch": "main", "commit": "e48ce1805697e4bb97bc171c081e849a65859244" }, - "catppuccin": { "branch": "main", "commit": "4fbab1f01488718c3d54034a473d0346346b90e3" }, + "LazyVim": { "branch": "main", "commit": "dde4a9dcdf49719c67642d09847dbaf7f9c7a156" }, + "bufferline.nvim": { "branch": "main", "commit": "99337f63f0a3c3ab9519f3d1da7618ca4f91cffe" }, + "catppuccin": { "branch": "main", "commit": "c0bea773a09e49e123136b099bce9ddc1bf395d2" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "8b407bb6175846cdc4c499e2a8d28109615a2089" }, - "dashboard-nvim": { "branch": "master", "commit": "63df28409d940f9cac0a925df09d3dc369db9841" }, - "dressing.nvim": { "branch": "master", "commit": "8b7ae53d7f04f33be3439a441db8071c96092d19" }, - "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, - "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, - "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, - "indent-blankline.nvim": { "branch": "master", "commit": "3084950d1b66426d207064a509477cbfa96362c6" }, - "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, - "mason-nvim-dap.nvim": { "branch": "main", "commit": "9e82ded0515186edd4f69e4ce6b1a5f1b55b47e9" }, - "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, - "mini.ai": { "branch": "main", "commit": "f7787cff9cc42004f722ca1e64e6af4e64e34177" }, - "mini.bufremove": { "branch": "main", "commit": "020243bfed8c8b941f2c20626faf3ea39c0c0e1b" }, - "mini.comment": { "branch": "main", "commit": "67f00d3ebbeae15e84584d971d0c32aad4f4f3a4" }, - "mini.indentscope": { "branch": "main", "commit": "5a8369475cd7cd6f207a4d288406d03b0fc48bdb" }, - "mini.pairs": { "branch": "main", "commit": "552062017ff207e1f35f7028bfb3f27c7421d22d" }, - "mini.surround": { "branch": "main", "commit": "7bf8915ba15d7a4f3c2afe7868d3c15a858d73f1" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "77d9f484b88fd380386b46ed9206e5374d69d9d8" }, - "neoconf.nvim": { "branch": "main", "commit": "64437787dba70fce50dad7bfbb97d184c5bc340f" }, - "neodev.nvim": { "branch": "main", "commit": "93ab59d5d436b36698c14d0374150a7e5e7bccb6" }, - "noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" }, - "nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" }, - "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, - "nvim-dap": { "branch": "master", "commit": "f0dca670fa059eb89dda8869a6310c804241345c" }, - "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, - "nvim-dap-virtual-text": { "branch": "master", "commit": "57f1dbd0458dd84a286b27768c142e1567f3ce3b" }, - "nvim-lint": { "branch": "master", "commit": "32f98300881f38f4e022391f240188fec42f74db" }, - "nvim-lspconfig": { "branch": "master", "commit": "9099871a7c7e1c16122e00d70208a2cd02078d80" }, - "nvim-notify": { "branch": "master", "commit": "ba1f59dccc584dddd138da870d0ee99b3f04ce54" }, - "nvim-spectre": { "branch": "master", "commit": "d8906855f1949ac97b1e77aaf8d3fe12ed158ddc" }, - "nvim-treesitter": { "branch": "master", "commit": "d496c5e08e853dadedc7f5d0a6541288d0441fd3" }, - "nvim-treesitter-context": { "branch": "master", "commit": "c9f2b429a1d63023f7a33b5404616f4cd2a109c5" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, - "nvim-ts-autotag": { "branch": "main", "commit": "8515e48a277a2f4947d91004d9aa92c29fdc5e18" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "1277b4a1f451b0f18c0790e1a7f12e1e5fdebfee" }, - "nvim-web-devicons": { "branch": "master", "commit": "aff5f50b34754335a312c9b3dc5b245f605ce437" }, - "persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" }, - "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, - "telescope.nvim": { "branch": "master", "commit": "f336f8cfab38a82f9f00df380d28f0c2a572f862" }, - "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, - "tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" }, - "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, - "vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" }, - "vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" }, - "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } + "conform.nvim": { "branch": "master", "commit": "9a06e83527407a7600a2fe4e0d10adf432b6215e" }, + "cspell.nvim": { "branch": "main", "commit": "508b64a23bd8f9473c59d083a92712486f6f138d" }, + "dashboard-nvim": { "branch": "master", "commit": "b88c997f468a1bacb1e9b13ff3b567638caa06e6" }, + "dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" }, + "flash.nvim": { "branch": "main", "commit": "43f67935d388fbb540f8b40e8cbfd80de54f978a" }, + "friendly-snippets": { "branch": "main", "commit": "682157939e57bd6a2c86277dfd4d6fbfce63dbac" }, + "gitsigns.nvim": { "branch": "main", "commit": "89a4dce7c94c40c89774d3cb3a7788a9ecf412c0" }, + "indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" }, + "lazy.nvim": { "branch": "main", "commit": "c501b429cf995c645454539b924aaefae45bb9eb" }, + "lazydev.nvim": { "branch": "main", "commit": "6184ebbbc8045d70077659b7d30c705a588dc62f" }, + "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, + "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" }, + "mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" }, + "mini.ai": { "branch": "main", "commit": "9fef1097bca44616133cde6a6769e7aa07d12d7d" }, + "mini.pairs": { "branch": "main", "commit": "40261dfcec7623cd57be3c3beb50fa73f2650cdf" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, + "noice.nvim": { "branch": "main", "commit": "88ac36864b5976a64b14a8f156c616f41b32f228" }, + "none-ls.nvim": { "branch": "main", "commit": "cc0a3c45047e3daf85d07c1571d65476cfce6480" }, + "nui.nvim": { "branch": "main", "commit": "322978c734866996274467de084a95e4f9b5e0b1" }, + "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, + "nvim-lint": { "branch": "master", "commit": "941fa1220a61797a51f3af9ec6b7d74c8c7367ce" }, + "nvim-lspconfig": { "branch": "master", "commit": "6806370929cf6a35be6e5e0e74588515a4356e4d" }, + "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, + "nvim-snippets": { "branch": "main", "commit": "5c978b3ba0c504dc9f94ca93d17029f26064d229" }, + "nvim-spectre": { "branch": "master", "commit": "ec67d4b5370094b923dfcf6b09b39142f2964861" }, + "nvim-treesitter": { "branch": "master", "commit": "7b04b398f868563cac37ae90baffd7c3dca513fe" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" }, + "nvim-ts-autotag": { "branch": "main", "commit": "06fe07d7523ba8c755fac7c913fceba43b1720ee" }, + "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, + "persistence.nvim": { "branch": "main", "commit": "95d03ad5450389ad7dc2a0fab14ebb3d46bc2c96" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, + "telescope.nvim": { "branch": "master", "commit": "c392f1b78eaaf870ca584bd698e78076ed301b26" }, + "todo-comments.nvim": { "branch": "main", "commit": "51e10f838e84b4756c16311d0b1ef0972c6482d2" }, + "tokyonight.nvim": { "branch": "main", "commit": "81c867c5f638597a82c82094dcb90ed42444dabc" }, + "trouble.nvim": { "branch": "main", "commit": "2d8610a07033f2b367e71230ab128f8b89c2639d" }, + "ts-comments.nvim": { "branch": "main", "commit": "c075b4ee00f6e111b44bf99a8cfd5a4cfce9258a" }, + "which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" } } \ No newline at end of file diff --git a/lazyvim/lazyvim.json b/lazyvim/lazyvim.json index ff6a139..b1aed37 100644 --- a/lazyvim/lazyvim.json +++ b/lazyvim/lazyvim.json @@ -3,7 +3,7 @@ ], "news": { - "NEWS.md": "2123" + "NEWS.md": "6077" }, - "version": 2 + "version": 6 } \ No newline at end of file diff --git a/lazyvim/lua/config/lazy.lua b/lazyvim/lua/config/lazy.lua index 9724ab5..4aeb4bd 100644 --- a/lazyvim/lua/config/lazy.lua +++ b/lazyvim/lua/config/lazy.lua @@ -1,25 +1,17 @@ local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then + +if not (vim.uv or 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 }) + 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) +vim.opt.rtp:prepend(lazypath) require("lazy").setup({ spec = { -- add LazyVim and import its plugins { "LazyVim/LazyVim", import = "lazyvim.plugins" }, - -- import any extras modules here - { import = "lazyvim.plugins.extras.dap.core" }, - { import = "lazyvim.plugins.extras.lang.typescript" }, - { import = "lazyvim.plugins.extras.lang.json" }, - { import = "lazyvim.plugins.extras.linting.eslint" }, - { import = "lazyvim.plugins.extras.formatting.prettier" }, - -- { import = "lazyvim.plugins.extras.ui.mini-animate" }, -- import/override with your plugins - { import = "lazyvim.plugins.extras.vscode" }, { import = "plugins" }, }, defaults = { diff --git a/lazyvim/lua/config/options.lua b/lazyvim/lua/config/options.lua index bd0b2ca..3ea1454 100644 --- a/lazyvim/lua/config/options.lua +++ b/lazyvim/lua/config/options.lua @@ -1,6 +1,3 @@ -- 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 - --- https://miikanissi.com/blog/grammar-and-spell-checker-in-nvim/ -vim.opt.spellfile = vim.fn.stdpath("config") .. "/spell/en.utf-8.add" diff --git a/lazyvim/lua/plugins/cspell.lua b/lazyvim/lua/plugins/cspell.lua new file mode 100644 index 0000000..4bba208 --- /dev/null +++ b/lazyvim/lua/plugins/cspell.lua @@ -0,0 +1,31 @@ +return { + { + "williamboman/mason.nvim", + opts = { ensure_installed = { "cspell" } }, + }, + { + "nvimtools/none-ls.nvim", + dependencies = { "davidmh/cspell.nvim" }, + opts = function(_, opts) + opts.sources = opts.sources or {} + local cspell = require("cspell") + local config = { + find_json = function(_) + return vim.fn.stdpath("config") .. "/cspell.json" + end, + } + table.insert( + opts.sources, + -- cspell.diagnostics + cspell.diagnostics.with({ + config = config, + diagnostics_postprocess = function(diagnostic) + diagnostic.severity = vim.diagnostic.severity["HINT"] + end, + }) + ) + table.insert(opts.sources, cspell.code_actions.with({ config = config })) + -- table.insert(opts.sources, cspell.code_actions) + end, + }, +} diff --git a/lazyvim/lua/plugins/example.lua b/lazyvim/lua/plugins/example.lua index f84ebdc..4ad9825 100644 --- a/lazyvim/lua/plugins/example.lua +++ b/lazyvim/lua/plugins/example.lua @@ -30,14 +30,6 @@ return { -- disable trouble { "folke/trouble.nvim", enabled = false }, - -- add symbols-outline - { - "simrat39/symbols-outline.nvim", - cmd = "SymbolsOutline", - keys = { { "cs", "SymbolsOutline", desc = "Symbols Outline" } }, - config = true, - }, - -- override nvim-cmp and add cmp-emoji { "hrsh7th/nvim-cmp", @@ -71,18 +63,6 @@ return { }, }, - -- add telescope-fzf-native - { - "telescope.nvim", - dependencies = { - "nvim-telescope/telescope-fzf-native.nvim", - build = "make", - config = function() - require("telescope").load_extension("fzf") - end, - }, - }, - -- add pyright to lspconfig { "neovim/nvim-lspconfig", @@ -102,7 +82,7 @@ return { dependencies = { "jose-elias-alvarez/typescript.nvim", init = function() - require("lazyvim.util").on_attach(function(_, buffer) + require("lazyvim.util").lsp.on_attach(function(_, buffer) -- stylua: ignore vim.keymap.set( "n", "co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" }) vim.keymap.set("n", "cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer }) @@ -210,56 +190,4 @@ return { }, }, }, - - -- Use for completion and snippets (supertab) - -- first: disable default and behavior in LuaSnip - { - "L3MON4D3/LuaSnip", - keys = function() - return {} - end, - }, - -- then: setup supertab in cmp - { - "hrsh7th/nvim-cmp", - dependencies = { - "hrsh7th/cmp-emoji", - }, - ---@param opts cmp.ConfigSchema - opts = function(_, opts) - 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 - - local luasnip = require("luasnip") - local cmp = require("cmp") - - opts.mapping = vim.tbl_extend("force", opts.mapping, { - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - -- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable() - -- this way you will only jump inside the snippet region - elseif luasnip.expand_or_jumpable() then - luasnip.expand_or_jump() - elseif has_words_before() then - cmp.complete() - else - fallback() - end - end, { "i", "s" }), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { "i", "s" }), - }) - end, - }, } diff --git a/lazyvim/lua/plugins/extras.lua b/lazyvim/lua/plugins/extras.lua new file mode 100644 index 0000000..bd1c38f --- /dev/null +++ b/lazyvim/lua/plugins/extras.lua @@ -0,0 +1,3 @@ +return { + { import = "lazyvim.plugins.extras.lsp.none-ls" }, +}