diff options
author | Wu, Zhenyu <wuzhenyu@ustc.edu> | 2024-10-08 21:58:35 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-10-08 21:58:35 +0200 |
commit | 347d43bd33519ab537f77d1a8fa8ab8f9196bcb9 (patch) | |
tree | 9d78eb5d9f014aa1f572df778cba23c9f5aad257 | |
parent | ded59139fde2ba509abbe97f2f23b54080ed59f2 (diff) |
patch 9.1.0769: filetype: MLIR files are not recognizedv9.1.0769
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>
-rw-r--r-- | runtime/filetype.vim | 3 | ||||
-rw-r--r-- | runtime/ftplugin/mlir.vim | 10 | ||||
-rw-r--r-- | src/testdir/test_filetype.vim | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 16 insertions, 0 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 7f39625216..4b5577acb8 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -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 diff --git a/runtime/ftplugin/mlir.vim b/runtime/ftplugin/mlir.vim new file mode 100644 index 0000000000..c6a9dc341f --- /dev/null +++ b/runtime/ftplugin/mlir.vim @@ -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<" diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index a780002ba4..bd79fbb782 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -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'], diff --git a/src/version.c b/src/version.c index bff689e653..b87fc78705 100644 --- a/src/version.c +++ b/src/version.c @@ -705,6 +705,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 769, +/**/ 768, /**/ 767, |