From 15aac8c529bb38ac39fdb22f7be7f37c0e39dd0c Mon Sep 17 00:00:00 2001 From: Sebastian Wiegandt Date: Mon, 29 May 2023 19:44:58 +0200 Subject: [PATCH] Improve Treesitter heading highlighting for Markdown (#161) --- lua/rose-pine/theme.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index 4f7af42e..cac5e66f 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -280,6 +280,20 @@ function M._load(options) h('@lsp.typemod.string.injected', { link = '@string' }) h('@lsp.typemod.variable.injected', { link = '@variable' }) + -- nvim-treesitter Markdown Headings + h('@text.title.1.markdown', { link = 'markdownH1' }) + h('@text.title.1.marker.markdown', { link = 'markdownH1Delimiter' }) + h('@text.title.2.markdown', { link = 'markdownH2' }) + h('@text.title.2.marker.markdown', { link = 'markdownH2Delimiter' }) + h('@text.title.3.markdown', { link = 'markdownH3' }) + h('@text.title.3.marker.markdown', { link = 'markdownH3Delimiter' }) + h('@text.title.4.markdown', { link = 'markdownH4' }) + h('@text.title.4.marker.markdown', { link = 'markdownH4Delimiter' }) + h('@text.title.5.markdown', { link = 'markdownH5' }) + h('@text.title.5.marker.markdown', { link = 'markdownH5Delimiter' }) + h('@text.title.6.markdown', { link = 'markdownH6' }) + h('@text.title.6.marker.markdown', { link = 'markdownH6Delimiter' }) + -- vim.lsp.buf.document_highlight() h('LspReferenceText', { bg = p.highlight_med }) h('LspReferenceRead', { bg = p.highlight_med })