Skip to content

Commit 17da1ad

Browse files
zeertzjqFreed-Wu
andauthored
vim-patch:9.1.1730: filetype: vivado journal/log files are not recognized (neovim#35613)
Problem: filetype: vivado journal/log files are not recognized Solution: Detect vivado*.{jou,log} as tcl filetype (Wu Zhenyu). closes: vim/vim#18191 vim/vim@9a6cafd Also fix missing anchor in the pattern from the port of patch 9.1.1602. Co-authored-by: Wu, Zhenyu <[email protected]>
1 parent bf5f7c1 commit 17da1ad

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

runtime/lua/vim/filetype.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2348,7 +2348,7 @@ local pattern = {
23482348
},
23492349
['require'] = {
23502350
['%-requirements%.txt$'] = 'requirements',
2351-
['requirements%-.*%.txt$'] = 'requirements',
2351+
['^requirements%-.*%.txt$'] = 'requirements',
23522352
['^requirements/.*%.txt$'] = 'requirements',
23532353
['^requires/.*%.txt$'] = 'requirements',
23542354
},
@@ -2530,6 +2530,8 @@ local pattern = {
25302530
[',v$'] = 'rcs',
25312531
['^svn%-commit.*%.tmp$'] = 'svn',
25322532
['%.swift%.gyb$'] = 'swiftgyb',
2533+
['^vivado.*%.jou$'] = 'tcl',
2534+
['^vivado.*%.log$'] = 'tcl',
25332535
['termcap'] = starsetf(function(_path, _bufnr)
25342536
return require('vim.filetype.detect').printcap('term')
25352537
end),

test/old/testdir/test_filetype.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,8 @@ func s:GetFilenameChecks() abort
820820
\ 'tal': ['file.tal'],
821821
\ 'taskdata': ['pending.data', 'completed.data', 'undo.data'],
822822
\ 'taskedit': ['file.task'],
823-
\ 'tcl': ['file.tcl', 'file.tm', 'file.tk', 'file.itcl', 'file.itk', 'file.jacl', '.tclshrc', 'tclsh.rc', '.wishrc', '.tclsh-history', '.xsctcmdhistory', '.xsdbcmdhistory'],
823+
\ 'tcl': ['file.tcl', 'file.tm', 'file.tk', 'file.itcl', 'file.itk', 'file.jacl', '.tclshrc', 'tclsh.rc', '.wishrc', '.tclsh-history',
824+
\ '.xsctcmdhistory', '.xsdbcmdhistory', 'vivado.jou', 'vivado.log'],
824825
\ 'teal': ['file.tl'],
825826
\ 'templ': ['file.templ'],
826827
\ 'template': ['file.tmpl'],

0 commit comments

Comments
 (0)