From c2e92f0ef50eb4cf9801a2841dd057fc073f724b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Wed, 15 Nov 2023 12:46:38 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(nvim):=20a=20lot?= =?UTF-8?q?=20of=20changes=20to=20the=20structure=20of=20the=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit moved extras, mason and tressitter packages, and some new extras for web dev --- .config/nvim/lazy-lock.json | 28 ++-- .config/nvim/lazyvim.json | 50 ++++--- .config/nvim/lua/plugins/conform.lua | 3 + .../lua/plugins/extras/coding/annotation.lua | 66 +++++++++ .../extras/{util => coding}/auto-indent.lua | 0 .../plugins/extras/{ai => coding}/codeium.lua | 0 .../plugins/extras/{ai => coding}/copilot.lua | 0 .../plugins/extras/coding/documentation.lua | 128 ------------------ .../lua/plugins/extras/{ai => coding}/gpt.lua | 0 .../extras/{editor => coding}/multicursor.lua | 0 .../lua/plugins/extras/editor/breadcrumbs.lua | 27 ---- .../lua/plugins/extras/editor/devdocs.lua | 62 +++++++++ .../lua/plugins/extras/editor/diffview.lua | 7 + .../plugins/extras/editor/git-conflict.lua | 25 ++++ .../nvim/lua/plugins/extras/editor/git.lua | 59 -------- .../nvim/lua/plugins/extras/editor/github.lua | 1 + .../lua/plugins/extras/editor/live-server.lua | 10 ++ .../extras/{util => editor}/mini-align.lua | 0 .../{coding => editor}/package-info.lua | 0 .../plugins/extras/{util => editor}/regex.lua | 0 .../plugins/extras/{util => editor}/repo.lua | 0 .../extras/{coding => editor}/rest-client.lua | 0 .../extras/{coding => editor}/undotree.lua | 0 .../extras/{util => editor}/winshift.lua | 0 .../lua/plugins/extras/editor/worktree.lua | 35 +++++ .../nvim/lua/plugins/extras/lang/astro.lua | 25 ++++ .config/nvim/lua/plugins/extras/lang/bash.lua | 25 ++++ .config/nvim/lua/plugins/extras/lang/css.lua | 25 ++++ .config/nvim/lua/plugins/extras/lang/git.lua | 14 ++ .config/nvim/lua/plugins/extras/lang/html.lua | 18 +++ .../{markdown.lua => markdown-extended.lua} | 0 .../plugins/extras/lang/python-extended.lua | 9 ++ .config/nvim/lua/plugins/extras/lang/sql.lua | 15 ++ .../nvim/lua/plugins/extras/lang/svelte.lua | 25 ++++ .../extras/lang/tailwindcss-extended.lua | 9 ++ .../extras/lang/typescript-extended.lua | 67 +++++++++ .../lua/plugins/extras/lang/typescript.lua | 65 --------- .config/nvim/lua/plugins/extras/lang/vue.lua | 25 ++++ .config/nvim/lua/plugins/extras/lang/web.lua | 38 ------ .config/nvim/lua/plugins/extras/lsp/lens.lua | 19 +++ .../extras/lsp/{lsp.lua => lsp-extended.lua} | 29 +--- .../nvim/lua/plugins/extras/lsp/timeout.lua | 11 ++ .../lua/plugins/extras/ui/breadcrumbs.lua | 33 +++++ .../lua/plugins/extras/{util => ui}/image.lua | 0 .../lua/plugins/extras/ui/import-cost.lua | 6 + .../nvim/lua/plugins/extras/ui/scrollbar.lua | 16 ++- .../plugins/extras/{editor => util}/numb.lua | 0 .config/nvim/lua/plugins/mason.lua | 34 ----- .config/nvim/lua/plugins/telescope.lua | 18 +++ .config/nvim/lua/plugins/treesitter.lua | 56 -------- .config/nvim/lua/plugins/which-key.lua | 2 - .config/nvim/lua/plugins/yanky.lua | 1 + 52 files changed, 612 insertions(+), 474 deletions(-) create mode 100644 .config/nvim/lua/plugins/extras/coding/annotation.lua rename .config/nvim/lua/plugins/extras/{util => coding}/auto-indent.lua (100%) rename .config/nvim/lua/plugins/extras/{ai => coding}/codeium.lua (100%) rename .config/nvim/lua/plugins/extras/{ai => coding}/copilot.lua (100%) delete mode 100644 .config/nvim/lua/plugins/extras/coding/documentation.lua rename .config/nvim/lua/plugins/extras/{ai => coding}/gpt.lua (100%) rename .config/nvim/lua/plugins/extras/{editor => coding}/multicursor.lua (100%) delete mode 100644 .config/nvim/lua/plugins/extras/editor/breadcrumbs.lua create mode 100644 .config/nvim/lua/plugins/extras/editor/devdocs.lua create mode 100644 .config/nvim/lua/plugins/extras/editor/diffview.lua create mode 100644 .config/nvim/lua/plugins/extras/editor/git-conflict.lua delete mode 100644 .config/nvim/lua/plugins/extras/editor/git.lua create mode 100644 .config/nvim/lua/plugins/extras/editor/live-server.lua rename .config/nvim/lua/plugins/extras/{util => editor}/mini-align.lua (100%) rename .config/nvim/lua/plugins/extras/{coding => editor}/package-info.lua (100%) rename .config/nvim/lua/plugins/extras/{util => editor}/regex.lua (100%) rename .config/nvim/lua/plugins/extras/{util => editor}/repo.lua (100%) rename .config/nvim/lua/plugins/extras/{coding => editor}/rest-client.lua (100%) rename .config/nvim/lua/plugins/extras/{coding => editor}/undotree.lua (100%) rename .config/nvim/lua/plugins/extras/{util => editor}/winshift.lua (100%) create mode 100644 .config/nvim/lua/plugins/extras/editor/worktree.lua create mode 100644 .config/nvim/lua/plugins/extras/lang/astro.lua create mode 100644 .config/nvim/lua/plugins/extras/lang/bash.lua create mode 100644 .config/nvim/lua/plugins/extras/lang/css.lua create mode 100644 .config/nvim/lua/plugins/extras/lang/git.lua create mode 100644 .config/nvim/lua/plugins/extras/lang/html.lua rename .config/nvim/lua/plugins/extras/lang/{markdown.lua => markdown-extended.lua} (100%) create mode 100644 .config/nvim/lua/plugins/extras/lang/python-extended.lua create mode 100644 .config/nvim/lua/plugins/extras/lang/svelte.lua create mode 100644 .config/nvim/lua/plugins/extras/lang/tailwindcss-extended.lua create mode 100644 .config/nvim/lua/plugins/extras/lang/typescript-extended.lua delete mode 100644 .config/nvim/lua/plugins/extras/lang/typescript.lua create mode 100644 .config/nvim/lua/plugins/extras/lang/vue.lua delete mode 100644 .config/nvim/lua/plugins/extras/lang/web.lua create mode 100644 .config/nvim/lua/plugins/extras/lsp/lens.lua rename .config/nvim/lua/plugins/extras/lsp/{lsp.lua => lsp-extended.lua} (90%) create mode 100644 .config/nvim/lua/plugins/extras/lsp/timeout.lua create mode 100644 .config/nvim/lua/plugins/extras/ui/breadcrumbs.lua rename .config/nvim/lua/plugins/extras/{util => ui}/image.lua (100%) create mode 100644 .config/nvim/lua/plugins/extras/ui/import-cost.lua rename .config/nvim/lua/plugins/extras/{editor => util}/numb.lua (100%) diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 4148bb4e..d42a3df3 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,8 +1,8 @@ { - "ChatGPT.nvim": { "branch": "main", "commit": "9f8062c7c40ec082c49f10e20818333a972b8063" }, + "ChatGPT.nvim": { "branch": "main", "commit": "b50fdaf7836c18e0de2f1def0c1f39d56ef8bced" }, "LazyVim": { "branch": "main", "commit": "68ff818a5bb7549f90b05e412b76fe448f605ffb" }, "LuaSnip": { "branch": "master", "commit": "1f4ad8bb72bdeb60975e98652636b991a9b7475d" }, - "SchemaStore.nvim": { "branch": "main", "commit": "fe2ab14cf777a041b7c62af37346f7849400a754" }, + "SchemaStore.nvim": { "branch": "main", "commit": "357fe900baae09e1a3fcef913e49733d05d1f888" }, "actions-preview.nvim": { "branch": "master", "commit": "5650c76abfb84d6498330dd045657ba630ecdbba" }, "alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" }, "animation.nvim": { "branch": "main", "commit": "fb77091ab72ec9971aee0562e7081182527aaa6a" }, @@ -19,14 +19,14 @@ "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "codeium.vim": { "branch": "main", "commit": "1efe2a2cdf516094bdb211aa8a1d45ef01836207" }, - "compiler.nvim": { "branch": "main", "commit": "693fdacb3895887913f03e7ccc8f03b5c5ad234e" }, - "conform.nvim": { "branch": "master", "commit": "ca3dfba94600aa62bfc88ae37cbd4f17eaea2553" }, + "compiler.nvim": { "branch": "main", "commit": "187b86e00183ae863ca2073cfc858ee71f0a6e6a" }, + "conform.nvim": { "branch": "master", "commit": "e76ad83e4a3e303ccf50104a251118613162f8a8" }, "crates.nvim": { "branch": "main", "commit": "f47c77d99f11362ddc2f4891f35407fb0b76d485" }, "dial.nvim": { "branch": "master", "commit": "019bbe9daea397c93a99adc747f8f071379fee5c" }, "diffview.nvim": { "branch": "main", "commit": "d38c1b5266850f77f75e006bcc26213684e1e141" }, "dooku.nvim": { "branch": "main", "commit": "10d7ccca5cdd30d4d03bc7433023590ca620edc7" }, "dressing.nvim": { "branch": "master", "commit": "fe3071330a0720ce3695ac915820c8134b22d1b0" }, - "dropbar.nvim": { "branch": "master", "commit": "183587de8899a8a61edd974ade9c4df73e6b6a49" }, + "dropbar.nvim": { "branch": "master", "commit": "c8a209ee319bb93e41e4daebc02eb1614409c350" }, "edgy.nvim": { "branch": "main", "commit": "8355be45610afdf79a0bab32b91ee297997455b4" }, "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" }, "friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" }, @@ -46,7 +46,7 @@ "lsp-lens.nvim": { "branch": "main", "commit": "d055ed2d3b199bcdfb409b8b184c26c8d9899ac6" }, "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "c1a10a956eab57c8e9e43491a252ac112e765af3" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "faeb361507aa1ef1b0e5645781e2aa0d36a4aa84" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "f0cd12f7a8a310c58cecebddb6b219ffad1cfd0f" }, "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, "middleclass": { "branch": "master", "commit": "9fab4d5bca67262614960960ca35c4740eb2be2c" }, @@ -61,7 +61,7 @@ "multicursors.nvim": { "branch": "main", "commit": "b4e8571b79a7d2a2aea70922c35eac3a71578c0e" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "f053f09962819c1558cd93639aa80edf7c314c17" }, "neoconf.nvim": { "branch": "main", "commit": "64437787dba70fce50dad7bfbb97d184c5bc340f" }, - "neodev.nvim": { "branch": "main", "commit": "1fc168ee385441994d7e9397e854cb20f5c7e324" }, + "neodev.nvim": { "branch": "main", "commit": "b2881eeb395d2b268de5fe9b5e201a8f1816beb8" }, "neogen": { "branch": "main", "commit": "70127baaff25611deaf1a29d801fc054ad9d2dc1" }, "neotest": { "branch": "master", "commit": "d424d262d01bccc1e0b038c9a7220a755afd2a1f" }, "neotest-go": { "branch": "main", "commit": "1a15e1136db43775214a3e7a598f8930c29c94b7" }, @@ -85,14 +85,14 @@ "nvim-jqx": { "branch": "master", "commit": "11b1d0368e5b23b9c356da8e5f70bb5827f27f62" }, "nvim-lightbulb": { "branch": "master", "commit": "8f00b89dd1b1dbde16872bee5fbcee2e58c9b8e9" }, "nvim-lint": { "branch": "master", "commit": "4f2d968a827d86bb40b7b1fad28c11f7b764fef3" }, - "nvim-lspconfig": { "branch": "master", "commit": "0a0682d4646a6869b85a4e4d0e30da5ef8b11f66" }, + "nvim-lspconfig": { "branch": "master", "commit": "d5d7412ff267b92a11a94e6559d5507c43670a52" }, "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" }, "nvim-numbertoggle": { "branch": "main", "commit": "9ab95e60ea5ec138e1b2332e0fc18b8e5de464c6" }, "nvim-puppeteer": { "branch": "main", "commit": "1a941a8684b937295632bc156d1b17e80de2d717" }, "nvim-regexplainer": { "branch": "main", "commit": "187f8666c2ba0fcba4ddb991e48d7229b0a58d96" }, - "nvim-spectre": { "branch": "master", "commit": "dd61feafc250c6ef81240a94b4365132f99a4cfc" }, + "nvim-spectre": { "branch": "master", "commit": "a18a58015b46f02b4fe537ebfffd82e46110ff24" }, "nvim-transparent": { "branch": "main", "commit": "fd35a46f4b7c1b244249266bdcb2da3814f01724" }, - "nvim-treesitter": { "branch": "master", "commit": "c0da2013d1cef768c00f3f0b7f365fe19a10bca3" }, + "nvim-treesitter": { "branch": "master", "commit": "8b9f99660294dcd11d42572c84ee33a1e284f70d" }, "nvim-treesitter-context": { "branch": "master", "commit": "c03f8aab1e6649036d69ba7e3af4d09cb7e4d977" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "4c344ffc8d54d7e1ba2cefaaa2c10ea93aa1cc2d" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "dbcd9388e3b119a87c785e10a00d62876077d23d" }, @@ -108,7 +108,7 @@ "persistent-breakpoints.nvim": { "branch": "main", "commit": "db2ad5974b0435cb806cd287e7525219d6ac4bd3" }, "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, - "rainbow-delimiters.nvim": { "branch": "master", "commit": "9515abd92ae0e42044d47716537f3997991a037b" }, + "rainbow-delimiters.nvim": { "branch": "master", "commit": "a3cfa42deb8ff13ef41e1fe81f2e60ab06150b7d" }, "rayso.nvim": { "branch": "main", "commit": "debedaa7f0ed754ab16a292a45bbae8dcc3410c5" }, "refactoring.nvim": { "branch": "master", "commit": "156532476deb10b1b2a32cb38e1078b3f9951c42" }, "rest.nvim": { "branch": "main", "commit": "b8d6c0a8762fd374e0204768a94241135ca3e311" }, @@ -131,16 +131,16 @@ "telescope-repo.nvim": { "branch": "master", "commit": "e17462610fb936bc8a8cc12a249c3252156dd6f7" }, "telescope-undo.nvim": { "branch": "main", "commit": "13c33c173e53f14df7eec5155c52a3d2ab022d8d" }, "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, - "telescope.nvim": { "branch": "master", "commit": "20bf20500c95208c3ac0ef07245065bf94dcab15" }, + "telescope.nvim": { "branch": "master", "commit": "721cdcae134eb5c564cb6c9df6c317c3854528ad" }, "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, "tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" }, "tree-sitter-hypr": { "branch": "master", "commit": "90b3ddf8a85b5ea3d9dc4920fddb16182a192e14" }, - "treesj": { "branch": "main", "commit": "7b6e1ce4bfd679071a16ed212be6b3b1e0840dd4" }, + "treesj": { "branch": "main", "commit": "1d6e89f4790aa04eaae38fa9460a3ee191961c96" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, "tsc.nvim": { "branch": "main", "commit": "26d3c9010f3ef78fbecdfc69d901ab8ed89cff6c" }, "twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" }, "urlview.nvim": { "branch": "main", "commit": "7d622e11adbc2cac5bba62345ade9b6672d564a4" }, - "venv-selector.nvim": { "branch": "main", "commit": "d5f6602d2d3f4089116a7eb04475b6a295f72419" }, + "venv-selector.nvim": { "branch": "main", "commit": "c259dacb20a00fb84ec6006e9a24b4085b27120a" }, "vim-be-good": { "branch": "master", "commit": "c290810728a4f75e334b07dc0f3a4cdea908d351" }, "vim-dadbod": { "branch": "master", "commit": "fecf5a3ecfb1869f34252c7c27351de99f01ab0e" }, "vim-dadbod-completion": { "branch": "master", "commit": "bcdf3ff768cc7e544a0f78b0383d8719c2116569" }, diff --git a/.config/nvim/lazyvim.json b/.config/nvim/lazyvim.json index e9610ae7..47167518 100644 --- a/.config/nvim/lazyvim.json +++ b/.config/nvim/lazyvim.json @@ -21,32 +21,45 @@ "lazyvim.plugins.extras.ui.alpha", "lazyvim.plugins.extras.util.dot", "lazyvim.plugins.extras.vscode", - "plugins.extras.ai.codeium", - "plugins.extras.ai.gpt", + "plugins.extras.coding.annotation", + "plugins.extras.coding.codeium", "plugins.extras.coding.dial", - "plugins.extras.coding.documentation", - "plugins.extras.coding.package-info", + "plugins.extras.coding.gpt", + "plugins.extras.coding.multicursor", "plugins.extras.coding.refactoring", - "plugins.extras.coding.rest-client", "plugins.extras.coding.treesj", - "plugins.extras.coding.undotree", "plugins.extras.dap.persistent-breakpoints", - "plugins.extras.editor.breadcrumbs", "plugins.extras.editor.color", - "plugins.extras.editor.git", + "plugins.extras.editor.devdocs", + "plugins.extras.editor.diffview", + "plugins.extras.editor.git-conflict", "plugins.extras.editor.github", "plugins.extras.editor.harpoon", - "plugins.extras.editor.multicursor", - "plugins.extras.editor.numb", + "plugins.extras.editor.live-server", + "plugins.extras.editor.mini-align", + "plugins.extras.editor.package-info", + "plugins.extras.editor.regex", + "plugins.extras.editor.repo", + "plugins.extras.editor.rest-client", "plugins.extras.editor.smart-splits", - "plugins.extras.lang.markdown", + "plugins.extras.editor.undotree", + "plugins.extras.editor.winshift", + "plugins.extras.editor.worktree", + "plugins.extras.lang.bash", + "plugins.extras.lang.css", + "plugins.extras.lang.git", + "plugins.extras.lang.html", + "plugins.extras.lang.markdown-extended", + "plugins.extras.lang.python-extended", "plugins.extras.lang.sql", - "plugins.extras.lang.typescript", - "plugins.extras.lang.web", + "plugins.extras.lang.tailwindcss-extended", + "plugins.extras.lang.typescript-extended", "plugins.extras.lsp.compiler", + "plugins.extras.lsp.lens", "plugins.extras.lsp.lightbulb", - "plugins.extras.lsp.lsp", + "plugins.extras.lsp.lsp-extended", "plugins.extras.lsp.repl", + "plugins.extras.lsp.timeout", "plugins.extras.test.jest-test", "plugins.extras.test.mocha-test", "plugins.extras.test.python-test", @@ -54,8 +67,10 @@ "plugins.extras.test.vitest-test", "plugins.extras.ui.alpha", "plugins.extras.ui.block", + "plugins.extras.ui.breadcrumbs", "plugins.extras.ui.edgy", "plugins.extras.ui.highlight-undo", + "plugins.extras.ui.import-cost", "plugins.extras.ui.modes", "plugins.extras.ui.number-toggle", "plugins.extras.ui.rainbow-delimeters", @@ -65,15 +80,12 @@ "plugins.extras.ui.zen-mode", "plugins.extras.util.bigfile", "plugins.extras.util.discordrcp", - "plugins.extras.util.mini-align", + "plugins.extras.util.numb", "plugins.extras.util.rayso", - "plugins.extras.util.regex", - "plugins.extras.util.repo", "plugins.extras.util.smooth-scrolling", "plugins.extras.util.suda", "plugins.extras.util.vim-be-good", - "plugins.extras.util.wakatime", - "plugins.extras.util.winshift" + "plugins.extras.util.wakatime" ], "news": { "NEWS.md": "2123" diff --git a/.config/nvim/lua/plugins/conform.lua b/.config/nvim/lua/plugins/conform.lua index cff2cb48..4b31e027 100644 --- a/.config/nvim/lua/plugins/conform.lua +++ b/.config/nvim/lua/plugins/conform.lua @@ -30,6 +30,9 @@ return { less = { { "prettierd", "prettier", "stylelint" } }, markdown = { { "prettierd", "prettier" } }, toml = { "taplo" }, + sql = { "sqlfmt" }, + mysql = { "sqlfmt" }, + plsql = { "sqlfmt" }, }, }, }, diff --git a/.config/nvim/lua/plugins/extras/coding/annotation.lua b/.config/nvim/lua/plugins/extras/coding/annotation.lua new file mode 100644 index 00000000..b662308f --- /dev/null +++ b/.config/nvim/lua/plugins/extras/coding/annotation.lua @@ -0,0 +1,66 @@ +return { + { + "danymat/neogen", + opts = { + snippet_engine = "luasnip", + enabled = true, + }, + keys = { + { + "ad", + function() + require("neogen").generate() + end, + desc = "Default Annotation", + }, + { + "ac", + function() + require("neogen").generate({ type = "class" }) + end, + desc = "Class", + }, + { + "af", + function() + require("neogen").generate({ type = "func" }) + end, + desc = "Function", + }, + { + "at", + function() + require("neogen").generate({ type = "type" }) + end, + desc = "Type", + }, + { + "aF", + function() + require("neogen").generate({ type = "file" }) + end, + desc = "File", + }, + }, + }, + { + "folke/which-key.nvim", + opts = { + defaults = { + ["a"] = { name = "+annotation" }, + }, + }, + }, + { + "Zeioth/dooku.nvim", + cmd = { "DookuGenerate", "DookuOpen", "DookuAutoSetup" }, + opts = {}, + keys = { + { + "ag", + "DookuGenerate", + desc = "Generate HTML Docs", + }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/util/auto-indent.lua b/.config/nvim/lua/plugins/extras/coding/auto-indent.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/util/auto-indent.lua rename to .config/nvim/lua/plugins/extras/coding/auto-indent.lua diff --git a/.config/nvim/lua/plugins/extras/ai/codeium.lua b/.config/nvim/lua/plugins/extras/coding/codeium.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/ai/codeium.lua rename to .config/nvim/lua/plugins/extras/coding/codeium.lua diff --git a/.config/nvim/lua/plugins/extras/ai/copilot.lua b/.config/nvim/lua/plugins/extras/coding/copilot.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/ai/copilot.lua rename to .config/nvim/lua/plugins/extras/coding/copilot.lua diff --git a/.config/nvim/lua/plugins/extras/coding/documentation.lua b/.config/nvim/lua/plugins/extras/coding/documentation.lua deleted file mode 100644 index 4c393b8b..00000000 --- a/.config/nvim/lua/plugins/extras/coding/documentation.lua +++ /dev/null @@ -1,128 +0,0 @@ -return { - { - "danymat/neogen", - opts = { - snippet_engine = "luasnip", - enabled = true, - }, - keys = { - { - "ad", - function() - require("neogen").generate() - end, - desc = "Default Annotation", - }, - { - "ac", - function() - require("neogen").generate({ type = "class" }) - end, - desc = "Class", - }, - { - "af", - function() - require("neogen").generate({ type = "func" }) - end, - desc = "Function", - }, - { - "at", - function() - require("neogen").generate({ type = "type" }) - end, - desc = "Type", - }, - { - "aF", - function() - require("neogen").generate({ type = "file" }) - end, - desc = "File", - }, - }, - }, - { - "folke/which-key.nvim", - opts = { - defaults = { - ["a"] = { name = "+annotation" }, - }, - }, - }, - { - "Zeioth/dooku.nvim", - cmd = { "DookuGenerate", "DookuOpen", "DookuAutoSetup" }, - opts = {}, - keys = { - { - "ag", - "DookuGenerate", - desc = "Generate HTML Docs", - }, - }, - }, - { - "luckasRanarison/nvim-devdocs", - cmd = { - "DevdocsFetch", - "DevdocsInstall", - "DevdocsUninstall", - "DevdocsOpen", - "DevdocsOpenFloat", - "DevdocsOpenCurrent", - "DevdocsOpenCurrentFloat", - "DevdocsUpdate", - "DevdocsUpdateAll", - }, - keys = { - { "sE", "DevdocsOpen", desc = "Devdocs" }, - { "se", "DevdocsOpenCurrent", desc = "Devdocs Current" }, - }, - opts = { - dir_path = vim.fn.stdpath("data") .. "/devdocs", -- installation directory - telescope = {}, -- passed to the telescope picker - float_win = { -- passed to nvim_open_win(), see :h api-floatwin - relative = "editor", - height = 25, - width = 100, - border = "rounded", - }, - wrap = false, -- text wrap, only applies to floating window - previewer_cmd = nil, -- for example: "glow" - cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "80" } - cmd_ignore = {}, -- ignore cmd rendering for the listed docs - picker_cmd = false, -- use cmd previewer in picker preview - picker_cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "50" } - after_open = function(bufnr) - vim.api.nvim_buf_set_keymap(bufnr, "n", "q", ":close", {}) - end, - ensure_installed = { - "css", - "html", - "javascript", - "lua-5.4", - "python-3.11", - "react", - "typescript", - "angular", - "bash", - "fish-3.6", - "git", - "go", - "rust", - "sass", - "vue-3", - "docker", - "markdown", - "svelte", - "tailwindcss", - "eslint", - "prettier", - "npm", - "node", - }, - }, - }, -} diff --git a/.config/nvim/lua/plugins/extras/ai/gpt.lua b/.config/nvim/lua/plugins/extras/coding/gpt.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/ai/gpt.lua rename to .config/nvim/lua/plugins/extras/coding/gpt.lua diff --git a/.config/nvim/lua/plugins/extras/editor/multicursor.lua b/.config/nvim/lua/plugins/extras/coding/multicursor.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/editor/multicursor.lua rename to .config/nvim/lua/plugins/extras/coding/multicursor.lua diff --git a/.config/nvim/lua/plugins/extras/editor/breadcrumbs.lua b/.config/nvim/lua/plugins/extras/editor/breadcrumbs.lua deleted file mode 100644 index f872c423..00000000 --- a/.config/nvim/lua/plugins/extras/editor/breadcrumbs.lua +++ /dev/null @@ -1,27 +0,0 @@ -return { - { - "Bekaboo/dropbar.nvim", -- NOTE: NVIM >= 10.0 - event = "BufRead", - opts = { - sources = { - terminal = { - name = "", - }, - }, - }, - }, - { - "utilyre/barbecue.nvim", -- NOTE: NVIM < 10.0 - name = "barbecue", - version = "*", - dependencies = { - "SmiteshP/nvim-navic", - "nvim-tree/nvim-web-devicons", -- optional dependency - }, - event = "BufRead", - enabled = false, - opts = { - theme = "catppuccin-macchiato", - }, - }, -} diff --git a/.config/nvim/lua/plugins/extras/editor/devdocs.lua b/.config/nvim/lua/plugins/extras/editor/devdocs.lua new file mode 100644 index 00000000..c288ad8c --- /dev/null +++ b/.config/nvim/lua/plugins/extras/editor/devdocs.lua @@ -0,0 +1,62 @@ +return { + "luckasRanarison/nvim-devdocs", + cmd = { + "DevdocsFetch", + "DevdocsInstall", + "DevdocsUninstall", + "DevdocsOpen", + "DevdocsOpenFloat", + "DevdocsOpenCurrent", + "DevdocsOpenCurrentFloat", + "DevdocsUpdate", + "DevdocsUpdateAll", + }, + keys = { + { "sE", "DevdocsOpen", desc = "Devdocs" }, + { "se", "DevdocsOpenCurrent", desc = "Devdocs Current" }, + }, + opts = { + dir_path = vim.fn.stdpath("data") .. "/devdocs", -- installation directory + telescope = {}, -- passed to the telescope picker + float_win = { -- passed to nvim_open_win(), see :h api-floatwin + relative = "editor", + height = 25, + width = 100, + border = "rounded", + }, + wrap = false, -- text wrap, only applies to floating window + previewer_cmd = nil, -- for example: "glow" + cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "80" } + cmd_ignore = {}, -- ignore cmd rendering for the listed docs + picker_cmd = false, -- use cmd previewer in picker preview + picker_cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "50" } + after_open = function(bufnr) + vim.api.nvim_buf_set_keymap(bufnr, "n", "q", ":close", {}) + end, + ensure_installed = { + "css", + "html", + "javascript", + "lua-5.4", + "python-3.11", + "react", + "typescript", + "angular", + "bash", + "fish-3.6", + "git", + "go", + "rust", + "sass", + "vue-3", + "docker", + "markdown", + "svelte", + "tailwindcss", + "eslint", + "prettier", + "npm", + "node", + }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/editor/diffview.lua b/.config/nvim/lua/plugins/extras/editor/diffview.lua new file mode 100644 index 00000000..5e08d373 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/editor/diffview.lua @@ -0,0 +1,7 @@ +return { + "sindrets/diffview.nvim", + keys = { + { "gd", "DiffviewFileHistory", desc = "Diff File History" }, + }, + opts = {}, +} diff --git a/.config/nvim/lua/plugins/extras/editor/git-conflict.lua b/.config/nvim/lua/plugins/extras/editor/git-conflict.lua new file mode 100644 index 00000000..81eb4ed0 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/editor/git-conflict.lua @@ -0,0 +1,25 @@ +return { + { + "akinsho/git-conflict.nvim", + opts = { + default_mappings = false, + }, + keys = { + { "gct", "GitConflictChooseTheirs", desc = "Choose Their Changes" }, + { "gco", "GitConflictChooseOurs", desc = "Choose Our Changes" }, + { "gcb", "GitConflictChooseBoth", desc = "Choose Both changes" }, + { "gcl", "GitConflictListQf", desc = "Git Conflict Quicklist" }, + { "[g", "GitConflictPrevConflict", desc = "Prev Git Conflict" }, + { "]g", "GitConflictPrevConflict", desc = "Next Git Conflict" }, + }, + + { + "folke/which-key.nvim", + opts = { + defaults = { + ["gc"] = { name = "+conflicts" }, + }, + }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/editor/git.lua b/.config/nvim/lua/plugins/extras/editor/git.lua deleted file mode 100644 index aa39ce37..00000000 --- a/.config/nvim/lua/plugins/extras/editor/git.lua +++ /dev/null @@ -1,59 +0,0 @@ -local Util = require("lazyvim.util") - -return { - { - "sindrets/diffview.nvim", - keys = { - { "gd", "DiffviewFileHistory", desc = "Diff File History" }, - }, - opts = {}, - }, - { - "akinsho/git-conflict.nvim", - opts = { - default_mappings = false, - }, - keys = { - { "gct", "GitConflictChooseTheirs", desc = "Choose Their Changes" }, - { "gco", "GitConflictChooseOurs", desc = "Choose Our Changes" }, - { "gcb", "GitConflictChooseBoth", desc = "Choose Both changes" }, - { "gcl", "GitConflictListQf", desc = "Git Conflict Quicklist" }, - { "[g", "GitConflictPrevConflict", desc = "Prev Git Conflict" }, - { "]g", "GitConflictPrevConflict", desc = "Next Git Conflict" }, - }, - }, - { - "ThePrimeagen/git-worktree.nvim", - opts = {}, - config = function(_, opts) - Util.on_load("telescope.nvim", function() - require("telescope").load_extension("git_worktree") - end) - end, - keys = { - { - "gwm", - function() - require("telescope").extensions.git_worktree.git_worktrees() - end, - desc = "Manage Worktrees", - }, - { - "gwc", - function() - require("telescope").extensions.git_worktree.create_git_worktree() - end, - desc = "Create Worktree", - }, - }, - }, - { - "folke/which-key.nvim", - opts = { - defaults = { - ["gc"] = { name = "+conflicts" }, - ["gw"] = { name = "+worktrees" }, - }, - }, - }, -} diff --git a/.config/nvim/lua/plugins/extras/editor/github.lua b/.config/nvim/lua/plugins/extras/editor/github.lua index 4780eec7..a9af940f 100644 --- a/.config/nvim/lua/plugins/extras/editor/github.lua +++ b/.config/nvim/lua/plugins/extras/editor/github.lua @@ -1,4 +1,5 @@ local prefix = "G" + return { { "almo7aya/openingh.nvim", diff --git a/.config/nvim/lua/plugins/extras/editor/live-server.lua b/.config/nvim/lua/plugins/extras/editor/live-server.lua new file mode 100644 index 00000000..f201a7db --- /dev/null +++ b/.config/nvim/lua/plugins/extras/editor/live-server.lua @@ -0,0 +1,10 @@ +return { + "aurum77/live-server.nvim", + build = function() + require("live_server.util").install() + end, + cmd = { "LiveServer", "LiveServerStart", "LiveServerStop" }, + keys = { + { "cV", "LiveServer", desc = "Live Server" }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/util/mini-align.lua b/.config/nvim/lua/plugins/extras/editor/mini-align.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/util/mini-align.lua rename to .config/nvim/lua/plugins/extras/editor/mini-align.lua diff --git a/.config/nvim/lua/plugins/extras/coding/package-info.lua b/.config/nvim/lua/plugins/extras/editor/package-info.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/coding/package-info.lua rename to .config/nvim/lua/plugins/extras/editor/package-info.lua diff --git a/.config/nvim/lua/plugins/extras/util/regex.lua b/.config/nvim/lua/plugins/extras/editor/regex.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/util/regex.lua rename to .config/nvim/lua/plugins/extras/editor/regex.lua diff --git a/.config/nvim/lua/plugins/extras/util/repo.lua b/.config/nvim/lua/plugins/extras/editor/repo.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/util/repo.lua rename to .config/nvim/lua/plugins/extras/editor/repo.lua diff --git a/.config/nvim/lua/plugins/extras/coding/rest-client.lua b/.config/nvim/lua/plugins/extras/editor/rest-client.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/coding/rest-client.lua rename to .config/nvim/lua/plugins/extras/editor/rest-client.lua diff --git a/.config/nvim/lua/plugins/extras/coding/undotree.lua b/.config/nvim/lua/plugins/extras/editor/undotree.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/coding/undotree.lua rename to .config/nvim/lua/plugins/extras/editor/undotree.lua diff --git a/.config/nvim/lua/plugins/extras/util/winshift.lua b/.config/nvim/lua/plugins/extras/editor/winshift.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/util/winshift.lua rename to .config/nvim/lua/plugins/extras/editor/winshift.lua diff --git a/.config/nvim/lua/plugins/extras/editor/worktree.lua b/.config/nvim/lua/plugins/extras/editor/worktree.lua new file mode 100644 index 00000000..4ab75892 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/editor/worktree.lua @@ -0,0 +1,35 @@ +return { + { + "ThePrimeagen/git-worktree.nvim", + opts = {}, + config = function(_, opts) + Util.on_load("telescope.nvim", function() + require("telescope").load_extension("git_worktree") + end) + end, + keys = { + { + "gwm", + function() + require("telescope").extensions.git_worktree.git_worktrees() + end, + desc = "Manage Worktrees", + }, + { + "gwc", + function() + require("telescope").extensions.git_worktree.create_git_worktree() + end, + desc = "Create Worktree", + }, + }, + }, + { + "folke/which-key.nvim", + opts = { + defaults = { + ["gw"] = { name = "+worktrees" }, + }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lang/astro.lua b/.config/nvim/lua/plugins/extras/lang/astro.lua new file mode 100644 index 00000000..6c74f97d --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lang/astro.lua @@ -0,0 +1,25 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "astro" }) + end + end, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + astro = {}, + }, + }, + }, + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "astro-language-server" }) + end, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lang/bash.lua b/.config/nvim/lua/plugins/extras/lang/bash.lua new file mode 100644 index 00000000..29600f3d --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lang/bash.lua @@ -0,0 +1,25 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "bash", "fish" }) + end + end, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + bashls = {}, + }, + }, + }, + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "bash-language-server", "shfmt", "shellharden" }) + end, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lang/css.lua b/.config/nvim/lua/plugins/extras/lang/css.lua new file mode 100644 index 00000000..71927d99 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lang/css.lua @@ -0,0 +1,25 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "css", "scss" }) + end + end, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + cssmodules_ls = {}, + }, + }, + }, + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "cssmodules-language-server", "rustywind" }) + end, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lang/git.lua b/.config/nvim/lua/plugins/extras/lang/git.lua new file mode 100644 index 00000000..46d832ad --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lang/git.lua @@ -0,0 +1,14 @@ +return { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { + "git_config", + "git_rebase", + "gitattributes", + "gitcommit", + "gitignore", + }) + end + end, +} diff --git a/.config/nvim/lua/plugins/extras/lang/html.lua b/.config/nvim/lua/plugins/extras/lang/html.lua new file mode 100644 index 00000000..e85dd525 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lang/html.lua @@ -0,0 +1,18 @@ +return { + { + "neovim/nvim-lspconfig", + opts = { + servers = { + emmet_language_server = {}, + html = {}, + }, + }, + }, + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "emmet-language-server", "html-lsp" }) + end, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lang/markdown.lua b/.config/nvim/lua/plugins/extras/lang/markdown-extended.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/lang/markdown.lua rename to .config/nvim/lua/plugins/extras/lang/markdown-extended.lua diff --git a/.config/nvim/lua/plugins/extras/lang/python-extended.lua b/.config/nvim/lua/plugins/extras/lang/python-extended.lua new file mode 100644 index 00000000..3c2b5f31 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lang/python-extended.lua @@ -0,0 +1,9 @@ +return { + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "pylint", "isort" }) + end, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lang/sql.lua b/.config/nvim/lua/plugins/extras/lang/sql.lua index 04804700..78589b2d 100644 --- a/.config/nvim/lua/plugins/extras/lang/sql.lua +++ b/.config/nvim/lua/plugins/extras/lang/sql.lua @@ -69,4 +69,19 @@ return { }, }, }, + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "sqlfmt", "sqlls" }) + end, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + sqlls = {}, + }, + }, + }, } diff --git a/.config/nvim/lua/plugins/extras/lang/svelte.lua b/.config/nvim/lua/plugins/extras/lang/svelte.lua new file mode 100644 index 00000000..a8537609 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lang/svelte.lua @@ -0,0 +1,25 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "svelte" }) + end + end, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + svelte = {}, + }, + }, + }, + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "svelte-language-server" }) + end, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lang/tailwindcss-extended.lua b/.config/nvim/lua/plugins/extras/lang/tailwindcss-extended.lua new file mode 100644 index 00000000..256e89a6 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lang/tailwindcss-extended.lua @@ -0,0 +1,9 @@ +return { + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "stylelint" }) + end, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lang/typescript-extended.lua b/.config/nvim/lua/plugins/extras/lang/typescript-extended.lua new file mode 100644 index 00000000..4d08eb13 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lang/typescript-extended.lua @@ -0,0 +1,67 @@ +return { + { + "dmmulroy/tsc.nvim", + config = true, + cmd = "TSC", + keys = { + { "ct", "TSC", desc = "Type Check" }, + }, + }, + { + -- TODO: Need to look more into this plugin + "pmizio/typescript-tools.nvim", + enabled = false, + event = { + "BufRead *.js,*.jsx,*.mjs,*.cjs,*ts,*tsx", + "BufNewFile *.js,*.jsx,*.mjs,*.cjs,*ts,*tsx", + }, + dependencies = { + "nvim-lua/plenary.nvim", + "neovim/nvim-lspconfig", + }, + opts = { + on_attach = function(client, bufnr) + client.server_capabilities.documentFormattingProvider = false + client.server_capabilities.documentRangeFormattingProvider = false + + vim.keymap.set( + "n", + "gD", + "TSToolsGoToSourceDefinition", + { buffer = bufnr, desc = "Source Definition" } + ) + + vim.keymap.set( + "n", + "i", + "TSToolsAddMissingImports", + { buffer = bufnr, desc = "Add missing imports" } + ) + vim.keymap.set( + "n", + "o", + "TSToolsOrganizeImports", + { buffer = bufnr, desc = "Organize imports" } + ) + vim.keymap.set( + "n", + "r", + "TSToolsRemoveUnused", + { buffer = bufnr, desc = "Remove unused variables" } + ) + vim.keymap.set("n", "f", "TSToolsFixAll", { buffer = bufnr, desc = "Fix all" }) + end, + settings = { + tsserver_file_preferences = { + includeInlayParameterNameHints = "all", + includeInlayParameterNameHintsWhenArgumentMatchesName = false, + includeInlayFunctionParameterTypeHints = true, + includeInlayVariableTypeHints = true, + includeInlayPropertyDeclarationTypeHints = true, + includeInlayFunctionLikeReturnTypeHints = true, + includeInlayEnumMemberValueHints = true, + }, + }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lang/typescript.lua b/.config/nvim/lua/plugins/extras/lang/typescript.lua deleted file mode 100644 index fb8f0c22..00000000 --- a/.config/nvim/lua/plugins/extras/lang/typescript.lua +++ /dev/null @@ -1,65 +0,0 @@ -return { - { - "dmmulroy/tsc.nvim", - config = true, - cmd = "TSC", - keys = { - { "ct", "TSC", desc = "Type Check" }, - }, - }, - -- { - -- "pmizio/typescript-tools.nvim", - -- event = { - -- "BufRead *.js,*.jsx,*.mjs,*.cjs,*ts,*tsx", - -- "BufNewFile *.js,*.jsx,*.mjs,*.cjs,*ts,*tsx", - -- }, - -- dependencies = { - -- "nvim-lua/plenary.nvim", - -- "neovim/nvim-lspconfig", - -- }, - -- opts = { - -- on_attach = function(client, bufnr) - -- client.server_capabilities.documentFormattingProvider = false - -- client.server_capabilities.documentRangeFormattingProvider = false - -- - -- vim.keymap.set( - -- "n", - -- "gD", - -- "TSToolsGoToSourceDefinition", - -- { buffer = bufnr, desc = "Source Definition" } - -- ) - -- - -- vim.keymap.set( - -- "n", - -- "i", - -- "TSToolsAddMissingImports", - -- { buffer = bufnr, desc = "Add missing imports" } - -- ) - -- vim.keymap.set( - -- "n", - -- "o", - -- "TSToolsOrganizeImports", - -- { buffer = bufnr, desc = "Organize imports" } - -- ) - -- vim.keymap.set( - -- "n", - -- "r", - -- "TSToolsRemoveUnused", - -- { buffer = bufnr, desc = "Remove unused variables" } - -- ) - -- vim.keymap.set("n", "f", "TSToolsFixAll", { buffer = bufnr, desc = "Fix all" }) - -- end, - -- settings = { - -- tsserver_file_preferences = { - -- includeInlayParameterNameHints = "all", - -- includeInlayParameterNameHintsWhenArgumentMatchesName = false, - -- includeInlayFunctionParameterTypeHints = true, - -- includeInlayVariableTypeHints = true, - -- includeInlayPropertyDeclarationTypeHints = true, - -- includeInlayFunctionLikeReturnTypeHints = true, - -- includeInlayEnumMemberValueHints = true, - -- }, - -- }, - -- }, - -- }, -} diff --git a/.config/nvim/lua/plugins/extras/lang/vue.lua b/.config/nvim/lua/plugins/extras/lang/vue.lua new file mode 100644 index 00000000..b0db6ad7 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lang/vue.lua @@ -0,0 +1,25 @@ +return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "vue" }) + end + end, + }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + vuels = {}, + }, + }, + }, + { + "williamboman/mason.nvim", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "vetur-vls" }) + end, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lang/web.lua b/.config/nvim/lua/plugins/extras/lang/web.lua deleted file mode 100644 index f447db24..00000000 --- a/.config/nvim/lua/plugins/extras/lang/web.lua +++ /dev/null @@ -1,38 +0,0 @@ -local Util = require("lazyvim.util") - -return { - { - "aurum77/live-server.nvim", - build = function() - require("live_server.util").install() - end, - cmd = { "LiveServer", "LiveServerStart", "LiveServerStop" }, - keys = { - { "cV", "LiveServer", desc = "Live Server" }, - }, - }, - { - "barrett-ruth/import-cost.nvim", - build = "sh install.sh yarn", - event = "BufReadPost", - config = true, - }, - { - "piersolenski/telescope-import.nvim", - config = function(_, opts) - Util.on_load("telescope.nvim", function() - require("telescope").setup({ - extensions = { - import = { - insert_at_top = true, - }, - }, - }) - require("telescope").load_extension("import") - end) - end, - keys = { - { "si", "Telescope import", desc = "Imports" }, - }, - }, -} diff --git a/.config/nvim/lua/plugins/extras/lsp/lens.lua b/.config/nvim/lua/plugins/extras/lsp/lens.lua new file mode 100644 index 00000000..dd4c5126 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lsp/lens.lua @@ -0,0 +1,19 @@ +return { + "VidocqH/lsp-lens.nvim", + event = "BufReadPost", + opts = { + sections = { + definition = false, + references = function(count) + return " Ref: " .. count + end, + implements = function(count) + return "󱁤 Imp: " .. count + end, + git_authors = false, + }, + }, + keys = { + { "ue", "LspLensToggle", desc = "Toggle Lsp Lens" }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lsp/lsp.lua b/.config/nvim/lua/plugins/extras/lsp/lsp-extended.lua similarity index 90% rename from .config/nvim/lua/plugins/extras/lsp/lsp.lua rename to .config/nvim/lua/plugins/extras/lsp/lsp-extended.lua index 0aed75e3..a4ca9057 100644 --- a/.config/nvim/lua/plugins/extras/lsp/lsp.lua +++ b/.config/nvim/lua/plugins/extras/lsp/lsp-extended.lua @@ -196,33 +196,12 @@ return { end, }, { - "hinell/lsp-timeout.nvim", - event = "LspAttach", - enabled = false, - dependencies = { "neovim/nvim-lspconfig" }, - init = function() - vim.g["lsp-timeout-config"] = { - startTimeout = 1000 * 1, -- ms before restart - } - end, - }, - { - "VidocqH/lsp-lens.nvim", - event = "BufReadPost", + "folke/which-key.nvim", + event = "VeryLazy", opts = { - sections = { - definition = false, - references = function(count) - return " Ref: " .. count - end, - implements = function(count) - return "󱁤 Imp: " .. count - end, - git_authors = false, + defaults = { + ["cL"] = { name = "+lsp" }, }, }, - keys = { - { "ue", "LspLensToggle", desc = "Toggle Lsp Lens" }, - }, }, } diff --git a/.config/nvim/lua/plugins/extras/lsp/timeout.lua b/.config/nvim/lua/plugins/extras/lsp/timeout.lua new file mode 100644 index 00000000..20e2b5ec --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lsp/timeout.lua @@ -0,0 +1,11 @@ +return { + "hinell/lsp-timeout.nvim", + event = "LspAttach", + enabled = false, + dependencies = { "neovim/nvim-lspconfig" }, + init = function() + vim.g["lsp-timeout-config"] = { + startTimeout = 1000 * 1, -- ms before restart + } + end, +} diff --git a/.config/nvim/lua/plugins/extras/ui/breadcrumbs.lua b/.config/nvim/lua/plugins/extras/ui/breadcrumbs.lua new file mode 100644 index 00000000..109489b2 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/ui/breadcrumbs.lua @@ -0,0 +1,33 @@ +local version = vim.fn.has("nvim-0.10") + +if version then + return { + { + "Bekaboo/dropbar.nvim", + event = "BufRead", + opts = { + sources = { + terminal = { + name = "", + }, + }, + }, + }, + } +else + return { + { + "utilyre/barbecue.nvim", + name = "barbecue", + version = "*", + dependencies = { + "SmiteshP/nvim-navic", + "nvim-tree/nvim-web-devicons", -- optional dependency + }, + event = "BufRead", + opts = { + theme = "catppuccin-macchiato", + }, + }, + } +end diff --git a/.config/nvim/lua/plugins/extras/util/image.lua b/.config/nvim/lua/plugins/extras/ui/image.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/util/image.lua rename to .config/nvim/lua/plugins/extras/ui/image.lua diff --git a/.config/nvim/lua/plugins/extras/ui/import-cost.lua b/.config/nvim/lua/plugins/extras/ui/import-cost.lua new file mode 100644 index 00000000..d867b41c --- /dev/null +++ b/.config/nvim/lua/plugins/extras/ui/import-cost.lua @@ -0,0 +1,6 @@ +return { + "barrett-ruth/import-cost.nvim", + build = "sh install.sh yarn", + event = "BufReadPost", + config = true, +} diff --git a/.config/nvim/lua/plugins/extras/ui/scrollbar.lua b/.config/nvim/lua/plugins/extras/ui/scrollbar.lua index 1711b7dd..d165d0f1 100644 --- a/.config/nvim/lua/plugins/extras/ui/scrollbar.lua +++ b/.config/nvim/lua/plugins/extras/ui/scrollbar.lua @@ -1,14 +1,16 @@ -return { - { +local version = vim.fn.has("nvim-0.10") + +if version then + return { "lewis6991/satellite.nvim", opts = { excluded_filetypes = { "neo-tree", "alpha", "symbols-outline" }, }, event = "BufRead", - }, - { + } +else + return { "dstein64/nvim-scrollview", - enabled = false, event = "BufReadPost", keys = { { "uS", "ScrollViewToggle", desc = "Toggle Scrollview" } }, config = function() @@ -22,5 +24,5 @@ return { diagnostics_hint_symbol = "", }) end, - }, -} + } +end diff --git a/.config/nvim/lua/plugins/extras/editor/numb.lua b/.config/nvim/lua/plugins/extras/util/numb.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/editor/numb.lua rename to .config/nvim/lua/plugins/extras/util/numb.lua diff --git a/.config/nvim/lua/plugins/mason.lua b/.config/nvim/lua/plugins/mason.lua index f09bea12..6400cdd1 100644 --- a/.config/nvim/lua/plugins/mason.lua +++ b/.config/nvim/lua/plugins/mason.lua @@ -5,39 +5,5 @@ return { { "cm", false }, { "cim", "Mason", desc = "Mason" }, }, - opts = { - ensure_installed = { - "black", - "prettierd", - "codespell", - "csharpier", - "css-lsp", - "cssmodules-language-server", - "ktlint", - "hadolint", - "html-lsp", - "rustywind", - "sqlfmt", - "markdownlint", - "stylua", - "shfmt", - "angular-language-server", - "bash-language-server", - "omnisharp", - "sqlls", - "goimports", - "shellharden", - "codelldb", - "markdownlint", - "pylint", - "gofumpt", - "delve", - "impl", - "gomodifytags", - "isort", - "stylelint", - "js-debug-adapter", - }, - }, }, } diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 036da77b..8cbe3d0c 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -12,6 +12,24 @@ return { }, cmd = "Nerdy", }, + { + "piersolenski/telescope-import.nvim", + config = function(_, opts) + Util.on_load("telescope.nvim", function() + require("telescope").setup({ + extensions = { + import = { + insert_at_top = true, + }, + }, + }) + require("telescope").load_extension("import") + end) + end, + keys = { + { "si", "Telescope import", desc = "Imports" }, + }, + }, { "nvim-telescope/telescope-fzf-native.nvim", build = "make", diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua index 57e2fb7a..42f2119e 100644 --- a/.config/nvim/lua/plugins/treesitter.lua +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -6,64 +6,8 @@ return { opts = { endwise = { enable = true }, ensure_installed = { - "bash", - "c", - "diff", - "html", - "javascript", - "jsdoc", - "json", - "jsonc", - "lua", - "luadoc", - "luap", - "markdown", - "markdown_inline", - "python", - "query", - "regex", - "toml", - "tsx", - "typescript", - "vim", - "vimdoc", - "yaml", - "arduino", - "diff", - "dart", - "css", - "c_sharp", - "comment", - "fish", - "git_config", - "git_rebase", - "gitattributes", - "gitcommit", - "gitignore", - "groovy", - "hjson", "http", "ini", - "luadoc", - "make", - "kotlin", - "julia", - "meson", - "perl", - "php", - "prisma", - "r", - "rasi", - "ruby", - "sql", - "scss", - "slint", - "svelte", - "todotxt", - "vim", - "vue", - "hypr", - "java", }, }, }, diff --git a/.config/nvim/lua/plugins/which-key.lua b/.config/nvim/lua/plugins/which-key.lua index 69813ae8..878d2ecc 100644 --- a/.config/nvim/lua/plugins/which-key.lua +++ b/.config/nvim/lua/plugins/which-key.lua @@ -4,8 +4,6 @@ return { event = "VeryLazy", opts = { defaults = { - ["dP"] = { name = "+python" }, - ["cL"] = { name = "+lsp" }, ["ci"] = { name = "+info" }, }, }, diff --git a/.config/nvim/lua/plugins/yanky.lua b/.config/nvim/lua/plugins/yanky.lua index 0db06900..bab1c961 100644 --- a/.config/nvim/lua/plugins/yanky.lua +++ b/.config/nvim/lua/plugins/yanky.lua @@ -6,6 +6,7 @@ return { function() require("telescope").extensions.yank_history.yank_history({}) end, + mode = { "n", "v" }, desc = "Yank History", }, },