echasnovski / mini.nvim

Library of 40+ independent Lua modules improving overall Neovim (version 0.8 and higher) experience with minimal effort
MIT License
5.19k stars 187 forks source link

Add filetypes to exclude in mini.trailspace #1035

Closed ConfusedAlex closed 3 months ago

ConfusedAlex commented 3 months ago

Contributing guidelines

Module(s)

trailspace

Description

It would be really nice if I could configure filetypes like markdown, which use trailing whitespaces, to be excluded from this plugin.

pkazmier commented 3 months ago

You can disable it based on filetypes. See the disabling recipes in the documentation. I’m on a mobile device or I’d have shown an example as well.

echasnovski commented 3 months ago

As was already said, disabling in buffer can be done by setting vim.b.minitrailspace_disable = true. For 'mini.trailspace' in particular this might also require calling unhighlight(). See also this recipe for automated disabling in a single buffer.

Related to #535, #423, #167, #85, #52.