diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/bigfile.lua b/users/price/dots/.config/nvim/lua/plugins/configs/bigfile.lua deleted file mode 100644 index de88b4eb..00000000 --- a/users/price/dots/.config/nvim/lua/plugins/configs/bigfile.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - { - "LunarVim/bigfile.nvim", - opts = { - filesize = 100, - }, - }, -} diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/neo-tree.lua b/users/price/dots/.config/nvim/lua/plugins/configs/neo-tree.lua index 86580e00..75386cbd 100644 --- a/users/price/dots/.config/nvim/lua/plugins/configs/neo-tree.lua +++ b/users/price/dots/.config/nvim/lua/plugins/configs/neo-tree.lua @@ -8,6 +8,7 @@ return { "nvim-lua/plenary.nvim", "MunifTanjim/nui.nvim", "miversen33/netman.nvim", + "folke/snacks.nvim", }, cmd = "Neotree", keys = { @@ -27,8 +28,8 @@ return { end, }) end, - opts = function() - return { + config = function() + require("neo-tree").setup({ sources = { "filesystem", "git_status", @@ -71,7 +72,19 @@ return { ["F"] = "fuzzy_finder", }, }, - } + }) + end, + opts = function(_, opts) + local snacks = require("snacks") + local function on_move(data) + snacks.rename.on_rename_file(data.source, data.destination) + end + local events = require("neo-tree.events") + opts.event_handlers = opts.event_handlers or {} + vim.list_extend(opts.event_handlers, { + { event = events.FILE_MOVED, handler = on_move }, + { event = events.FILE_RENAMED, handler = on_move }, + }) end, }, } diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/noice.lua b/users/price/dots/.config/nvim/lua/plugins/configs/noice.lua index 1c8a4bc7..eff330b3 100644 --- a/users/price/dots/.config/nvim/lua/plugins/configs/noice.lua +++ b/users/price/dots/.config/nvim/lua/plugins/configs/noice.lua @@ -63,96 +63,5 @@ return { vim.opt.cmdheight = 0 end, - dependencies = { - "MunifTanjim/nui.nvim", - { - "rcarriga/nvim-notify", - keys = { - { - "nd", - function() - vim.cmd.noh() - require("notify").dismiss({ - pending = true, - silent = true, - }) - end, - desc = "Notifications: Dismiss", - }, - { - "nv", - function() - if not vim.g.nvim_notify_telescope_loaded then - require("telescope").load_extension("notify") - vim.g.nvim_notify_telescope_loaded = true - end - require("telescope").extensions.notify.notify() - end, - desc = "Notifications: Search", - }, - }, - config = function() - local base = require("notify.render.base") - - local opts = { - stages = "slide", - fps = 60, - render = function(bufnr, notif, highlights, _) - local left_icon = notif.icon .. " " - local max_message_width = math.max(math.max(unpack(vim.tbl_map(function(line) - return vim.fn.strchars(line) - end, notif.message)))) - local right_title = notif.title[2] - local left_title = notif.title[1] - local title_accum = vim.str_utfindex(left_icon) - + vim.str_utfindex(right_title) - + vim.str_utfindex(left_title) - - local left_buffer = string.rep(" ", math.max(0, max_message_width - title_accum)) - - local namespace = base.namespace() - vim.api.nvim_buf_set_lines(bufnr, 0, 1, false, { "", "" }) - vim.api.nvim_buf_set_extmark(bufnr, namespace, 0, 0, { - virt_text = { - { left_icon, highlights.icon }, - { left_title .. left_buffer, highlights.title }, - }, - virt_text_win_col = 0, - priority = 10, - }) - vim.api.nvim_buf_set_extmark(bufnr, namespace, 0, 0, { - virt_text = { { right_title, highlights.title } }, - virt_text_pos = "right_align", - priority = 10, - }) - vim.api.nvim_buf_set_lines(bufnr, 1, -1, false, notif.message) - - vim.api.nvim_buf_set_extmark(bufnr, namespace, 1, 0, { - hl_group = highlights.body, - end_line = #notif.message, - end_col = #notif.message[#notif.message], - priority = 50, -- Allow treesitter to override - }) - end, - - timeout = 5000, - -- For stages that change opacity this is treated as the highlight behind the window - -- Set this to either a highlight group, an RGB hex value e.g. "#000000" or a function returning an RGB code for dynamic values - background_colour = "#000000", - -- Minimum width for notification windows - minimum_width = 50, - -- Icons for the different levels - icons = { - ERROR = "", - WARN = "", - INFO = "", - DEBUG = "", - TRACE = "✎", - }, - } - require("notify").setup(opts) - end, - }, - }, }, } diff --git a/users/price/dots/.config/nvim/lua/plugins/configs/snacks.lua b/users/price/dots/.config/nvim/lua/plugins/configs/snacks.lua new file mode 100644 index 00000000..e0cbe61e --- /dev/null +++ b/users/price/dots/.config/nvim/lua/plugins/configs/snacks.lua @@ -0,0 +1,40 @@ +return { + { + "folke/snacks.nvim", + priority = 1000, + lazy = false, + keys = { + { + "nd", + function() + require("snacks").notifier.hide() + end, + desc = "Notifications: Dismiss", + }, + { + "nv", + function() + require("snacks").notifier.show_history() + end, + desc = "Notifications: Search", + }, + }, + config = function() + local snacks = require("snacks") + snacks.setup({ + bigfile = { enabled = true }, + debug = { enabled = true }, + notifier = { + enabled = true, + style = "compact", + margin = { top = 1 }, + }, + words = { enabled = true }, + statuscolumn = { enabled = false } + }) + _G.bt = snacks.debug.backtrace + _G.dd = snacks.debug.inspect + vim.print = snacks.debug.inspect + end, + }, +}