neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 17da1ad8f44fe6b02969233b142d5bb2da98dd85
parent bf5f7c1591d00d0253e8de25381a14bfaf4b4743
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Thu,  4 Sep 2025 07:16:47 +0800

vim-patch:9.1.1730: filetype: vivado journal/log files are not recognized (#35613)

Problem:  filetype: vivado journal/log files are not recognized
Solution: Detect vivado*.{jou,log} as tcl filetype (Wu Zhenyu).

closes: vim/vim#18191

https://github.com/vim/vim/commit/9a6cafdc1ca51653cc37ab896a27db70d6cb1b15

Also fix missing anchor in the pattern from the port of patch 9.1.1602.

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Diffstat:
Mruntime/lua/vim/filetype.lua | 4+++-
Mtest/old/testdir/test_filetype.vim | 3++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua @@ -2348,7 +2348,7 @@ local pattern = { }, ['require'] = { ['%-requirements%.txt$'] = 'requirements', - ['requirements%-.*%.txt$'] = 'requirements', + ['^requirements%-.*%.txt$'] = 'requirements', ['^requirements/.*%.txt$'] = 'requirements', ['^requires/.*%.txt$'] = 'requirements', }, @@ -2530,6 +2530,8 @@ local pattern = { [',v$'] = 'rcs', ['^svn%-commit.*%.tmp$'] = 'svn', ['%.swift%.gyb$'] = 'swiftgyb', + ['^vivado.*%.jou$'] = 'tcl', + ['^vivado.*%.log$'] = 'tcl', ['termcap'] = starsetf(function(_path, _bufnr) return require('vim.filetype.detect').printcap('term') end), diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim @@ -820,7 +820,8 @@ func s:GetFilenameChecks() abort \ 'tal': ['file.tal'], \ 'taskdata': ['pending.data', 'completed.data', 'undo.data'], \ 'taskedit': ['file.task'], - \ 'tcl': ['file.tcl', 'file.tm', 'file.tk', 'file.itcl', 'file.itk', 'file.jacl', '.tclshrc', 'tclsh.rc', '.wishrc', '.tclsh-history', '.xsctcmdhistory', '.xsdbcmdhistory'], + \ 'tcl': ['file.tcl', 'file.tm', 'file.tk', 'file.itcl', 'file.itk', 'file.jacl', '.tclshrc', 'tclsh.rc', '.wishrc', '.tclsh-history', + \ '.xsctcmdhistory', '.xsdbcmdhistory', 'vivado.jou', 'vivado.log'], \ 'teal': ['file.tl'], \ 'templ': ['file.templ'], \ 'template': ['file.tmpl'],