From 07b91321dee1a120c8b890d9b6fd7fff804f8487 Mon Sep 17 00:00:00 2001 From: Brahmajit Das Date: Sun, 29 Dec 2024 14:05:36 +0530 Subject: read header file (h) as c file Signed-off-by: Brahmajit Das --- plugin/filetypes.lua | 15 +++++++++++---- 1 file 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 -- cgit v1.2.3