Skip to content

Commit

Permalink
feat(extensions): add snacks.nvim
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmckendry committed Nov 8, 2024
1 parent 7e6feb4 commit 28cde1c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lua/cyberdream/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ local M = {}
---@field noice? boolean
---@field notify? boolean
---@field rainbow_delimiters? boolean
---@field snacks? boolean
---@field telescope? boolean
---@field treesitter? boolean
---@field treesittercontext? boolean
Expand Down Expand Up @@ -101,6 +102,7 @@ local default_options = {
neogit = true,
notify = true,
rainbow_delimiters = true,
snacks = true,
telescope = true,
treesitter = true,
treesittercontext = true,
Expand Down
44 changes: 44 additions & 0 deletions lua/cyberdream/extensions/snacks.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
local M = {}

--- Get extension configuration
--- @param opts Config
--- @param t CyberdreamPalette
function M.get(opts, t)
opts = opts or {}
local highlights = {
SnacksNormal = { link = "NormalFloat" },
SnacksWinBar = { link = "Title" },
SnacksBackdrop = { fg = "NONE", bg = "NONE" },
SnacksNormalNC = { link = "NormalFloat" },
SnacksWinBarNC = { link = "SnacksWinBar" },

SnacksNotifierDebug = { fg = t.fg },
SnacksNotifierBorderDebug = { fg = t.bgHighlight },
SnacksNotifierIconDebug = { fg = t.grey },
SnacksNotifierTitleDebug = { fg = t.grey },

SnacksNotifierError = { link = "SnacksNotifierDebug" },
SnacksNotifierBorderError = { link = "SnacksNotifierBorderDebug" },
SnacksNotifierIconError = { fg = t.red },
SnacksNotifierTitleError = { fg = t.red },

SnacksNotifierInfo = { link = "SnacksNotifierDebug" },
SnacksNotifierBorderInfo = { link = "SnacksNotifierBorderDebug" },
SnacksNotifierIconInfo = { fg = t.blue },
SnacksNotifierTitleInfo = { fg = t.blue },

SnacksNotifierTrace = { link = "SnacksNotifierDebug" },
SnacksNotifierBorderTrace = { link = "SnacksNotifierBorderDebug" },
SnacksNotifierIconTrace = { fg = t.purple },
SnacksNotifierTitleTrace = { fg = t.purple },

SnacksNotifierWarn = { link = "SnacksNotifierDebug" },
SnacksNotifierBorderWarn = { link = "SnacksNotifierBorderDebug" },
SnacksNotifierIconWarn = { fg = t.yellow },
SnacksNotifierTitleWarn = { fg = t.yellow },
}

return highlights
end

return M

0 comments on commit 28cde1c

Please sign in to comment.