Skip to content

Commit

Permalink
fix(cmdline): allow overriding title hl
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jun 13, 2024
1 parent edd14df commit a5aa639
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Check the [wiki](https://github.com/folke/noice.nvim/wiki/Configuration-Recipes)
filter = { pattern = "^:%s*!", icon = "$", lang = "bash" },
lua = { pattern = { "^:%s*lua%s+", "^:%s*lua%s*=%s*", "^:%s*=%s*" }, icon = "", lang = "lua" },
help = { pattern = "^:%s*he?l?p?%s+", icon = "" },
input = { view = "cmdline_input" }, -- Used by input()
input = { view = "cmdline_input", icon = "󰥻 " }, -- Used by input()
-- lua = false, -- to disable a format, set to `false`
},
},
Expand Down
4 changes: 4 additions & 0 deletions lua/noice/config/cmdline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ function M.setup()
local hl_group_border = "CmdlinePopupBorder" .. kind_cc
Highlights.add(hl_group_border, "NoiceCmdlinePopupBorder")

local hl_group_title = "CmdlinePopupTitle" .. kind_cc
Highlights.add(hl_group_title, "Noice" .. hl_group_border)

format = vim.tbl_deep_extend("force", {
name = name,
conceal = format.conceal ~= false,
Expand All @@ -37,6 +40,7 @@ function M.setup()
win_options = {
winhighlight = {
FloatBorder = "Noice" .. hl_group_border,
FloatTitle = "Noice" .. hl_group_title,
},
},
},
Expand Down
1 change: 1 addition & 0 deletions lua/noice/config/init.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---@diagnostic disable: missing-fields
local require = require("noice.util.lazy")

local Routes = require("noice.config.routes")
Expand Down

0 comments on commit a5aa639

Please sign in to comment.