init
This commit is contained in:
31
nvim/lua/plugins/extras/util/autosave.lua
Normal file
31
nvim/lua/plugins/extras/util/autosave.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
return {
|
||||
"Pocco81/auto-save.nvim",
|
||||
event = { "InsertLeave", "TextChanged" },
|
||||
opts = {
|
||||
debounce_delay = 1000,
|
||||
callbacks = {
|
||||
before_saving = function()
|
||||
-- save global autoformat status
|
||||
vim.g.OLD_AUTOFORMAT = vim.g.autoformat_enabled
|
||||
|
||||
vim.g.autoformat_enabled = false
|
||||
vim.g.OLD_AUTOFORMAT_BUFFERS = {}
|
||||
-- disable all manually enabled buffers
|
||||
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
|
||||
if vim.b[bufnr].autoformat_enabled then
|
||||
table.insert(vim.g.OLD_BUFFER_AUTOFORMATS, bufnr)
|
||||
vim.b[bufnr].autoformat_enabled = false
|
||||
end
|
||||
end
|
||||
end,
|
||||
after_saving = function()
|
||||
-- restore global autoformat status
|
||||
vim.g.autoformat_enabled = vim.g.OLD_AUTOFORMAT
|
||||
-- reenable all manually enabled buffers
|
||||
for _, bufnr in ipairs(vim.g.OLD_AUTOFORMAT_BUFFERS or {}) do
|
||||
vim.b[bufnr].autoformat_enabled = true
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
5
nvim/lua/plugins/extras/util/better-escape.lua
Normal file
5
nvim/lua/plugins/extras/util/better-escape.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"max397574/better-escape.nvim",
|
||||
opts = {},
|
||||
event = "InsertEnter",
|
||||
}
|
||||
10
nvim/lua/plugins/extras/util/cloak.lua
Normal file
10
nvim/lua/plugins/extras/util/cloak.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
"laytan/cloak.nvim",
|
||||
event = "BufRead .env*",
|
||||
cmd = { "CloakDisable", "CloakEnable", "CloakToggle" },
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>ck", function() require("cloak").toggle() end, desc = "Toggle Cloak" },
|
||||
},
|
||||
}
|
||||
26
nvim/lua/plugins/extras/util/discordrcp.lua
Normal file
26
nvim/lua/plugins/extras/util/discordrcp.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
return {
|
||||
"IogaMaster/neocord",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
logo = "auto", -- "auto" or url
|
||||
logo_tooltip = nil, -- nil or string
|
||||
main_image = "language", -- "language" or "logo"
|
||||
client_id = "1157438221865717891", -- Use your own Discord application client id (not recommended)
|
||||
log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
|
||||
debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
|
||||
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
|
||||
file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
|
||||
show_time = true, -- Show the timer
|
||||
global_timer = false, -- if set true, timer won't update when any event are triggered
|
||||
|
||||
-- Rich Presence text options
|
||||
editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
|
||||
file_explorer_text = "Browsing %s", -- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
|
||||
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
|
||||
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
|
||||
reading_text = "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
|
||||
workspace_text = "Working on %s", -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
|
||||
line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
|
||||
terminal_text = "Using Terminal", -- Format string rendered when in terminal mode.
|
||||
},
|
||||
}
|
||||
4
nvim/lua/plugins/extras/util/dotfyle.lua
Normal file
4
nvim/lua/plugins/extras/util/dotfyle.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"creativenull/dotfyle-metadata.nvim",
|
||||
cmd = { "DotfyleGenerate", "DotfyleOpen" },
|
||||
}
|
||||
21
nvim/lua/plugins/extras/util/esqueleto.lua
Normal file
21
nvim/lua/plugins/extras/util/esqueleto.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
return {
|
||||
"cvigilv/esqueleto.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
directories = {
|
||||
vim.fn.stdpath("config") .. "/templates",
|
||||
},
|
||||
patterns = {
|
||||
-- File
|
||||
"README",
|
||||
"LICENSE",
|
||||
-- Filetype
|
||||
"sh",
|
||||
"markdown",
|
||||
"python",
|
||||
"lua",
|
||||
"html",
|
||||
"vue",
|
||||
},
|
||||
},
|
||||
}
|
||||
40
nvim/lua/plugins/extras/util/hardtime.lua
Normal file
40
nvim/lua/plugins/extras/util/hardtime.lua
Normal file
@@ -0,0 +1,40 @@
|
||||
return {
|
||||
"m4xshen/hardtime.nvim",
|
||||
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
|
||||
event = "LazyFile",
|
||||
keys = {
|
||||
{ "<leader>uH", "<cmd>Hardtime toggle<CR>", desc = "Toggle Hardtime" },
|
||||
},
|
||||
opts = {
|
||||
disabled_filetypes = {
|
||||
"qf",
|
||||
"netrw",
|
||||
"NvimTree",
|
||||
"lazy",
|
||||
"mason",
|
||||
"oil",
|
||||
"neo-tree",
|
||||
"symbols-outline",
|
||||
"vim-be-good",
|
||||
"oil",
|
||||
"outline",
|
||||
},
|
||||
restriction_mode = "hint",
|
||||
restricted_keys = {
|
||||
["h"] = { "n", "x" },
|
||||
["l"] = { "n", "x" },
|
||||
["-"] = { "n", "x" },
|
||||
["+"] = { "n", "x" },
|
||||
["gj"] = { "n", "x" },
|
||||
["gk"] = { "n", "x" },
|
||||
["<C-N>"] = { "n", "x" },
|
||||
["<C-P>"] = { "n", "x" },
|
||||
},
|
||||
disabled_keys = {
|
||||
["<Up>"] = { "" },
|
||||
["<Down>"] = { "" },
|
||||
["<Left>"] = { "" },
|
||||
["<Right>"] = { "" },
|
||||
},
|
||||
},
|
||||
}
|
||||
5
nvim/lua/plugins/extras/util/hawtkeys.lua
Normal file
5
nvim/lua/plugins/extras/util/hawtkeys.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"tris203/hawtkeys.nvim",
|
||||
cmd = { "Hawtkeys", "HawtkeysDupes", "HawtkeysAll" },
|
||||
opts = {},
|
||||
}
|
||||
28
nvim/lua/plugins/extras/util/icon-picker.lua
Normal file
28
nvim/lua/plugins/extras/util/icon-picker.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
local prefix = "<leader>si"
|
||||
|
||||
return {
|
||||
{
|
||||
"ziontee113/icon-picker.nvim",
|
||||
dependencies = {
|
||||
"stevearc/dressing.nvim",
|
||||
},
|
||||
opts = {
|
||||
disable_legacy_commands = true,
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ prefix .. "a", "<cmd>IconPickerNormal<cr>", desc = "All" },
|
||||
{ prefix .. "s", "<cmd>IconPickerNormal symbols<cr>", desc = "Symbols" },
|
||||
{ prefix .. "e", "<cmd>IconPickerNormal emoji<cr>", desc = "Emoji" },
|
||||
{ prefix .. "n", "<cmd>IconPickerNormal nerd_font_v3<cr>", desc = "Nerd Fonts" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
opts = {
|
||||
spec = {
|
||||
{ prefix, group = "icons", icon = " " },
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
7
nvim/lua/plugins/extras/util/kitty-scrollback.lua
Normal file
7
nvim/lua/plugins/extras/util/kitty-scrollback.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"mikesmithgh/kitty-scrollback.nvim",
|
||||
lazy = true,
|
||||
cmd = { "KittyScrollbackGenerateKittens", "KittyScrollbackCheckHealth" },
|
||||
event = { "User KittyScrollbackLaunch" },
|
||||
opts = {},
|
||||
}
|
||||
14
nvim/lua/plugins/extras/util/leetcode.lua
Normal file
14
nvim/lua/plugins/extras/util/leetcode.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
return {
|
||||
"kawre/leetcode.nvim",
|
||||
build = ":TSUpdate html",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-lua/plenary.nvim", -- required by telescope
|
||||
"MunifTanjim/nui.nvim",
|
||||
|
||||
-- optional
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
opts = {},
|
||||
}
|
||||
5
nvim/lua/plugins/extras/util/live-command.lua
Normal file
5
nvim/lua/plugins/extras/util/live-command.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"smjonas/live-command.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
}
|
||||
8
nvim/lua/plugins/extras/util/live-share.lua
Normal file
8
nvim/lua/plugins/extras/util/live-share.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"azratul/live-share.nvim",
|
||||
cmd = { "LiveShareServer", "LiveShareJoin" },
|
||||
dependencies = {
|
||||
"jbyuki/instant.nvim",
|
||||
},
|
||||
opts = {},
|
||||
}
|
||||
8
nvim/lua/plugins/extras/util/mason-lock.lua
Normal file
8
nvim/lua/plugins/extras/util/mason-lock.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"williamboman/mason.nvim",
|
||||
dependencies = {
|
||||
"zapling/mason-lock.nvim",
|
||||
cmd = { "MasonLock", "MasonLockRestore" },
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
5
nvim/lua/plugins/extras/util/mise.lua
Normal file
5
nvim/lua/plugins/extras/util/mise.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"ejrichards/mise.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
}
|
||||
45
nvim/lua/plugins/extras/util/neovide.lua
Normal file
45
nvim/lua/plugins/extras/util/neovide.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
if not vim.g.neovide then
|
||||
return {}
|
||||
end
|
||||
|
||||
RefreshGuiFont = function()
|
||||
vim.opt.guifont = string.format("%s:h%s", vim.g.gui_font_face, vim.g.gui_font_size)
|
||||
end
|
||||
|
||||
ResizeGuiFont = function(delta)
|
||||
vim.g.gui_font_size = vim.g.gui_font_size + delta
|
||||
RefreshGuiFont()
|
||||
end
|
||||
|
||||
-- Keymaps
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
vim.keymap.set({ "n", "i" }, "<C-+>", function()
|
||||
ResizeGuiFont(1)
|
||||
end, opts)
|
||||
vim.keymap.set({ "n", "i" }, "<C-->", function()
|
||||
ResizeGuiFont(-1)
|
||||
end, opts)
|
||||
|
||||
-- Options
|
||||
vim.g.neovide_padding_top = 5
|
||||
vim.g.neovide_padding_right = 5
|
||||
vim.g.neovide_padding_left = 5
|
||||
|
||||
vim.g.neovide_window_blurred = true
|
||||
vim.g.neovide_floating_blur_amount_x = 5.0
|
||||
vim.g.neovide_floating_blur_amount_y = 5.0
|
||||
vim.g.neovide_floating_shadow = true
|
||||
vim.g.neovide_floating_z_height = 10
|
||||
|
||||
vim.g.neovide_cursor_antialiasing = false
|
||||
|
||||
vim.g.neovide_cursor_vfx_mode = "pixiedust"
|
||||
vim.g.neovide_hide_mouse_when_typing = true
|
||||
|
||||
vim.o.guifont = "JetBrainsMono Nerd Font:h10"
|
||||
|
||||
vim.opt.winblend = 20
|
||||
vim.g.neovide_refresh_rate = 75
|
||||
|
||||
return {}
|
||||
8
nvim/lua/plugins/extras/util/no-neck-pain.lua
Normal file
8
nvim/lua/plugins/extras/util/no-neck-pain.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"shortcuts/no-neck-pain.nvim",
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>uN", "<cmd>NoNeckPain<cr>", desc = "No Neck Pain" },
|
||||
},
|
||||
}
|
||||
119
nvim/lua/plugins/extras/util/persisted.lua
Normal file
119
nvim/lua/plugins/extras/util/persisted.lua
Normal file
@@ -0,0 +1,119 @@
|
||||
return {
|
||||
{
|
||||
"folke/persistence.nvim",
|
||||
enabled = false,
|
||||
},
|
||||
{
|
||||
"olimorris/persisted.nvim",
|
||||
init = function()
|
||||
vim.api.nvim_create_autocmd({ "User" }, {
|
||||
pattern = "PersistedTelescopeLoadPre",
|
||||
callback = function(session)
|
||||
-- Save the currently loaded session using a global variable
|
||||
require("persisted").save({ session = vim.g.persisted_loaded_session })
|
||||
|
||||
-- Delete all of the open buffers
|
||||
vim.api.nvim_input("<ESC>:%bd!<CR>")
|
||||
end,
|
||||
})
|
||||
end,
|
||||
lazy = false,
|
||||
config = function()
|
||||
LazyVim.on_load("telescope.nvim", function()
|
||||
require("telescope").setup({
|
||||
extensions = {
|
||||
persisted = {
|
||||
layout_config = {
|
||||
height = 0.6,
|
||||
width = 0.6,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
require("telescope").load_extension("persisted")
|
||||
end)
|
||||
require("persisted").setup({
|
||||
use_git_branch = true,
|
||||
should_save = function()
|
||||
if vim.bo.filetype == "dashboard" then
|
||||
return false
|
||||
end
|
||||
return true
|
||||
end,
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"<leader>ql",
|
||||
function()
|
||||
require("persisted").load()
|
||||
end,
|
||||
desc = "Load Session",
|
||||
},
|
||||
{
|
||||
"<leader>qL",
|
||||
function()
|
||||
require("persisted").load({ last = true })
|
||||
end,
|
||||
desc = "Load Last Session",
|
||||
},
|
||||
{
|
||||
"<leader>qt",
|
||||
function()
|
||||
require("persisted").stop()
|
||||
end,
|
||||
desc = "Stop Current Session",
|
||||
},
|
||||
{
|
||||
"<leader>qv",
|
||||
function()
|
||||
require("persisted").save()
|
||||
end,
|
||||
desc = "Save Current Session",
|
||||
},
|
||||
{
|
||||
"<leader>qr",
|
||||
function()
|
||||
require("persisted").start()
|
||||
end,
|
||||
desc = "Start Recording Current Session",
|
||||
},
|
||||
{
|
||||
"<leader>qs",
|
||||
function()
|
||||
require("persisted").select()
|
||||
end,
|
||||
desc = "Select Sessions",
|
||||
},
|
||||
{
|
||||
"<leader>qS",
|
||||
"<cmd>Telescope persisted<cr>",
|
||||
desc = "Select Session (Telescope)",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimdev/dashboard-nvim",
|
||||
opts = function(_, opts)
|
||||
-- Remove the older session plugin entry
|
||||
for i, section in ipairs(opts.config.center) do
|
||||
if section.key == "s" then
|
||||
table.remove(opts.config.center, i)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
local session = {
|
||||
action = 'lua require("persisted").load()',
|
||||
desc = " Restore Session",
|
||||
icon = " ",
|
||||
key = "s",
|
||||
}
|
||||
|
||||
session.desc = session.desc .. string.rep(" ", 43 - #session.desc)
|
||||
session.key_format = " %s"
|
||||
|
||||
table.insert(opts.config.center, 9, session)
|
||||
end,
|
||||
},
|
||||
}
|
||||
38
nvim/lua/plugins/extras/util/persistence-extended.lua
Normal file
38
nvim/lua/plugins/extras/util/persistence-extended.lua
Normal file
@@ -0,0 +1,38 @@
|
||||
return {
|
||||
"folke/persistence.nvim",
|
||||
optional = true,
|
||||
keys = {
|
||||
-- stylua: ignore start
|
||||
{ "<leader>ql", function() require("persistence").load() end, desc = "Load Session" },
|
||||
{ "<leader>qs", function() require("persistence").select() end,desc = "Select Session" },
|
||||
{ "<leader>qL", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" },
|
||||
{ "<leader>qd", function() require("persistence").stop() end, desc = "Don't Save Current Session" },
|
||||
{
|
||||
"<leader>qS",
|
||||
function()
|
||||
local p = require("persistence")
|
||||
p.save()
|
||||
LazyVim.notify("Session Saved", { title = "Persistence" })
|
||||
end,
|
||||
desc = "Save Session",
|
||||
},
|
||||
{
|
||||
"<leader>qt",
|
||||
function()
|
||||
local isActive = true
|
||||
local p = require("persistence")
|
||||
if isActive then
|
||||
p.stop()
|
||||
isActive = false
|
||||
vim.notify("Stopped Session Recording", vim.log.levels.INFO, { title = "Persistence" })
|
||||
else
|
||||
p.start()
|
||||
isActive = true
|
||||
vim.notify("Started Session Recording", vim.log.levels.INFO, { title = "Persistence" })
|
||||
end
|
||||
end,
|
||||
desc = "Toggle Recording"
|
||||
},
|
||||
-- stylua: ignore end
|
||||
},
|
||||
}
|
||||
36
nvim/lua/plugins/extras/util/pomo.lua
Normal file
36
nvim/lua/plugins/extras/util/pomo.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
return {
|
||||
{
|
||||
"epwalsh/pomo.nvim",
|
||||
cmd = { "TimerStart", "TimerStop", "TimerRepeat" },
|
||||
opts = {
|
||||
notifiers = {
|
||||
{
|
||||
name = "Default",
|
||||
opts = {
|
||||
sticky = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
optional = true,
|
||||
opts = function(_, opts)
|
||||
local function pomoTimer()
|
||||
local ok, pomo = pcall(require, "pomo")
|
||||
if not ok then
|
||||
return ""
|
||||
end
|
||||
|
||||
local timer = pomo.get_first_to_finish()
|
||||
if timer == nil then
|
||||
return ""
|
||||
end
|
||||
|
||||
return " " .. tostring(timer)
|
||||
end
|
||||
table.insert(opts.sections.lualine_x, { pomoTimer })
|
||||
end,
|
||||
},
|
||||
}
|
||||
32
nvim/lua/plugins/extras/util/rest-extended.lua
Normal file
32
nvim/lua/plugins/extras/util/rest-extended.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.util.rest" },
|
||||
{
|
||||
"mistweaverco/kulala.nvim",
|
||||
opts = {
|
||||
icons = {
|
||||
inlay = {
|
||||
loading = "",
|
||||
done = " ",
|
||||
error = " ",
|
||||
},
|
||||
lualine = " ",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
kulala_ls = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"stevearc/conform.nvim",
|
||||
opts = function(_, opts)
|
||||
opts.formatters_by_ft.http = opts.formatters_by_ft.http or {}
|
||||
table.insert(opts.formatters_by_ft.python, "kulala")
|
||||
return opts
|
||||
end,
|
||||
},
|
||||
}
|
||||
5
nvim/lua/plugins/extras/util/scrollEOF.lua
Normal file
5
nvim/lua/plugins/extras/util/scrollEOF.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"Aasim-A/scrollEOF.nvim",
|
||||
event = "CursorMoved",
|
||||
opts = {},
|
||||
}
|
||||
20
nvim/lua/plugins/extras/util/smart-splits.lua
Normal file
20
nvim/lua/plugins/extras/util/smart-splits.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
"mrjones2014/smart-splits.nvim",
|
||||
build = "./kitty/install-kittens.bash",
|
||||
event = "VeryLazy",
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<C-Left>", function() require("smart-splits").resize_left() end, desc = "Resize Left" },
|
||||
{ "<C-Down>", function() require("smart-splits").resize_down() end, desc = "Resize Down" },
|
||||
{ "<C-Up>", function() require("smart-splits").resize_up() end, desc = "Resize Up" },
|
||||
{ "<C-Right>", function() require("smart-splits").resize_right() end, desc = "Resize Right" },
|
||||
{ "<C-h>", function() require("smart-splits").move_cursor_left() end, desc = "Move Cursor Left" },
|
||||
{ "<C-j>", function() require("smart-splits").move_cursor_down() end, desc = "Move Cursor Down" },
|
||||
{ "<C-k>", function() require("smart-splits").move_cursor_up() end, desc = "Move Cursor Up" },
|
||||
{ "<C-l>", function() require("smart-splits").move_cursor_right() end, desc = "Move Cursor Right" },
|
||||
{ "<A-Left>", function() require("smart-splits").swap_buf_left() end, desc = "Swap Buffer Left" },
|
||||
{ "<A-Down>", function() require("smart-splits").swap_buf_down() end, desc = "Swap Buffer Down" },
|
||||
{ "<A-Up>", function() require("smart-splits").swap_buf_up() end, desc = "Swap Buffer Up" },
|
||||
{ "<A-Right>", function() require("smart-splits").swap_buf_right() end, desc = "Swap Buffer Right" },
|
||||
},
|
||||
}
|
||||
68
nvim/lua/plugins/extras/util/snacks-extended.lua
Normal file
68
nvim/lua/plugins/extras/util/snacks-extended.lua
Normal file
@@ -0,0 +1,68 @@
|
||||
return {
|
||||
"folke/snacks.nvim",
|
||||
opts = {
|
||||
dashboard = {
|
||||
preset = {
|
||||
header = [[
|
||||
|
||||
████ ██████ █████ ██
|
||||
███████████ █████
|
||||
█████████ ███████████████████ ███ ███████████
|
||||
█████████ ███ █████████████ █████ ██████████████
|
||||
█████████ ██████████ █████████ █████ █████ ████ █████
|
||||
███████████ ███ ███ █████████ █████ █████ ████ █████
|
||||
██████ █████████████████████ ████ █████ █████ ████ ██████
|
||||
]],
|
||||
},
|
||||
},
|
||||
lazygit = {
|
||||
configure = false,
|
||||
},
|
||||
notifier = {
|
||||
style = "fancy",
|
||||
},
|
||||
terminal = {
|
||||
win = {
|
||||
position = "float",
|
||||
},
|
||||
},
|
||||
picker = {
|
||||
previewers = {
|
||||
git = {
|
||||
builtin = false,
|
||||
},
|
||||
},
|
||||
matcher = {
|
||||
frecency = true,
|
||||
},
|
||||
win = {
|
||||
input = {
|
||||
keys = {
|
||||
["<c-u>"] = { "preview_scroll_up", mode = { "i", "n" } },
|
||||
["<a-j>"] = { "list_scroll_down", mode = { "i", "n" } },
|
||||
["<c-d>"] = { "preview_scroll_down", mode = { "i", "n" } },
|
||||
["<a-k>"] = { "list_scroll_up", mode = { "i", "n" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
image = {
|
||||
enabled = true,
|
||||
doc = {
|
||||
inline = false,
|
||||
},
|
||||
},
|
||||
scroll = {
|
||||
animate = {
|
||||
duration = { step = 10, total = 150 },
|
||||
},
|
||||
},
|
||||
},
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "<leader>fz", function() Snacks.picker.zoxide() end, desc = "Zoxide" },
|
||||
{ "<leader>S", function() Snacks.picker.spelling() end, desc = "Spelling" },
|
||||
{ "<leader>gB", function() Snacks.picker.git_branches() end, desc = "Git Branches" },
|
||||
{ "<leader>go", function() Snacks.gitbrowse() end, desc = "Git Open Line" },
|
||||
},
|
||||
}
|
||||
5
nvim/lua/plugins/extras/util/speedtyper.lua
Normal file
5
nvim/lua/plugins/extras/util/speedtyper.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"NStefan002/speedtyper.nvim",
|
||||
cmd = "Speedtyper",
|
||||
opts = {},
|
||||
}
|
||||
5
nvim/lua/plugins/extras/util/tmux.lua
Normal file
5
nvim/lua/plugins/extras/util/tmux.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
"aserowy/tmux.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
}
|
||||
4
nvim/lua/plugins/extras/util/vim-be-good.lua
Normal file
4
nvim/lua/plugins/extras/util/vim-be-good.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
"ThePrimeagen/vim-be-good",
|
||||
cmd = "VimBeGood",
|
||||
}
|
||||
144
nvim/lua/plugins/extras/util/vscode.lua
Normal file
144
nvim/lua/plugins/extras/util/vscode.lua
Normal file
@@ -0,0 +1,144 @@
|
||||
if not vim.g.vscode then
|
||||
return {}
|
||||
end
|
||||
|
||||
local vscode = require("vscode-neovim")
|
||||
local map = vim.keymap.set
|
||||
|
||||
-- Options
|
||||
vim.o.spell = false
|
||||
vim.opt.timeoutlen = 150 -- To show whichkey without delay
|
||||
vim.notify = vscode.notify
|
||||
vim.g.clipboard = vim.g.vscode_clipboard
|
||||
|
||||
local function vscode_action(cmd, opts)
|
||||
return function()
|
||||
vscode.action(cmd, opts)
|
||||
end
|
||||
end
|
||||
|
||||
-- Add some vscode specific keymaps
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "LazyVimKeymaps",
|
||||
callback = function()
|
||||
-- view problems
|
||||
map("n", "<leader>xx", vscode_action("workbench.actions.view.problems"))
|
||||
-- open file explorer
|
||||
map("n", "<leader>e", vscode_action("workbench.view.explorer"))
|
||||
-- terminal
|
||||
map("n", [[<c-\>]], vscode_action("workbench.action.terminal.toggleTerminal"))
|
||||
map("n", "<leader>fts", vscode_action("workbench.action.terminal.newWithCwd"))
|
||||
-- working with editors (buffers)
|
||||
map("n", "<leader>bo", vscode_action("workbench.action.closeOtherEditors"))
|
||||
map("n", "<leader>bb", function()
|
||||
vscode_action("workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup")
|
||||
vscode_action("list.select")
|
||||
end)
|
||||
map("n", "<leader>bn", vscode_action("workbench.action.nextEditor"))
|
||||
map("n", "<leader>bu", vscode_action("workbench.action.reopenClosedEditor"))
|
||||
map("n", "<leader>bh", vscode_action("workbench.action.moveEditorToLeftGroup"))
|
||||
map("n", "<leader>bj", vscode_action("workbench.action.moveEditorToBelowGroup"))
|
||||
map("n", "<leader>bk", vscode_action("workbench.action.moveEditorToAboveGroup"))
|
||||
map("n", "<leader>bl", vscode_action("workbench.action.moveEditorToRightGroup"))
|
||||
map("n", "<leader>,", vscode_action("workbench.action.showAllEditors"))
|
||||
map("n", "<leader>bA", vscode_action("workbench.action.closeAllEditors"))
|
||||
map("n", "<leader>ba", vscode_action("workbench.action.lastEditorInGroup"))
|
||||
map("n", "<leader>bf", vscode_action("workbench.action.firstEditorInGroup"))
|
||||
map("n", "<Leader>bL", vscode_action("workbench.action.closeEditorsToTheLeft"))
|
||||
map("n", "<Leader>bR", vscode_action("workbench.action.closeEditorsToTheRight"))
|
||||
map("n", "H", vscode_action("workbench.action.previousEditorInGroup"))
|
||||
map("n", "L", vscode_action("workbench.action.nextEditorInGroup"))
|
||||
map("n", "<leader>bd", vscode_action("workbench.action.closeActiveEditor"))
|
||||
map("n", "<leader><tab>", vscode_action("workbench.action.showMultipleEditorTabs"))
|
||||
map("n", "<leader><s-tab>", vscode_action("workbench.action.showEditorTab"))
|
||||
-- breakpoints
|
||||
map("n", "<F2>", vscode_action("editor.debug.action.toggleBreakpoint"))
|
||||
-- windows
|
||||
map("n", "<leader>|", vscode_action("workbench.action.splitEditorRight"))
|
||||
map("n", "<leader>-", vscode_action("workbench.action.splitEditorDown"))
|
||||
-- LSP actions
|
||||
map("n", "<leader>ca", vscode_action("editor.action.codeAction"))
|
||||
map("n", "gy", vscode_action("editor.action.goToTypeDefinition"))
|
||||
map("n", "gr", vscode_action("editor.action.goToReferences"))
|
||||
map("n", "gi", vscode_action("editor.action.goToImplementation"))
|
||||
map("n", "K", vscode_action("editor.action.showHover"))
|
||||
map("n", "<leader>cr", vscode_action("editor.action.rename"))
|
||||
map("n", "<leader>co", vscode_action("editor.action.organizeImports"))
|
||||
map("n", "<leader>cf", vscode_action("editor.action.formatDocument"))
|
||||
map("n", "<leader>ss", vscode_action("workbench.action.gotoSymbol"))
|
||||
map("n", "<leader>sS", vscode_action("workbench.action.showAllSymbols"))
|
||||
-- refactor
|
||||
map("n", "<leader>cR", vscode_action("editor.action.refactor"))
|
||||
-- markdown preview
|
||||
map("n", "<leader>cp", vscode_action("markdown.showPreviewToSide"))
|
||||
-- project manager
|
||||
map("n", "<leader>fp", vscode_action("projectManager.listProjects"))
|
||||
-- zen mode
|
||||
map("n", "<leader>z", vscode_action("workbench.action.toggleZenMode"))
|
||||
-- cspell
|
||||
map("n", "<leader>!", vscode_action("cSpell.addWordToDictionary"))
|
||||
map("n", "<leader>us", vscode_action("cSpell.toggleEnableSpellChecker"))
|
||||
-- comments
|
||||
map("n", "<leader>xt", vscode_action("workspaceAnchors.focus"))
|
||||
-- git
|
||||
map("n", "<leader>gg", vscode_action("gitlens.views.home.focus"))
|
||||
map("n", "<leader>ub", vscode_action("gitlens.toggleFileBlame"))
|
||||
map("n", "]h", function()
|
||||
vscode_action("workbench.action.editor.nextChange")
|
||||
vscode_action("workbench.action.compareEditor.nextChange")
|
||||
end)
|
||||
map("n", "[h", function()
|
||||
vscode_action("workbench.action.editor.previousChange")
|
||||
vscode_action("workbench.action.compareEditor.previousChange")
|
||||
end)
|
||||
-- statusline
|
||||
map("n", "<leader>uS", vscode_action("workbench.action.toggleStatusbarVisibility"))
|
||||
-- codeium
|
||||
map("n", "<leader>cI", vscode_action("codeium.toggleEnable"))
|
||||
map({ "n", "v" }, "<leader>id", vscode_action("codeium.generateFunctionDocstring"))
|
||||
map("n", "<leader>ic", vscode_action("codeium.openChatView"))
|
||||
map("n", "<leader>is", vscode_action("codeium.openSearchView"))
|
||||
map({ "n", "v" }, "<leader>ie", vscode_action("codeium.explainCodeBlock"))
|
||||
map({ "n", "v" }, "<leader>iE", vscode_action("codeium.explainProblem"))
|
||||
map({ "n", "v" }, "<leader>ii", vscode_action("codeium.openCodeiumCommand"))
|
||||
-- diagnostics
|
||||
map("n", "]d", vscode_action("editor.action.marker.next"))
|
||||
map("n", "[d", vscode_action("editor.action.marker.prev"))
|
||||
-- zoxide
|
||||
map("n", "<leader>fz", vscode_action("autojump.openFolder"))
|
||||
-- whichkey
|
||||
map("n", "<leader>", vscode_action("whichkey.show"))
|
||||
-- search
|
||||
map("n", "<leader><space>", "<cmd>Find<cr>")
|
||||
map("n", "<leader>ff", "<cmd>Find<cr>")
|
||||
map("n", "<leader>/", vscode_action("workbench.action.findInFiles"))
|
||||
map("n", "<leader>sg", vscode_action("workbench.action.findInFiles"))
|
||||
map("n", "<leader>sc", vscode_action("workbench.action.showCommands"))
|
||||
-- ui
|
||||
map("n", "<leader>uC", vscode_action("workbench.action.selectTheme"))
|
||||
end,
|
||||
})
|
||||
|
||||
return {
|
||||
{ import = "lazyvim.plugins.extras.vscode" },
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
config = function(_, opts)
|
||||
opts = opts or {}
|
||||
-- disable the colorscheme
|
||||
opts.colorscheme = function() end
|
||||
require("lazyvim").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
init = function()
|
||||
local palette = require("catppuccin.palettes").get_palette("macchiato")
|
||||
local bg = palette.none
|
||||
vim.api.nvim_set_hl(0, "FlashBackdrop", { fg = bg })
|
||||
vim.api.nvim_set_hl(0, "FlashLabel", { fg = palette.green, bg = bg, bold = true })
|
||||
vim.api.nvim_set_hl(0, "FlashMatch", { fg = palette.lavender, bg = bg })
|
||||
vim.api.nvim_set_hl(0, "FlashCurrent", { fg = palette.peach, bg = bg })
|
||||
end,
|
||||
},
|
||||
}
|
||||
7
nvim/lua/plugins/extras/util/wakatime.lua
Normal file
7
nvim/lua/plugins/extras/util/wakatime.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"wakatime/vim-wakatime",
|
||||
event = "VeryLazy",
|
||||
setup = function()
|
||||
vim.cmd([[packadd wakatime/vim-wakatime]])
|
||||
end,
|
||||
}
|
||||
19
nvim/lua/plugins/extras/util/yadm.lua
Normal file
19
nvim/lua/plugins/extras/util/yadm.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
dependencies = {
|
||||
"purarue/gitsigns-yadm.nvim",
|
||||
},
|
||||
opts = {
|
||||
_on_attach_pre = function(bufnr, callback)
|
||||
if vim.fn.executable("yadm") == 1 then
|
||||
require("gitsigns-yadm").yadm_signs(callback, { bufnr = bufnr })
|
||||
else
|
||||
-- if optionally disabling the plugin, make sure to call
|
||||
-- 'callback' with no arguments
|
||||
callback()
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
19
nvim/lua/plugins/extras/util/yazi.lua
Normal file
19
nvim/lua/plugins/extras/util/yazi.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
{
|
||||
"mikavilpas/yazi.nvim",
|
||||
keys = {
|
||||
{ "<leader>e", "<cmd>Yazi<cr>", desc = "Yazi (Current File)" },
|
||||
{ "<leader>E", "<cmd>Yazi cwd<cr>", desc = "Yazi (cwd)" },
|
||||
{ "<a-e>", "<cmd>Yazi toggle<cr>", desc = "Resume Last Yazi Session" },
|
||||
},
|
||||
opts = {
|
||||
open_for_directories = true,
|
||||
floating_window_scaling_factor = 0.8,
|
||||
yazi_floating_window_border = "none",
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
enabled = false,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user