From 5df9903c4740b6e6cfb87b6a70e4f6f335352cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Wed, 25 Oct 2023 17:41:55 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=81=20files(nvim):=20finished=20the=20?= =?UTF-8?q?change=20in=20structure=20of=20files=20in=20the=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/nvim/lazy-lock.json | 12 +- .config/nvim/lazyvim.json | 37 +++- .config/nvim/lua/plugins/catppuccin.lua | 1 + .../nvim/lua/plugins/extras/coding/dial.lua | 36 ++++ .../nvim/lua/plugins/extras/coding/spider.lua | 12 ++ .../nvim/lua/plugins/extras/coding/treesj.lua | 7 + .../lua/plugins/extras/coding/undotree.lua | 17 ++ .../extras/{coding => editor}/multicursor.lua | 0 .../nvim/lua/plugins/extras/editor/numb.lua | 5 + .../plugins/extras/editor/smart-splits.lua | 19 ++ .../nvim/lua/plugins/extras/lang/semshi.lua | 35 --- .../lua/plugins/extras/lang/typescript.lua | 10 + .../plugins/extras/lsp/actions-preview.lua | 28 +++ .../nvim/lua/plugins/extras/lsp/glance.lua | 21 ++ .../nvim/lua/plugins/extras/lsp/lightbulb.lua | 19 ++ .config/nvim/lua/plugins/extras/lsp/lsp.lua | 64 +----- .../lua/plugins/extras/test/jest-test.lua | 19 ++ .../lua/plugins/extras/test/mocha-test.lua | 18 ++ .../lua/plugins/extras/test/python-test.lua | 9 + .../lua/plugins/extras/test/rust-test.lua | 9 + .../lua/plugins/extras/test/test-extended.lua | 59 ----- .../lua/plugins/extras/test/vitest-test.lua | 9 + .config/nvim/lua/plugins/extras/ui/alpha.lua | 78 ++++--- .config/nvim/lua/plugins/extras/ui/block.lua | 10 + .../lua/plugins/extras/ui/highlight-undo.lua | 7 + .config/nvim/lua/plugins/extras/ui/modes.lua | 12 ++ .../lua/plugins/extras/ui/number-toggle.lua | 4 + .../plugins/extras/ui/rainbow-delimeters.lua | 30 ++- .../nvim/lua/plugins/extras/ui/scrollbar.lua | 17 ++ .../lua/plugins/extras/ui/ui-extended.lua | 54 ----- .../nvim/lua/plugins/extras/ui/windows.lua | 14 ++ .../lua/plugins/extras/util/auto-indent.lua | 5 + .../lua/plugins/extras/util/better-escape.lua | 15 ++ .../nvim/lua/plugins/extras/util/bigfile.lua | 17 ++ .../nvim/lua/plugins/extras/util/hardtime.lua | 38 ++++ .../lua/plugins/extras/util/mini-align.lua | 8 + .../nvim/lua/plugins/extras/util/rayso.lua | 11 + .../nvim/lua/plugins/extras/util/regex.lua | 8 + .config/nvim/lua/plugins/extras/util/suda.lua | 14 ++ .config/nvim/lua/plugins/extras/util/util.lua | 204 ------------------ .../lua/plugins/extras/util/vim-be-good.lua | 4 + .../nvim/lua/plugins/extras/util/wakatime.lua | 4 + .config/nvim/lua/plugins/neotest.lua | 24 +++ 43 files changed, 542 insertions(+), 482 deletions(-) create mode 100644 .config/nvim/lua/plugins/extras/coding/dial.lua create mode 100644 .config/nvim/lua/plugins/extras/coding/spider.lua create mode 100644 .config/nvim/lua/plugins/extras/coding/treesj.lua create mode 100644 .config/nvim/lua/plugins/extras/coding/undotree.lua rename .config/nvim/lua/plugins/extras/{coding => editor}/multicursor.lua (100%) create mode 100644 .config/nvim/lua/plugins/extras/editor/numb.lua create mode 100644 .config/nvim/lua/plugins/extras/editor/smart-splits.lua delete mode 100644 .config/nvim/lua/plugins/extras/lang/semshi.lua create mode 100644 .config/nvim/lua/plugins/extras/lang/typescript.lua create mode 100644 .config/nvim/lua/plugins/extras/lsp/actions-preview.lua create mode 100644 .config/nvim/lua/plugins/extras/lsp/glance.lua create mode 100644 .config/nvim/lua/plugins/extras/lsp/lightbulb.lua create mode 100644 .config/nvim/lua/plugins/extras/test/jest-test.lua create mode 100644 .config/nvim/lua/plugins/extras/test/mocha-test.lua create mode 100644 .config/nvim/lua/plugins/extras/test/python-test.lua create mode 100644 .config/nvim/lua/plugins/extras/test/rust-test.lua delete mode 100644 .config/nvim/lua/plugins/extras/test/test-extended.lua create mode 100644 .config/nvim/lua/plugins/extras/test/vitest-test.lua create mode 100644 .config/nvim/lua/plugins/extras/ui/block.lua create mode 100644 .config/nvim/lua/plugins/extras/ui/highlight-undo.lua create mode 100644 .config/nvim/lua/plugins/extras/ui/modes.lua create mode 100644 .config/nvim/lua/plugins/extras/ui/number-toggle.lua delete mode 100644 .config/nvim/lua/plugins/extras/ui/ui-extended.lua create mode 100644 .config/nvim/lua/plugins/extras/ui/windows.lua create mode 100644 .config/nvim/lua/plugins/extras/util/auto-indent.lua create mode 100644 .config/nvim/lua/plugins/extras/util/better-escape.lua create mode 100644 .config/nvim/lua/plugins/extras/util/bigfile.lua create mode 100644 .config/nvim/lua/plugins/extras/util/hardtime.lua create mode 100644 .config/nvim/lua/plugins/extras/util/mini-align.lua create mode 100644 .config/nvim/lua/plugins/extras/util/rayso.lua create mode 100644 .config/nvim/lua/plugins/extras/util/regex.lua create mode 100644 .config/nvim/lua/plugins/extras/util/suda.lua delete mode 100644 .config/nvim/lua/plugins/extras/util/util.lua create mode 100644 .config/nvim/lua/plugins/extras/util/vim-be-good.lua create mode 100644 .config/nvim/lua/plugins/extras/util/wakatime.lua create mode 100644 .config/nvim/lua/plugins/neotest.lua diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 344ee93c..fff52283 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -1,6 +1,6 @@ { "ChatGPT.nvim": { "branch": "main", "commit": "9f8062c7c40ec082c49f10e20818333a972b8063" }, - "LazyVim": { "branch": "main", "commit": "e996eed750aabdfaa976357450f9ccbcd333a785" }, + "LazyVim": { "branch": "main", "commit": "028f69c03c6014f06525eff0a44410bb3f479174" }, "LuaSnip": { "branch": "master", "commit": "80a8528f084a97b624ae443a6f50ff8074ba486b" }, "SchemaStore.nvim": { "branch": "main", "commit": "e0884542c973b92a193274eaebedd8d2ae05ceb5" }, "actions-preview.nvim": { "branch": "master", "commit": "5650c76abfb84d6498330dd045657ba630ecdbba" }, @@ -13,6 +13,8 @@ "catppuccin": { "branch": "main", "commit": "ea52fe8a0b1e4a820df0d0cf9a6a5a0e18c3eaa0" }, "ccc.nvim": { "branch": "main", "commit": "cd2a10557b4a13e80929f59a7076ae792b2c60fa" }, "cinnamon.nvim": { "branch": "master", "commit": "c406ffda3a0302f32c23b24ab756ea20467d6578" }, + "clangd_extensions.nvim": { "branch": "main", "commit": "34c8eaa12be192e83cd4865ce2375e9f53e728f2" }, + "cmake-tools.nvim": { "branch": "master", "commit": "4b7a0e79cb72ca01a3106987be45961b5f2dddb6" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-git": { "branch": "main", "commit": "f900a4cf117300fdc3ba31d26f8b6223ccd9c574" }, "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, @@ -57,7 +59,7 @@ "mini.surround": { "branch": "main", "commit": "68ce058ef9716d7d955b79363845d2dd003d6500" }, "modes.nvim": { "branch": "main", "commit": "5357fda0f4a21d73611496087a0d3b6d7b4f9384" }, "multicursors.nvim": { "branch": "main", "commit": "b0c571caeff42090cc047cd97988dcfdb06b7fff" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "0b9a83e6dc47513a81fd9086440d5638683f4f17" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "1236db954ce502eb5b340bcdb69aa057cc372e8d" }, "neoconf.nvim": { "branch": "main", "commit": "00dcf2b81c45de1768b4171faa16729f0888cfb8" }, "neodev.nvim": { "branch": "main", "commit": "d617d9eb27e73e701e446874c6ea2cb528719260" }, "neogen": { "branch": "main", "commit": "70127baaff25611deaf1a29d801fc054ad9d2dc1" }, @@ -69,12 +71,12 @@ "neotest-rust": { "branch": "main", "commit": "03e036a310379f132d4e39387e9076396132ce3f" }, "neotest-vitest": { "branch": "main", "commit": "41bf2f6b743f2ac5c5e9bd0949cee77ca7f2372c" }, "nerdy.nvim": { "branch": "main", "commit": "061b0c8b5d56dcc9d3aba90be94593070f299878" }, - "noice.nvim": { "branch": "main", "commit": "50fc77bcd75cf32374521fb227e9f41f3fe1521a" }, + "noice.nvim": { "branch": "main", "commit": "92433164e2f7118d4122c7674c3834d9511722ba" }, "nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" }, "numb.nvim": { "branch": "master", "commit": "3f7d4a74bd456e747a1278ea1672b26116e0824d" }, "nvim-cmp": { "branch": "main", "commit": "51260c02a8ffded8e16162dcf41a23ec90cfba62" }, "nvim-cmp-fonts": { "branch": "master", "commit": "43be83eb24ff8aec124c3aae64d053a095e03bd0" }, - "nvim-dap": { "branch": "master", "commit": "b595c820018a15b6d54bf53b5cbeaa6f2d7a27e2" }, + "nvim-dap": { "branch": "master", "commit": "3eb26a63a3674e3722182a92f21d04c4e5ce0f43" }, "nvim-dap-go": { "branch": "main", "commit": "a5cc8dcad43f0732585d4793deb02a25c4afb766" }, "nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" }, "nvim-dap-ui": { "branch": "master", "commit": "34160a7ce6072ef332f350ae1d4a6a501daf0159" }, @@ -132,7 +134,7 @@ "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" }, "telescope.nvim": { "branch": "master", "commit": "4522d7e3ea75ffddabdc39957168a8a7060b5df0" }, "todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" }, - "tokyonight.nvim": { "branch": "main", "commit": "531b04704fc9ff994d8b9c0720428fdc3c7d49d1" }, + "tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" }, "tree-sitter-hypr": { "branch": "master", "commit": "90b3ddf8a85b5ea3d9dc4920fddb16182a192e14" }, "treesj": { "branch": "main", "commit": "070e6761d0b11a55446d988a69908f7a0928dbab" }, "trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" }, diff --git a/.config/nvim/lazyvim.json b/.config/nvim/lazyvim.json index 94da60f6..4e8657a2 100644 --- a/.config/nvim/lazyvim.json +++ b/.config/nvim/lazyvim.json @@ -6,6 +6,8 @@ "lazyvim.plugins.extras.editor.symbols-outline", "lazyvim.plugins.extras.formatting.black", "lazyvim.plugins.extras.formatting.prettier", + "lazyvim.plugins.extras.lang.clangd", + "lazyvim.plugins.extras.lang.cmake", "lazyvim.plugins.extras.lang.docker", "lazyvim.plugins.extras.lang.go", "lazyvim.plugins.extras.lang.java", @@ -13,6 +15,7 @@ "lazyvim.plugins.extras.lang.markdown", "lazyvim.plugins.extras.lang.omnisharp", "lazyvim.plugins.extras.lang.python", + "lazyvim.plugins.extras.lang.python-semshi", "lazyvim.plugins.extras.lang.rust", "lazyvim.plugins.extras.lang.tailwind", "lazyvim.plugins.extras.lang.typescript", @@ -26,35 +29,57 @@ "plugins.extras.ai.codeium", "plugins.extras.ai.gpt", "plugins.extras.coding.cmp", + "plugins.extras.coding.dial", "plugins.extras.coding.documentation", - "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.github", "plugins.extras.editor.harpoon", + "plugins.extras.editor.multicursor", + "plugins.extras.editor.numb", + "plugins.extras.editor.smart-splits", "plugins.extras.lang.db", "plugins.extras.lang.markdown", - "plugins.extras.lang.semshi", + "plugins.extras.lang.typescript", "plugins.extras.lang.web", + "plugins.extras.lsp.actions-preview", "plugins.extras.lsp.compiler", + "plugins.extras.lsp.glance", + "plugins.extras.lsp.lightbulb", "plugins.extras.lsp.lsp", "plugins.extras.lsp.repl", - "plugins.extras.test.test-extended", + "plugins.extras.test.jest-test", + "plugins.extras.test.mocha-test", + "plugins.extras.test.python-test", + "plugins.extras.test.rust-test", + "plugins.extras.test.vitest-test", "plugins.extras.ui.alpha", + "plugins.extras.ui.block", + "plugins.extras.ui.highlight-undo", + "plugins.extras.ui.modes", + "plugins.extras.ui.number-toggle", "plugins.extras.ui.rainbow-delimeters", "plugins.extras.ui.scrollbar", - "plugins.extras.ui.ui-extended", + "plugins.extras.ui.windows", "plugins.extras.ui.zen-mode", + "plugins.extras.util.bigfile", "plugins.extras.util.discordrcp", + "plugins.extras.util.mini-align", + "plugins.extras.util.rayso", + "plugins.extras.util.regex", "plugins.extras.util.smooth-scrolling", - "plugins.extras.util.util" + "plugins.extras.util.suda", + "plugins.extras.util.vim-be-good", + "plugins.extras.util.wakatime" ], "news": { "NEWS.md": "2123" }, "version": 2 -} +} \ No newline at end of file diff --git a/.config/nvim/lua/plugins/catppuccin.lua b/.config/nvim/lua/plugins/catppuccin.lua index 8e508208..77517d42 100644 --- a/.config/nvim/lua/plugins/catppuccin.lua +++ b/.config/nvim/lua/plugins/catppuccin.lua @@ -63,6 +63,7 @@ return { }, lsp_trouble = false, symbols_outline = false, + lsp_trouble = true, treesitter = true, treesitter_context = false, which_key = true, diff --git a/.config/nvim/lua/plugins/extras/coding/dial.lua b/.config/nvim/lua/plugins/extras/coding/dial.lua new file mode 100644 index 00000000..3ed33548 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/coding/dial.lua @@ -0,0 +1,36 @@ +return { + "monaqa/dial.nvim", + event = "VeryLazy", + -- splutylua: ignore + keys = { + { + "", + function() + return require("dial.map").inc_normal() + end, + expr = true, + desc = "Increment", + }, + { + "", + function() + return require("dial.map").dec_normal() + end, + expr = true, + desc = "Decrement", + }, + }, + config = function() + local augend = require("dial.augend") + require("dial.config").augends:register_group({ + default = { + augend.integer.alias.decimal, + augend.integer.alias.hex, + augend.date.alias["%Y/%m/%d"], + augend.constant.alias.bool, + augend.constant.new({ elements = { "let", "const" } }), + augend.semver.alias.semver, + }, + }) + end, +} diff --git a/.config/nvim/lua/plugins/extras/coding/spider.lua b/.config/nvim/lua/plugins/extras/coding/spider.lua new file mode 100644 index 00000000..dab539ed --- /dev/null +++ b/.config/nvim/lua/plugins/extras/coding/spider.lua @@ -0,0 +1,12 @@ +return { + "chrisgrieser/nvim-spider", + lazy = true, + enabled = false, + opts = {}, + keys = { + { "w", "lua require('spider').motion('w')", mode = { "n", "o", "x" }, desc = "Spider-w" }, + { "e", "lua require('spider').motion('e')", mode = { "n", "o", "x" }, desc = "Spider-e" }, + { "b", "lua require('spider').motion('b')", mode = { "n", "o", "x" }, desc = "Spider-b" }, + { "ge", "lua require('spider').motion('ge')", mode = { "n", "o", "x" }, desc = "Spider-ge" }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/coding/treesj.lua b/.config/nvim/lua/plugins/extras/coding/treesj.lua new file mode 100644 index 00000000..918aa001 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/coding/treesj.lua @@ -0,0 +1,7 @@ +return { + "Wansmer/treesj", + keys = { + { "J", "TSJToggle", desc = "Join Toggle" }, + }, + opts = { use_default_keymaps = false, max_join_length = 150 }, +} diff --git a/.config/nvim/lua/plugins/extras/coding/undotree.lua b/.config/nvim/lua/plugins/extras/coding/undotree.lua new file mode 100644 index 00000000..0b982905 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/coding/undotree.lua @@ -0,0 +1,17 @@ +local util = require("lazyvim.util") + +return { + { + "mbbill/undotree", + event = "BufReadPost", + }, + { + "debugloop/telescope-undo.nvim", + opts = {}, + config = function(_, opts) + Util.on_load("telescope.nvim", function() + require("telescope").load_extension("undo") + end) + end, + }, +} diff --git a/.config/nvim/lua/plugins/extras/coding/multicursor.lua b/.config/nvim/lua/plugins/extras/editor/multicursor.lua similarity index 100% rename from .config/nvim/lua/plugins/extras/coding/multicursor.lua rename to .config/nvim/lua/plugins/extras/editor/multicursor.lua diff --git a/.config/nvim/lua/plugins/extras/editor/numb.lua b/.config/nvim/lua/plugins/extras/editor/numb.lua new file mode 100644 index 00000000..dd16293d --- /dev/null +++ b/.config/nvim/lua/plugins/extras/editor/numb.lua @@ -0,0 +1,5 @@ +return { + "nacro90/numb.nvim", + event = "CmdlineEnter", + opts = {}, +} diff --git a/.config/nvim/lua/plugins/extras/editor/smart-splits.lua b/.config/nvim/lua/plugins/extras/editor/smart-splits.lua new file mode 100644 index 00000000..cc9b4dfe --- /dev/null +++ b/.config/nvim/lua/plugins/extras/editor/smart-splits.lua @@ -0,0 +1,19 @@ +return { + "mrjones2014/smart-splits.nvim", + build = "./kitty/install-kittens.bash", + -- stylua: ignore + keys = { + { "", function() require("smart-splits").resize_left() end, desc = "Resize left", mode = "n" }, + { "", function() require("smart-splits").resize_down() end, desc = "Resize down", mode = "n" }, + { "", function() require("smart-splits").resize_up() end, desc = "Resize up", mode = "n" }, + { "", function() require("smart-splits").resize_right() end, desc = "Resize right", mode = "n" }, + { "", function() require("smart-splits").move_cursor_left() end, desc = "Move cursor left", mode = "n" }, + { "", function() require("smart-splits").move_cursor_down() end, desc = "Move cursor down", mode = "n" }, + { "", function() require("smart-splits").move_cursor_up() end, desc = "Move cursor up", mode = "n" }, + { "", function() require("smart-splits").move_cursor_right() end, desc = "Move cursor right", mode = "n" }, + { "", function() require("smart-splits").swap_buf_left() end, desc = "Swap buffer left", mode = "n" }, + { "", function() require("smart-splits").swap_buf_down() end, desc = "Swap buffer down", mode = "n" }, + { "", function() require("smart-splits").swap_buf_up() end, desc = "Swap buffer up", mode = "n" }, + { "", function() require("smart-splits").swap_buf_right() end, desc = "Swap buffer right", mode = "n" }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lang/semshi.lua b/.config/nvim/lua/plugins/extras/lang/semshi.lua deleted file mode 100644 index 3553b96c..00000000 --- a/.config/nvim/lua/plugins/extras/lang/semshi.lua +++ /dev/null @@ -1,35 +0,0 @@ -return { - { - -- "numiras/semshi", - "wookayin/semshi", -- use a maintained fork - ft = "python", - build = ":UpdateRemotePlugins", - init = function() - -- Disabled these features better provided by LSP or other more general plugins - vim.g["semshi#error_sign"] = false - vim.g["semshi#simplify_markup"] = false - vim.g["semshi#mark_selected_nodes"] = false - vim.g["semshi#update_delay_factor"] = 0.001 - -- This autocmd must be defined in init to take effect - vim.api.nvim_create_autocmd({ "VimEnter", "ColorScheme" }, { - group = vim.api.nvim_create_augroup("SemanticHighlight", {}), - callback = function() - -- Only add style, inherit or link to the LSP's colors - vim.cmd([[ - highlight! semshiGlobal gui=italic - highlight! semshiImported gui=bold - highlight! link semshiImported @none - highlight! link semshiParameter @lsp.type.parameter - highlight! link semshiParameterUnused DiagnosticUnnecessary - highlight! link semshiBuiltin @function.builtin - highlight! link semshiAttribute @attribute - highlight! link semshiAttribute @field - highlight! link semshiSelf @lsp.type.selfKeyword - highlight! link semshiUnresolved @lsp.type.unresolvedReference - highlight! link semshiFree @none - ]]) - end, - }) - end, - }, -} diff --git a/.config/nvim/lua/plugins/extras/lang/typescript.lua b/.config/nvim/lua/plugins/extras/lang/typescript.lua new file mode 100644 index 00000000..f91e2f9a --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lang/typescript.lua @@ -0,0 +1,10 @@ +return { + { + "dmmulroy/tsc.nvim", + config = true, + cmd = "TSC", + keys = { + { "ct", "TSC", desc = "Type Check" }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lsp/actions-preview.lua b/.config/nvim/lua/plugins/extras/lsp/actions-preview.lua new file mode 100644 index 00000000..cc2eed7b --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lsp/actions-preview.lua @@ -0,0 +1,28 @@ +return { + { + "aznhe21/actions-preview.nvim", + event = "BufRead", + opts = { + telescope = { + sorting_strategy = "ascending", + layout_strategy = "vertical", + layout_config = { + width = 0.8, + height = 0.9, + prompt_position = "top", + preview_cutoff = 20, + preview_height = function(_, _, max_lines) + return max_lines - 15 + end, + }, + }, + }, + }, + { + "neovim/nvim-lspconfig", + init = function() + local keys = require("lazyvim.plugins.lsp.keymaps").get() + keys[#keys + 1] = { "ca", require("actions-preview").code_actions, desc = "Code Action Preview" } + end, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lsp/glance.lua b/.config/nvim/lua/plugins/extras/lsp/glance.lua new file mode 100644 index 00000000..a7e7e339 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lsp/glance.lua @@ -0,0 +1,21 @@ +return { + { + "dnlhc/glance.nvim", + cmd = { "Glance" }, + opts = { + border = { + enable = true, + }, + }, + }, + { + "neovim/nvim-lspconfig", + init = function() + local keys = require("lazyvim.plugins.lsp.keymaps").get() + -- keys[#keys + 1] = { "gd", "Glance definitions", desc = "Goto definition" } + keys[#keys + 1] = { "gr", "Glance references", desc = "References" } + keys[#keys + 1] = { "gy", "Glance type_definitions", desc = "Goto t[y]pe definitions" } + keys[#keys + 1] = { "gI", "Glance implementations", desc = "Goto implementations" } + end, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lsp/lightbulb.lua b/.config/nvim/lua/plugins/extras/lsp/lightbulb.lua new file mode 100644 index 00000000..d6b2fc91 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/lsp/lightbulb.lua @@ -0,0 +1,19 @@ +return { + "kosayoda/nvim-lightbulb", + event = "BufReadPre", + opts = { + sign = { + enabled = false, + priority = 10, + }, + float = { + enabled = true, + text = "πŸ’‘", + win_opts = {}, + }, + virtual_text = { + enabled = false, + text = "πŸ’‘", + }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/lsp/lsp.lua b/.config/nvim/lua/plugins/extras/lsp/lsp.lua index fa1f9386..24440583 100644 --- a/.config/nvim/lua/plugins/extras/lsp/lsp.lua +++ b/.config/nvim/lua/plugins/extras/lsp/lsp.lua @@ -6,14 +6,12 @@ return { keys[#keys + 1] = { "cl", false } keys[#keys + 1] = { "cli", "LspInfo", desc = "LspInfo" } - -- add more lsp keymaps - -- keys[#keys + 1] = { "cla", vim.lsp.buf.add_workspace_folder, desc = "Add Folder" } - -- keys[#keys + 1] = { "clr", vim.lsp.buf.remove_workspace_folder, desc = "Remove Folder" } keys[#keys + 1] = { "cll", "lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))", desc = "List Folders", } + keys[#keys + 1] = { "clh", vim.lsp.codelens.run, desc = "Run Code Lens" } keys[#keys + 1] = { "cld", vim.lsp.codelens.refresh, desc = "Refresh Code Lens" } keys[#keys + 1] = { "clr", "LspRestart", desc = "Restart Lsp" } @@ -22,11 +20,6 @@ return { require("which-key").register({ ["cl"] = { name = "+lsp" }, }) - -- keys[#keys + 1] = { "gd", "Glance definitions", desc = "Goto definition" } - keys[#keys + 1] = { "gr", "Glance references", desc = "References" } - keys[#keys + 1] = { "gy", "Glance type_definitions", desc = "Goto t[y]pe definitions" } - keys[#keys + 1] = { "gI", "Glance implementations", desc = "Goto implementations" } - keys[#keys + 1] = { "ca", require("actions-preview").code_actions, desc = "Code Action Preview" } require("lazyvim.util").lsp.on_attach(function(client, buffer) if client.supports_method("textDocument/documentSymbol") then -- Enable inlay hints if the client supports it. @@ -146,53 +139,6 @@ return { } end, }, - { - "aznhe21/actions-preview.nvim", - event = "BufRead", - opts = { - telescope = { - sorting_strategy = "ascending", - layout_strategy = "vertical", - layout_config = { - width = 0.8, - height = 0.9, - prompt_position = "top", - preview_cutoff = 20, - preview_height = function(_, _, max_lines) - return max_lines - 15 - end, - }, - }, - }, - }, - { - "dnlhc/glance.nvim", - cmd = { "Glance" }, - opts = { - border = { - enable = true, - }, - }, - }, - { - "kosayoda/nvim-lightbulb", - event = "BufReadPre", - opts = { - sign = { - enabled = false, - priority = 10, - }, - float = { - enabled = true, - text = "πŸ’‘", - win_opts = {}, - }, - virtual_text = { - enabled = false, - text = "πŸ’‘", - }, - }, - }, { "hinell/lsp-timeout.nvim", event = "BufRead", @@ -212,12 +158,4 @@ return { { "ue", "LspLensToggle", desc = "Toggle Lsp Lens" }, }, }, - { - "dmmulroy/tsc.nvim", - config = true, - cmd = "TSC", - keys = { - { "ct", "TSC", desc = "Type Check" }, - }, - }, } diff --git a/.config/nvim/lua/plugins/extras/test/jest-test.lua b/.config/nvim/lua/plugins/extras/test/jest-test.lua new file mode 100644 index 00000000..26b9401b --- /dev/null +++ b/.config/nvim/lua/plugins/extras/test/jest-test.lua @@ -0,0 +1,19 @@ +return { + "nvim-neotest/neotest", + dependencies = { + "haydenmeade/neotest-jest", + }, + opts = function(_, opts) + table.insert( + opts.adapters, + require("neotest-jest")({ + jestCommand = "npm test --", + jestConfigFile = "custom.jest.config.ts", + env = { CI = true }, + cwd = function() + return vim.fn.getcwd() + end, + }) + ) + end, +} diff --git a/.config/nvim/lua/plugins/extras/test/mocha-test.lua b/.config/nvim/lua/plugins/extras/test/mocha-test.lua new file mode 100644 index 00000000..974fda55 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/test/mocha-test.lua @@ -0,0 +1,18 @@ +return { + "nvim-neotest/neotest", + dependencies = { + "adrigzr/neotest-mocha", + }, + opts = function(_, opts) + table.insert( + opts.adapters, + require("neotest-mocha")({ + command = "npm test --", + env = { CI = true }, + cwd = function(path) + return vim.fn.getcwd() + end, + }) + ) + end, +} diff --git a/.config/nvim/lua/plugins/extras/test/python-test.lua b/.config/nvim/lua/plugins/extras/test/python-test.lua new file mode 100644 index 00000000..78fd7d74 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/test/python-test.lua @@ -0,0 +1,9 @@ +return { + "nvim-neotest/neotest", + dependencies = { + "nvim-neotest/neotest-python", + }, + opts = function(_, opts) + table.insert(opts.adapters, require("neotest-python")) + end, +} diff --git a/.config/nvim/lua/plugins/extras/test/rust-test.lua b/.config/nvim/lua/plugins/extras/test/rust-test.lua new file mode 100644 index 00000000..9bd059ee --- /dev/null +++ b/.config/nvim/lua/plugins/extras/test/rust-test.lua @@ -0,0 +1,9 @@ +return { + "nvim-neotest/neotest", + dependencies = { + "rouge8/neotest-rust", + }, + opts = function(_, opts) + table.insert(opts.adapters, require("neotest-rust")) + end, +} diff --git a/.config/nvim/lua/plugins/extras/test/test-extended.lua b/.config/nvim/lua/plugins/extras/test/test-extended.lua deleted file mode 100644 index 4a39d9fa..00000000 --- a/.config/nvim/lua/plugins/extras/test/test-extended.lua +++ /dev/null @@ -1,59 +0,0 @@ -return { - { - "nvim-neotest/neotest", - dependencies = { - "haydenmeade/neotest-jest", - "marilari88/neotest-vitest", - "adrigzr/neotest-mocha", - "nvim-neotest/neotest-python", - "rouge8/neotest-rust", - }, - keys = { - { - "tl", - function() - require("neotest").run.run_last() - end, - desc = "Run Last Test", - }, - { - "tL", - function() - require("neotest").run.run_last({ strategy = "dap" }) - end, - desc = "Debug Last Test", - }, - { - "tw", - "lua require('neotest').run.run({ jestCommand = 'jest --watch ' })", - desc = "Run Watch", - }, - }, - opts = function(_, opts) - table.insert( - opts.adapters, - require("neotest-jest")({ - jestCommand = "npm test --", - jestConfigFile = "custom.jest.config.ts", - env = { CI = true }, - cwd = function() - return vim.fn.getcwd() - end, - }) - ) - table.insert(opts.adapters, require("neotest-vitest")) - table.insert(opts.adapters, require("neotest-rust")) - table.insert(opts.adapters, require("neotest-python")) - table.insert( - opts.adapters, - require("neotest-mocha")({ - command = "npm test --", - env = { CI = true }, - cwd = function(path) - return vim.fn.getcwd() - end, - }) - ) - end, - }, -} diff --git a/.config/nvim/lua/plugins/extras/test/vitest-test.lua b/.config/nvim/lua/plugins/extras/test/vitest-test.lua new file mode 100644 index 00000000..2c2a706c --- /dev/null +++ b/.config/nvim/lua/plugins/extras/test/vitest-test.lua @@ -0,0 +1,9 @@ +return { + "nvim-neotest/neotest", + dependencies = { + "marilari88/neotest-vitest", + }, + opts = function(_, opts) + table.insert(opts.adapters, require("neotest-vitest")) + end, +} diff --git a/.config/nvim/lua/plugins/extras/ui/alpha.lua b/.config/nvim/lua/plugins/extras/ui/alpha.lua index fc0cacd4..f3d90152 100644 --- a/.config/nvim/lua/plugins/extras/ui/alpha.lua +++ b/.config/nvim/lua/plugins/extras/ui/alpha.lua @@ -1,11 +1,10 @@ return { - { - "goolord/alpha-nvim", - event = "VimEnter", - optional = true, - opts = function() - local dashboard = require("alpha.themes.dashboard") - local logo = [[ + "goolord/alpha-nvim", + event = "VimEnter", + optional = true, + opts = function() + local dashboard = require("alpha.themes.dashboard") + local logo = [[ ξ‚Ίξ‚Έ ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ ξ‚Ύβ–ˆβ–ˆξ‚Ό ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ ξ‚Έ @@ -15,29 +14,29 @@ return { ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Όξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ίβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ίβ–ˆβ–ˆβ–ˆξ‚Έ ξ‚Ίβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆξ‚Όξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ ]] - -- local logo = [[ - -- ξ‚Ίξ‚Έ - -- ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ ξ‚Ύβ–ˆβ–ˆξ‚Ό - -- ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ ξ‚Έ - -- ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆξ‚Όξ‚Ύξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ ξ‚Ίβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆξ‚Έ ξ‚Ίβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆξ‚Έ - -- ξ‚Ίβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Όξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ίβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ - -- ξ‚Ίβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Όξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ίβ–ˆβ–ˆβ–ˆξ‚Ύβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ - -- ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Όξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Όξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Όξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ - -- ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ - -- ]] - -- local logo = [[ - -- β–„ β–„ - -- β–„ β–„β–„β–„ β–„ β–„β–„β–„ β–„ β–„ - -- β–ˆ β–„ β–ˆβ–„β–ˆ β–„β–„β–„ β–ˆ β–ˆβ–„β–ˆ β–ˆ β–ˆ - -- β–„β–„ β–ˆβ–„β–ˆβ–„β–„β–„β–ˆ β–ˆβ–„β–ˆβ–„β–ˆβ–„β–„β–ˆβ–„β–„β–ˆ β–ˆ - -- β–„ β–ˆβ–„β–„β–ˆ β–„ β–„β–„ β–„β–ˆ β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„ - -- β–ˆβ–„β–„β–„β–„ β–„β–„β–„ β–ˆ β–„ β–„β–„β–„ β–„ β–„β–„β–„ β–„ β–„ β–ˆ β–„ - -- β–„ β–ˆ β–ˆβ–„β–ˆ β–ˆβ–„β–ˆ β–ˆ β–ˆ β–ˆβ–„β–ˆ β–ˆ β–ˆβ–„β–ˆ β–„β–„β–„ β–ˆ β–ˆ - -- β–ˆβ–„β–ˆ β–„ β–ˆβ–„β–„β–ˆβ–„β–„β–ˆ β–ˆ β–„β–„β–ˆ β–ˆ β–„ β–ˆ β–ˆβ–„β–ˆβ–„β–ˆ β–ˆ - -- β–ˆβ–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–ˆ β–ˆβ–„β–ˆβ–„β–„β–„β–ˆ - -- ]] + -- local logo = [[ + -- ξ‚Ίξ‚Έ + -- ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ ξ‚Ύβ–ˆβ–ˆξ‚Ό + -- ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ ξ‚Έ + -- ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆξ‚Όξ‚Ύξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ ξ‚Ίβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆξ‚Έ ξ‚Ίβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆξ‚Έ + -- ξ‚Ίβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Όξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ίβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ + -- ξ‚Ίβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Όξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ίβ–ˆβ–ˆβ–ˆξ‚Ύβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ + -- ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Όξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Όξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Όξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ + -- ξ‚Ίβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό ξ‚Ύβ–ˆβ–ˆβ–ˆβ–ˆξ‚Ό β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆξ‚Έ + -- ]] + -- local logo = [[ + -- β–„ β–„ + -- β–„ β–„β–„β–„ β–„ β–„β–„β–„ β–„ β–„ + -- β–ˆ β–„ β–ˆβ–„β–ˆ β–„β–„β–„ β–ˆ β–ˆβ–„β–ˆ β–ˆ β–ˆ + -- β–„β–„ β–ˆβ–„β–ˆβ–„β–„β–„β–ˆ β–ˆβ–„β–ˆβ–„β–ˆβ–„β–„β–ˆβ–„β–„β–ˆ β–ˆ + -- β–„ β–ˆβ–„β–„β–ˆ β–„ β–„β–„ β–„β–ˆ β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„ + -- β–ˆβ–„β–„β–„β–„ β–„β–„β–„ β–ˆ β–„ β–„β–„β–„ β–„ β–„β–„β–„ β–„ β–„ β–ˆ β–„ + -- β–„ β–ˆ β–ˆβ–„β–ˆ β–ˆβ–„β–ˆ β–ˆ β–ˆ β–ˆβ–„β–ˆ β–ˆ β–ˆβ–„β–ˆ β–„β–„β–„ β–ˆ β–ˆ + -- β–ˆβ–„β–ˆ β–„ β–ˆβ–„β–„β–ˆβ–„β–„β–ˆ β–ˆ β–„β–„β–ˆ β–ˆ β–„ β–ˆ β–ˆβ–„β–ˆβ–„β–ˆ β–ˆ + -- β–ˆβ–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–„β–ˆ β–ˆβ–„β–ˆβ–„β–„β–„β–ˆ + -- ]] - dashboard.section.header.val = vim.split(logo, "\n") + dashboard.section.header.val = vim.split(logo, "\n") -- stylua: ignore dashboard.section.buttons.val = { dashboard.button("f", " " .. " Find file", " Telescope find_files "), @@ -52,15 +51,14 @@ return { dashboard.button("l", "σ°’² " .. " Lazy", " Lazy "), dashboard.button("q", " " .. " Quit", " qa "), } - for _, button in ipairs(dashboard.section.buttons.val) do - button.opts.hl = "AlphaButtons" - button.opts.hl_shortcut = "AlphaShortcut" - end - dashboard.section.header.opts.hl = "AlphaHeader" - dashboard.section.buttons.opts.hl = "AlphaButtons" - dashboard.section.footer.opts.hl = "AlphaFooter" - dashboard.opts.layout[1].val = 8 - return dashboard - end, - }, + for _, button in ipairs(dashboard.section.buttons.val) do + button.opts.hl = "AlphaButtons" + button.opts.hl_shortcut = "AlphaShortcut" + end + dashboard.section.header.opts.hl = "AlphaHeader" + dashboard.section.buttons.opts.hl = "AlphaButtons" + dashboard.section.footer.opts.hl = "AlphaFooter" + dashboard.opts.layout[1].val = 8 + return dashboard + end, } diff --git a/.config/nvim/lua/plugins/extras/ui/block.lua b/.config/nvim/lua/plugins/extras/ui/block.lua new file mode 100644 index 00000000..78f14b28 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/ui/block.lua @@ -0,0 +1,10 @@ +return { + "HampusHauffman/block.nvim", + keys = { { "uB", "Block", desc = "Toggle Block" } }, + opts = { + percent = 0.9, + depth = 4, + colors = nil, + automatic = false, + }, +} diff --git a/.config/nvim/lua/plugins/extras/ui/highlight-undo.lua b/.config/nvim/lua/plugins/extras/ui/highlight-undo.lua new file mode 100644 index 00000000..85311757 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/ui/highlight-undo.lua @@ -0,0 +1,7 @@ +return { + "tzachar/highlight-undo.nvim", + event = "BufReadPost", + opts = { + duration = 700, + }, +} diff --git a/.config/nvim/lua/plugins/extras/ui/modes.lua b/.config/nvim/lua/plugins/extras/ui/modes.lua new file mode 100644 index 00000000..c930294d --- /dev/null +++ b/.config/nvim/lua/plugins/extras/ui/modes.lua @@ -0,0 +1,12 @@ +return { + "mvllow/modes.nvim", + event = "BufReadPost", + opts = { + colors = { + copy = "#f5a97f", + delete = "#ee99a0", + insert = "#8bd5ca", + visual = "#8aadf4", + }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/ui/number-toggle.lua b/.config/nvim/lua/plugins/extras/ui/number-toggle.lua new file mode 100644 index 00000000..ca2064fc --- /dev/null +++ b/.config/nvim/lua/plugins/extras/ui/number-toggle.lua @@ -0,0 +1,4 @@ +return { + "sitiom/nvim-numbertoggle", + event = "BufReadPost", +} diff --git a/.config/nvim/lua/plugins/extras/ui/rainbow-delimeters.lua b/.config/nvim/lua/plugins/extras/ui/rainbow-delimeters.lua index 67442345..998feaa4 100644 --- a/.config/nvim/lua/plugins/extras/ui/rainbow-delimeters.lua +++ b/.config/nvim/lua/plugins/extras/ui/rainbow-delimeters.lua @@ -1,20 +1,18 @@ return { - { - "HiPhish/rainbow-delimiters.nvim", - event = "VeryLazy", - config = function(_, opts) - require("rainbow-delimiters.setup").setup({ opts }) - end, - opts = { - highlight = { - "RainbowDelimiterBlue", - "RainbowDelimiterYellow", - "RainbowDelimiterViolet", - "RainbowDelimiterOrange", - "RainbowDelimiterCyan", - "RainbowDelimiterRed", - "RainbowDelimiterGreen", - }, + "HiPhish/rainbow-delimiters.nvim", + event = "VeryLazy", + config = function(_, opts) + require("rainbow-delimiters.setup").setup({ opts }) + end, + opts = { + highlight = { + "RainbowDelimiterBlue", + "RainbowDelimiterYellow", + "RainbowDelimiterViolet", + "RainbowDelimiterOrange", + "RainbowDelimiterCyan", + "RainbowDelimiterRed", + "RainbowDelimiterGreen", }, }, } diff --git a/.config/nvim/lua/plugins/extras/ui/scrollbar.lua b/.config/nvim/lua/plugins/extras/ui/scrollbar.lua index e74431b5..1711b7dd 100644 --- a/.config/nvim/lua/plugins/extras/ui/scrollbar.lua +++ b/.config/nvim/lua/plugins/extras/ui/scrollbar.lua @@ -6,4 +6,21 @@ return { }, event = "BufRead", }, + { + "dstein64/nvim-scrollview", + enabled = false, + event = "BufReadPost", + keys = { { "uS", "ScrollViewToggle", desc = "Toggle Scrollview" } }, + config = function() + require("scrollview").setup({ + excluded_filetypes = { "neo-tree", "alpha", "symbols-outline" }, + signs_column = 0, + winblend = 25, + diagnostics_error_symbol = "ο™™", + diagnostics_warn_symbol = "ο”©", + diagnostics_info_symbol = "", + diagnostics_hint_symbol = "ο ΅", + }) + end, + }, } diff --git a/.config/nvim/lua/plugins/extras/ui/ui-extended.lua b/.config/nvim/lua/plugins/extras/ui/ui-extended.lua deleted file mode 100644 index 8dcfca73..00000000 --- a/.config/nvim/lua/plugins/extras/ui/ui-extended.lua +++ /dev/null @@ -1,54 +0,0 @@ -return { - { - "HampusHauffman/block.nvim", - keys = { { "uB", "Block", desc = "Toggle Block" } }, - opts = { - percent = 0.9, - depth = 4, - colors = nil, - automatic = false, - }, - }, - { - "tzachar/highlight-undo.nvim", - event = "BufReadPost", - opts = { - duration = 700, - }, - }, - { - "mvllow/modes.nvim", - event = "BufReadPost", - opts = { - colors = { - copy = "#f5a97f", - delete = "#ee99a0", - insert = "#8bd5ca", - visual = "#8aadf4", - }, - }, - }, - { - "nacro90/numb.nvim", - event = "CmdlineEnter", - opts = {}, - }, - { - "sitiom/nvim-numbertoggle", - event = "BufReadPost", - }, - { - "anuvyklack/windows.nvim", - event = "WinNew", - dependencies = { - { "anuvyklack/middleclass" }, - { "anuvyklack/animation.nvim" }, - }, - keys = { - { "wv", "WindowsMaximizeVertically", desc = "Vertical Zoom" }, - { "wh", "WindowsMaximizeHorizontally", desc = "Horizontal Zoom" }, - { "we", "WindowsEqualize", desc = "Equalize Zoom" }, - }, - opts = {}, - }, -} diff --git a/.config/nvim/lua/plugins/extras/ui/windows.lua b/.config/nvim/lua/plugins/extras/ui/windows.lua new file mode 100644 index 00000000..5a226a0a --- /dev/null +++ b/.config/nvim/lua/plugins/extras/ui/windows.lua @@ -0,0 +1,14 @@ +return { + "anuvyklack/windows.nvim", + event = "WinNew", + dependencies = { + { "anuvyklack/middleclass" }, + { "anuvyklack/animation.nvim" }, + }, + keys = { + { "wv", "WindowsMaximizeVertically", desc = "Vertical Zoom" }, + { "wh", "WindowsMaximizeHorizontally", desc = "Horizontal Zoom" }, + { "we", "WindowsEqualize", desc = "Equalize Zoom" }, + }, + opts = {}, +} diff --git a/.config/nvim/lua/plugins/extras/util/auto-indent.lua b/.config/nvim/lua/plugins/extras/util/auto-indent.lua new file mode 100644 index 00000000..7498feab --- /dev/null +++ b/.config/nvim/lua/plugins/extras/util/auto-indent.lua @@ -0,0 +1,5 @@ +return { + "vidocqh/auto-indent.nvim", + event = "BufReadPost", + opts = {}, +} diff --git a/.config/nvim/lua/plugins/extras/util/better-escape.lua b/.config/nvim/lua/plugins/extras/util/better-escape.lua new file mode 100644 index 00000000..81e79ebd --- /dev/null +++ b/.config/nvim/lua/plugins/extras/util/better-escape.lua @@ -0,0 +1,15 @@ +return { + "max397574/better-escape.nvim", + config = function() + require("better_escape").setup({ + mapping = { "jk", "jj", "kj", "jl" }, -- a table with mappings to use + timeout = vim.o.timeoutlen, -- the time in which the keys must be hit in ms. Use option timeoutlen by default + clear_empty_lines = false, -- clear line after escaping if there is only whitespace + keys = "", -- keys used for escaping, if it is a function will use the result everytime + -- example(recommended) + -- keys = function() + -- return vim.api.nvim_win_get_cursor(0)[2] > 1 and 'l' or '' + -- end, + }) + end, +} diff --git a/.config/nvim/lua/plugins/extras/util/bigfile.lua b/.config/nvim/lua/plugins/extras/util/bigfile.lua new file mode 100644 index 00000000..728bf9f1 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/util/bigfile.lua @@ -0,0 +1,17 @@ +return { + "LunarVim/bigfile.nvim", + event = "VeryLazy", + opts = { + filesize = 1, -- size of the file in MiB, the plugin round file sizes to the closest MiB + pattern = { "*" }, -- autocmd pattern or function see <### Overriding the detection of big files> + features = { -- features to disable + "indent_blankline", + "illuminate", + "lsp", + "treesitter", + "syntax", + "vimopts", + "matchparen", + }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/util/hardtime.lua b/.config/nvim/lua/plugins/extras/util/hardtime.lua new file mode 100644 index 00000000..715f973b --- /dev/null +++ b/.config/nvim/lua/plugins/extras/util/hardtime.lua @@ -0,0 +1,38 @@ +return { + "m4xshen/hardtime.nvim", + dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" }, + event = "VeryLazy", + keys = { + { "uH", "Hardtime toggle", desc = "Toggle Hardtime" }, + }, + opts = { + disabled_filetypes = { + "qf", + "netrw", + "NvimTree", + "lazy", + "mason", + "oil", + "neo-tree", + "symbols-outline", + "vim-be-good", + }, + restriction_mode = "hint", + restricted_keys = { + ["h"] = { "n", "x" }, + ["l"] = { "n", "x" }, + ["-"] = { "n", "x" }, + ["+"] = { "n", "x" }, + ["gj"] = { "n", "x" }, + ["gk"] = { "n", "x" }, + [""] = { "n", "x" }, + [""] = { "n", "x" }, + }, + disabled_keys = { + [""] = { "" }, + [""] = { "" }, + [""] = { "" }, + [""] = { "" }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/util/mini-align.lua b/.config/nvim/lua/plugins/extras/util/mini-align.lua new file mode 100644 index 00000000..2fc5c662 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/util/mini-align.lua @@ -0,0 +1,8 @@ +return { + "echasnovski/mini.align", + opts = {}, + keys = { + { "ga", mode = { "n", "v" }, desc = "Align" }, + { "gA", mode = { "n", "v" }, desc = "Align Preview" }, + }, +} diff --git a/.config/nvim/lua/plugins/extras/util/rayso.lua b/.config/nvim/lua/plugins/extras/util/rayso.lua new file mode 100644 index 00000000..11da81bc --- /dev/null +++ b/.config/nvim/lua/plugins/extras/util/rayso.lua @@ -0,0 +1,11 @@ +return { + "TobinPalmer/rayso.nvim", + cmd = { "Rayso" }, + keys = { + { "cS", "Rayso", mode = { "n" }, desc = "Screenshot Code" }, + { "cS", "'<,'>Rayso", mode = { "v" }, desc = "Screenshot Selection" }, + }, + opts = { + open_cmd = "librewolf", + }, +} diff --git a/.config/nvim/lua/plugins/extras/util/regex.lua b/.config/nvim/lua/plugins/extras/util/regex.lua new file mode 100644 index 00000000..7e9c0d40 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/util/regex.lua @@ -0,0 +1,8 @@ +return { + "bennypowers/nvim-regexplainer", + opts = {}, + event = "BufReadPost", + requires = { + "MunifTanjim/nui.nvim", + }, +} diff --git a/.config/nvim/lua/plugins/extras/util/suda.lua b/.config/nvim/lua/plugins/extras/util/suda.lua new file mode 100644 index 00000000..31f11ae7 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/util/suda.lua @@ -0,0 +1,14 @@ +return { + "lambdalisue/suda.vim", + keys = { + { + "W", + ":SudaWrite", + desc = "Suda Write", + }, + }, + cmd = { + "SudaRead", + "SudaWrite", + }, +} diff --git a/.config/nvim/lua/plugins/extras/util/util.lua b/.config/nvim/lua/plugins/extras/util/util.lua deleted file mode 100644 index 7485a92a..00000000 --- a/.config/nvim/lua/plugins/extras/util/util.lua +++ /dev/null @@ -1,204 +0,0 @@ -return { - { - "LunarVim/bigfile.nvim", - event = "VeryLazy", - opts = { - filesize = 1, -- size of the file in MiB, the plugin round file sizes to the closest MiB - pattern = { "*" }, -- autocmd pattern or function see <### Overriding the detection of big files> - features = { -- features to disable - "indent_blankline", - "illuminate", - "lsp", - "treesitter", - "syntax", - "vimopts", - "matchparen", - }, - }, - }, - { - "max397574/better-escape.nvim", - enabled = false, - config = function() - require("better_escape").setup({ - mapping = { "jk", "jj", "kj", "jl" }, -- a table with mappings to use - timeout = vim.o.timeoutlen, -- the time in which the keys must be hit in ms. Use option timeoutlen by default - clear_empty_lines = false, -- clear line after escaping if there is only whitespace - keys = "", -- keys used for escaping, if it is a function will use the result everytime - -- example(recommended) - -- keys = function() - -- return vim.api.nvim_win_get_cursor(0)[2] > 1 and 'l' or '' - -- end, - }) - end, - }, - { - "monaqa/dial.nvim", - event = "VeryLazy", - -- splutylua: ignore - keys = { - { - "", - function() - return require("dial.map").inc_normal() - end, - expr = true, - desc = "Increment", - }, - { - "", - function() - return require("dial.map").dec_normal() - end, - expr = true, - desc = "Decrement", - }, - }, - config = function() - local augend = require("dial.augend") - require("dial.config").augends:register_group({ - default = { - augend.integer.alias.decimal, - augend.integer.alias.hex, - augend.date.alias["%Y/%m/%d"], - augend.constant.alias.bool, - augend.constant.new({ elements = { "let", "const" } }), - augend.semver.alias.semver, - }, - }) - end, - }, - { - "m4xshen/hardtime.nvim", - dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" }, - enabled = false, - event = "VeryLazy", - keys = { - { "uH", "Hardtime toggle", desc = "Toggle Hardtime" }, - }, - opts = { - disabled_filetypes = { - "qf", - "netrw", - "NvimTree", - "lazy", - "mason", - "oil", - "neo-tree", - "symbols-outline", - "vim-be-good", - }, - restriction_mode = "hint", - restricted_keys = { - ["h"] = { "n", "x" }, - ["l"] = { "n", "x" }, - ["-"] = { "n", "x" }, - ["+"] = { "n", "x" }, - ["gj"] = { "n", "x" }, - ["gk"] = { "n", "x" }, - [""] = { "n", "x" }, - [""] = { "n", "x" }, - }, - disabled_keys = { - [""] = { "" }, - [""] = { "" }, - [""] = { "" }, - [""] = { "" }, - }, - }, - }, - { - "mrjones2014/smart-splits.nvim", - build = "./kitty/install-kittens.bash", - -- stylua: ignore - keys = { - { "", function() require("smart-splits").resize_left() end, desc = "Resize left", mode = "n" }, - { "", function() require("smart-splits").resize_down() end, desc = "Resize down", mode = "n" }, - { "", function() require("smart-splits").resize_up() end, desc = "Resize up", mode = "n" }, - { "", function() require("smart-splits").resize_right() end, desc = "Resize right", mode = "n" }, - { "", function() require("smart-splits").move_cursor_left() end, desc = "Move cursor left", mode = "n" }, - { "", function() require("smart-splits").move_cursor_down() end, desc = "Move cursor down", mode = "n" }, - { "", function() require("smart-splits").move_cursor_up() end, desc = "Move cursor up", mode = "n" }, - { "", function() require("smart-splits").move_cursor_right() end, desc = "Move cursor right", mode = "n" }, - { "", function() require("smart-splits").swap_buf_left() end, desc = "Swap buffer left", mode = "n" }, - { "", function() require("smart-splits").swap_buf_down() end, desc = "Swap buffer down", mode = "n" }, - { "", function() require("smart-splits").swap_buf_up() end, desc = "Swap buffer up", mode = "n" }, - { "", function() require("smart-splits").swap_buf_right() end, desc = "Swap buffer right", mode = "n" }, - }, - }, - { - "lambdalisue/suda.vim", - keys = { - { - "W", - ":SudaWrite", - desc = "Suda Write", - }, - }, - cmd = { - "SudaRead", - "SudaWrite", - }, - }, - { - "chrisgrieser/nvim-spider", - lazy = true, - enabled = false, - opts = {}, - keys = { - { "w", "lua require('spider').motion('w')", mode = { "n", "o", "x" }, desc = "Spider-w" }, - { "e", "lua require('spider').motion('e')", mode = { "n", "o", "x" }, desc = "Spider-e" }, - { "b", "lua require('spider').motion('b')", mode = { "n", "o", "x" }, desc = "Spider-b" }, - { "ge", "lua require('spider').motion('ge')", mode = { "n", "o", "x" }, desc = "Spider-ge" }, - }, - }, - { - "TobinPalmer/rayso.nvim", - cmd = { "Rayso" }, - keys = { - { "cS", "Rayso", mode = { "n" }, desc = "Screenshot Code" }, - { "cS", "'<,'>Rayso", mode = { "v" }, desc = "Screenshot Selection" }, - }, - opts = { - open_cmd = "librewolf", - }, - }, - { - "bennypowers/nvim-regexplainer", - opts = {}, - event = "BufReadPost", - requires = { - "MunifTanjim/nui.nvim", - }, - }, - { - "Wansmer/treesj", - keys = { - { "J", "TSJToggle", desc = "Join Toggle" }, - }, - opts = { use_default_keymaps = false, max_join_length = 150 }, - }, - { "wakatime/vim-wakatime", lazy = false }, - { - "mbbill/undotree", - event = "BufReadPost", - }, - { - "echasnovski/mini.align", - opts = {}, - keys = { - { "ga", mode = { "n", "v" }, desc = "Align" }, - { "gA", mode = { "n", "v" }, desc = "Align Preview" }, - }, - }, - { - "ThePrimeagen/vim-be-good", - cmd = "VimBeGood", - }, - { - "vidocqh/auto-indent.nvim", - enabled = false, - event = "BufReadPost", - opts = {}, - }, -} diff --git a/.config/nvim/lua/plugins/extras/util/vim-be-good.lua b/.config/nvim/lua/plugins/extras/util/vim-be-good.lua new file mode 100644 index 00000000..41515498 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/util/vim-be-good.lua @@ -0,0 +1,4 @@ +return { + "ThePrimeagen/vim-be-good", + cmd = "VimBeGood", +} diff --git a/.config/nvim/lua/plugins/extras/util/wakatime.lua b/.config/nvim/lua/plugins/extras/util/wakatime.lua new file mode 100644 index 00000000..f9bd1fc6 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/util/wakatime.lua @@ -0,0 +1,4 @@ +return { "wakatime/vim-wakatime", lazy = false }, { + "mbbill/undotree", + event = "BufReadPost", +} diff --git a/.config/nvim/lua/plugins/neotest.lua b/.config/nvim/lua/plugins/neotest.lua new file mode 100644 index 00000000..e608a009 --- /dev/null +++ b/.config/nvim/lua/plugins/neotest.lua @@ -0,0 +1,24 @@ +return { + "nvim-neotest/neotest", + keys = { + { + "tl", + function() + require("neotest").run.run_last() + end, + desc = "Run Last Test", + }, + { + "tL", + function() + require("neotest").run.run_last({ strategy = "dap" }) + end, + desc = "Debug Last Test", + }, + { + "tw", + "lua require('neotest').run.run({ jestCommand = 'jest --watch ' })", + desc = "Run Watch", + }, + }, +}