mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 23:17:35 +00:00
Make some things lazier
This commit is contained in:
parent
fc016bd7b8
commit
144903e2c4
@ -1,5 +1,6 @@
|
|||||||
local utils = require("utils")
|
local utils = require("utils")
|
||||||
return {
|
return {
|
||||||
|
{
|
||||||
-- Colorschemes
|
-- Colorschemes
|
||||||
{
|
{
|
||||||
"https://github.com/vim-scripts/wombat256.vim",
|
"https://github.com/vim-scripts/wombat256.vim",
|
||||||
@ -31,6 +32,8 @@ return {
|
|||||||
"https://github.com/folke/tokyonight.nvim",
|
"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
|
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
|
-- Some helpers
|
||||||
-- Auto and ends to some ifs and dos
|
-- Auto and ends to some ifs and dos
|
||||||
{ "https://github.com/tpope/vim-endwise" },
|
{ "https://github.com/tpope/vim-endwise" },
|
||||||
@ -66,19 +69,17 @@ return {
|
|||||||
-- Better commenting
|
-- Better commenting
|
||||||
{
|
{
|
||||||
"https://github.com/tomtom/tcomment_vim",
|
"https://github.com/tomtom/tcomment_vim",
|
||||||
config = function()
|
keys = {
|
||||||
require("utils").keymap_set("n", "//", ":TComment<CR>", { desc = "Toggle comment" })
|
{ "//", ":TComment<CR>", desc = "Toggle comment" },
|
||||||
require("utils").keymap_set("v", "//", ":TCommentBlock<CR>", { desc = "Toggle comment" })
|
{ "//", ":TCommentBlock<CR>", mode = "v", desc = "Toggle comment" },
|
||||||
end,
|
},
|
||||||
},
|
},
|
||||||
-- Allow wrapping and joining of arguments across multiple lines
|
-- Allow wrapping and joining of arguments across multiple lines
|
||||||
{
|
{
|
||||||
"https://github.com/FooSoft/vim-argwrap",
|
"https://github.com/FooSoft/vim-argwrap",
|
||||||
config = function()
|
keys = {
|
||||||
require("utils").keymap_set("n", "<Leader>a", "<cmd>ArgWrap<CR>", {
|
{ "<Leader>a", "<cmd>ArgWrap<CR>", desc = "Wrap or unwrap arguments" },
|
||||||
desc = "Wrap or unwrap arguments",
|
},
|
||||||
})
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
-- Adds git operations to vim
|
-- Adds git operations to vim
|
||||||
{
|
{
|
||||||
@ -89,30 +90,27 @@ return {
|
|||||||
-- when used in status line.
|
-- when used in status line.
|
||||||
["<0.9.2"] = "v3.6",
|
["<0.9.2"] = "v3.6",
|
||||||
}),
|
}),
|
||||||
config = function()
|
keys = {
|
||||||
require("utils").keymap_set("n", "gb", "<cmd>Git blame<CR>", { desc = "Git blame" })
|
{ "gb", "<cmd>Git blame<CR>", desc = "Git blame" },
|
||||||
require("utils").keymap_set("n", "gc", "<cmd>Git commit<CR>", { desc = "Git commit" })
|
{ "gc", "<cmd>Git commit<CR>", desc = "Git commit" },
|
||||||
require("utils").keymap_set("n", "gd", "<cmd>Git diff<CR>", { desc = "Git diff" })
|
{ "gd", "<cmd>Git diff<CR>", desc = "Git diff" },
|
||||||
require("utils").keymap_set("n", "gs", "<cmd>Git<CR>", { desc = "Git status" })
|
{ "gs", "<cmd>Git<CR>", desc = "Git status" },
|
||||||
require("utils").keymap_set("n", "gw", "<cmd>Git write<CR>", { desc = "Git write" })
|
{ "gw", "<cmd>Git write<CR>", desc = "Git write" },
|
||||||
end,
|
},
|
||||||
|
command = { "Git" },
|
||||||
},
|
},
|
||||||
-- Quick toggling of Location and Quickfix lists
|
-- Quick toggling of Location and Quickfix lists
|
||||||
{
|
{
|
||||||
"https://github.com/milkypostman/vim-togglelist",
|
"https://github.com/milkypostman/vim-togglelist",
|
||||||
config = function()
|
keys = {
|
||||||
require("utils").keymap_set("n", "<F6>", ":call ToggleQuickfixList()<CR>", { desc = "Toggle quickfix" })
|
{ "<F6>", ":call ToggleQuickfixList()<CR>", desc = "Toggle quickfix" },
|
||||||
require("utils").keymap_set(
|
{ "<F7>", ":call ToggleLocationList()<CR>", desc = "Toggle location list" },
|
||||||
"n",
|
},
|
||||||
"<F7>",
|
|
||||||
":call ToggleLocationList()<CR>",
|
|
||||||
{ desc = "Toggle location list" }
|
|
||||||
)
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Find text everywhere!
|
-- Find text everywhere!
|
||||||
{
|
{
|
||||||
|
-- TODO: Maybe replace this with Telescope?
|
||||||
"https://github.com/mhinz/vim-grepper",
|
"https://github.com/mhinz/vim-grepper",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.grepper")
|
require("plugins.grepper")
|
||||||
@ -123,6 +121,7 @@ return {
|
|||||||
{
|
{
|
||||||
"https://github.com/norcalli/nvim-colorizer.lua",
|
"https://github.com/norcalli/nvim-colorizer.lua",
|
||||||
config = true,
|
config = true,
|
||||||
|
cmd = { "ColorizerToggle" },
|
||||||
},
|
},
|
||||||
|
|
||||||
-- Custom status line
|
-- Custom status line
|
||||||
|
Loading…
Reference in New Issue
Block a user