dotfiles/nvim/lua/trim_config.lua

14 lines
332 B
Lua

local hastrim, trim = pcall(require, "trim")
if not hastrim then
return
end
trim.setup({
ft_blocklist= {"markdown", "vimwiki"},
patterns = {
[[%s/\s\+$//e]], -- remove unwanted spaces
[[%s/\($\n\s*\)\+\%$//]], -- trim last line
[[%s/\%^\n\+//]], -- trim first line
},
})