Skip to content

Commit

Permalink
feat: More highlights in cursorline
Browse files Browse the repository at this point in the history
  • Loading branch information
Isrothy committed Aug 24, 2024
1 parent fb8a84c commit 0f4836a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,14 @@ The default `winopt` is:

```lua
{
winhighlight = "Normal:NeominimapBackground,FloatBorder:NeominimapBorder,CursorLine:NeominimapCursorLine",
winhighlight = table.concat({
"Normal:NeominimapBackground",
"FloatBorder:NeominimapBorder",
"CursorLine:NeominimapCursorLine",
"CursorLineNr:NeominimapCursorLineNr",
"CursorLineSign:NeominimapCursorLineSign",
"CursorLineFold:NeominimapCursorLineFold",
}, ","),
wrap = false,
foldcolumn = "0",
signcolumn = "auto",
Expand Down Expand Up @@ -503,11 +510,14 @@ Checkout the wiki page for more details. [wiki](https://github.com/Isrothy/neomi

### Highlight Groups of Neominimap Windows

| Highlight Group | Description |
|---------------------------|-----------------------------------------------|
| `NeominimapBackground` | Background color for the minimap. |
| `NeominimapBorder` | Border highlight for the minimap window. |
| `NeominimapCursorLine` | Highlight for the cursor line in the minimap. |
| Highlight Group | Description |
|----------------------------|--------------------------------------------|
| `NeominimapBackground` | Background color for the minimap. |
| `NeominimapBorder` | Border highlight for the minimap window. |
| `NeominimapCursorLine` | Highlight for the cursor line in minimaps. |
| `NeominimapCursorLineNr` | To replace `CursorLineNr` in minimaps. |
| `NeominimapCursorLineSign` | To replace `CursorLineSign` in minimaps. |
| `NeominimapCursorLineFold` | To replace `CursorLineFold` in minimaps. |

### Highlight Groups of Diagnostic Annotations

Expand Down
3 changes: 3 additions & 0 deletions lua/neominimap/window/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ local api = vim.api
api.nvim_set_hl(0, "NeominimapBackground", { link = "Normal", default = true })
api.nvim_set_hl(0, "NeominimapBorder", { link = "FloatBorder", default = true })
api.nvim_set_hl(0, "NeominimapCursorLine", { link = "CursorLine", default = true })
api.nvim_set_hl(0, "NeominimapCursorLineSign", { link = "CursorLineSign", default = true })
api.nvim_set_hl(0, "NeominimapCursorLineNr", { link = "CursorLineSign", default = true })
api.nvim_set_hl(0, "NeominimapCursorLineFold", { link = "CursorLineSign", default = true })

---@class Neominimap.Window
---@field create_autocmds fun()
Expand Down
9 changes: 8 additions & 1 deletion lua/neominimap/window/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ end

---@type vim.wo
local default_winopt = {
winhighlight = "Normal:NeominimapBackground,FloatBorder:NeominimapBorder,CursorLine:NeominimapCursorLine",
winhighlight = table.concat({
"Normal:NeominimapBackground",
"FloatBorder:NeominimapBorder",
"CursorLine:NeominimapCursorLine",
"CursorLineNr:NeominimapCursorLineNr",
"CursorLineSign:NeominimapCursorLineSign",
"CursorLineFold:NeominimapCursorLineFold",
}, ","),
wrap = false,
foldcolumn = "0",
signcolumn = "auto",
Expand Down

0 comments on commit 0f4836a

Please sign in to comment.