config/.config/nvim/lua/lazy/plugins/utility.lua

275 lines
9.1 KiB
Lua

return {
{
"nvim-lua/plenary.nvim",
},
{
"nvim-lua/popup.nvim",
},
{
"folke/neodev.nvim",
},
{
"rcarriga/nvim-notify",
config = function()
local icons = require "user.icons"
require"notify".setup {
-- Animation style (see below for details)
stages = "fade_in_slide_out",
-- Function called when a new window is opened, use for changing win settings/config
on_open = nil,
-- Function called when a window is closed
on_close = nil,
-- Render function for notifications. See notify-render()
render = "default",
-- Default timeout for notifications
timeout = 2000,
-- For stages that change opacity this is treated as the highlight behind the window
-- Set this to either a highlight group or an RGB hex value e.g. "#000000"
background_colour = "Normal",
-- Minimum width for notification windows
minimum_width = 10,
-- Icons for the different levels
icons = {
ERROR = icons.diagnostics.Error,
WARN = icons.diagnostics.Warning,
INFO = icons.diagnostics.Information,
DEBUG = icons.ui.Bug,
TRACE = icons.ui.Pencil,
},
}
end,
},
{
"moll/vim-bbye",
},
{
"lewis6991/impatient.nvim",
config = function()
require"impatient".enable_profile()
end,
},
{
"ghillb/cybu.nvim",
config = function()
require"cybu".setup({
position = {
relative_to = "win", -- win, editor, cursor
anchor = "topright", -- topleft, topcenter, topright,
-- centerleft, center, centerright,
-- bottomleft, bottomcenter, bottomright
-- vertical_offset = 10, -- vertical offset from anchor in lines
-- horizontal_offset = 0, -- vertical offset from anchor in columns
-- max_win_height = 5, -- height of cybu window in lines
-- max_win_width = 0.5, -- integer for absolute in columns
-- float for relative to win/editor width
},
display_time = 1750, -- time the cybu window is displayed
style = {
separator = " ", -- string used as separator
prefix = "", -- string used as prefix for truncated paths
padding = 1, -- left & right padding in number of spaces
hide_buffer_id = true,
devicons = {
enabled = true, -- enable or disable web dev icons
colored = true, -- enable color for web dev icons
},
},
})
end,
},
{
"mbbill/undotree",
},
{
"MunifTanjim/nui.nvim",
},
{
"kyazdani42/nvim-web-devicons"
},
{
"lukas-reineke/indent-blankline.nvim",
config = function()
vim.g.indent_blankline_buftype_exclude = { "terminal", "nofile" }
vim.g.indent_blankline_filetype_exclude = {
"help",
"startify",
"dashboard",
"packer",
"neogitstatus",
"NvimTree",
"Trouble",
"text"
}
vim.g.indentLine_enabled = 1
vim.g.indent_blankline_char = ""
vim.g.indent_blankline_show_trailing_blankline_indent = false
vim.g.indent_blankline_show_first_indent_level = true
vim.g.indent_blankline_use_treesitter = false
vim.g.indent_blankline_show_current_context = true
require"indent_blankline".setup({
show_current_context = true,
})
end,
},
{
"windwp/nvim-autopairs",
config = function()
require"nvim-autopairs".setup({
disable_filetype = { "TelescopePrompt", "spectre_panel" },
ignore_next_char = "[%w%.*]", -- don't place pair when cursor sits in front of any char
})
end,
},
{
"preservim/vim-markdown",
},
{
"nacro90/numb.nvim",
config = function()
require"numb".setup({
show_numbers = true, -- enable 'number' for the window while peeking
show_cursorline = true, -- enable 'cursorline' for window wdile peeking
})
end,
},
{
"andymass/vim-matchup",
},
{
"junegunn/vim-slash",
},
{
"folke/zen-mode.nvim",
config = function()
require"zen-mode".setup({
window = {
backdrop = 1,
height = 0.9,
width = 80,
options = {
signcolumn = "no",
number = false,
relativenumber = false,
cursorline = true,
cursorcolumn = false, -- disable cursor column
},
},
plugins = {
gitsigns = { enabled = false },
tmux = { enabled = false },
twilight = { enabled = false },
},
on_open = function()
vim.g.cmp_active = false
vim.cmd [[LspStop]]
local status_ok, _ = pcall(vim.api.nvim_set_option_value, "winbar", nil, { scope = "local" })
if not status_ok then
return
end
if vim.fn.exists("#" .. "_winbar") == 1 then
vim.cmd("au! " .. "_winbar")
end
end,
on_close = function()
vim.g.cmp_active = true
vim.cmd [[LspStart]]
require("user.winbar").create_winbar()
end,
})
end,
},
{
"tpope/vim-surround",
},
{
"danymat/neogen",
config = function()
require"neogen".setup({
enabled = true,
input_after_comment = true,
})
end,
},
{
"monaqa/dial.nvim",
config = function()
local dial_config = require"dial.config"
local y = "2024/05/29"
local augend = require "dial.augend"
dial_config.augends:register_group {
default = {
augend.integer.alias.decimal,
augend.integer.alias.hex,
augend.date.alias["%Y/%m/%d"],
},
typescript = {
augend.integer.alias.decimal,
augend.integer.alias.hex,
augend.constant.new { elements = { "let", "const" } },
},
visual = {
augend.integer.alias.decimal,
augend.integer.alias.hex,
augend.date.alias["%Y/%m/%d"],
augend.constant.alias.alpha,
augend.constant.alias.Alpha,
},
mygroup = {
augend.constant.new {
elements = { "and", "or" },
word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc.
cyclic = true, -- "or" is incremented into "and".
},
augend.constant.new {
elements = { "True", "False" },
word = true,
cyclic = true,
},
augend.constant.new {
elements = { "public", "private" },
word = true,
cyclic = true,
},
augend.constant.new {
elements = { "&&", "||" },
word = false,
cyclic = true,
},
augend.date.alias["%d/%m/%Y"], -- date (02/19/2022, etc.)
augend.constant.alias.bool, -- boolean value (true <-> false)
augend.integer.alias.decimal,
augend.integer.alias.hex,
augend.semver.alias.semver
},
}
local map = require "dial.map"
-- change augends in VISUAL mode
vim.api.nvim_set_keymap("n", "<C-a>", map.inc_normal "mygroup", { noremap = true })
vim.api.nvim_set_keymap("n", "<C-x>", map.dec_normal "mygroup", { noremap = true })
vim.api.nvim_set_keymap("v", "<C-a>", map.inc_normal "visual", { noremap = true })
vim.api.nvim_set_keymap("v", "<C-x>", map.dec_normal "visual", { noremap = true })
vim.cmd [[
" enable only for specific FileType
autocmd FileType typescript,javascript lua vim.api.nvim_buf_set_keymap(0, "n", "<C-a>", require("dial.map").inc_normal("typescript"), {noremap = true})
]]
end,
},
{
"ThePrimeagen/harpoon",
},
}