Skip to content

Commit cb3ac6b

Browse files
Update change log for 3.3.0 release
1 parent 8f5bbbd commit cb3ac6b

File tree

3 files changed

+160
-193
lines changed

3 files changed

+160
-193
lines changed

CHANGELOG.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
# Change Log
22

3+
## 3.3.0 (2024-07-06)
4+
5+
### Features
6+
7+
- Improve performance by attaching events at buffer level [#45](https://github.com/MeanderingProgrammer/markdown.nvim/issues/45)
8+
[14b3a01](https://github.com/MeanderingProgrammer/markdown.nvim/commit/14b3a01fbd7de25b03dafad7398e4ce463a4d323)
9+
- Reduce startup time by scheduling treesitter parsing [6d153d7](https://github.com/MeanderingProgrammer/markdown.nvim/commit/6d153d749b9297c0e5cb74716f2a8aacc8df3d0e)
10+
- Support arbitrary nesting of block quotes & code blocks [770f7a1](https://github.com/MeanderingProgrammer/markdown.nvim/commit/770f7a13515b9fd8d4ed4d6a1d8a854b3fbeeb7e)
11+
- Prefer `mini.icons` for code blocks over `nvim-web-devicons` [353e445](https://github.com/MeanderingProgrammer/markdown.nvim/commit/353e4459938dd58873772e27a45c1d92bc83bafc)
12+
- Support custom checkbox states [#42](https://github.com/MeanderingProgrammer/markdown.nvim/issues/42)
13+
[ff3e8e3](https://github.com/MeanderingProgrammer/markdown.nvim/commit/ff3e8e344004bd6acda48a59f6780b5326e8a453)
14+
- Support custom callouts [8f5bbbd](https://github.com/MeanderingProgrammer/markdown.nvim/commit/8f5bbbd9e29508e2fc15b6fa9228eada15fca08a)
15+
16+
### Bug Fixes
17+
18+
- Fix language selection logic for code blocks [#44](https://github.com/MeanderingProgrammer/markdown.nvim/issues/44)
19+
[90072fd](https://github.com/MeanderingProgrammer/markdown.nvim/commit/90072fdbc28042add4cd08bef282df032bf6ac42)
20+
321
## 3.2.0 (2024-06-28)
422

523
### Features
@@ -52,8 +70,8 @@
5270
[#31](https://github.com/MeanderingProgrammer/markdown.nvim/pull/31)
5371
[258da4b](https://github.com/MeanderingProgrammer/markdown.nvim/commit/258da4bcdecdc83318a515fc4c6c3e18c0c65a61)
5472
- In order to fix:
55-
- `conceal = { default = <value_1>, rendered = <value_2> }` ->
56-
`win_options = { conceallevel = { default = <value_1>, rendered = <value_2> } }`
73+
- `conceal = { default = <v1>, rendered = <v2> }` ->
74+
`win_options = { conceallevel = { default = <v1>, rendered = <v2> } }`
5775

5876
### Contributor Shoutouts
5977

README.md

Lines changed: 66 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -269,135 +269,119 @@ require('render-markdown').setup({
269269

270270
</details>
271271

272-
There are 4 main types of settings:
273-
274-
1. Icon: the text that gets rendered
275-
2. Highlight: the color for text & backgrounds
276-
3. Style: how different components are rendered
277-
4. Window Options: handles conceal behavior
278-
279-
There are 2 main ways array like values are accessed:
272+
We use the following definitions when discussing indexing into arrays:
280273

281274
1. Cycle: Indexed `mod` the length.
282275
Example: `{ 1, 2, 3 }` @ 4 = 1.
283276
2. Clamp: Indexed normally but larger values use the last value in the array.
284277
Example: `{ 1, 2, 3 }` @ 4 = 3.
285278

286-
## Icon
279+
## Headings
287280

288-
### headings
289-
290-
Replace the `#` characters in front of headings.
281+
Icon: `headings`
282+
Highlight: `highlights.heading.backgrounds` & `highlights.heading.backgrounds`
283+
Style: N/A
291284

285+
The icons replace the `#` characters in front of headings.
292286
The number of `#` characters in the heading determines the level of the heading.
287+
The level is used to index into the icon table using a cycle.
288+
The icon is left padded with spaces to fill the gap and hide any additional `#`.
289+
The level is also used to index into both highlights tables using a clamp.
290+
Both are applied to the icon and the background extends through the entire line.
293291

294-
The level is used to index into the table using a cycle.
295-
296-
The icon is pre-pendeded with spaces to fill the gap and hide any additional `#`.
292+
## Dashed Line
297293

298-
### dash
294+
Icon: `dash`
295+
Highlight: `highlights.dash`
296+
Style: N/A
299297

300298
Gets repeated across the window's width when a `thematic_break` is found.
301299

302-
### bullets
303-
304-
Replace the `-`, `+`, and `*` characters in front of list items.
305-
306-
A different bullet is used depending on the level of nesting for the list item.
307-
308-
The nesting level is used to index into the table using a cycle.
300+
## List Bullets
309301

310-
If the character is before a checkbox, rather than changing the icon a conceal
311-
is used to hide the character.
302+
Icon: `bullets`
303+
Highlight: `highlights.bullet`
304+
Style: N/A
312305

313-
### checkbox
306+
The icons replace the `-`, `+`, and `*` characters in front of list items.
307+
How deeply nested the list is determines the level of the list.
308+
The level is used to index into the icon table using a cycle.
309+
If the item is a `checkbox` a conceal is instead used to hide the bullet.
314310

315-
The checked `[ ]` & unchecked `[x]` are directly replaced with these values.
311+
## Checkboxes
316312

317-
Additionally `custom` states can be specified, an example of this is provided with:
318-
`todo = { raw = '[-]', rendered = '󰥔 ', highlight = '@markup.raw' }`.
313+
Icon: `checkbox.unchecked`, `checkbox.checkbox`, & `checkbox.custom.rendered`
314+
Highlight: `highlights.checkbox.unchecked`, `highlights.checkbox.checked`, & `checkbox.custom.highlight`
315+
Style: N/A
319316

320-
This requires neovim >= `0.10.0` since it relies on `inline` extmarks.
317+
In the case of a standard checked `[x]` or unchecked `[ ]` checkbox state we simply
318+
overlay the appropriate icon and apply the appropriate highlight.
321319

322-
The key in the `custom` table is unused. The parts of the value are:
323-
324-
- `raw`: matched against the raw text of a `shortcut_link`, in the same way as `callouts`
320+
Custom checkbox states setup through `checkbox.custom` are more involved as they
321+
are not part of the actual `markdown` grammar.
322+
As a result this requires neovim >= `0.10.0` since it relies on `inline` extmarks.
323+
An example comes with the default config:
324+
`todo = { raw = '[-]', rendered = '󰥔 ', highlight = '@markup.raw' }`
325+
The key part in this case `todo` is unused. The parts of the value are:
326+
- `raw`: matched against the raw text of a `shortcut_link`
325327
- `rendered`: replaces the `raw` value when rendering
326328
- `highlight`: color used for `rendered` text
327329

328-
### quote
329-
330-
Replaces the `|` character in front of `block_quotes`.
330+
## Standard Quotes
331331

332-
### callout
332+
Icon: `quote`
333+
Highlight: `highlights.quote`
334+
Style: N/A
333335

334-
This is a special instance of a `block_quote`.
336+
The icon replaces the `|` character in front of `block_quotes`.
335337

336-
When the `callout` syntax is used the start, i.e. `[!NOTE]`, is replaced
337-
with this text.
338+
## Callouts
338339

339-
Additionally `custom` callouts can be specified, an example of this is provided with:
340-
`bug = { raw = '[!BUG]', rendered = '󰨰 Bug', highlight = 'DiagnosticError' }`.
340+
Icon: `callout` & `callout.custom.rendered`
341+
Highlight: `highlights.callout` & `callout.custom.highlight`
342+
Style: N/A
341343

342-
The key in the `custom` table is unused. The parts of the value are:
344+
Callouts are a special instance of a `block_quote` that start with a `shortcut_link`.
345+
When this pattern is seen the link text gets replaced by the icon.
346+
The highlight is then applied to the icon as well as the quote markers.
343347

348+
Custom callouts setup through `callout.custom` behave in much the same way.
349+
An example comes with the default config:
350+
`bug = { raw = '[!BUG]', rendered = '󰨰 Bug', highlight = 'DiagnosticError' }`
351+
The key part in this case `bug` is unused. The parts of the value are:
344352
- `raw`: matched against the raw text of a `shortcut_link`
345353
- `rendered`: replaces the `raw` value when rendering
346354
- `highlight`: color used for `rendered` text
347355

348-
## Highlight
349-
350-
Options are all contained in the `highlights` table.
351-
352-
For the most part the highlight group is used directly when writing the
353-
associated icons. We'll cover some of the specific behaviors.
354-
355-
### heading
356+
## Code Blocks
356357

357-
Both `backgrounds` and `foregrounds` are indexed by the level of the heading
358-
using a clamp.
359-
360-
Both values are applied to the icon, however the background extends through
361-
the entire line.
362-
363-
### table
364-
365-
The `head` is used for the table heading, delimitter, and the line above.
366-
367-
The `row` is used for everything else, so the main table rows and the line below.
368-
369-
## Style
370-
371-
### code_style
372-
373-
Determines how `fenced_code_block`s are rendered.
358+
Icon: N/A
359+
Highlight: `highlights.code`
360+
Style: `code_style`
374361

362+
`code_style` determines how code blocks are rendered:
375363
- `none`: disables all rendering
376-
- `normal`: adds background highlight group to the code block
364+
- `normal`: adds highlight group to the code block
377365
- `full`: `normal` + language icon & name above the code block
378366

379-
### table_style
367+
## Tables
380368

381-
Determines how `table`s are rendered.
369+
Icon: N/A
370+
Highlight: `highlights.table.head` & `highlights.table.row`
371+
Style: `table_style` & `cell_style`
382372

373+
The `head` highlight is used for the table heading, delimitter, and the line above.
374+
The `row` highlight is used for everything else, main table rows and the line below.
375+
376+
`table_style` determines how the table as a whole is rendered:
383377
- `none`: disables all rendering
384378
- `normal`: applies the `cell_style` rendering to each row of the table
385379
- `full`: `normal` + a top & bottom line that fill out the table when lengths match
386380

387-
### cell_style
388-
389-
Determines how `table cell`s are rendered.
390-
381+
`cell_style` determines how individual cells of a table are rendered:
391382
- `overlay`: writes completely over the table, removing conceal behavior and highlights
392383
- `raw`: replaces only the `|` icons in each row, leaving the cell completely unmodified
393384

394-
## Window Options
395-
396-
Options are all contained in the `win_options` table.
397-
398-
This changes the `conceallevel` & `concealcursor` when rendering. When not rendering
399-
the value is changed back to the users configured value.
400-
401385
# Additional Info
402386

403387
- [Limitations](doc/limitations.md): Known limitations of this plugin

0 commit comments

Comments
 (0)