⚡️ perf(lazy-load): delegate plugins to their cmd/keymaps
Increase performance: Allow plugins to only load with their commands and keymaps whenever possible
This commit is contained in:
@@ -2,10 +2,15 @@
|
|||||||
-- -------------------------------- AUTOCMDS -----------------------------------
|
-- -------------------------------- AUTOCMDS -----------------------------------
|
||||||
-- -----------------------------------------------------------------------------
|
-- -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
local autogrp = vim.api.nvim_create_augroup
|
||||||
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
|
|
||||||
-- GIT CONFLICT MARKERS
|
-- GIT CONFLICT MARKERS
|
||||||
-- if there are conflicts, jump to first conflict, highlight conflict markers,
|
-- if there are conflicts, jump to first conflict, highlight conflict markers,
|
||||||
-- and disable diagnostics (simplified version of `git-conflict.nvim`)
|
-- and disable diagnostics (simplified version of `git-conflict.nvim`)
|
||||||
vim.api.nvim_create_autocmd({ "BufEnter", "FocusGained" }, {
|
autogrp("GitConflictMarkers", { clear = true })
|
||||||
|
autocmd({ "BufEnter", "FocusGained" }, {
|
||||||
|
group = "GitConflictMarkers",
|
||||||
callback = function(ctx)
|
callback = function(ctx)
|
||||||
local hlgroup = "DiagnosticVirtualTextInfo" -- CONFIG
|
local hlgroup = "DiagnosticVirtualTextInfo" -- CONFIG
|
||||||
|
|
||||||
|
|||||||
@@ -183,15 +183,6 @@ function M.setup_autocommands()
|
|||||||
local autogrp = vim.api.nvim_create_augroup
|
local autogrp = vim.api.nvim_create_augroup
|
||||||
local autocmd = vim.api.nvim_create_autocmd
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
autogrp("IndentHighlight", { clear = true })
|
autogrp("IndentHighlight", { clear = true })
|
||||||
-- Autocommand to trigger setup on FileType
|
|
||||||
-- autocmd("FileType", {
|
|
||||||
-- pattern = "*",
|
|
||||||
-- group = "IndentHighlight",
|
|
||||||
-- callback = function()
|
|
||||||
-- M.setup_indent_highlight()
|
|
||||||
-- M.setup_dashboard_highlight()
|
|
||||||
-- end,
|
|
||||||
-- })
|
|
||||||
|
|
||||||
-- List of filetypes to exclude
|
-- List of filetypes to exclude
|
||||||
local excluded_filetypes = {
|
local excluded_filetypes = {
|
||||||
@@ -209,7 +200,7 @@ function M.setup_autocommands()
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Autocommand to trigger setup on FileType
|
-- Autocommand to trigger setup on FileType
|
||||||
vim.api.nvim_create_autocmd("FileType", {
|
autocmd("FileType", {
|
||||||
group = "IndentHighlight",
|
group = "IndentHighlight",
|
||||||
callback = function()
|
callback = function()
|
||||||
local filetype = vim.bo.filetype
|
local filetype = vim.bo.filetype
|
||||||
|
|||||||
@@ -7,12 +7,6 @@
|
|||||||
-- Initialize which-key
|
-- Initialize which-key
|
||||||
local wk = require("which-key")
|
local wk = require("which-key")
|
||||||
wk.add({
|
wk.add({
|
||||||
{ -- Toggle Terminal
|
|
||||||
mode = "n",
|
|
||||||
"<c-/>",
|
|
||||||
":ToggleTerm<cr>",
|
|
||||||
desc = "Toggle Terminal",
|
|
||||||
},
|
|
||||||
{ -- Open LazyGit in terminal
|
{ -- Open LazyGit in terminal
|
||||||
"<leader>gt",
|
"<leader>gt",
|
||||||
rhs = function()
|
rhs = function()
|
||||||
@@ -26,42 +20,6 @@ wk.add({
|
|||||||
lhs = "<leader>I",
|
lhs = "<leader>I",
|
||||||
group = "IconPicker",
|
group = "IconPicker",
|
||||||
icon = { icon = "", color = "orange" },
|
icon = { icon = "", color = "orange" },
|
||||||
cond = function()
|
|
||||||
return pcall(require, "icon-picker")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Pick Icon
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
lhs = "<leader>Ii",
|
|
||||||
rhs = "<cmd>IconPickerNormal<cr>",
|
|
||||||
desc = "Pick Icon",
|
|
||||||
group = "IconPicker",
|
|
||||||
cond = function()
|
|
||||||
return pcall(require, "icon-picker")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Yank Icon
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
lhs = "<leader>Iy",
|
|
||||||
rhs = "<cmd>IconPickerYank<cr>",
|
|
||||||
desc = "Yank Icon",
|
|
||||||
group = "IconPicker",
|
|
||||||
cond = function()
|
|
||||||
return pcall(require, "icon-picker")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Insert Icon in insert mode
|
|
||||||
{
|
|
||||||
mode = "i",
|
|
||||||
lhs = "<C-i>",
|
|
||||||
rhs = "<cmd>IconPickerInsert<cr>",
|
|
||||||
desc = "Insert Icon",
|
|
||||||
group = "IconPicker",
|
|
||||||
cond = function()
|
|
||||||
return pcall(require, "icon-picker")
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
-- Gists group
|
-- Gists group
|
||||||
{
|
{
|
||||||
@@ -69,29 +27,6 @@ wk.add({
|
|||||||
lhs = "<leader>gn",
|
lhs = "<leader>gn",
|
||||||
group = "Gists",
|
group = "Gists",
|
||||||
icon = { icon = "", color = "orange" },
|
icon = { icon = "", color = "orange" },
|
||||||
cond = function()
|
|
||||||
return pcall(require, "gist")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Create Gist
|
|
||||||
{
|
|
||||||
mode = { "n", "x" },
|
|
||||||
lhs = "<leader>gnc",
|
|
||||||
rhs = "<cmd>GistCreate<cr>",
|
|
||||||
desc = "Create Gist",
|
|
||||||
cond = function()
|
|
||||||
return pcall(require, "gist")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Find Gists
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
lhs = "<leader>gnf",
|
|
||||||
rhs = "<cmd>GistList<cr>",
|
|
||||||
desc = "Find Gists",
|
|
||||||
cond = function()
|
|
||||||
return pcall(require, "gist")
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
{ -- Lazy group
|
{ -- Lazy group
|
||||||
"<leader>l",
|
"<leader>l",
|
||||||
@@ -112,140 +47,6 @@ wk.add({
|
|||||||
group = "MiniMap",
|
group = "MiniMap",
|
||||||
icon = { icon = "", color = "yellow" },
|
icon = { icon = "", color = "yellow" },
|
||||||
},
|
},
|
||||||
-- Save selected code snapshot into clipboard
|
|
||||||
{
|
|
||||||
mode = "x",
|
|
||||||
lhs = "<leader>cy",
|
|
||||||
rhs = "<cmd>CodeSnap<cr>",
|
|
||||||
desc = "Save selected code snapshot into clipboard",
|
|
||||||
cond = function()
|
|
||||||
return pcall(require, "codesnap")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Save selected code snapshot in ~/Pictures
|
|
||||||
{
|
|
||||||
mode = "x",
|
|
||||||
lhs = "<leader>cs",
|
|
||||||
rhs = "<cmd>CodeSnapSave<cr>",
|
|
||||||
desc = "Save selected code snapshot in ~/Pictures",
|
|
||||||
cond = function()
|
|
||||||
return pcall(require, "codesnap")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Highlight and snapshot selected code into clipboard
|
|
||||||
{
|
|
||||||
mode = "x",
|
|
||||||
lhs = "<leader>ch",
|
|
||||||
rhs = "<cmd>CodeSnapHighlight<cr>",
|
|
||||||
desc = "Highlight and snapshot selected code into clipboard",
|
|
||||||
cond = function()
|
|
||||||
return pcall(require, "codesnap")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Save ASCII code snapshot into clipboard
|
|
||||||
{
|
|
||||||
mode = "x",
|
|
||||||
lhs = "<leader>ci",
|
|
||||||
rhs = "<cmd>CodeSnapASCII<cr>",
|
|
||||||
desc = "Save ASCII code snapshot into clipboard",
|
|
||||||
cond = function()
|
|
||||||
return pcall(require, "codesnap")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"gx",
|
|
||||||
"<cmd>Browse<cr>",
|
|
||||||
mode = { "n", "x" },
|
|
||||||
desc = "Open URL/Link",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>lg",
|
|
||||||
"<cmd>LazyGit<cr>",
|
|
||||||
desc = "LazyGit",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>fs",
|
|
||||||
rhs = function()
|
|
||||||
require("rip-substitute").sub()
|
|
||||||
end,
|
|
||||||
mode = { "n", "x" },
|
|
||||||
desc = "Rip Substitute",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<c-s-h>",
|
|
||||||
rhs = function()
|
|
||||||
require("kitty-navigator").navigateLeft()
|
|
||||||
end,
|
|
||||||
desc = "KittyNavigateLeft",
|
|
||||||
cond = function() -- Using Kitty
|
|
||||||
return require("config.rootiest").using_kitty()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<c-s-j>",
|
|
||||||
rhs = function()
|
|
||||||
require("kitty-navigator").navigateDown()
|
|
||||||
end,
|
|
||||||
desc = "KittyNavigateDown",
|
|
||||||
cond = function() -- Using Kitty
|
|
||||||
return require("config.rootiest").using_kitty()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<c-s-k>",
|
|
||||||
rhs = function()
|
|
||||||
require("kitty-navigator").navigateUp()
|
|
||||||
end,
|
|
||||||
desc = "KittyNavigateUp",
|
|
||||||
cond = function() -- Using Kitty
|
|
||||||
return require("config.rootiest").using_kitty()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<c-s-l>",
|
|
||||||
rhs = function()
|
|
||||||
require("kitty-navigator").navigateRight()
|
|
||||||
end,
|
|
||||||
desc = "KittyNavigateRight",
|
|
||||||
cond = function() -- Using Kitty
|
|
||||||
return require("config.rootiest").using_kitty()
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"zk",
|
|
||||||
rhs = function()
|
|
||||||
require("config.rootiest").toggle_precognition()
|
|
||||||
end,
|
|
||||||
desc = "Toggle Precognition",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>a",
|
|
||||||
"<cmd>Alternate<cr>",
|
|
||||||
desc = "Toggle Alternate",
|
|
||||||
cond = function()
|
|
||||||
return (
|
|
||||||
vim.bo.filetype == "c"
|
|
||||||
or vim.bo.filetype == "h"
|
|
||||||
or vim.bo.filetype == "cpp"
|
|
||||||
or vim.bo.filetype == "hpp"
|
|
||||||
)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>wt",
|
|
||||||
rhs = function()
|
|
||||||
require("transparent").toggle()
|
|
||||||
end,
|
|
||||||
desc = "Toggle Transparency",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
mode = "x",
|
|
||||||
lhs = "<leader>r",
|
|
||||||
rhs = function()
|
|
||||||
require("substitute").visual()
|
|
||||||
end,
|
|
||||||
desc = "Substitute",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"yo",
|
"yo",
|
||||||
rhs = function()
|
rhs = function()
|
||||||
@@ -260,82 +61,7 @@ wk.add({
|
|||||||
end,
|
end,
|
||||||
desc = "Toggle Hardmode",
|
desc = "Toggle Hardmode",
|
||||||
},
|
},
|
||||||
{ -- Toggle ZenMode
|
|
||||||
"<leader>z",
|
|
||||||
rhs = function()
|
|
||||||
require("zen-mode").toggle()
|
|
||||||
end,
|
|
||||||
desc = "Toggle ZenMode",
|
|
||||||
},
|
|
||||||
-- Substitute operator in normal mode
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
lhs = "x",
|
|
||||||
rhs = function()
|
|
||||||
require("substitute").operator()
|
|
||||||
end,
|
|
||||||
desc = "Substitute operator",
|
|
||||||
cond = function()
|
|
||||||
return pcall(require, "substitute")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Substitute line in normal mode
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
lhs = "xx",
|
|
||||||
rhs = function()
|
|
||||||
require("substitute").line()
|
|
||||||
end,
|
|
||||||
desc = "Substitute line",
|
|
||||||
cond = function()
|
|
||||||
return pcall(require, "substitute")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Substitute end of line in normal mode
|
|
||||||
{
|
|
||||||
mode = "n",
|
|
||||||
lhs = "X",
|
|
||||||
rhs = function()
|
|
||||||
require("substitute").eol()
|
|
||||||
end,
|
|
||||||
desc = "Substitute end of line",
|
|
||||||
cond = function()
|
|
||||||
return pcall(require, "substitute")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
-- Substitute visual selection in visual mode
|
|
||||||
{
|
|
||||||
mode = "x",
|
|
||||||
lhs = "x",
|
|
||||||
rhs = function()
|
|
||||||
require("substitute").visual()
|
|
||||||
end,
|
|
||||||
desc = "Substitute visual selection",
|
|
||||||
cond = function()
|
|
||||||
return pcall(require, "substitute")
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
{ "<leader>u,", group = "Font" },
|
{ "<leader>u,", group = "Font" },
|
||||||
{ "<leader>u,l", "<cmd>Nekifoch list<cr>", desc = "Fonts list" },
|
|
||||||
{
|
|
||||||
"<leader>u,c",
|
|
||||||
"<cmd>Nekifoch check<cr>",
|
|
||||||
desc = "Check current font settings",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>u,f",
|
|
||||||
rhs = function()
|
|
||||||
require("nekifoch.nui_set_font")()
|
|
||||||
end,
|
|
||||||
desc = "Set font family",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>u,s",
|
|
||||||
rhs = function()
|
|
||||||
require("nekifoch.nui_set_size")()
|
|
||||||
end,
|
|
||||||
desc = "Set font size",
|
|
||||||
},
|
|
||||||
{ -- Yank buffer contents
|
{ -- Yank buffer contents
|
||||||
"<leader>Y",
|
"<leader>Y",
|
||||||
"<cmd>%y<cr>",
|
"<cmd>%y<cr>",
|
||||||
|
|||||||
+31
-27
@@ -110,31 +110,6 @@ function M.set_cursor_icons()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Evaluate dependencies and print warnings if needed
|
|
||||||
function M.eval_dependencies()
|
|
||||||
local function should_suppress_warnings()
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local function check_executable(executable)
|
|
||||||
if vim.fn.executable(executable) ~= 1 then
|
|
||||||
vim.api.nvim_notify(
|
|
||||||
executable .. " is not installed!",
|
|
||||||
vim.log.levels.WARN,
|
|
||||||
{}
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if not should_suppress_warnings() then
|
|
||||||
local executables =
|
|
||||||
{ "lazygit", "gh", "rg", "fzf", "fd", "git", "luarocks" }
|
|
||||||
for _, executable in ipairs(executables) do
|
|
||||||
check_executable(executable)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Evaluate Neovide settings
|
-- Evaluate Neovide settings
|
||||||
function M.eval_neovide()
|
function M.eval_neovide()
|
||||||
if vim.g.neovide then
|
if vim.g.neovide then
|
||||||
@@ -158,11 +133,40 @@ function M.define_commands()
|
|||||||
end, { force = true, desc = "Yank line without leading whitespace" })
|
end, { force = true, desc = "Yank line without leading whitespace" })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function M.define_autocommands()
|
||||||
|
local autogrp = vim.api.nvim_create_augroup
|
||||||
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
|
autogrp("AutoSpellCorrections", { clear = true })
|
||||||
|
-- List of filetypes to exclude
|
||||||
|
local excluded_filetypes = {
|
||||||
|
"help",
|
||||||
|
"alpha",
|
||||||
|
"dashboard",
|
||||||
|
"neo-tree",
|
||||||
|
"Trouble",
|
||||||
|
"trouble",
|
||||||
|
"lazy",
|
||||||
|
"mason",
|
||||||
|
"notify",
|
||||||
|
"toggleterm",
|
||||||
|
"lazyterm",
|
||||||
|
}
|
||||||
|
-- Autocommand to trigger setup on FileType
|
||||||
|
autocmd("FileType", {
|
||||||
|
group = "AutoSpellCorrections",
|
||||||
|
callback = function()
|
||||||
|
local filetype = vim.bo.filetype
|
||||||
|
if not vim.tbl_contains(excluded_filetypes, filetype) then
|
||||||
|
M.define_autocorrections()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
function M.setup()
|
function M.setup()
|
||||||
M.eval_dependencies()
|
|
||||||
M.eval_neovide()
|
M.eval_neovide()
|
||||||
M.define_autocorrections()
|
|
||||||
M.define_commands()
|
M.define_commands()
|
||||||
|
M.define_autocommands()
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
|||||||
+49
-2
@@ -58,7 +58,15 @@ return {
|
|||||||
},
|
},
|
||||||
{ -- Alternate
|
{ -- Alternate
|
||||||
"ton/vim-alternate",
|
"ton/vim-alternate",
|
||||||
|
lazy = true,
|
||||||
ft = { "cpp", "h", "hpp", "c" },
|
ft = { "cpp", "h", "hpp", "c" },
|
||||||
|
keys = {
|
||||||
|
{ -- Toggle Alternate
|
||||||
|
"<leader>a",
|
||||||
|
"<cmd>Alternate<cr>",
|
||||||
|
desc = "Toggle Alternate",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ -- Completion
|
{ -- Completion
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
@@ -104,18 +112,57 @@ return {
|
|||||||
},
|
},
|
||||||
{ -- Colorizer
|
{ -- Colorizer
|
||||||
"norcalli/nvim-colorizer.lua",
|
"norcalli/nvim-colorizer.lua",
|
||||||
event = "InsertEnter",
|
event = "BufEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("colorizer").setup()
|
require("colorizer").setup()
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
{ -- Substitute
|
{ -- Substitute
|
||||||
"gbprod/substitute.nvim",
|
"gbprod/substitute.nvim",
|
||||||
event = "InsertEnter",
|
lazy = true,
|
||||||
opts = {
|
opts = {
|
||||||
yank_substituted_text = false,
|
yank_substituted_text = false,
|
||||||
preserve_cursor_position = true,
|
preserve_cursor_position = true,
|
||||||
},
|
},
|
||||||
|
keys = {
|
||||||
|
{ -- Substitute operator in normal mode
|
||||||
|
"x",
|
||||||
|
function()
|
||||||
|
require("substitute").operator()
|
||||||
|
end,
|
||||||
|
desc = "Substitute operator",
|
||||||
|
},
|
||||||
|
{ -- Substitute line in normal mode
|
||||||
|
"xx",
|
||||||
|
function()
|
||||||
|
require("substitute").line()
|
||||||
|
end,
|
||||||
|
desc = "Substitute line",
|
||||||
|
},
|
||||||
|
{ -- Substitute end of line in normal mode
|
||||||
|
"X",
|
||||||
|
function()
|
||||||
|
require("substitute").eol()
|
||||||
|
end,
|
||||||
|
desc = "Substitute end of line",
|
||||||
|
},
|
||||||
|
{ -- Substitute visual selection in visual mode
|
||||||
|
"x",
|
||||||
|
function()
|
||||||
|
require("substitute").visual()
|
||||||
|
end,
|
||||||
|
desc = "Substitute visual selection",
|
||||||
|
mode = "x",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>r",
|
||||||
|
function()
|
||||||
|
require("substitute").visual()
|
||||||
|
end,
|
||||||
|
desc = "Substitute",
|
||||||
|
mode = "x",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ -- mini.splitjoin
|
{ -- mini.splitjoin
|
||||||
"echasnovski/mini.splitjoin",
|
"echasnovski/mini.splitjoin",
|
||||||
|
|||||||
+21
-3
@@ -42,15 +42,14 @@ return {
|
|||||||
},
|
},
|
||||||
{ -- indent-blankline
|
{ -- indent-blankline
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
|
lazy = true,
|
||||||
},
|
},
|
||||||
{ -- Outline
|
{ -- Outline
|
||||||
import = "lazyvim.plugins.extras.editor.outline",
|
import = "lazyvim.plugins.extras.editor.outline",
|
||||||
},
|
},
|
||||||
{ -- Telescope
|
|
||||||
import = "lazyvim.plugins.extras.editor.telescope",
|
|
||||||
},
|
|
||||||
{ -- FoldNav
|
{ -- FoldNav
|
||||||
"domharries/foldnav.nvim",
|
"domharries/foldnav.nvim",
|
||||||
|
lazy = true,
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"<C-h>",
|
"<C-h>",
|
||||||
@@ -80,6 +79,7 @@ return {
|
|||||||
},
|
},
|
||||||
{ -- Which-Key
|
{ -- Which-Key
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
|
lazy = true,
|
||||||
opts = {
|
opts = {
|
||||||
preset = "modern",
|
preset = "modern",
|
||||||
win = {
|
win = {
|
||||||
@@ -118,12 +118,30 @@ return {
|
|||||||
"tris203/precognition.nvim",
|
"tris203/precognition.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
opts = {},
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"zk",
|
||||||
|
function()
|
||||||
|
require("config.rootiest").toggle_precognition()
|
||||||
|
end,
|
||||||
|
desc = "Toggle Precognition",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ -- Zen Mode
|
{ -- Zen Mode
|
||||||
"folke/zen-mode.nvim",
|
"folke/zen-mode.nvim",
|
||||||
--event = "VeryLazy",
|
--event = "VeryLazy",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
opts = {},
|
opts = {},
|
||||||
|
keys = {
|
||||||
|
{ -- Toggle ZenMode
|
||||||
|
"<leader>z",
|
||||||
|
function()
|
||||||
|
require("zen-mode").toggle()
|
||||||
|
end,
|
||||||
|
desc = "Toggle ZenMode",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ -- SmoothCursor
|
{ -- SmoothCursor
|
||||||
"gen740/SmoothCursor.nvim",
|
"gen740/SmoothCursor.nvim",
|
||||||
|
|||||||
@@ -15,6 +15,14 @@ return {
|
|||||||
{ -- ToggleTerm
|
{ -- ToggleTerm
|
||||||
"akinsho/toggleterm.nvim",
|
"akinsho/toggleterm.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
|
keys = {
|
||||||
|
{ -- Toggle Terminal
|
||||||
|
"<c-/>",
|
||||||
|
"<cmd>ToggleTerm<cr>",
|
||||||
|
desc = "Toggle Terminal",
|
||||||
|
mode = "n",
|
||||||
|
},
|
||||||
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("toggleterm").setup({
|
require("toggleterm").setup({
|
||||||
-- size can be a number or function which is passed the current terminal
|
-- size can be a number or function which is passed the current terminal
|
||||||
@@ -63,6 +71,36 @@ return {
|
|||||||
local kit = string.find(term, "kitty")
|
local kit = string.find(term, "kitty")
|
||||||
return kit ~= nil
|
return kit ~= nil
|
||||||
end,
|
end,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<c-s-h>",
|
||||||
|
function()
|
||||||
|
require("kitty-navigator").navigateLeft()
|
||||||
|
end,
|
||||||
|
desc = "KittyNavigateLeft",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<c-s-j>",
|
||||||
|
function()
|
||||||
|
require("kitty-navigator").navigateDown()
|
||||||
|
end,
|
||||||
|
desc = "KittyNavigateDown",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<c-s-k>",
|
||||||
|
function()
|
||||||
|
require("kitty-navigator").navigateUp()
|
||||||
|
end,
|
||||||
|
desc = "KittyNavigateUp",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<c-s-l>",
|
||||||
|
function()
|
||||||
|
require("kitty-navigator").navigateRight()
|
||||||
|
end,
|
||||||
|
desc = "KittyNavigateRight",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ -- Kitty-Runner
|
{ -- Kitty-Runner
|
||||||
"jghauser/kitty-runner.nvim",
|
"jghauser/kitty-runner.nvim",
|
||||||
@@ -87,10 +125,37 @@ return {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"NeViRAIDE/nekifoch.nvim",
|
"NeViRAIDE/nekifoch.nvim",
|
||||||
|
lazy = true,
|
||||||
cmd = "Nekifoch",
|
cmd = "Nekifoch",
|
||||||
opts = {
|
opts = {
|
||||||
kitty_conf_path = vim.env.HOME .. "/.kittyoverrides",
|
kitty_conf_path = vim.env.HOME .. "/.kittyoverrides",
|
||||||
},
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>u,l",
|
||||||
|
"<cmd>Nekifoch list<cr>",
|
||||||
|
desc = "Fonts list",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>u,c",
|
||||||
|
"<cmd>Nekifoch check<cr>",
|
||||||
|
desc = "Check current font settings",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>u,f",
|
||||||
|
function()
|
||||||
|
require("nekifoch.nui_set_font")()
|
||||||
|
end,
|
||||||
|
desc = "Set font family",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"<leader>u,s",
|
||||||
|
function()
|
||||||
|
require("nekifoch.nui_set_size")()
|
||||||
|
end,
|
||||||
|
desc = "Set font size",
|
||||||
|
},
|
||||||
|
},
|
||||||
cond = function() -- Using Kitty
|
cond = function() -- Using Kitty
|
||||||
local term = os.getenv("TERM") or ""
|
local term = os.getenv("TERM") or ""
|
||||||
local kit = string.find(term, "kitty")
|
local kit = string.find(term, "kitty")
|
||||||
|
|||||||
@@ -72,6 +72,15 @@ return {
|
|||||||
"xiyaowong/transparent.nvim",
|
"xiyaowong/transparent.nvim",
|
||||||
lazy = true,
|
lazy = true,
|
||||||
config = true,
|
config = true,
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>wt",
|
||||||
|
function()
|
||||||
|
require("transparent").toggle()
|
||||||
|
end,
|
||||||
|
desc = "Toggle Transparency",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ -- Auto Dark Mode
|
{ -- Auto Dark Mode
|
||||||
"f-person/auto-dark-mode.nvim",
|
"f-person/auto-dark-mode.nvim",
|
||||||
|
|||||||
+109
-16
@@ -21,10 +21,6 @@ local function get_fg_color(hlgroup)
|
|||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{ -- Project management
|
|
||||||
import = "lazyvim.plugins.extras.util.project",
|
|
||||||
opts = { manual_mode = false },
|
|
||||||
},
|
|
||||||
{ -- Chezmoi
|
{ -- Chezmoi
|
||||||
import = "lazyvim.plugins.extras.util.chezmoi",
|
import = "lazyvim.plugins.extras.util.chezmoi",
|
||||||
},
|
},
|
||||||
@@ -43,8 +39,16 @@ return {
|
|||||||
},
|
},
|
||||||
{ -- Link following
|
{ -- Link following
|
||||||
"chrishrb/gx.nvim",
|
"chrishrb/gx.nvim",
|
||||||
event = "VeryLazy",
|
lazy = true,
|
||||||
cmd = { "Browse" },
|
cmd = { "Browse" },
|
||||||
|
keys = {
|
||||||
|
{ -- Open URL/Link
|
||||||
|
"gx",
|
||||||
|
"<cmd>Browse<cr>",
|
||||||
|
mode = { "n", "x" },
|
||||||
|
desc = "Open URL/Link",
|
||||||
|
},
|
||||||
|
},
|
||||||
init = function()
|
init = function()
|
||||||
vim.g.netrw_nogx = 1
|
vim.g.netrw_nogx = 1
|
||||||
end,
|
end,
|
||||||
@@ -55,19 +59,42 @@ return {
|
|||||||
"Pocco81/auto-save.nvim",
|
"Pocco81/auto-save.nvim",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
},
|
},
|
||||||
{ -- User is bored
|
|
||||||
"mikesmithgh/ugbi",
|
|
||||||
event = "InsertEnter",
|
|
||||||
},
|
|
||||||
{ -- Ripgrep substitute
|
{ -- Ripgrep substitute
|
||||||
"chrisgrieser/nvim-rip-substitute",
|
"chrisgrieser/nvim-rip-substitute",
|
||||||
event = "InsertEnter",
|
event = "InsertEnter",
|
||||||
cmd = "RipSubstitute",
|
cmd = "RipSubstitute",
|
||||||
|
keys = {
|
||||||
|
{ -- Rip Substitute
|
||||||
|
"<leader>fs",
|
||||||
|
function()
|
||||||
|
require("rip-substitute").sub()
|
||||||
|
end,
|
||||||
|
mode = { "n", "x" },
|
||||||
|
desc = "Rip Substitute",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ -- Gist Tools
|
{ -- Gist Tools
|
||||||
"Rawnly/gist.nvim",
|
"Rawnly/gist.nvim",
|
||||||
event = "InsertEnter",
|
lazy = true,
|
||||||
cmd = { "GistCreate", "GistCreateFromFile", "GistsList" },
|
cmd = {
|
||||||
|
"GistCreate",
|
||||||
|
"GistCreateFromFile",
|
||||||
|
"GistsList",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ -- Create Gist
|
||||||
|
"<leader>gnc",
|
||||||
|
"<cmd>GistCreate<cr>",
|
||||||
|
desc = "Create Gist",
|
||||||
|
mode = { "n", "x" },
|
||||||
|
},
|
||||||
|
{ -- Find Gists
|
||||||
|
"<leader>gnf",
|
||||||
|
"<cmd>GistList<cr>",
|
||||||
|
desc = "Find Gists",
|
||||||
|
},
|
||||||
|
},
|
||||||
config = true,
|
config = true,
|
||||||
},
|
},
|
||||||
{ -- Unception
|
{ -- Unception
|
||||||
@@ -78,10 +105,28 @@ return {
|
|||||||
},
|
},
|
||||||
{ -- 🍎 Icon Picker
|
{ -- 🍎 Icon Picker
|
||||||
"ziontee113/icon-picker.nvim",
|
"ziontee113/icon-picker.nvim",
|
||||||
event = "InsertEnter",
|
lazy = true,
|
||||||
config = function()
|
config = function()
|
||||||
require("icon-picker").setup({ disable_legacy_commands = true })
|
require("icon-picker").setup({ disable_legacy_commands = true })
|
||||||
end,
|
end,
|
||||||
|
keys = {
|
||||||
|
{ -- Pick Icon
|
||||||
|
"<leader>Ii",
|
||||||
|
"<cmd>IconPickerNormal<cr>",
|
||||||
|
desc = "Pick Icon",
|
||||||
|
},
|
||||||
|
{ -- Yank Icon
|
||||||
|
"<leader>Iy",
|
||||||
|
"<cmd>IconPickerYank<cr>",
|
||||||
|
desc = "Yank Icon",
|
||||||
|
},
|
||||||
|
{ -- Insert Icon in insert mode
|
||||||
|
"<C-i>",
|
||||||
|
"<cmd>IconPickerInsert<cr>",
|
||||||
|
desc = "Insert Icon",
|
||||||
|
mode = "i",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ -- LazyGit
|
{ -- LazyGit
|
||||||
"kdheepak/lazygit.nvim",
|
"kdheepak/lazygit.nvim",
|
||||||
@@ -93,13 +138,20 @@ return {
|
|||||||
"LazyGitFilter",
|
"LazyGitFilter",
|
||||||
"LazyGitFilterCurrentFile",
|
"LazyGitFilterCurrentFile",
|
||||||
},
|
},
|
||||||
|
keys = {
|
||||||
|
{
|
||||||
|
"<leader>lg",
|
||||||
|
"<cmd>LazyGit<cr>",
|
||||||
|
desc = "LazyGit",
|
||||||
|
},
|
||||||
|
},
|
||||||
dependencies = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{ -- Codesnap
|
{ -- Codesnap
|
||||||
"mistricky/codesnap.nvim",
|
"mistricky/codesnap.nvim",
|
||||||
event = "InsertEnter",
|
lazy = true,
|
||||||
build = "make",
|
build = "make",
|
||||||
opts = {
|
opts = {
|
||||||
save_path = "~/Pictures/Screenshots/",
|
save_path = "~/Pictures/Screenshots/",
|
||||||
@@ -110,6 +162,38 @@ return {
|
|||||||
code_font_family = "Iosevka NF",
|
code_font_family = "Iosevka NF",
|
||||||
code_font_size = 12,
|
code_font_size = 12,
|
||||||
},
|
},
|
||||||
|
cmd = {
|
||||||
|
"CodeSnap",
|
||||||
|
"CodeSnapSave",
|
||||||
|
"CodeSnapHighlight",
|
||||||
|
"CodeSnapASCII",
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ -- Save selected code snapshot into clipboard
|
||||||
|
"<leader>cy",
|
||||||
|
"<cmd>CodeSnap<cr>",
|
||||||
|
desc = "Save selected code snapshot into clipboard",
|
||||||
|
mode = "x",
|
||||||
|
},
|
||||||
|
{ -- Save selected code snapshot in ~/Pictures
|
||||||
|
"<leader>cs",
|
||||||
|
"<cmd>CodeSnapSave<cr>",
|
||||||
|
desc = "Save selected code snapshot in ~/Pictures",
|
||||||
|
mode = "x",
|
||||||
|
},
|
||||||
|
{ -- Highlight and snapshot selected code into clipboard
|
||||||
|
"<leader>ch",
|
||||||
|
"<cmd>CodeSnapHighlight<cr>",
|
||||||
|
desc = "Highlight and snapshot selected code into clipboard",
|
||||||
|
mode = "x",
|
||||||
|
},
|
||||||
|
{ -- Save ASCII code snapshot into clipboard
|
||||||
|
"<leader>ci",
|
||||||
|
"<cmd>CodeSnapASCII<cr>",
|
||||||
|
desc = "Save ASCII code snapshot into clipboard",
|
||||||
|
mode = "x",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{ -- Kulala
|
{ -- Kulala
|
||||||
"mistweaverco/kulala.nvim",
|
"mistweaverco/kulala.nvim",
|
||||||
@@ -120,7 +204,13 @@ return {
|
|||||||
},
|
},
|
||||||
{ -- Thanks/github-stars
|
{ -- Thanks/github-stars
|
||||||
"jsongerber/thanks.nvim",
|
"jsongerber/thanks.nvim",
|
||||||
event = "VeryLazy",
|
lazy = true,
|
||||||
|
cmd = {
|
||||||
|
"ThanksAll",
|
||||||
|
"ThanksGithubAuth",
|
||||||
|
"ThanksGithubLogout",
|
||||||
|
"ThanksClearCache",
|
||||||
|
},
|
||||||
opts = {
|
opts = {
|
||||||
star_on_install = false,
|
star_on_install = false,
|
||||||
},
|
},
|
||||||
@@ -158,9 +248,12 @@ return {
|
|||||||
opts = {},
|
opts = {},
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
mode = { "i", "n" },
|
|
||||||
"<C-s>",
|
"<C-s>",
|
||||||
"<cmd>lua require('caps-word').toggle()<CR>",
|
function()
|
||||||
|
require("caps-word").toggle()
|
||||||
|
end,
|
||||||
|
desc = "Toggle CapsWord",
|
||||||
|
mode = { "i", "n" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user