feat(nvim): add user cmd to strip trailing whitespace
This commit is contained in:
parent
007c26e3aa
commit
5653be9041
@ -13,7 +13,7 @@ M.setup = function()
|
||||
-- NOTE: Remove trailing whitespace on save
|
||||
vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
group = augroup,
|
||||
command = "%s/\\s\\+$//e",
|
||||
command = "StripTrailSpace",
|
||||
})
|
||||
|
||||
|
||||
|
6
dots/.config/nvim/lua/core/cmds.lua
Normal file
6
dots/.config/nvim/lua/core/cmds.lua
Normal file
@ -0,0 +1,6 @@
|
||||
local M = {}
|
||||
M.setup = function()
|
||||
vim.api.nvim_create_user_command("StripTrailSpace", "%s/\\s\\+$//e", {})
|
||||
end
|
||||
|
||||
return M
|
@ -2,6 +2,7 @@ require("core.disabled").setup()
|
||||
require("core.options").setup()
|
||||
require("core.mappings").setup()
|
||||
require("core.globals").setup()
|
||||
require("core.cmds").setup()
|
||||
require("core.autocmds").setup()
|
||||
require("core.filetypes").setup()
|
||||
require("core.lsp").setup()
|
||||
|
Loading…
Reference in New Issue
Block a user