diff options
author | Brahmajit Das <brahmajit.xyz@gmail.com> | 2024-12-29 14:05:36 +0530 |
---|---|---|
committer | Brahmajit Das <brahmajit.xyz@gmail.com> | 2024-12-29 14:05:36 +0530 |
commit | 07b91321dee1a120c8b890d9b6fd7fff804f8487 (patch) | |
tree | d9dd399af37dcfeb37f2d9d6647e7816185ec7d8 | |
parent | 5b854dea2e40031f1e7297cdfe3bc412336ef498 (diff) |
read header file (h) as c file
Signed-off-by: Brahmajit Das <brahmajit.xyz@gmail.com>
-rw-r--r-- | plugin/filetypes.lua | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/plugin/filetypes.lua b/plugin/filetypes.lua index 1725599..438eeae 100644 --- a/plugin/filetypes.lua +++ b/plugin/filetypes.lua @@ -6,10 +6,10 @@ local cmd = vim.cmd local u = require('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' }, + { '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 @@ -17,5 +17,12 @@ cmd [[ au BufRead,BufNewFile *mutt-* setfiletype mail ]] +vim.filetype.add { + extension = { + h = "c", + scheme = "scheme", + }, +} + -- Add in the following like to auto remove empty lines -- au BufWritePre * %s/\s\+$//e |