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(barbecue): add barbecue #377

Merged
merged 4 commits into from
Jan 13, 2023
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
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ Below is a list of supported plugins and their corresponding integration module.
| ------------------------------------------------------------------------------------- | ------------------- |
| [aerial.nvim](https://github.com/stevearc/aerial.nvim) | aerial |
| [barbar.nvim](https://github.com/romgrk/barbar.nvim) | barbar |
| [barbecue.nvim](https://github.com/utilyre/barbecue.nvim) | barbecue, Special |
| [beacon.nvim](https://github.com/DanilaMihailov/beacon.nvim) | beacon |
| [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) | Special |
| [dashboard-nvim](https://github.com/glepnir/dashboard-nvim) | dashboard |
Expand Down Expand Up @@ -453,6 +454,9 @@ require("catppuccin").setup({
which_key = false,

-- Special integrations, see https://github.com/catppuccin/nvim#special-integrations
barbecue = {
dim_dirname = true,
},
dap = {
enabled = false,
enable_ui = false,
Expand Down Expand Up @@ -488,6 +492,27 @@ require("catppuccin").setup({

## Special integrations


<details> <summary>barbecue.nvim</summary>

Use this to set it up (**Note**: `catppuccin` is the only valid theme name. It will pick the one set in your config):

```lua
require("barbecue").setup {
theme = "catppuccin",
}
```

The directory name color shown is dimmed by default, you can customize this setting.

```lua
integrations = {
barbecue = {
dim_dirname = true,
}
}
```

<details> <summary>bufferline.nvim</summary>

Update your bufferline config to use the Catppuccin components:
Expand Down
46 changes: 46 additions & 0 deletions lua/barbecue/theme/catppuccin.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
local C = require("catppuccin.palettes").get_palette()
local O = require("catppuccin").options

local dirname_color = O.integrations.barbecue.dim_dirname and C.overlay1 or C.text

local M = {
normal = { fg = C.text, bg = "none" },

ellipsis = { fg = C.overlay1 },
separator = { fg = C.overlay1 },
modified = { fg = C.peach },

dirname = { fg = dirname_color },
basename = { fg = C.text, bold = true },
context = { fg = C.text },

-- Same keys as navic
context_file = { fg = C.blue },
context_module = { fg = C.blue },
context_namespace = { fg = C.blue },
context_package = { fg = C.blue },
context_class = { fg = C.yellow },
context_method = { fg = C.blue },
context_property = { fg = C.green },
context_field = { fg = C.green },
context_constructor = { fg = C.blue },
context_enum = { fg = C.green },
context_interface = { fg = C.yellow },
context_function = { fg = C.blue },
context_variable = { fg = C.flamingo },
context_constant = { fg = C.peach },
context_string = { fg = C.green },
context_number = { fg = C.peach },
context_boolean = { fg = C.peach },
context_array = { fg = C.blue },
context_object = { fg = C.blue },
context_key = { fg = C.flamingo },
context_null = { fg = C.peach },
context_enum_member = { fg = C.red },
context_struct = { fg = C.blue },
context_event = { fg = C.blue },
context_operator = { fg = C.blue },
context_type_parameter = { fg = C.blue },
}

return M
3 changes: 3 additions & 0 deletions lua/catppuccin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ local M = {
telescope = true,
treesitter = not is_vim,
ts_rainbow = true,
barbecue = {
dim_dirname = true,
},
indent_blankline = {
enabled = true,
colored_indent_levels = false,
Expand Down