From 6a5b341e23c2fea40ddbc47564d5f5687de378f4 Mon Sep 17 00:00:00 2001 From: Christophe Robillard Date: Sat, 3 May 2025 17:45:40 +0200 Subject: [PATCH] [nvim] add mini plugin --- dotfiles/nvim/lazy-lock.json | 1 + dotfiles/nvim/lua/lazy-plugins.lua | 1 + dotfiles/nvim/lua/plugins/mini.lua | 40 ++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 dotfiles/nvim/lua/plugins/mini.lua diff --git a/dotfiles/nvim/lazy-lock.json b/dotfiles/nvim/lazy-lock.json index 31cf2c1..180a946 100644 --- a/dotfiles/nvim/lazy-lock.json +++ b/dotfiles/nvim/lazy-lock.json @@ -1,6 +1,7 @@ { "gitsigns.nvim": { "branch": "main", "commit": "1796c7cedfe7e5dd20096c5d7b8b753d8f8d22eb" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "mini.nvim": { "branch": "main", "commit": "ee23e1abc206efc6d6cce19ec8c0a3da7a897035" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, "vim-tmux-navigator": { "branch": "master", "commit": "33afa80db65113561dc53fa732b7f5e53d5ecfd0" }, "vim-tmux-runner": { "branch": "master", "commit": "eead441119d9863227f4c39dac7890aa09d6b4cd" }, diff --git a/dotfiles/nvim/lua/lazy-plugins.lua b/dotfiles/nvim/lua/lazy-plugins.lua index b8add3e..cc3bd73 100644 --- a/dotfiles/nvim/lua/lazy-plugins.lua +++ b/dotfiles/nvim/lua/lazy-plugins.lua @@ -16,6 +16,7 @@ require('lazy').setup({ 'christoomey/vim-tmux-runner', require 'plugins/which-key', require 'plugins/gitsigns', + require 'plugins/mini', }, { ui = { diff --git a/dotfiles/nvim/lua/plugins/mini.lua b/dotfiles/nvim/lua/plugins/mini.lua new file mode 100644 index 0000000..3a9bdc3 --- /dev/null +++ b/dotfiles/nvim/lua/plugins/mini.lua @@ -0,0 +1,40 @@ +return { + { -- 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 [Q]uote + -- - 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 + + -- ... and there is more! + -- Check out: https://github.com/echasnovski/mini.nvim + end, + }, +} +-- vim: ts=2 sts=2 sw=2 et