Skip to content

Commit 50de4d1

Browse files
committed
feat(align): adds mini.trailspace
1 parent 1a6cba7 commit 50de4d1

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

lazy-lock.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"mini.ai": { "branch": "main", "commit": "bfb26d9072670c3aaefab0f53024b2f3729c8083" },
1616
"mini.icons": { "branch": "main", "commit": "ff2e4f1d29f659cc2bad0f9256f2f6195c6b2428" },
1717
"mini.surround": { "branch": "main", "commit": "88c52297ed3e69ecf9f8652837888ecc727a28ee" },
18+
"mini.trailspace": { "branch": "main", "commit": "f8083ca969e1b2098480c10f3c3c4d2ce3586680" },
1819
"neogit": { "branch": "master", "commit": "d8bf9102692250193b855acd9025a826f1af2729" },
1920
"nvim-ansible": { "branch": "main", "commit": "bba61168b7aef735e7f950fdfece5ef6c388eacf" },
2021
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
-- Highlight and remove trailspace.
2+
-- See https://github.com/nvim-mini/mini.trailspace'.
3+
4+
---@type LazyPluginSpec[]
5+
return {
6+
{
7+
"echasnovski/mini.trailspace",
8+
event = { "BufReadPre", "BufNewFile" },
9+
opts = {},
10+
init = function()
11+
vim.api.nvim_create_autocmd("BufWritePre", {
12+
group = require("peter.util.autocmds").augroup("TrimWhitespace"),
13+
callback = function()
14+
require("mini.trailspace").trim()
15+
end,
16+
})
17+
end,
18+
},
19+
}

0 commit comments

Comments
 (0)