From 144903e2c47932e51e86017fdb2c42a844838d38 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Wed, 17 Jul 2024 12:10:25 -0700 Subject: [PATCH] Make some things lazier --- neovim/lua/lazy_plugins.lua | 103 ++++++++++++++++++------------------ 1 file changed, 51 insertions(+), 52 deletions(-) diff --git a/neovim/lua/lazy_plugins.lua b/neovim/lua/lazy_plugins.lua index 24fa5eb..52b81c2 100644 --- a/neovim/lua/lazy_plugins.lua +++ b/neovim/lua/lazy_plugins.lua @@ -1,35 +1,38 @@ local utils = require("utils") return { - -- Colorschemes { - "https://github.com/vim-scripts/wombat256.vim", - }, - { - "https://github.com/ViViDboarder/wombat.nvim", - dependencies = { - { - "https://github.com/rktjmp/lush.nvim", - tag = utils.map_version_rule({ - [">=0.7.0"] = utils.nil_val, - [">=0.5.0"] = "v1.0.1", - }), + -- Colorschemes + { + "https://github.com/vim-scripts/wombat256.vim", + }, + { + "https://github.com/ViViDboarder/wombat.nvim", + dependencies = { + { + "https://github.com/rktjmp/lush.nvim", + tag = utils.map_version_rule({ + [">=0.7.0"] = utils.nil_val, + [">=0.5.0"] = "v1.0.1", + }), + }, }, }, - }, - { - "https://github.com/ViViDboarder/wombuddy.nvim", - dependencies = { { "https://github.com/tjdevries/colorbuddy.vim" } }, - }, - { - "https://github.com/ishan9299/nvim-solarized-lua", - commit = utils.map_version_rule({ - [">=0.7.0"] = utils.nil_val, - ["<0.7.0"] = "faba49b", - }), - }, - { - "https://github.com/folke/tokyonight.nvim", - build = 'fish -c \'echo "set --path --prepend fish_themes_path "(pwd)"/extras" > ~/.config/fish/conf.d/tokyonight.fish\' || true', -- luacheck: no max line length + { + "https://github.com/ViViDboarder/wombuddy.nvim", + dependencies = { { "https://github.com/tjdevries/colorbuddy.vim" } }, + }, + { + "https://github.com/ishan9299/nvim-solarized-lua", + commit = utils.map_version_rule({ + [">=0.7.0"] = utils.nil_val, + ["<0.7.0"] = "faba49b", + }), + }, + { + "https://github.com/folke/tokyonight.nvim", + build = 'fish -c \'echo "set --path --prepend fish_themes_path "(pwd)"/extras" > ~/.config/fish/conf.d/tokyonight.fish\' || true', -- luacheck: no max line length + }, + priority = 1000, }, -- Some helpers -- Auto and ends to some ifs and dos @@ -66,19 +69,17 @@ return { -- Better commenting { "https://github.com/tomtom/tcomment_vim", - config = function() - require("utils").keymap_set("n", "//", ":TComment", { desc = "Toggle comment" }) - require("utils").keymap_set("v", "//", ":TCommentBlock", { desc = "Toggle comment" }) - end, + keys = { + { "//", ":TComment", desc = "Toggle comment" }, + { "//", ":TCommentBlock", mode = "v", desc = "Toggle comment" }, + }, }, -- Allow wrapping and joining of arguments across multiple lines { "https://github.com/FooSoft/vim-argwrap", - config = function() - require("utils").keymap_set("n", "a", "ArgWrap", { - desc = "Wrap or unwrap arguments", - }) - end, + keys = { + { "a", "ArgWrap", desc = "Wrap or unwrap arguments" }, + }, }, -- Adds git operations to vim { @@ -89,30 +90,27 @@ return { -- when used in status line. ["<0.9.2"] = "v3.6", }), - config = function() - require("utils").keymap_set("n", "gb", "Git blame", { desc = "Git blame" }) - require("utils").keymap_set("n", "gc", "Git commit", { desc = "Git commit" }) - require("utils").keymap_set("n", "gd", "Git diff", { desc = "Git diff" }) - require("utils").keymap_set("n", "gs", "Git", { desc = "Git status" }) - require("utils").keymap_set("n", "gw", "Git write", { desc = "Git write" }) - end, + keys = { + { "gb", "Git blame", desc = "Git blame" }, + { "gc", "Git commit", desc = "Git commit" }, + { "gd", "Git diff", desc = "Git diff" }, + { "gs", "Git", desc = "Git status" }, + { "gw", "Git write", desc = "Git write" }, + }, + command = { "Git" }, }, -- Quick toggling of Location and Quickfix lists { "https://github.com/milkypostman/vim-togglelist", - config = function() - require("utils").keymap_set("n", "", ":call ToggleQuickfixList()", { desc = "Toggle quickfix" }) - require("utils").keymap_set( - "n", - "", - ":call ToggleLocationList()", - { desc = "Toggle location list" } - ) - end, + keys = { + { "", ":call ToggleQuickfixList()", desc = "Toggle quickfix" }, + { "", ":call ToggleLocationList()", desc = "Toggle location list" }, + }, }, -- Find text everywhere! { + -- TODO: Maybe replace this with Telescope? "https://github.com/mhinz/vim-grepper", config = function() require("plugins.grepper") @@ -123,6 +121,7 @@ return { { "https://github.com/norcalli/nvim-colorizer.lua", config = true, + cmd = { "ColorizerToggle" }, }, -- Custom status line