Remove message from whitespace removal command
This commit is contained in:
parent
d20db3486e
commit
380bb03ffd
6
init.fnl
6
init.fnl
@ -61,10 +61,8 @@
|
||||
;; Remove trailing whitespace
|
||||
(fn remove-trailing-whitespace []
|
||||
"Remove trailing whitespace from the whole file."
|
||||
(let [res (pcall vim.cmd "%s/ \\+$//")]
|
||||
(vim.cmd.nohlsearch)
|
||||
(when (not res)
|
||||
(print "File is clean"))))
|
||||
(pcall vim.cmd "%s/ \\+$//")
|
||||
(vim.cmd.nohlsearch))
|
||||
(vim.api.nvim_create_user_command :RemoveTrailingWhitespace
|
||||
remove-trailing-whitespace {})
|
||||
(hook! [ :BufWritePre ] "*" remove-trailing-whitespace)
|
||||
|
Reference in New Issue
Block a user