mirror of
https://github.com/Cian-H/dotfiles.git
synced 2025-12-22 19:31:57 +00:00
Changed . token to _dot
This change allows the dotfiles to work with chezmoi (e.g: on windows) and improves grepability with neovim/telescope
This commit is contained in:
108
dot_config/nvim/lua/plugins/mini.lua
Normal file
108
dot_config/nvim/lua/plugins/mini.lua
Normal file
@@ -0,0 +1,108 @@
|
||||
return { -- Mini is so varied it's hard to categorise. So i dumped my mini installs here
|
||||
{ -- Collection of various small independent plugins/modules
|
||||
"echasnovski/mini.nvim",
|
||||
config = function()
|
||||
-- Better Around/Inside textobjects
|
||||
--
|
||||
-- Examples:
|
||||
-- - va) - [V]isually select [A]round [)]paren
|
||||
-- - yinq - [Y]ank [I]nside [N]ext [']quote
|
||||
-- - ci' - [C]hange [I]nside [']quote
|
||||
require("mini.ai").setup({ n_lines = 500 })
|
||||
|
||||
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
||||
--
|
||||
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||
-- - sd' - [S]urround [D]elete [']quotes
|
||||
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||
require("mini.surround").setup()
|
||||
|
||||
-- Simple and easy statusline.
|
||||
-- You could remove this setup call if you don't like it,
|
||||
-- and try some other statusline plugin
|
||||
-- local statusline = require("mini.statusline")
|
||||
-- set use_icons to true if you have a Nerd Font
|
||||
-- statusline.setup({ use_icons = vim.g.have_nerd_font })
|
||||
|
||||
-- You can configure sections in the statusline by overriding their
|
||||
-- default behavior. For example, here we set the section for
|
||||
-- cursor location to LINE:COLUMN
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
-- statusline.section_location = function()
|
||||
-- return "%2l:%-2v"
|
||||
-- end
|
||||
|
||||
-- Setup of mini.notify
|
||||
-- local notify = require("mini.notify")
|
||||
-- notify.setup()
|
||||
-- vim.notify = notify.make_notify({
|
||||
-- ERROR = { duration = 5000 },
|
||||
-- WARN = { duration = 4000 },
|
||||
-- INFO = { duration = 3000 },
|
||||
-- })
|
||||
|
||||
-- Some other mini.nvim plugins that look useful to me
|
||||
require("mini.clue").setup()
|
||||
require("mini.visits").setup()
|
||||
require("mini.sessions").setup()
|
||||
require("mini.pairs").setup({ mappings = { ["`"] = false } })
|
||||
require("mini.comment").setup()
|
||||
require("mini.splitjoin").setup()
|
||||
require("mini.trailspace").setup()
|
||||
|
||||
-- My custom mini.starter config
|
||||
|
||||
-- This function runs a vim command then exits the buffer that called it
|
||||
function _Launch_Vim_Cmd(cmd)
|
||||
local startbuf = vim.api.nvim_get_current_buf()
|
||||
vim.cmd(cmd)
|
||||
vim.api.nvim_buf_delete(startbuf, {})
|
||||
end
|
||||
|
||||
local custom_items = {
|
||||
{
|
||||
name = "Status",
|
||||
action = "Git status",
|
||||
section = "Git",
|
||||
},
|
||||
{
|
||||
name = "Log",
|
||||
action = [[lua _Launch_Vim_Cmd("Git log --graph --pretty=oneline --abbrev-commit")]],
|
||||
section = "Git",
|
||||
},
|
||||
{
|
||||
name = "Lazygit",
|
||||
action = "LazyGit",
|
||||
section = "Git",
|
||||
},
|
||||
{
|
||||
name = "Harpoon Quickmenu",
|
||||
action = [[lua require("harpoon").ui:toggle_quick_menu(require("harpoon"):list())]],
|
||||
section = "Misc",
|
||||
},
|
||||
}
|
||||
require("mini.starter").setup({
|
||||
header = "⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\
|
||||
⠀⠀⠀⠀⠀⠀⢀⣴⣾⣿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\
|
||||
⠀⠀⠀⠀⢀⣴⠿⢟⣛⣩⣤⣶⣶⣶⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\
|
||||
⠀⠀⢀⣴⣿⠿⠸⣿⣿⣿⣿⣿⣿⡿⢿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀\
|
||||
⠀⢠⠞⠉⠀⠀⠀⣿⠋⠻⣿⣿⣿⠀⣦⣿⠏⠀⠀⠀⢀⣀⣀⣀⣀⣀⠀⠀\
|
||||
⢠⠏⠀⠀⠀⠀⠀⠻⣤⣷⣿⣿⣿⣶⢟⣁⣒⣒⡋⠉⠉⠁⠀⠀⠀⠈⠉⡧\
|
||||
⢻⡀⠀⠀⠀⠀⠀⣀⡤⠌⢙⣛⣛⣵⣿⣿⡛⠛⠿⠃⠀⠀⠀⠀⠀⢀⡜⠁\
|
||||
⠀⠉⠙⠒⠒⠛⠉⠁⠀⠸⠛⠉⠉⣿⣿⣿⣿⣦⣄⠀⠀⠀⢀⣠⠞⠁⠀⠀\
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⡿⣿⣿⣷⡄⠞⠋⠀⠀⠀⠀⠀\
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣷⡻⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀\
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢨⣑⡙⠻⠿⠿⠈⠙⣿⣧⠀⠀⠀⠀⠀⠀\
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⣿⣷⡀⠀⠀⠀⠀⢹⣿⣆⠀⠀⠀⠀⠀\
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⡇⠀⠀⠀⠀⠸⣿⣿⡄⠀⠀⠀⠀\
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠁⠀⠀⠀⠀⠀⡿⣿⣿⠀⠀⠀⠀\
|
||||
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠀⠀⠀⠀⠀",
|
||||
items = {
|
||||
require("mini.starter").sections.telescope(),
|
||||
custom_items,
|
||||
},
|
||||
footer = "",
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user