You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: add option to restart treesitter highlighter to clear invalid state
## Details
Issue: #488
Adds top level `restart_highlighter` option that when set to `true` will
restart the neovim highlighter by calling `vim.treesitter.stop()` and
`vim.treesitter.start()`.
This will happen once only, after this plugin attaches to its first
buffer for the first time, after modifying treesitter queries. Currently
this plugin may modify `injections` to insert markdown and `highlights`
to disable specific patterns.
In order for this to be a problem the following all need to be true for the user:
- They are using a version of neovim >= `0.11.0`
- They are lazy loading this plugin using `lazy.nvim` based on filetype.
- Their default `conceallevel` is > 0.
- They are using the `main` branch of `nvim-treesitter` and their custom
`FileType` autocommand to enable highlighting does not handle
duplicate events for the same buffer. The `master` branch handles
duplicate events by restarting the highlighter already.
When all of these are true what can sometimes happen is any
`conceal_lines` directives in the highlighter will be activated before
this plugin has a chance to disable them. By default this is the case
for the delimiters around fenced code blocks. These concealed lines will
only reappear after a modification is made to the buffer.
- add scope_highlight to wiki config [ca86b59](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/ca86b5941a56b04ac140837ee7a366cf3fa5cd88)
12
+
- add cell_offset function to pipe_table configuration [e5c3c50](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/e5c3c500d66e9aaf04c116cdfdb0b040d56a1521)
0 commit comments