mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
feat(markdown): replace headlines.nvim
by markdown.nvim
(#4139)
Okay, so https://github.com/MeanderingProgrammer/markdown.nvim?tab=readme-ov-file is a new kid on the block that I've been enjoying a lot. It replaces headlines.nvim. This new extra is a way for folks to try markdown.nvim effortlessly. (Should I add here everything from the current markdown extra to make this extra a complete drop-in replacement?) --------- Co-authored-by: Folke Lemaitre <folke.lemaitre@gmail.com>
This commit is contained in:
parent
489a7a8e84
commit
264abdf9d5
2 changed files with 17 additions and 25 deletions
3
NEWS.md
3
NEWS.md
|
@ -2,6 +2,9 @@
|
|||
|
||||
## 12.x
|
||||
|
||||
- **Markdown Extra**: [headlines.nvim](https://github.com/lukas-reineke/headlines.nvim) has been removed in favor of [markdown.nvim](https://github.com/MeanderingProgrammer/markdown.nvim)
|
||||
to spice up your markdown files.
|
||||
|
||||
- [nvim-spectre](https://github.com/nvim-pack/nvim-spectre) has been removed in favor of [grug-far.nvim](https://github.com/MagicDuck/grug-far.nvim).
|
||||
**grug-far.nvim** has a great UI and feels more intuitive to use.
|
||||
|
||||
|
|
|
@ -92,31 +92,20 @@ return {
|
|||
},
|
||||
|
||||
{
|
||||
"lukas-reineke/headlines.nvim",
|
||||
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 = {},
|
||||
quote_string = false,
|
||||
}
|
||||
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,
|
||||
"MeanderingProgrammer/markdown.nvim",
|
||||
opts = {
|
||||
file_types = { "markdown", "norg", "rmd", "org" },
|
||||
code = {
|
||||
sign = false,
|
||||
width = "block",
|
||||
right_pad = 1,
|
||||
},
|
||||
heading = {
|
||||
sign = false,
|
||||
icons = {},
|
||||
},
|
||||
},
|
||||
ft = { "markdown", "norg", "rmd", "org" },
|
||||
config = function(_, opts)
|
||||
-- PERF: schedule to prevent headlines slowing down opening a file
|
||||
vim.schedule(function()
|
||||
require("headlines").setup(opts)
|
||||
require("headlines").refresh()
|
||||
end)
|
||||
end,
|
||||
enabled = true,
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue