From 309344590cf781955c8fb4ef177b6c3e154f036c Mon Sep 17 00:00:00 2001 From: Marcus Grant Date: Wed, 5 Jun 2024 14:35:28 +0200 Subject: [PATCH] Fix headlines.nvim plugin with markdown config - Uses this fix: - https://github.com/lukas-reineke/headlines.nvim/issues/41 - Added to `lua/plugins/headline.lua` new config overrider - Full spec from lazyvim inclusion is here: - https://www.lazyvim.org/extras/lang/markdown#headlinesnvim --- lua/plugins/headline.lua | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lua/plugins/headline.lua diff --git a/lua/plugins/headline.lua b/lua/plugins/headline.lua new file mode 100644 index 0000000..0d94e0e --- /dev/null +++ b/lua/plugins/headline.lua @@ -0,0 +1,29 @@ +-- Fix taken from: +-- https://github.com/lukas-reineke/headlines.nvim/issues/41 +return { + "lukas-reineke/headlines.nvim", + dependencies = "nvim-treesitter/nvim-treesitter", + opts = { + markdown = { + fat_headline_lower_string = "▔", + }, + }, +} +-- Full Spec taken from lazyvim docs: +-- https://www.lazyvim.org/extras/lang/markdown#headlinesnvim +-- opts = function() +-- local opts = {} +-- for _, ft in ipairs({ "markdown", "norg", "rmd", "org" }) do +-- opts[ft] = { +-- headline_highlights = {}, +-- -- disable bullets for now. See https://github.com/lukas-reineke/headlines.nvim/issues/66 +-- bullets = {}, +-- } +-- for i = 1, 6 do +-- local hl = "Headline" .. i +-- vim.api.nvim_set_hl(0, hl, { link = "Headline", default = true }) +-- table.insert(opts[ft].headline_highlights, hl) +-- end +-- end +-- return opts +-- end