Restore highlighting in netrw previews
Keep the loaded-buffer lifecycle protection while allowing Tree-sitter or Vim syntax highlighting; diagnostics and indent guides remain suppressed.
This commit is contained in:
parent
52f86a2ef9
commit
306b1c188c
3 changed files with 6 additions and 8 deletions
|
|
@ -502,9 +502,7 @@ local function show_native_preview(state, entry)
|
|||
vim.bo[preview_buf].bufhidden = 'hide'
|
||||
vim.bo[preview_buf].buflisted = preview_buffers[preview_buf].buflisted
|
||||
vim.b[preview_buf].netrw_live_preview_buffer = true
|
||||
pcall(vim.treesitter.stop, preview_buf)
|
||||
vim.diagnostic.enable(false, { bufnr = preview_buf })
|
||||
vim.bo[preview_buf].syntax = ''
|
||||
set_indent_guides(preview_buf, false)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue