Skip to content

Commit

Permalink
feat(split-and-window): add neominimap.nvim (#1175)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter authored Aug 22, 2024
1 parent d4d3420 commit c2ee7e0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lua/astrocommunity/split-and-window/neominimap-nvim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Neominimap

Yet another minimap plugin for Neovim

**Repository:** <https://github.com/Isrothy/neominimap.nvim>
30 changes: 30 additions & 0 deletions lua/astrocommunity/split-and-window/neominimap-nvim/init.lua
Original file line number Diff line number Diff line change
@@ -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 = {
["<Leader>um"] = { "<Cmd>Neominimap toggle<CR>", 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,
}

0 comments on commit c2ee7e0

Please sign in to comment.