diff --git a/after/ftplugin/gitrebase.lua b/after/ftplugin/gitrebase.lua index 3a84f4b..7162fbf 100644 --- a/after/ftplugin/gitrebase.lua +++ b/after/ftplugin/gitrebase.lua @@ -11,7 +11,7 @@ vim.fn.matchadd("tinygit_rebase_issueNumber", [[#\d\+]]) vim.api.nvim_set_hl(ns, "tinygit_rebase_issueNumber", { link = "Number" }) vim.fn.matchadd("tinygit_rebase_mdInlineCode", [[`.\{-}`]]) -- .\{-} = non-greedy quantifier -vim.api.nvim_set_hl(ns, "tinygit_rebase_mdInlineCode", { link = "@text.literal" }) +vim.api.nvim_set_hl(ns, "tinygit_rebase_mdInlineCode", { link = "@markup.raw.markdown_inline" }) vim.fn.matchadd( "tinygit_rebase_conventionalCommit", diff --git a/lua/tinygit/commands/commit-and-amend.lua b/lua/tinygit/commands/commit-and-amend.lua index fe307b7..eb5ad93 100644 --- a/lua/tinygit/commands/commit-and-amend.lua +++ b/lua/tinygit/commands/commit-and-amend.lua @@ -89,7 +89,7 @@ local function setupInputField(commitType) vim.api.nvim_set_hl(ns, "issueNumber", { link = "Number" }) fn.matchadd("mdInlineCode", [[`.\{-}`]]) -- .\{-} = non-greedy quantifier - vim.api.nvim_set_hl(ns, "mdInlineCode", { link = "@text.literal" }) + vim.api.nvim_set_hl(ns, "mdInlineCode", { link = "@markup.raw.markdown_inline" }) fn.matchadd("overLength", ([[.\{%s}\zs.*\ze]]):format(config.maxLen - 1)) vim.api.nvim_set_hl(ns, "overLength", { link = "ErrorMsg" }) @@ -106,7 +106,7 @@ local function setupInputField(commitType) -- treesitter highlighting vim.bo.filetype = "gitcommit" - vim.api.nvim_set_hl(ns, "@text.title.gitcommit", { link = "Normal" }) + vim.api.nvim_set_hl(ns, "@markup.heading.gitcommit", { link = "Normal" }) -- prevent auto-wrapping due to filetype "gitcommit" being set vim.opt_local.formatoptions:remove("t") @@ -172,7 +172,7 @@ local function commitNotification(title, stagedAllChanges, commitMsg, extra) -- using `matchadd`, since it is restricted to the current window anyway -- INFO the order the highlights are added matters, later has priority fn.matchadd("Number", [[#\d\+]]) -- issues number - fn.matchadd("@text.literal", [[`.\{-}`]]) -- inline code (.\{-} = non-greedy quantifier) + fn.matchadd("@markup.raw.markdown_inline", [[`.\{-}`]]) -- inline code (.\{-} = non-greedy quantifier) -- setting the filetype to "gitcommit" does not work well with -- nvim-notify, therefore manually highlighting conventional commits fn.matchadd(