From 70470cb37386be034f7d9540c40c056f1756196a Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Fri, 19 Jul 2024 07:20:05 +1200 Subject: [PATCH] feat(extensions): add hop.nvim --- lua/cyberdream/config.lua | 2 ++ lua/cyberdream/extensions/hop.lua | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 lua/cyberdream/extensions/hop.lua diff --git a/lua/cyberdream/config.lua b/lua/cyberdream/config.lua index 9a570c8..cdead51 100644 --- a/lua/cyberdream/config.lua +++ b/lua/cyberdream/config.lua @@ -31,6 +31,7 @@ local M = {} ---@field gitsigns? boolean ---@field grapple? boolean ---@field heirline? boolean +---@field hop? boolean ---@field indentblankline? boolean ---@field kubectl? boolean ---@field lazy? boolean @@ -74,6 +75,7 @@ local default_options = { gitsigns = true, grapple = true, heirline = true, + hop = true, indentblankline = true, kubectl = true, lazy = true, diff --git a/lua/cyberdream/extensions/hop.lua b/lua/cyberdream/extensions/hop.lua new file mode 100644 index 0000000..8a985c6 --- /dev/null +++ b/lua/cyberdream/extensions/hop.lua @@ -0,0 +1,22 @@ +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 = { + HopNextKey = { fg = t.magenta, bg = util.blend(t.bg_solid, t.magenta, 0.85), bold = true }, + HopNextKey1 = { fg = t.cyan, bg = util.blend(t.bg_solid, t.cyan, 0.85), bold = true }, + HopNextKey2 = { + fg = util.blend(t.cyan, t.bg_solid, 0.7), + bg = util.blend(t.bg_solid, t.cyan, 0.9), + bold = true, + }, + HopUnmatched = { fg = t.bgHighlight }, + HopPreview = { fg = t.fg, bg = t.bgHighlight }, + } + return highlights +end +return M