Update init.lua

feat: remove white space on save files
This commit is contained in:
Waldir Borba Junior 2022-06-06 18:08:19 -03:00 committed by GitHub
parent 7f90ace239
commit 46e44234a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -23,5 +23,11 @@ autocmd('BufEnter', {
command = 'set fo-=c fo-=r fo-=o'
})
-- Remove whitespace on save
autocmd('BufWritePre', {
pattern = '*',
command = ":%s/\\s\\+$//e"
})
-- load statusline
vim.opt.statusline = "%!v:lua.require'ui.statusline'.run()"