mirror of
https://github.com/vim/vim
synced 2025-07-15 16:51:57 +00:00
patch 9.1.0769: filetype: MLIR files are not recognized
Problem: filetype: MLIR files are not recognized Solution: Detect '*.mlir' files as mlir filetype, include a mlir filetype plugin (Wu, Zhenyu) closes: #15826 Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
ded59139fd
commit
347d43bd33
@ -576,6 +576,9 @@ au BufNewFile,BufRead lynx.cfg setf lynx
|
||||
" LyRiCs
|
||||
au BufNewFile,BufRead *.lrc setf lyrics
|
||||
|
||||
" MLIR
|
||||
au BufNewFile,BufRead *.mlir setf mlir
|
||||
|
||||
" Modula-3 configuration language (must be before *.cfg and *makefile)
|
||||
au BufNewFile,BufRead *.quake,cm3.cfg setf m3quake
|
||||
au BufNewFile,BufRead m3makefile,m3overrides setf m3build
|
||||
|
10
runtime/ftplugin/mlir.vim
Normal file
10
runtime/ftplugin/mlir.vim
Normal file
@ -0,0 +1,10 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: MLIR
|
||||
|
||||
if exists("b:did_ftplugin") | finish | endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
setl comments=:///,://
|
||||
setl commentstring=//\ %s
|
||||
|
||||
let b:undo_ftplugin = "setl commentstring< comments<"
|
@ -479,6 +479,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
||||
mgp: ['file.mgp'],
|
||||
mib: ['file.mib', 'file.my'],
|
||||
mix: ['file.mix', 'file.mixal'],
|
||||
mlir: ['file.mlir'],
|
||||
mma: ['file.nb', 'file.wl'],
|
||||
mmp: ['file.mmp'],
|
||||
modconf: ['/etc/modules.conf', '/etc/modules', '/etc/conf.modules', '/etc/modprobe.file', 'any/etc/conf.modules', 'any/etc/modprobe.file', 'any/etc/modules', 'any/etc/modules.conf'],
|
||||
|
@ -704,6 +704,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
769,
|
||||
/**/
|
||||
768,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user