Skip to content

Commit 56ba207

Browse files
Add note for vimwiki users
1 parent 6208fc4 commit 56ba207

File tree

3 files changed

+67
-16
lines changed

3 files changed

+67
-16
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Plugin to improve viewing Markdown files in Neovim
2626
- Support for [callouts](https://github.com/orgs/community/discussions/16925)
2727
- Support custom handlers which are ran identically to native handlers
2828

29-
# Known Limitations
29+
# Limitations
3030

3131
- Text that extends beyond available space will overwrite content [#35](https://github.com/MeanderingProgrammer/markdown.nvim/issues/35)
3232
- `LaTeX` formula evaluations are placed above rather than overlayed [#6](https://github.com/MeanderingProgrammer/markdown.nvim/issues/6)
@@ -234,6 +234,25 @@ require('render-markdown').setup({
234234

235235
- Function can also be accessed directly through `require('render-markdown').toggle()`
236236

237+
# For `vimwiki` Users
238+
239+
If you use [vimwiki](https://github.com/vimwiki/vimwiki), because it overrides the
240+
`filetype` of `markdown` files there are additional setup steps.
241+
242+
- Add `vimwiki` to the `file_types` configuration of this plugin
243+
244+
```lua
245+
require('render-markdown').setup({
246+
file_types = { 'markdown', 'vimwiki' },
247+
})
248+
```
249+
250+
- Register `markdown` as the parser for `vimwiki` files
251+
252+
```lua
253+
vim.treesitter.language.register('markdown', 'vimwiki')
254+
```
255+
237256
# Custom Handlers
238257

239258
Custom handlers allow users to integrate custom rendering for either unsupported

TROUBLESHOOTING.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The following guide goes from easy to complex operations that can help when this
44
plugin is not functioning how you expect. As such it is recommended to go in order.
55

6-
## Run healthcheck
6+
## Run checkhealth
77

88
```vim
99
:checkhealth render-markdown
@@ -31,7 +31,17 @@ the `filetype` of the current buffer and make sure it is in that list:
3131
:lua vim.print(vim.bo.filetype)
3232
```
3333

34-
## Provide debug logs
34+
## Create an Issue
35+
36+
Create an issue in this repo with the following information:
37+
38+
- Description of your problem
39+
- Operating system
40+
- Version of neovim
41+
- Terminal emulator / GUI
42+
- Debug logs, steps to generate these are below
43+
44+
### Generating debug logs
3545

3646
If all else fails hopefully the logs can provide some insight. This plugin
3747
ships with logging, however it only includes errors by default.
@@ -43,7 +53,7 @@ To help debug your issue you'll need to go through the following steps:
4353
3. Generate logs from the test file
4454
4. Provide the logs in the issue
4555

46-
### Update the log level to `debug`
56+
#### Update the log level to `debug`
4757

4858
Change the plugin configuration to:
4959

@@ -53,7 +63,7 @@ require('render-markdown').setup({
5363
})
5464
```
5565

56-
### Create a test file
66+
#### Create a test file
5767

5868
Create a new `markdown` file locally with the following content:
5969

@@ -70,13 +80,13 @@ Create a new `markdown` file locally with the following content:
7080
- [x] Checked
7181
```
7282

73-
### Generate logs from the test file
83+
#### Generate logs from the test file
7484

7585
To do this restart Neovim and open the `markdown` file from the previous step.
7686

7787
This should trigger the render function by default, then close Neovim.
7888

79-
### Provide the logs in the issue
89+
#### Provide the logs in the issue
8090

8191
Logs are written to a file typically located at: `~/.local/state/nvim/render-markdown.log`.
8292

doc/render-markdown.txt

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
*render-markdown.txt* For 0.10.0 Last change: 2024 June 10
1+
*render-markdown.txt* For 0.10.0 Last change: 2024 June 13
22

33
==============================================================================
44
Table of Contents *render-markdown-table-of-contents*
55

66
1. markdown.nvim |render-markdown-markdown.nvim|
77
2. Features |render-markdown-features|
8-
3. Known Limitations |render-markdown-known-limitations|
8+
3. Limitations |render-markdown-limitations|
99
4. Dependencies |render-markdown-dependencies|
1010
5. Install |render-markdown-install|
1111
- lazy.nvim |render-markdown-install-lazy.nvim|
1212
- packer.nvim |render-markdown-install-packer.nvim|
1313
6. Setup |render-markdown-setup|
1414
7. Commands |render-markdown-commands|
15-
8. Custom Handlers |render-markdown-custom-handlers|
15+
8. For vimwiki Users |render-markdown-for-vimwiki-users|
16+
9. Custom Handlers |render-markdown-custom-handlers|
1617
- More Complex Example|render-markdown-custom-handlers-more-complex-example|
17-
9. Purpose |render-markdown-purpose|
18-
10. Markdown Ecosystem |render-markdown-markdown-ecosystem|
18+
10. Purpose |render-markdown-purpose|
19+
11. Markdown Ecosystem |render-markdown-markdown-ecosystem|
1920
- Render in Neovim |render-markdown-markdown-ecosystem-render-in-neovim|
2021
- Render in Browser |render-markdown-markdown-ecosystem-render-in-browser|
2122
- Orthogonal |render-markdown-markdown-ecosystem-orthogonal|
@@ -54,7 +55,7 @@ Plugin to improve viewing Markdown files in Neovim
5455

5556

5657
==============================================================================
57-
3. Known Limitations *render-markdown-known-limitations*
58+
3. Limitations *render-markdown-limitations*
5859

5960
- Text that extends beyond available space will overwrite content #35 <https://github.com/MeanderingProgrammer/markdown.nvim/issues/35>
6061
- `LaTeX` formula evaluations are placed above rather than overlayed #6 <https://github.com/MeanderingProgrammer/markdown.nvim/issues/6>
@@ -274,7 +275,28 @@ modified by the user.
274275

275276

276277
==============================================================================
277-
8. Custom Handlers *render-markdown-custom-handlers*
278+
8. For vimwiki Users *render-markdown-for-vimwiki-users*
279+
280+
If you use vimwiki <https://github.com/vimwiki/vimwiki>, because it overrides
281+
the `filetype` of `markdown` files there are additional setup steps.
282+
283+
- Add `vimwiki` to the `file_types` configuration of this plugin
284+
285+
>lua
286+
require('render-markdown').setup({
287+
file_types = { 'markdown', 'vimwiki' },
288+
})
289+
<
290+
291+
- Register `markdown` as the parser for `vimwiki` files
292+
293+
>lua
294+
vim.treesitter.language.register('markdown', 'vimwiki')
295+
<
296+
297+
298+
==============================================================================
299+
9. Custom Handlers *render-markdown-custom-handlers*
278300

279301
Custom handlers allow users to integrate custom rendering for either
280302
unsupported languages or to override the native implementations. This can also
@@ -344,7 +366,7 @@ Lets say for `python` we want to highlight lines with function definitions.
344366

345367

346368
==============================================================================
347-
9. Purpose *render-markdown-purpose*
369+
10. Purpose *render-markdown-purpose*
348370

349371
There are many existing markdown rendering plugins in the Neovim ecosystem.
350372
However, most of these rely on syncing a separate browser window with the
@@ -361,7 +383,7 @@ this plugin.
361383

362384

363385
==============================================================================
364-
10. Markdown Ecosystem *render-markdown-markdown-ecosystem*
386+
11. Markdown Ecosystem *render-markdown-markdown-ecosystem*
365387

366388
There are many `markdown` plugins that specialize in different aspects of
367389
interacting with `markdown` files. This plugin specializes in rendering the

0 commit comments

Comments
 (0)