summaryrefslogtreecommitdiff
path: root/.config/nvim/after/ftdetect
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/after/ftdetect')
-rw-r--r--.config/nvim/after/ftdetect/c.lua6
-rw-r--r--.config/nvim/after/ftdetect/c.vim1
-rw-r--r--.config/nvim/after/ftdetect/nroff.lua6
-rw-r--r--.config/nvim/after/ftdetect/nroff.vim1
4 files changed, 12 insertions, 2 deletions
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