-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(markdown): replace headlines.nvim by markdown.nvim
#4139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(markdown): replace headlines.nvim by markdown.nvim
#4139
Conversation
|
I think we should keep markdown stuff into a single extra, i.e. decide between headlines or this. Not both. Also, imo it's best to not change the highlight groups, and instead add them to tokyonight, so the markdown plugin is supported for all people who might use the plugin. This line |
|
I've been using that plugin for a while as a replacement for headlines.nvim. I still need to file an issue, or create a PR in the repo, so that it's easier for colorschemes to override the default hl groups. |
|
This is what I'm using right now as a reference: {
"OXY2DEV/markview.nvim",
enabled = true,
opts = {
checkboxes = { enable = false },
links = {
inline_links = {
hl = "@markup.link.label.markown_inline",
icon = " ",
icon_hl = "@markup.link",
},
images = {
hl = "@markup.link.label.markown_inline",
icon = " ",
icon_hl = "@markup.link",
},
},
code_blocks = {
style = "language",
hl = "CodeBlock",
pad_amount = 0,
},
list_items = {
shift_width = 2,
marker_minus = { text = "●", hl = "@markup.list.markdown" },
marker_plus = { text = "●", hl = "@markup.list.markdown" },
marker_star = { text = "●", hl = "@markup.list.markdown" },
marker_dot = {},
},
inline_codes = { enable = false },
headings = {
heading_1 = { style = "simple", hl = "Headline1" },
heading_2 = { style = "simple", hl = "Headline2" },
heading_3 = { style = "simple", hl = "Headline3" },
heading_4 = { style = "simple", hl = "Headline4" },
heading_5 = { style = "simple", hl = "Headline5" },
heading_6 = { style = "simple", hl = "Headline6" },
},
},
ft = { "markdown", "norg", "rmd", "org" },
}It disables some of the bling by default to make the plugin a little less intrusive. |
|
I've been working on support for tokyonight as well, but like I said, the plugin currently doesn't use default groups like I configured in the spec. |
|
I'm stealing that spec, thanks for sharing :) It is in fact way better than headlines, and fast too. EDIT: It's a different plugin, no? |
|
It's a different plugin @folke: yours: mine: I'll try yours as well. |
Yeah, there's lots of plugins named markdown.nvim, so I wanted to keep the recommendation from the README. But yes, I don't like it either. |
|
Right, indeed a different plugin. |
|
Found the biggest reason. |
|
Hmm makes sense! |
5afa82e to
9d05e66
Compare
|
btw, I had to add {
"folke/tokyonight.nvim",
opts = {
plugins = {
headlines = true,
},
},
},In order to have CodeBlock and Headlines1..6 hls even with headlines.nvim disabled. |
|
That's because I didn't push my changes in tokyonight yet. |
Hi @folke, I saw this thread and am curious about this comment. Neither plugin uses
Both create autocommands at a buffer level, so performance should be nearly identical.
I imagine the idea you have here is to do some kind of minimal re-render using the There is a legitimate performance hit from I totally get an aesthetic preference for one plugin vs. the other, but I do not think either offers improved performance. Please lmk if I'm missing something. Much love for all the work you do in this community! |
|
@MeanderingProgrammer looks I was wrong on that indeed. Thank you for clarifying! Will take a closer look to markdown.nvim again as well! For optimizing performance, a combination of
This is just a suggestion though, I'm sure your current approach works really well already. Will try it out again! |
|
another point in favor of markdown.nvim, it's super easy to add livebook filetypes (*.livemd) to it. |
|
@folke, I am not sure if it is more efficient to redraw It seems like an interesting approach, and I should probably be more aware of the latency of different approaches. So far I've more or less done an eyeball test on various files as my latency benchmark. @georgeguimaraes, I appreciate your enthusiasm and that you like my plugin! Has definitely been a fun project for me as well that's evolved in fun ways. I would summarize the difference between the 2 as such, this is obviously biased on my familiarity: markdown.nvim
markview.nvim
I definitely have more familiarity with my own plugin and |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
Just added proper support to tokyonight folke/tokyonight.nvim@71429c9 |
headlines.nvim by markdown.nvim
|
I've updated the PR to replace headlines.nvim with markdown.nvim |
This comment was marked as outdated.
This comment was marked as outdated.
|
It's great to see my two favorit plugins getting aligned together, you two make my daly life just more colorful 🌈 . |
|
@folke I think you merged (folke/tokyonight.nvim@71429c9) support in Tokyo for https://github.com/OXY2DEV/markview.nvim rather than https://github.com/MeanderingProgrammer/markdown.nvim was that expected? |
|
That was correct, but incorrect url. It's quite confusing 😅 I fixed it in a later commit though |
|
Merged, ty! |
🤖 I have created a release *beep* *boop* --- ## [12.38.0](v12.37.0...v12.38.0) (2024-07-24) ### Features * **markdown:** markdown-render toggle ([c8d0faf](c8d0faf)) * **markdown:** replace `headlines.nvim` by `markdown.nvim` ([#4139](#4139)) ([264abdf](264abdf)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
Seeing double chain link icons in LazyVim changelog |
|
@dotfrag you probably still have headlines.nvim in your config? |
|
From testing the PRs.. yes sorry. |

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?)