summaryrefslogtreecommitdiff
path: root/.config/nvim/after/ftdetect
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-10 23:07:28 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-06-10 23:07:28 +0200
commit511efe89ed084bc922ae142d32e08427859198f4 (patch)
treefef9294b6056b6cf972ea5e689f70da8184fafae /.config/nvim/after/ftdetect
parent64e2e90abdca04743558e3baf42a6b714b440bd0 (diff)
nvim: Completely rewrite my configuration
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