Skip to content

Commit

Permalink
feat(extensions): add neogit (#117)
Browse files Browse the repository at this point in the history
* Add neogit.nvim

* Changed bg to match highlight groups

* Fix formatting

Resolves #116
  • Loading branch information
gldtn authored Aug 10, 2024
1 parent 4429874 commit 31f31f2
Show file tree
Hide file tree
Showing 2 changed files with 37 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 @@ -41,6 +41,7 @@ local M = {}
---@field markdown? boolean
---@field markview? boolean
---@field mini? boolean
---@field neogit? boolean
---@field noice? boolean
---@field notify? boolean
---@field rainbow_delimiters? boolean
Expand Down Expand Up @@ -91,6 +92,7 @@ local default_options = {
markview = true,
mini = true,
noice = true,
neogit = true,
notify = true,
rainbow_delimiters = true,
telescope = true,
Expand Down
35 changes: 35 additions & 0 deletions lua/cyberdream/extensions/neogit.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
local M = {}

--- Get extension configuration
--- @param opts Config
--- @param t CyberdreamPalette
function M.get(opts, t)
opts = opts or {}
local highlights = {
NeogitNormal = { bg = t.bg },
NeogitPopupSwitchKey = { fg = t.orange },
NeogitPopupOptionKey = { fg = t.orange },
NeogitPopupActionKey = { fg = t.orange },
NeogitPopupBranchName = { fg = t.cyan, bold = true },
NeogitPopupSectionTitle = { fg = t.pink, bold = true },
NeogitFold = { fg = t.fg },
NeogitRemote = { fg = t.cyan },
NeogitBranch = { fg = t.pink, bold = true },
NeogitBranchHead = { fg = t.pink, bold = true },
NeogitWinSeparator = { bg = t.bg, fg = t.bgHighlight },
NeogitChangeDeleted = { fg = t.red, bold = true, italic = true },
NeogitChangeModified = { fg = t.blue, bold = true, italic = true },
NeogitSectionHeader = { fg = t.orange, bold = true },
NeogitCommitViewHeader = { bg = t.pink, fg = t.bgAlt },
NeogitHunkHeader = { bg = t.cyan, fg = t.bgAlt, bold = true },
NeogitHunkHeaderHighlight = { bg = t.pink, fg = t.bgAlt, bold = true },
NeogitDiffHeader = { bg = t.fg, fg = t.bgAlt },
NeogitDiffContext = { bg = t.bg },
NeogitDiffHeaderHighlight = { bg = t.bgHighlight, fg = t.orange, bold = true, italic = true },
NeogitDiffContextHighlight = { bg = t.bgHighlight },
}

return highlights
end

return M

0 comments on commit 31f31f2

Please sign in to comment.