deprecated: the upstream problem has been fixed: neovim/neovim#14977.
Save you from both:
- the tree-sitter bug on folding, see: nvim-treesitter/nvim-treesitter#2439
- the "how to clear the last highlight qq" problem
NeoClear.lua.mov
- Only one command, since this is a temporary patch.
- Can be run on "un-saved" buffer without error(as
silent!
)- but you need to leave your buffer unmodified(save or undo, like the DEMO) before running
NeoClear
to solve the first problem.
- but you need to leave your buffer unmodified(save or undo, like the DEMO) before running
- Leave window-view intact after run.
NeoClear
example
vim.keymap.set('n', '<C-C>', function()
vim.cmd('NeoClear')
end, { noremap = true, silent = true, nowait = true })