]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0860: filetype: xilinx design constraint files are not recognized v9.2.0860
authorWu, Zhenyu <wuzhenyu@ustc.edu>
Mon, 27 Jul 2026 18:55:11 +0000 (18:55 +0000)
committerChristian Brabandt <cb@256bit.org>
Mon, 27 Jul 2026 19:00:29 +0000 (19:00 +0000)
Problem:  filetype: xilinx design constraint files are not recognized
Solution: Detect *.xdc files as tcl filetype (Wu, Zhenyu)

Reference:
https://docs.amd.com/r/en-US/ug903-vivado-using-constraints/About-XDC-Constraints

closes: #20853

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/dist/ft.vim
src/testdir/test_filetype.vim
src/version.c

index 5b4264aeb4f67523e460723063094613e4ed947c..7ed41785f9bdc3359d5f706f9a7bce45ba16d07c 100644 (file)
@@ -3,7 +3,7 @@ vim9script
 # Vim functions for file type detection
 #
 # Maintainer:          The Vim Project <https://github.com/vim/vim>
-# Last Change:         2026 Jul 24
+# Last Change:         2026 Jul 27
 # Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 # These functions are moved here from runtime/filetype.vim to make startup
@@ -3166,6 +3166,8 @@ const ft_from_ext = {
   "tiltfile": "tiltfile",
   # Ghostty
   "ghostty": "ghostty",
+  # Xilinx Design Constraint file
+  "xdc": "tcl",
 }
 # Key: file name (the final path component, excluding the drive and root)
 # Value: filetype
index 075430ae54c462359ec9f550471c56cae5eb3019..e98f308afba024d880b0f2363205c31a7762b15d 100644 (file)
@@ -891,7 +891,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     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', 'vivado.jou', 'vivado.log'],
+          '.xsctcmdhistory', '.xsdbcmdhistory', 'vivado.jou', 'vivado.log', 'file.xdc'],
     teal: ['file.tl'],
     templ: ['file.templ'],
     template: ['file.tmpl'],
index 01b586bebf71d3f5b015c8f1e3a6543062a3998e..131299e89f0c6c02060959a0c03d9223a00ba677 100644 (file)
@@ -758,6 +758,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    860,
 /**/
     859,
 /**/