From 511efe89ed084bc922ae142d32e08427859198f4 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 10 Jun 2024 23:07:28 +0200 Subject: nvim: Completely rewrite my configuration --- .config/nvim/after/ftdetect/c.lua | 6 ++++++ .config/nvim/after/ftdetect/c.vim | 1 - .config/nvim/after/ftdetect/nroff.lua | 6 ++++++ .config/nvim/after/ftdetect/nroff.vim | 1 - 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .config/nvim/after/ftdetect/c.lua delete mode 100644 .config/nvim/after/ftdetect/c.vim create mode 100644 .config/nvim/after/ftdetect/nroff.lua delete mode 100644 .config/nvim/after/ftdetect/nroff.vim (limited to '.config/nvim/after/ftdetect') diff --git a/.config/nvim/after/ftdetect/c.lua b/.config/nvim/after/ftdetect/c.lua new file mode 100644 index 0000000..a518a11 --- /dev/null +++ b/.config/nvim/after/ftdetect/c.lua @@ -0,0 +1,6 @@ +vim.api.nvim_create_autocmd({'BufRead', 'BufNewFile'}, { + pattern = '*.[ch]', + callback = function() + vim.bo.filetype = 'c' + end, +}) diff --git a/.config/nvim/after/ftdetect/c.vim b/.config/nvim/after/ftdetect/c.vim deleted file mode 100644 index 609b487..0000000 --- a/.config/nvim/after/ftdetect/c.vim +++ /dev/null @@ -1 +0,0 @@ -au BufRead,BufNewFile *.[ch] set ft=c diff --git a/.config/nvim/after/ftdetect/nroff.lua b/.config/nvim/after/ftdetect/nroff.lua new file mode 100644 index 0000000..592f620 --- /dev/null +++ b/.config/nvim/after/ftdetect/nroff.lua @@ -0,0 +1,6 @@ +vim.api.nvim_create_autocmd({'BufRead', 'BufNewFile'}, { + pattern = '*.[1-7]', + callback = function() + vim.bo.filetype = 'nroff' + end, +}) diff --git a/.config/nvim/after/ftdetect/nroff.vim b/.config/nvim/after/ftdetect/nroff.vim deleted file mode 100644 index f1c3d67..0000000 --- a/.config/nvim/after/ftdetect/nroff.vim +++ /dev/null @@ -1 +0,0 @@ -au BufRead,BufNewFile *.[1-7] setf nroff -- cgit v1.2.3