home: vim: ftdetect: switch to lua
It looks like `vim.filetype.add` is smarter about "local.am". For some reason opening an *empty* Tiger file results in a backtrace...
This commit is contained in:
parent
f3e888dadc
commit
527a85bf11
6
home/vim/ftdetect/automake.lua
Normal file
6
home/vim/ftdetect/automake.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
-- Use Automake filetype for `local.am` files, explicit `set` to force override
|
||||
vim.filetype.add({
|
||||
filename = {
|
||||
["local.am"] = "automake",
|
||||
},
|
||||
})
|
|
@ -1,2 +0,0 @@
|
|||
" Use Automake filetype for `local.am` files, explicit `set` to force override
|
||||
au BufNewFile,BufRead local.am set filetype=automake
|
6
home/vim/ftdetect/direnv.lua
Normal file
6
home/vim/ftdetect/direnv.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
-- Use bash filetype for `.envrc` files
|
||||
vim.filetype.add({
|
||||
filename = {
|
||||
[".envrc"] = "bash",
|
||||
},
|
||||
})
|
|
@ -1,2 +0,0 @@
|
|||
" Use bash filetype for `.envrc` files
|
||||
au BufNewFile,BufRead .envrc setfiletype bash
|
7
home/vim/ftdetect/tiger.lua
Normal file
7
home/vim/ftdetect/tiger.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
-- Use Tiger filetype for programs and header files
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
tig = "tiger",
|
||||
tih = "tiger",
|
||||
},
|
||||
})
|
|
@ -1,3 +0,0 @@
|
|||
" Use Tiger filetype for programs and header files
|
||||
au BufNewFile,BufRead *.tig setfiletype tiger
|
||||
au BufNewFile,BufRead *.tih setfiletype tiger
|
6
home/vim/ftdetect/tikz.lua
Normal file
6
home/vim/ftdetect/tikz.lua
Normal file
|
@ -0,0 +1,6 @@
|
|||
-- Use LaTeX filetype for TikZ files
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
tikz = "tex",
|
||||
},
|
||||
})
|
|
@ -1,2 +0,0 @@
|
|||
" Use LaTeX filetype for TikZ files
|
||||
au BufNewFile,BufRead *.tikz setfiletype tex
|
Loading…
Reference in a new issue