-
-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(split-and-window): add
neominimap.nvim
(#1175)
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
lua/astrocommunity/split-and-window/neominimap-nvim/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
30
lua/astrocommunity/split-and-window/neominimap-nvim/init.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} |