mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-28 19:34:15 +00:00
feat(render): dim housekeeping commits by default
use `LazyComment` highlight group for commits with housekeeping types, i.e. chore/ci/doc
This commit is contained in:
parent
26d121ea13
commit
52c02266b2
1 changed files with 14 additions and 8 deletions
|
@ -456,14 +456,20 @@ function M:log(task)
|
||||||
self:diagnostic({ message = "Breaking Changes", severity = vim.diagnostic.severity.WARN })
|
self:diagnostic({ message = "Breaking Changes", severity = vim.diagnostic.severity.WARN })
|
||||||
end
|
end
|
||||||
self:append(ref:sub(1, 7) .. " ", "LazyCommit", { indent = 6 })
|
self:append(ref:sub(1, 7) .. " ", "LazyCommit", { indent = 6 })
|
||||||
self:append(vim.trim(msg)):highlight({
|
if msg:match([[^chore]]) or msg:match([[^ci]]) or msg:match([[^doc]]) then
|
||||||
["#%d+"] = "LazyCommitIssue",
|
self:append(vim.trim(msg)):highlight({
|
||||||
["^%S+:"] = "LazyCommitType",
|
["."] = "LazyComment",
|
||||||
["^%S+(%(.*%)):"] = "LazyCommitScope",
|
})
|
||||||
["`.-`"] = "@text.literal.markdown_inline",
|
else
|
||||||
["%*.-%*"] = "Italic",
|
self:append(vim.trim(msg)):highlight({
|
||||||
["%*%*.-%*%*"] = "Bold",
|
["#%d+"] = "LazyCommitIssue",
|
||||||
})
|
["^%S+:"] = "LazyCommitType",
|
||||||
|
["^%S+(%(.*%)):"] = "LazyCommitScope",
|
||||||
|
["`.-`"] = "@text.literal.markdown_inline",
|
||||||
|
["%*.-%*"] = "Italic",
|
||||||
|
["%*%*.-%*%*"] = "Bold",
|
||||||
|
})
|
||||||
|
end
|
||||||
-- string.gsub
|
-- string.gsub
|
||||||
self:append(" " .. time, "LazyComment")
|
self:append(" " .. time, "LazyComment")
|
||||||
self:nl()
|
self:nl()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue