diff --git a/init.fnl b/init.fnl index 54faf91..2e07c1b 100644 --- a/init.fnl +++ b/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)