From 15bee43293bdc042a6af44a787088722f36df027 Mon Sep 17 00:00:00 2001 From: Luca Matei Pintilie Date: Sun, 2 Apr 2023 21:05:25 +0200 Subject: Remove beacon config and add mini.comment --- .config/nvim/lua/plugins.lua | 47 ++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 13 deletions(-) (limited to '.config/nvim/lua/plugins.lua') diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index f4b9ba5..157b926 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -8,7 +8,6 @@ local PKGS = { { url = "https://github.com/chentoast/marks.nvim.git" }; { url = "https://github.com/chrisgrieser/nvim-spider.git" }; { url = "https://github.com/nvim-orgmode/orgmode.git" }; - { url = "https://github.com/rainbowhxch/beacon.nvim.git" }; { url = "https://github.com/kyazdani42/nvim-tree.lua.git" }; { url = "https://github.com/nvim-telescope/telescope.nvim.git" }; @@ -143,18 +142,6 @@ local function init_plugins() -- Available modes: foreground, background mode = "foreground"; -- Set the display mode. }) - require("beacon").setup({ - enable = true; - size = 100; - fade = true; - minimal_jump = 10; - show_jumps = true; - focus_gained = false; - shrink = false; - timeout = 1000; - ignore_buffers = {}; - ignore_filetypes = {}; - }) vim.g.minimap_auto_start = 0 vim.g.minimap_highlight_range = 1 @@ -208,6 +195,40 @@ local function init_plugins() orgmode.setup({ org_default_notes_file = "~/.cache/org/refile.org" }) require("mini.surround").setup({}) + require("mini.comment").setup({ + -- Options which control module behavior + options = { + -- Whether to ignore blank lines + ignore_blank_line = true; + + -- Whether to recognize as comment only lines without indent + start_of_line = false; + + -- Whether to ensure single space pad for comment parts + pad_comment_parts = true; + }; + + -- Module mappings. Use `''` (empty string) to disable one. + mappings = { + -- Toggle comment (like `gcip` - comment inner paragraph) for both + -- Normal and Visual modes + comment = "gc"; + + -- Toggle comment on current line + comment_line = "gcc"; + + -- Define 'comment' textobject (like `dgc` - delete whole comment block) + textobject = "gc"; + }; + + -- Hook functions to be executed at certain stage of commenting + hooks = { + -- Before successful commenting. Does nothing by default. + pre = function() end; + -- After successful commenting. Does nothing by default. + post = function() end; + }; + }) require("gitsigns").setup { signs = { -- cgit v1.2.3