Skip to content

Commit

Permalink
feat(barbecue): add enabled key
Browse files Browse the repository at this point in the history
  • Loading branch information
mrtnvgr committed Jul 28, 2023
1 parent 737f60a commit 903370d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ barbar = false

```lua
barbecue = {
enabled = true,
dim_dirname = true, -- directory name is dimmed by default
bold_basename = true,
dim_context = false,
Expand Down
1 change: 1 addition & 0 deletions lua/catppuccin/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ local M = {
telescope = { enabled = true },
treesitter = not is_vim,
barbecue = {
enabled = true,
dim_dirname = true,
bold_basename = true,
dim_context = false,
Expand Down
2 changes: 2 additions & 0 deletions lua/catppuccin/types.lua
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@
---@field which_key boolean

---@class CtpIntegrationBarbecue
--Whether to use custom barbecue theme.
---@field enabled boolean?
-- Whether to use the alternative background.
---@field alt_background boolean?
-- Whether the basename should be bold.
Expand Down
4 changes: 4 additions & 0 deletions lua/catppuccin/utils/barbecue.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ return function(flavour)
local C = require("catppuccin.palettes").get_palette(flavour)
local O = require("catppuccin").options

if not O.integrations.barbecue.enabled then
return require("barbecue.theme.default")
end

local transparent_bg = O.transparent_background and C.none or C.mantle

local dirname_color = O.integrations.barbecue.dim_dirname and C.overlay1 or C.text
Expand Down
3 changes: 3 additions & 0 deletions vim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ globals:
type: bool
property: read-only

O.integrations.barbecue.enabled:
type: bool
property: read-only
O.integrations.barbecue.dim_dirname:
type: bool
property: read-only
Expand Down

0 comments on commit 903370d

Please sign in to comment.