diff options
| author | listout <listout@protonmail.com> | 2022-08-01 19:40:05 +0000 |
|---|---|---|
| committer | listout <listout@protonmail.com> | 2022-09-01 10:56:25 +0000 |
| commit | 18edf9861d1b38591b51b42465b224d77736db04 (patch) | |
| tree | d3c47be47a0bb532444556f307a33465f9cf79fe /lua/core/settings.lua | |
| parent | b5d497da359e7d5224e0462bd5b55c3d1caefd26 (diff) | |
| download | nvim-18edf9861d1b38591b51b42465b224d77736db04.tar.gz | |
nvim: moving init to lua
Signed-off-by: listout <listout@protonmail.com>
Diffstat (limited to '')
| -rw-r--r-- | lua/core/settings.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lua/core/settings.lua b/lua/core/settings.lua new file mode 100644 index 0000000..20858b1 --- /dev/null +++ b/lua/core/settings.lua @@ -0,0 +1,19 @@ +-- +-- Mainly filetype settings +-- + +local cmd = vim.cmd +local u = require('core/utils') + +u.create_augroup({ + { 'BufRead,BufNewFile', '/tmp/nail-*', 'setlocal', 'ft=mail' }, + { 'BufRead,BufNewFile', '*s-nail-*', 'setlocal', 'ft=mail' }, + { 'BufRead,BufNewFile', '*mutt-*', 'setlocal', 'ft=mail' }, + { 'BufRead', '/tmp/*mutt-*', 'setlocal', 'tw=72' }, +}, 'ftmail') + +-- Autoremove unwanted whitespaces +cmd [[ + au BufWritePre * %s/\s\+$//e + au BufRead,BufNewFile *mutt-* setfiletype mail +]] |
