Vanquish ftdetect, long live vim.filetype.add()
This commit is contained in:
parent
4499dee3d6
commit
48ad466bd3
@ -1 +0,0 @@
|
||||
autocmd BufNewFile,BufReadPost CMakeCache.txt set filetype=cmakecache
|
@ -1,2 +0,0 @@
|
||||
" Force *.def to C++ filetype for LLVM
|
||||
au BufNewFile,BufReadPost *.def set filetype=cpp
|
@ -1,3 +0,0 @@
|
||||
" Set .ll files to LLVM IR filetype
|
||||
au BufNewFile,BufReadPost *.ll set filetype=llvm
|
||||
au BufNewFile,BufReadPost *.test set filetype=llvm
|
@ -1,3 +0,0 @@
|
||||
" Force *.md to markdown filetype
|
||||
au BufNewFile,BufReadPost *.md set filetype=markdown
|
||||
au BufNewFile,BufReadPost *.ronn set filetype=markdown
|
@ -1,2 +0,0 @@
|
||||
" Force *.cl to OpenCL C filetype
|
||||
au BufNewFile,BufReadPost *.cl set filetype=opencl
|
@ -1,3 +0,0 @@
|
||||
" Force lit.cfg/lit.local.cfg to be Python
|
||||
au BufNewFile,BufReadPost lit.cfg set filetype=python
|
||||
au BufNewFile,BufReadPost lit.local.cfg set filetype=python
|
@ -1 +0,0 @@
|
||||
autocmd BufNewFile,BufReadPost */requirements.txt set filetype=requirements
|
@ -1,2 +0,0 @@
|
||||
" Force *.td to tablegen filetype
|
||||
au BufNewFile,BufReadPost *.td set filetype=tablegen
|
@ -1,3 +0,0 @@
|
||||
" Force .enter/.exit to be zsh
|
||||
au BufNewFile,BufReadPost .enter set filetype=zsh
|
||||
au BufNewFile,BufReadPost .exit set filetype=zsh
|
19
plugin/filetype.lua
Normal file
19
plugin/filetype.lua
Normal file
@ -0,0 +1,19 @@
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
cl = 'opencl',
|
||||
def = 'cpp',
|
||||
ll = 'llvm',
|
||||
md = 'markdown',
|
||||
ronn = 'markdown',
|
||||
td = 'tablegen',
|
||||
test = 'llvm',
|
||||
},
|
||||
filename = {
|
||||
['.enter'] = 'zsh',
|
||||
['.exit'] = 'zsh',
|
||||
['CMakeCache.txt'] = 'cmakecache',
|
||||
['lit.cfg'] = 'python',
|
||||
['lit.local.cfg'] = 'python',
|
||||
['requirements.txt'] = 'requirements',
|
||||
},
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user