From 411bc325c5445c16b93ff79fa740749db71a5478 Mon Sep 17 00:00:00 2001 From: Quinn Date: Sun, 23 Nov 2025 01:30:17 +0100 Subject: [PATCH] replace snacks with some mini functions --- .config/nvim/lua/plugin/mini.lua | 6 +-- .config/nvim/lua/plugin/snacks.lua | 83 ------------------------------ 2 files changed, 3 insertions(+), 86 deletions(-) delete mode 100644 .config/nvim/lua/plugin/snacks.lua diff --git a/.config/nvim/lua/plugin/mini.lua b/.config/nvim/lua/plugin/mini.lua index 7185cf5..dd4ce7b 100644 --- a/.config/nvim/lua/plugin/mini.lua +++ b/.config/nvim/lua/plugin/mini.lua @@ -24,8 +24,8 @@ require('mini.diff').setup({ -- shows git diffs in the file style = 'sign', } }) -require('mini.jump').setup() -- extends f,F,t,T to work across multiple lines - +require('mini.jump').setup() -- extends f,F,t,T to work across multiple lines +require('mini.cursorword').setup() -- highlight words beneath the cursor require('mini.indentscope').setup({ draw = { delay = 50, -- delay in MS before writing the indicator @@ -35,7 +35,7 @@ require('mini.indentscope').setup({ MiniDeps.later(function() vim.api.nvim_set_hl(0, 'MiniIndentscopeSymbol', { link = 'Whitespace' }) end) - +require('mini.notify').setup() -- has more noticeable / utilitarian / aesthetically pleasing notifications require('mini.statusline').setup({ content = { active = function() diff --git a/.config/nvim/lua/plugin/snacks.lua b/.config/nvim/lua/plugin/snacks.lua deleted file mode 100644 index 5a35c14..0000000 --- a/.config/nvim/lua/plugin/snacks.lua +++ /dev/null @@ -1,83 +0,0 @@ ----@module 'snacks' ----@module 'lazy' ----@type LazySpec -return { { -- provides quality of life features for neovim - 'folke/snacks.nvim', - priority = 1000, - lazy = false, - ---@type snacks.Config - opts = { - animate = { enabled = false }, -- efficient animations including over 45 easing functions (library) - bigfile = { enabled = false }, -- deal with big files - bufdelete = { enabled = false }, -- delete buffers without disrupting window layout - dashboard = { enabled = false }, -- beautiful declarative dashboards - debug = { enabled = false }, -- pretty inspect & backtraces for debugging - dim = { enabled = false }, -- focus on the active scope by dimming the rest - explorer = { enabled = false }, -- a file explorer (picker in disguise) - git = { enabled = false }, -- git utilities - gitbrowse = { enabled = false }, -- open the current file, branch, commit, or repo in a browser (e.g. github, gitlab, etc.) - image = { enabled = true }, -- image viewer using kitty graphics protocol - indent = { enabled = false }, -- indent guides and scopes - input = { enabled = false }, -- better vim.ui.input - layout = { enabled = false }, -- window layouts - lazygit = { enabled = false }, -- open lazygit in a float, auto-configure colour scheme and integration with neovim - notifier = { enabled = true }, -- pretty vim.notify - notify = { enabled = true }, -- utility functions to work with neovim's vim.notify - picker = { enabled = false }, -- picker for selecting items - profiler = { enabled = false }, -- neovim lua profiler - quickfile = { enabled = true }, -- when doing nvim somefile.txt, it will render the file as quickly as possible, before loading your plugins. - rename = { enabled = true }, -- LSP-integrated file renaming with support for plugins like and. - scope = { enabled = false }, -- scope detection, text objects and jumping based on treesitter or indent - scratch = { enabled = false }, -- scratch buffers with a persistent file - scroll = { enabled = false }, -- smooth scrolling - statuscolumn = { enabled = false }, -- pretty status column - terminal = { enabled = false }, -- create and toggle floating/split terminals - toggle = { enabled = false }, -- toggle keymaps integrated with which-key icons / colours - util = { enabled = false }, -- utility functions for Snacks (library) - win = { enabled = false }, -- create and manage floating windows or splits - words = { enabled = true }, -- auto-show LSP references and quickly navigate between them - zen = { enabled = false }, -- zen mode; distraction-free coding - }, - keys = { - { '*', function() Snacks.words.jump(-vim.v.count1) end, desc = 'next reference', nowait = true }, - { '#', function() Snacks.words.jump(vim.v.count1) end, desc = 'prev reference', nowait = true }, - { '', function() Snacks.bufdelete() end, desc = 'delete buffer', nowait = true }, - { 'N', function() Snacks.notifier.show_history() end, desc = 'show notification history' }, - { 'U', function() Snacks.picker.undo() end, desc = 'undo tree' }, - { 'gB', function() Snacks.git.blame_line() end, desc = 'git blame line' }, - { 'gb', function() Snacks.picker.git_branches() end, desc = 'git branches' }, - { '@', function() Snacks.picker.lsp_symbols() end, desc = 'workspace symbols' }, - { 'ld', function() Snacks.picker.lsp_definitions() end, desc = 'definition' }, - { 'lr', function() Snacks.picker.lsp_references() end, desc = 'references' }, - { 'li', function() Snacks.picker.lsp_implementations() end, desc = 'implementation' }, - { 'lt', function() Snacks.picker.lsp_type_definitions() end, desc = 'type definition' }, - { '?', function() Snacks.picker.keymaps() end, desc = 'keymaps' }, - { 'gd', function() Snacks.picker.lsp_definitions() end, desc = 'definition' }, - { 'gr', function() Snacks.picker.lsp_references() end, desc = 'references' }, - }, - init = function() - Autocmd("User", { - pattern = 'VeryLazy', - callback = function() - local virt_lines = false; - Snacks.toggle.new({ - id = "virtual_lines", - name = "diagnostics virtual lines", - get = function() return virt_lines end, - set = function(v) - virt_lines = v - vim.diagnostic.config({ virtual_lines = v }) - end, - }):map('tl') - - Snacks.toggle.option('wrap', { name = 'word wrap' }):map('tw') - Snacks.toggle.option('spell', { name = 'spelling' }):map('ts') - Snacks.toggle.inlay_hints():map('th') - end, - }) - end, - ---@param opts snacks.Config - config = function(_, opts) - require('snacks').setup(opts) - end -} }