Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(recipes): add neo-tree dark theme recipe #860

Merged
merged 2 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lua/astrocommunity/recipes/neo-tree-dark/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# neo-tree.nvim dark theme

Dark themed color scheme for `neo-tree.nvim`

**Repository**: https://github.com/nvim-neo-tree/neo-tree.nvim

_Note_: Highlight groups are designed to match `astrotheme`. Customize the table if you are using different colorscheme.
64 changes: 64 additions & 0 deletions lua/astrocommunity/recipes/neo-tree-dark/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
-- theme colors
local colors = {
dark = "#111317",
light = "#777777",
neutral = "#8094B4",
backdrop = "#61afef",
}

local new_highlights = {
-- indentline marker
NeoTreeIndentMarker = { fg = colors.neutral },

-- file tree window separator
NeoTreeWinSeparator = { fg = colors.dark, bg = colors.dark },

-- info messages
NeoTreeMessage = { link = "NeoTreeDotfile" },

-- normal mode appearance
NeoTreeNormal = { bg = colors.dark },
NeoTreeNormalNC = { link = "NeoTreeNormal" },

-- dotfiles
NeoTreeDotfile = { fg = colors.light },
NeoTreeDotfiles = { link = "NeoTreeDotfile" },

-- tabs
NeoTreeTabActive = { fg = colors.dark, bg = colors.backdrop, bold = true },
NeoTreeTabInactive = { fg = colors.light, bg = colors.dark },

-- tab separators
NeoTreeTabSeparatorActive = { fg = colors.backdrop, bg = colors.backdrop },
NeoTreeTabSeparatorInactive = { link = "NeoTreeWinSeparator" },

-- file operations prompt
NeoTreeTitleBar = { link = "NeoTreeTabActive" },
NeoTreeFloatNormal = { bg = colors.dark },
NeoTreeFloatBorder = { fg = colors.backdrop, bg = colors.dark },
}

return {
"AstroNvim/astroui",
---@param opts AstroUIOpts
opts = function(_, opts)
if not opts.highlights then opts.highlights = {} end
local astrodark = opts.highlights.astrodark
if type(astrodark) == "function" then
opts.highlights.astrodark = function(...) return require("astrocore").extend_tbl(astrodark(...), new_highlights) end
else
opts.highlights.astrodark = require("astrocore").extend_tbl(astrodark, new_highlights)
end

if not opts.icons then opts.icons = {} end
opts.icons.GitAdd = "󰬈" -- set icon for git symbols
opts.icons.GitChange = "󰬔"
opts.icons.GitDelete = "󰬋"
opts.icons.GitRenamed = "󰬙"
opts.icons.GitUntracked = "󰬛"
opts.icons.GitIgnored = "󰬐"
opts.icons.GitUnstaged = "󰬜"
opts.icons.GitStaged = "󰬚"
opts.icons.GitConflict = "󰬊"
end,
}
Loading