mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-26 18:59:00 +02:00
fix(markdown): disable headlines.nvim bullets for now
This commit is contained in:
parent
0ba731a879
commit
843032ef1c
1 changed files with 4 additions and 14 deletions
|
@ -69,6 +69,8 @@ return {
|
||||||
for _, ft in ipairs({ "markdown", "norg", "rmd", "org" }) do
|
for _, ft in ipairs({ "markdown", "norg", "rmd", "org" }) do
|
||||||
opts[ft] = {
|
opts[ft] = {
|
||||||
headline_highlights = {},
|
headline_highlights = {},
|
||||||
|
-- disable bullets for now. See https://github.com/lukas-reineke/headlines.nvim/issues/66
|
||||||
|
bullets = {},
|
||||||
}
|
}
|
||||||
for i = 1, 6 do
|
for i = 1, 6 do
|
||||||
local hl = "Headline" .. i
|
local hl = "Headline" .. i
|
||||||
|
@ -82,20 +84,8 @@ return {
|
||||||
config = function(_, opts)
|
config = function(_, opts)
|
||||||
-- PERF: schedule to prevent headlines slowing down opening a file
|
-- PERF: schedule to prevent headlines slowing down opening a file
|
||||||
vim.schedule(function()
|
vim.schedule(function()
|
||||||
local hl = require("headlines")
|
require("headlines").setup(opts)
|
||||||
hl.setup(opts)
|
require("headlines").refresh()
|
||||||
local md = hl.config.markdown
|
|
||||||
hl.refresh()
|
|
||||||
|
|
||||||
-- Toggle markdown headlines on insert enter/leave
|
|
||||||
vim.api.nvim_create_autocmd({ "InsertEnter", "InsertLeave" }, {
|
|
||||||
callback = function(data)
|
|
||||||
if vim.bo.filetype == "markdown" then
|
|
||||||
hl.config.markdown = data.event == "InsertLeave" and md or nil
|
|
||||||
hl.refresh()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue