Commit 24aacee
committed
feat: better support for reloading with lazy.nvim
## Details
The goal is being able to run `:Lazy reload render-markdown.nvim` in
order to quickly check changes to configuration as well as code.
After some recent changes `extmarks` can sometimes get stuck forever as
the cache gets reloaded but the buffer is never fully cleared.
To improve this 2 minor changes were made:
- use `vim.api.nvim_list_bufs()` when clearing the namespace instead of
the keys in `M.cache`, that way we capture previously cached buffers
- in addition to hiding all the `extmarks` when clearing, add a call to
`vim.api.nvim_buf_clear_namespace` to make sure no longer visible
marks are also removed1 parent 0944ba0 commit 24aacee
File tree
3 files changed
+4
-3
lines changed- doc
- lua/render-markdown
- core
3 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments