mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-06-29 03:44:14 +00:00
refactor: some small improvments to unimportant commits
This commit is contained in:
parent
52c02266b2
commit
a15126b2de
3 changed files with 17 additions and 14 deletions
|
@ -456,21 +456,21 @@ function M:log(task)
|
|||
self:diagnostic({ message = "Breaking Changes", severity = vim.diagnostic.severity.WARN })
|
||||
end
|
||||
self:append(ref:sub(1, 7) .. " ", "LazyCommit", { indent = 6 })
|
||||
if msg:match([[^chore]]) or msg:match([[^ci]]) or msg:match([[^doc]]) then
|
||||
self:append(vim.trim(msg)):highlight({
|
||||
["."] = "LazyComment",
|
||||
})
|
||||
else
|
||||
self:append(vim.trim(msg)):highlight({
|
||||
["#%d+"] = "LazyCommitIssue",
|
||||
["^%S+:"] = "LazyCommitType",
|
||||
["^%S+(%(.*%)):"] = "LazyCommitScope",
|
||||
["`.-`"] = "@text.literal.markdown_inline",
|
||||
["%*.-%*"] = "Italic",
|
||||
["%*%*.-%*%*"] = "Bold",
|
||||
})
|
||||
|
||||
local dimmed = false
|
||||
for _, dim in ipairs(ViewConfig.dimmed_commits) do
|
||||
if msg:find("^" .. dim) then
|
||||
dimmed = true
|
||||
end
|
||||
end
|
||||
-- string.gsub
|
||||
self:append(vim.trim(msg), dimmed and "LazyDimmed" or nil):highlight({
|
||||
["#%d+"] = "LazyCommitIssue",
|
||||
["^%S+:"] = dimmed and "Bold" or "LazyCommitType",
|
||||
["^%S+(%(.*%)):"] = "LazyCommitScope",
|
||||
["`.-`"] = "@text.literal.markdown_inline",
|
||||
["%*.-%*"] = "Italic",
|
||||
["%*%*.-%*%*"] = "Bold",
|
||||
})
|
||||
self:append(" " .. time, "LazyComment")
|
||||
self:nl()
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue