Skip to content

Commit

Permalink
feat(extensions): add helpview.nvim
Browse files Browse the repository at this point in the history
resolves #122
  • Loading branch information
scottmckendry committed Aug 13, 2024
1 parent abc44e4 commit 6ee2234
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
| [grapple.nvim](https://github.com/cbochs/grapple.nvim) | [grapple](lua/cyberdream/extensions/grapple.lua) |
| [grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim) | [grugfar](lua/cyberdream/extensions/grugfar.lua) |
| [heirline-components.nvim](https://github.com/Zeioth/heirline-components.nvim) | [heirline](lua/cyberdream/extensions/heirline.lua) |
| [helpview.nvim](https://github.com/OXY2DEV/helpview.nvim) | [helpview](lua/cyberdream/extensions/helpview.lua) |
| [hop.nvim](https://github.com/phaazon/hop.nvim) | [hop](lua/cyberdream/extensions/hop.lua) |
| [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) | [indentblankline](lua/cyberdream/extensions/indentblankline.lua) |
| [kubectl.nvim](https://github.com/ramilito/kubectl.nvim) | [kubectl](lua/cyberdream/extensions/kubectl.lua) |
Expand Down
2 changes: 2 additions & 0 deletions lua/cyberdream/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ local M = {}
---@field grapple? boolean
---@field grugfar? boolean
---@field heirline? boolean
---@field helpview? boolean
---@field hop? boolean
---@field indentblankline? boolean
---@field kubectl? boolean
Expand Down Expand Up @@ -83,6 +84,7 @@ local default_options = {
grapple = true,
grugfar = true,
heirline = true,
helpview = true,
hop = true,
indentblankline = true,
kubectl = true,
Expand Down
31 changes: 31 additions & 0 deletions lua/cyberdream/extensions/helpview.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
local M = {}
local util = require("cyberdream.util")

--- Get extension configuration
--- @param opts Config
--- @param t CyberdreamPalette
function M.get(opts, t)
opts = opts or {}
local highlights = {
HelpviewTitle = { fg = t.orange, bg = util.blend(t.bg_solid, t.orange, 0.8), bold = true },
HelpviewHeading1 = { fg = t.cyan, bg = util.blend(t.bg_solid, t.cyan, 0.8), bold = true },
HelpviewHeading2 = { fg = t.blue, bg = util.blend(t.bg_solid, t.blue, 0.8), bold = true },
HelpviewHeading3 = { fg = t.purple, bg = util.blend(t.bg_solid, t.purple, 0.8), bold = true },
HelpviewHeading4 = { fg = t.magenta, bg = util.blend(t.bg_solid, t.magenta, 0.8), bold = true },

HelpviewCode = { bg = t.bgAlt },
HelpviewInlineCode = { link = "HelpviewCode" },
HelpviewCodeLanguage = { fg = t.grey, bg = t.bgAlt, italic = true },

HelpviewTaglink = { fg = t.blue, underline = true },
HelpviewOptionlink = { fg = util.blend(t.green, t.blue, 0.5), underline = true },
HelpviewMentionlink = { fg = t.cyan, underline = true },
}

for i = 1, 10 do
highlights["HelpviewGradient" .. i] = { fg = util.blend(t.grey, t.bg_solid, i / 10) }
end

return highlights
end
return M

0 comments on commit 6ee2234

Please sign in to comment.