aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-04-12 17:03:45 +0800
committerGitHub <noreply@github.com>2024-04-12 17:03:45 +0800
commitda3059b00f96979691a420835f47d53fbef8db05 (patch)
tree0afbaed5d21843a1c5d3639bb01c41cba40f0fc3
parent5aee5879703eeaf65896059b70b41988d3af6dca (diff)
downloadrneovim-da3059b00f96979691a420835f47d53fbef8db05.tar.gz
rneovim-da3059b00f96979691a420835f47d53fbef8db05.tar.bz2
rneovim-da3059b00f96979691a420835f47d53fbef8db05.zip
vim-patch:9.1.0290: filetype: xilinx files are not recognized (#28295)
Problem: filetype: xilinx files are not recognized Solution: Add a few xilinx specific file patterns, inspect lpr files for being xml/pascal (Wu, Zhenyu) closes: vim/vim#14454 https://github.com/vim/vim/commit/614691ceefb2b2470cd9097013ffc140f81d6a71 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
-rw-r--r--runtime/lua/vim/filetype.lua9
-rw-r--r--test/old/testdir/test_filetype.vim4
2 files changed, 10 insertions, 3 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index 06761fefe9..d7d34b625d 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -582,6 +582,9 @@ local extension = {
['sublime-settings'] = 'json',
['sublime-workspace'] = 'json',
['json-patch'] = 'json',
+ bd = 'json',
+ bda = 'json',
+ xci = 'json',
json5 = 'json5',
jsonc = 'jsonc',
jsonl = 'jsonl',
@@ -770,7 +773,7 @@ local extension = {
papp = 'papp',
pxml = 'papp',
pas = 'pascal',
- lpr = 'pascal',
+ lpr = detect_line1('<%?xml', 'xml', 'pascal'),
dpr = 'pascal',
pbtxt = 'pbtxt',
g = 'pccts',
@@ -1156,6 +1159,10 @@ local extension = {
csproj = 'xml',
wpl = 'xml',
xmi = 'xml',
+ xpr = 'xml',
+ xpfm = 'xml',
+ spfm = 'xml',
+ bxml = 'xml',
xpm = detect_line1('XPM2', 'xpm2', 'xpm'),
xpm2 = 'xpm2',
xqy = 'xquery',
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
index 5d6c7d2874..2cdcd72a8a 100644
--- a/test/old/testdir/test_filetype.vim
+++ b/test/old/testdir/test_filetype.vim
@@ -352,7 +352,7 @@ func s:GetFilenameChecks() abort
\ 'jq': ['file.jq'],
\ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
\ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'],
- \ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', '.prettierrc', '.firebaserc', '.stylelintrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace'],
+ \ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', '.prettierrc', '.firebaserc', '.stylelintrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace', 'file.bd', 'file.bda', 'file.xci'],
\ 'json5': ['file.json5'],
\ 'jsonc': ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json', '.luaurc'],
\ 'jsonl': ['file.jsonl'],
@@ -816,7 +816,7 @@ func s:GetFilenameChecks() abort
\ 'xinetd': ['/etc/xinetd.conf', '/etc/xinetd.d/file', 'any/etc/xinetd.conf', 'any/etc/xinetd.d/file'],
\ 'xkb': ['/usr/share/X11/xkb/compat/pc', '/usr/share/X11/xkb/geometry/pc', '/usr/share/X11/xkb/keycodes/evdev', '/usr/share/X11/xkb/symbols/pc', '/usr/share/X11/xkb/types/pc'],
\ 'xmath': ['file.msc', 'file.msf'],
- \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.fsproj', 'file.fsproj.user', 'file.vbproj', 'file.vbproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu', 'file.atom', 'file.rss', 'file.cdxml', 'file.psc1', 'file.mpd', 'fonts.conf'],
+ \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.fsproj', 'file.fsproj.user', 'file.vbproj', 'file.vbproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu', 'file.atom', 'file.rss', 'file.cdxml', 'file.psc1', 'file.mpd', 'fonts.conf', 'file.xpr', 'file.xpfm', 'file.spfm', 'file.bxml'],
\ 'xmodmap': ['anyXmodmap', 'Xmodmap', 'some-Xmodmap', 'some-xmodmap', 'some-xmodmap-file', 'xmodmap', 'xmodmap-file'],
\ 'xpm': ['file.xpm'],
\ 'xpm2': ['file.xpm2'],