diff --git a/lua/astrocommunity/split-and-window/neominimap-nvim/README.md b/lua/astrocommunity/split-and-window/neominimap-nvim/README.md new file mode 100644 index 000000000..cee3ccf22 --- /dev/null +++ b/lua/astrocommunity/split-and-window/neominimap-nvim/README.md @@ -0,0 +1,5 @@ +# Neominimap + +Yet another minimap plugin for Neovim + +**Repository:** diff --git a/lua/astrocommunity/split-and-window/neominimap-nvim/init.lua b/lua/astrocommunity/split-and-window/neominimap-nvim/init.lua new file mode 100644 index 000000000..75291ea6b --- /dev/null +++ b/lua/astrocommunity/split-and-window/neominimap-nvim/init.lua @@ -0,0 +1,30 @@ +return { + "Isrothy/neominimap.nvim", + version = "^3", + lazy = false, + specs = { + { -- recommended options by the plugin + "AstroNvim/astrocore", + opts = { + options = { opt = { + wrap = false, + } }, + mappings = { + n = { + ["um"] = { "Neominimap toggle", desc = "Toggle minimap" }, + }, + }, + }, + }, + }, + opts = { + buf_filter = function(bufnr) return require("astrocore.buffer").is_valid(bufnr) end, + }, + config = function(_, opts) + if opts.layout == nil or opts.layout == "float" then + local float_width = (vim.tbl_get(opts, "float", "minimap_width") or 20) + 2 + if vim.opt.sidescrolloff:get() < float_width then vim.opt.sidescrolloff = float_width end + end + vim.g.neominimap = require("astrocore").extend_tbl(opts, vim.g.neominimap) + end, +}