@@ -28,44 +28,63 @@ Plugin is experimental at this time
28
28
' MeanderingProgrammer/markdown.nvim' ,
29
29
dependencies = { ' nvim-treesitter/nvim-treesitter' },
30
30
config = function ()
31
- require (' markdown' ).setup ({
32
- query = vim .treesitter .query .parse (
33
- ' markdown' ,
34
- [[
35
- (atx_heading [
36
- (atx_h1_marker)
37
- (atx_h2_marker)
38
- (atx_h3_marker)
39
- (atx_h4_marker)
40
- (atx_h5_marker)
41
- (atx_h6_marker)
42
- ] @heading)
43
-
44
- (fenced_code_block) @code
45
-
46
- (list_item) @item
47
-
48
- (pipe_table_header) @table_head
49
- (pipe_table_delimiter_row) @table_delim
50
- (pipe_table_row) @table_row
51
- ]]
52
- ),
53
- render_modes = { ' n' , ' c' },
54
- bullet = ' ○' ,
55
- highlights = {
56
- headings = { ' DiffAdd' , ' DiffChange' , ' DiffDelete' },
57
- code = ' ColorColumn' ,
58
- bullet = ' Normal' ,
59
- table = {
60
- head = ' @markup.heading' ,
61
- row = ' Normal' ,
62
- },
63
- },
64
- })
31
+ require (' markdown' ).setup ({})
65
32
end ,
66
33
}
67
34
```
68
35
36
+ ## Default Config
37
+
38
+ Below is the configuration that gets used by default, any part of it can be modified
39
+ by the user.
40
+
41
+ ``` lua
42
+ require (' markdown' ).setup ({
43
+ -- Capture groups that get pulled from the markdown file, these are later
44
+ -- used to modify how the file gets rendered
45
+ query = vim .treesitter .query .parse (
46
+ ' markdown' ,
47
+ [[
48
+ (atx_heading [
49
+ (atx_h1_marker)
50
+ (atx_h2_marker)
51
+ (atx_h3_marker)
52
+ (atx_h4_marker)
53
+ (atx_h5_marker)
54
+ (atx_h6_marker)
55
+ ] @heading)
56
+
57
+ (fenced_code_block) @code
58
+
59
+ (list_item) @item
60
+
61
+ (pipe_table_header) @table_head
62
+ (pipe_table_delimiter_row) @table_delim
63
+ (pipe_table_row) @table_row
64
+ ]]
65
+ ),
66
+ -- vim modes that will show a rendered view of the markdown file, all other
67
+ -- modes will be uneffected by this plugin
68
+ render_modes = { ' n' , ' c' },
69
+ -- Character to use for the bullet point in lists
70
+ bullet = ' ○' ,
71
+ highlights = {
72
+ -- Groups that get cycled through for rendering headings
73
+ headings = { ' DiffAdd' , ' DiffChange' , ' DiffDelete' },
74
+ -- Used when displaying code blocks
75
+ code = ' ColorColumn' ,
76
+ -- Used when displaying bullet points in list
77
+ bullet = ' Normal' ,
78
+ table = {
79
+ -- Used when displaying header in a markdown table
80
+ head = ' @markup.heading' ,
81
+ -- Used when displaying non header rows in a markdown table
82
+ row = ' Normal' ,
83
+ },
84
+ },
85
+ })
86
+ ```
87
+
69
88
# Related Projects
70
89
71
90
- [ headlines.nvim] ( https://github.com/lukas-reineke/headlines.nvim ) - Same high level
0 commit comments