From e5283a89ed6a38289a44f0a4c21a822670424897 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Thu, 16 Oct 2025 10:51:11 -0400 Subject: [PATCH] refactor(nvim): simplify lazy loading configuration --- lazy-lock.json | 12 +- lua/plugins/cloudflare.lua | 293 ------------------------------------- 2 files changed, 11 insertions(+), 294 deletions(-) delete mode 100644 lua/plugins/cloudflare.lua diff --git a/lazy-lock.json b/lazy-lock.json index dbf2d1b..e1f5e09 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -17,10 +17,12 @@ "chezmoi.vim": { "branch": "main", "commit": "ca5f2ed602046d5662cb76d845c4b510aae0ce84" }, "cmp-dap": { "branch": "master", "commit": "ea92773e84c0ad3288c3bc5e452ac91559669087" }, "conform.nvim": { "branch": "master", "commit": "fbcb4fa7f34bfea9be702ffff481a8e336ebf6ed" }, + "crates.nvim": { "branch": "main", "commit": "ac9fa498a9edb96dc3056724ff69d5f40b898453" }, "cyberdream.nvim": { "branch": "main", "commit": "eba11f590026e74915e13d12a53cdbdc9b98d9f9" }, "deno-nvim": { "branch": "master", "commit": "5c1ef9762f916033bd3b9b37878384cae24ddb4e" }, "doodle": { "branch": "main", "commit": "2f192d6ec821f9ae14460689047438aae8002ec9" }, "dressing.nvim": { "branch": "master", "commit": "3a45525bb182730fe462325c99395529308f431e" }, + "editorconfig-vim": { "branch": "master", "commit": "6a58b7c11f79c0e1d0f20533b3f42f2a11490cf8" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" }, "gopher.nvim": { "branch": "main", "commit": "295e21e637f9194a4d2bc34622d324a88b028141" }, @@ -30,10 +32,12 @@ "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, + "lsp_lines.nvim": { "branch": "main", "commit": "a92c755f182b89ea91bd8a6a2227208026f27b4d" }, "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, "mason-null-ls.nvim": { "branch": "main", "commit": "2b8433f76598397fcc97318d410e0c4f7a4bea6a" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "4c2cdc69d69fe00c15ae8648f7e954d99e5de3ea" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, "mini.bufremove": { "branch": "main", "commit": "285bdac9596ee7375db50c0f76ed04336dcd2685" }, "neo-tree.nvim": { "branch": "main", "commit": "c4c168e459395275c552179a1baf9c3d885d6a74" }, @@ -42,15 +46,19 @@ "none-ls.nvim": { "branch": "main", "commit": "a117163db44c256d53c3be8717f3e1a2a28e6299" }, "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, "nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" }, + "nvim-bqf": { "branch": "main", "commit": "a77b17e39b1b707b6feee86a36c83703c1534c08" }, "nvim-colorizer.lua": { "branch": "master", "commit": "517df88cf2afb36652830df2c655df2da416a0ae" }, "nvim-dap": { "branch": "master", "commit": "6a5bba0ddea5d419a783e170c20988046376090d" }, "nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" }, "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, + "nvim-dev-container": { "branch": "main", "commit": "56ecfb7a48e6a0728f0183f7a68f662a169a5262" }, + "nvim-lint": { "branch": "master", "commit": "9da1fb942dd0668d5182f9c8dee801b9c190e2bb" }, "nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" }, "nvim-lspconfig": { "branch": "master", "commit": "185b2af444b27d6541c02d662b5b68190e5cf0c4" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-notify": { "branch": "master", "commit": "a3020c2cf4dfc4c4f390c4a21e84e35e46cf5d17" }, "nvim-treesitter": { "branch": "master", "commit": "f8aaf5ce4e27cd20de917946b2ae5c968a2c2858" }, + "nvim-treesitter-context": { "branch": "master", "commit": "41847d3dafb5004464708a3db06b14f12bde548a" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" }, "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, @@ -64,15 +72,17 @@ "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "promise-async": { "branch": "main", "commit": "38a4575da9497326badd3995e768b4ccf0bb153e" }, "resession.nvim": { "branch": "master", "commit": "cc819b0489938d03e4f3532a583354f0287c015b" }, + "rest.nvim": { "branch": "main", "commit": "5466d1e447fc4b038ef511a7a2c4c7cbb13da01a" }, "schemastore.nvim": { "branch": "main", "commit": "667eaa5da8f66f1dd97c905a12dd1eb544a2d259" }, "smart-splits.nvim": { "branch": "master", "commit": "ddb23c1a1cf1507bda487cda7f6e4690965ef9f5" }, - "sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" }, "supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope.nvim": { "branch": "master", "commit": "a17d611a0e111836a1db5295f04945df407c5135" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, + "trouble.nvim": { "branch": "main", "commit": "c098362fe603d3922095e7db595961e020bdf2d0" }, "tsc.nvim": { "branch": "main", "commit": "8c1b4ec6a48d038a79ced8674cb15e7db6dd8ef0" }, + "typescript-tools.nvim": { "branch": "master", "commit": "bf11d98ad5736e1cbc1082ca9a03196d45c701f1" }, "vim-illuminate": { "branch": "master", "commit": "19cb21f513fc2b02f0c66be70107741e837516a1" }, "which-key.nvim": { "branch": "main", "commit": "fcbf4eea17cb299c02557d576f0d568878e354a4" } } diff --git a/lua/plugins/cloudflare.lua b/lua/plugins/cloudflare.lua deleted file mode 100644 index fa18975..0000000 --- a/lua/plugins/cloudflare.lua +++ /dev/null @@ -1,293 +0,0 @@ ---- Cloudflare Workers and React/shadcn development tools ---- Includes Workers-specific LSP, React tooling, and UI helpers ---- @module plugins.cloudflare - -return { - -- WASM/WebAssembly support for Workers - { - "nvim-treesitter/nvim-treesitter", - optional = true, - opts = function(_, opts) - if opts.ensure_installed ~= "all" then - opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, { - "wgsl", - "wgsl_bevy", - }) - end - end, - }, - - -- TOML support for wrangler.toml - { - "AstroNvim/astrolsp", - optional = true, - ---@type AstroLSPOpts - opts = { - ---@diagnostic disable: missing-fields - config = { - taplo = { - settings = { - evenBetterToml = { - schema = { - enabled = true, - associations = { - ["wrangler\\.toml"] = "https://raw.githubusercontent.com/cloudflare/workers-sdk/main/schemas/wrangler.json", - }, - }, - }, - }, - }, - }, - }, - }, - - -- Enhanced search/replace for refactoring React components - { - "nvim-pack/nvim-spectre", - cmd = "Spectre", - dependencies = { "nvim-lua/plenary.nvim" }, - opts = { - mapping = { - ["toggle_line"] = { - map = "dd", - cmd = "lua require('spectre').toggle_line()", - desc = "toggle item", - }, - ["enter_file"] = { - map = "", - cmd = "lua require('spectre.actions').select_entry()", - desc = "open file", - }, - ["send_to_qf"] = { - map = "q", - cmd = "lua require('spectre.actions').send_to_qf()", - desc = "send all items to quickfix", - }, - ["replace_cmd"] = { - map = "c", - cmd = "lua require('spectre.actions').replace_cmd()", - desc = "input replace command", - }, - ["show_option_menu"] = { - map = "o", - cmd = "lua require('spectre').show_options()", - desc = "show options", - }, - ["run_current_replace"] = { - map = "rc", - cmd = "lua require('spectre.actions').run_current_replace()", - desc = "replace current line", - }, - ["run_replace"] = { - map = "R", - cmd = "lua require('spectre.actions').run_replace()", - desc = "replace all", - }, - }, - }, - }, - - -- React component preview and development - { - "roobert/tailwindcss-colorizer-cmp.nvim", - event = "VeryLazy", - opts = { - color_square_width = 2, - }, - config = function(_, opts) - require("tailwindcss-colorizer-cmp").setup(opts) - end, - }, - - -- Color highlighting for CSS/Tailwind - { - "NvChad/nvim-colorizer.lua", - event = { "BufReadPost", "BufNewFile" }, - opts = { - filetypes = { - "typescript", - "typescriptreact", - "javascript", - "javascriptreact", - "css", - "scss", - "html", - "vue", - "lua", - }, - user_default_options = { - RGB = true, - RRGGBB = true, - names = false, - RRGGBBAA = true, - AARRGGBB = false, - rgb_fn = true, - hsl_fn = true, - css = true, - css_fn = true, - mode = "background", - tailwind = true, - sass = { enable = true, parsers = { "css" } }, - virtualtext = "■", - always_update = false, - }, - buftypes = {}, - }, - }, - - -- Import cost for monitoring bundle size - { - "yardnsm/vim-import-cost", - build = "npm install --production", - ft = { "javascript", "typescript", "javascriptreact", "typescriptreact" }, - }, - - -- Live browser reload for Workers development - { - "Barrett17/browser-sync.nvim", - build = "npm install -g browser-sync", - cmd = { - "BrowserSyncStart", - "BrowserSyncReload", - "BrowserSyncStop", - }, - opts = {}, - }, - - -- Component generator for shadcn/ui - { - "chrisgrieser/nvim-scissors", - dependencies = { "nvim-telescope/telescope.nvim" }, - cmd = { "ScissorsAddNewSnippet", "ScissorsEditSnippet" }, - opts = { - snippetDir = vim.fn.stdpath "config" .. "/snippets", - editSnippetPopup = { - height = 0.4, - width = 0.6, - border = "rounded", - keymaps = { - cancel = "q", - saveChanges = "", - deleteSnippet = "d", - duplicateSnippet = "c", - }, - }, - }, - }, - - -- HTTP client for testing Workers - { - "mistweaverco/kulala.nvim", - ft = "http", - opts = { - default_view = "body", - debug = false, - contenttypes = { - ["application/json"] = { - ft = "json", - formatter = { "jq", "." }, - }, - ["application/xml"] = { - ft = "xml", - formatter = { "xmllint", "--format", "-" }, - }, - ["text/html"] = { - ft = "html", - formatter = { "xmllint", "--format", "--html", "-" }, - }, - }, - }, - }, - - -- Enhanced movement for JSX/TSX - { - "echasnovski/mini.ai", - event = { "BufReadPost", "BufNewFile" }, - opts = function() - local ai = require "mini.ai" - return { - custom_textobjects = { - -- Function calls - f = ai.gen_spec.treesitter { a = "@call.outer", i = "@call.inner" }, - -- Function definitions - F = ai.gen_spec.treesitter { a = "@function.outer", i = "@function.inner" }, - -- Classes - c = ai.gen_spec.treesitter { a = "@class.outer", i = "@class.inner" }, - -- Parameters/arguments - a = ai.gen_spec.treesitter { a = "@parameter.outer", i = "@parameter.inner" }, - -- JSX elements - x = ai.gen_spec.treesitter { - a = { "@jsx_element", "@jsx_self_closing_element" }, - i = { "@jsx_element", "@jsx_self_closing_element" }, - }, - }, - } - end, - }, - - -- React component navigation - { - "someone-stole-my-name/yaml-companion.nvim", - ft = { "yaml" }, - dependencies = { - { "neovim/nvim-lspconfig" }, - { "nvim-lua/plenary.nvim" }, - { "nvim-telescope/telescope.nvim" }, - }, - opts = {}, - }, - - -- Worker-specific terminal commands via toggleterm - { - "akinsho/toggleterm.nvim", - optional = true, - opts = function(_, opts) - local Terminal = require("toggleterm.terminal").Terminal - - -- Wrangler dev server - local wrangler_dev = Terminal:new { - cmd = "bunx wrangler dev", - hidden = true, - direction = "float", - float_opts = { - border = "curved", - }, - on_open = function(term) - vim.cmd "startinsert!" - vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "close", { noremap = true, silent = true }) - end, - } - - -- Wrangler tail (logs) - local wrangler_tail = Terminal:new { - cmd = "bunx wrangler tail", - hidden = true, - direction = "horizontal", - on_open = function(term) - vim.cmd "startinsert!" - vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "close", { noremap = true, silent = true }) - end, - } - - -- Wrangler deploy - local wrangler_deploy = Terminal:new { - cmd = "bunx wrangler deploy", - hidden = true, - direction = "float", - close_on_exit = false, - on_open = function(term) - vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "close", { noremap = true, silent = true }) - end, - } - - -- Extend the opts with custom terminals - opts.on_create = function() - vim.keymap.set("n", "wd", function() wrangler_dev:toggle() end, { desc = "Wrangler Dev" }) - vim.keymap.set("n", "wt", function() wrangler_tail:toggle() end, { desc = "Wrangler Tail" }) - vim.keymap.set("n", "wp", function() wrangler_deploy:toggle() end, { desc = "Wrangler Deploy" }) - end - - return opts - end, - }, -}