diff --git a/README.md b/README.md index 441f28e..bab5eee 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ This port of Catppuccin is special because it was the first one and the one that - [WhichKey](https://github.com/folke/which-key.nvim) - [BarBar](https://github.com/romgrk/barbar.nvim) - [NvimTree](https://github.com/kyazdani42/nvim-tree.lua) + - [Neo-tree](https://github.com/nvim-neo-tree/neo-tree.nvim) - [Git Gutter](https://github.com/airblade/vim-gitgutter) - [Fern](https://github.com/lambdalisue/fern.vim) - [Lightline](https://github.com/itchyny/lightline.vim) @@ -117,6 +118,11 @@ integrations = { show_root = false, transparent_panel = false, }, + neotree = { + enabled = false, + show_root = false, + transparent_panel = false, + }, which_key = false, indent_blankline = { enabled = true, @@ -248,6 +254,17 @@ integration = { } } ``` +- **Neo-tree:** setting `enabled` to `true` enables this integration: + +```lua +integration = { + neotree = { + enabled = true, + show_root = true, -- makes the root folder not transparent + transparent_panel = false, -- make the panel transparent + } +} +``` ### Extra diff --git a/lua/catppuccin/config.lua b/lua/catppuccin/config.lua index 6ee4151..ea0f36e 100644 --- a/lua/catppuccin/config.lua +++ b/lua/catppuccin/config.lua @@ -39,6 +39,11 @@ config.options = { show_root = false, transparent_panel = false, }, + neotree = { + enabled = false, + show_root = false, + transparent_panel = false, + }, which_key = false, indent_blankline = { enabled = true, diff --git a/lua/catppuccin/core/integrations/neotree.lua b/lua/catppuccin/core/integrations/neotree.lua new file mode 100644 index 0000000..3dadc0a --- /dev/null +++ b/lua/catppuccin/core/integrations/neotree.lua @@ -0,0 +1,26 @@ +local M = {} + +function M.get(cp) + local config = require("catppuccin.config").options + local neotree = config.integrations.neotree + + local root_dir_color = cp.pink + + if neotree.show_root then + root_dir_color = cp.blue + end + + return { + NeoTreeDirectoryName = { fg = cp.blue }, + NeoTreeDirectoryIcon = { fg = cp.blue }, + NeoTreeNormal = { fg = cp.white, bg = neotree.transparent_panel and "NONE" or cp.black1 }, + NeoTreeIndentMarker = { fg = cp.gray0 }, + NeoTreeRootName = { fg = root_dir_color, style = "bold" }, + NeoTreeSymbolicLinkTarget = { fg = cp.pink }, + NeoTreeGitModified = { fg = cp.yellow }, + NeoTreeUntracked = { fg = cp.blue }, + NeoTreeFileNameOpened = { fg = cp.pink }, + } +end + +return M