From b16c92ac66d73d856d544775632297c400a93590 Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Sat, 31 May 2025 14:32:55 +0800 Subject: [PATCH] feat nvim: add minimap --- .../exact_plugins/exact_ui/scrollbar.lua | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/dot_config/nvim/exact_lua/exact_plugins/exact_ui/scrollbar.lua b/dot_config/nvim/exact_lua/exact_plugins/exact_ui/scrollbar.lua index 43703b1..cbe55b4 100644 --- a/dot_config/nvim/exact_lua/exact_plugins/exact_ui/scrollbar.lua +++ b/dot_config/nvim/exact_lua/exact_plugins/exact_ui/scrollbar.lua @@ -16,6 +16,77 @@ return { end, }, + -- { + -- 'wfxr/minimap.vim', + -- config = function() + -- vim.g.minimap_width = 10 + -- vim.g.minimap_auto_start = 1 + -- vim.g.minimap_auto_start_win_enter = 1 + -- end, + -- } + -- { + -- 'gorbit99/codewindow.nvim', + -- config = function() + -- local codewindow = require('codewindow') + -- codewindow.setup() + -- codewindow.apply_default_keybinds() + -- end, + -- }, + ---@module "neominimap.config.meta" + { + "Isrothy/neominimap.nvim", + version = "v3.x.x", + lazy = false, -- NOTE: NO NEED to Lazy load + -- Optional. You can alse set your own keybindings + keys = { + -- Global Minimap Controls + { "nm", "Neominimap Toggle", desc = "Toggle global minimap" }, + { "no", "Neominimap Enable", desc = "Enable global minimap" }, + { "nc", "Neominimap Disable", desc = "Disable global minimap" }, + { "nr", "Neominimap Refresh", desc = "Refresh global minimap" }, + + -- Window-Specific Minimap Controls + { "nwt", "Neominimap WinToggle", desc = "Toggle minimap for current window" }, + { "nwr", "Neominimap WinRefresh", desc = "Refresh minimap for current window" }, + { "nwo", "Neominimap WinEnable", desc = "Enable minimap for current window" }, + { "nwc", "Neominimap WinDisable", desc = "Disable minimap for current window" }, + + -- Tab-Specific Minimap Controls + { "ntt", "Neominimap TabToggle", desc = "Toggle minimap for current tab" }, + { "ntr", "Neominimap TabRefresh", desc = "Refresh minimap for current tab" }, + { "nto", "Neominimap TabEnable", desc = "Enable minimap for current tab" }, + { "ntc", "Neominimap TabDisable", desc = "Disable minimap for current tab" }, + + -- Buffer-Specific Minimap Controls + { "nbt", "Neominimap BufToggle", desc = "Toggle minimap for current buffer" }, + { "nbr", "Neominimap BufRefresh", desc = "Refresh minimap for current buffer" }, + { "nbo", "Neominimap BufEnable", desc = "Enable minimap for current buffer" }, + { "nbc", "Neominimap BufDisable", desc = "Disable minimap for current buffer" }, + + ---Focus Controls + { "nf", "Neominimap Focus", desc = "Focus on minimap" }, + { "nu", "Neominimap Unfocus", desc = "Unfocus minimap" }, + { "ns", "Neominimap ToggleFocus", desc = "Switch focus on minimap" }, + }, + init = function() + -- The following options are recommended when layout == "float" + vim.opt.wrap = false + vim.opt.sidescrolloff = 36 -- Set a large value + + --- Put your configuration here + ---@type Neominimap.UserConfig + vim.g.neominimap = { + auto_enable = true, + + click = { + -- Enable mouse click on the minimap + enabled = true, ---@type boolean + -- Automatically switch focus to the minimap when clicked + auto_switch_focus = true, ---@type boolean + }, + } + end, + } -- { "petertriho/nvim-scrollbar", -- cond = true, -- config = function()