]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.2062: filetype: djot files are not recognized v9.1.2062
authorHoang Nguyen <folliekazetani@protonmail.com>
Tue, 6 Jan 2026 15:00:15 +0000 (15:00 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 6 Jan 2026 15:00:15 +0000 (15:00 +0000)
Problem:  filetype: djot files are not recognized
Solution: Detect *.dj and *.djot files as djot filetype
          (Hoang Nguyen).

Reference:
- https://djot.net/

closes: #19105

Signed-off-by: Hoang Nguyen <folliekazetani@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/dist/ft.vim
src/testdir/test_filetype.vim
src/version.c

index 0f28455b3257284f042403a7945464eeaa57a813..20c8d2ec89322286c7982ad36e33698947ac2282 100644 (file)
@@ -1917,6 +1917,9 @@ const ft_from_ext = {
   # Diff files
   "diff": "diff",
   "rej": "diff",
+  # Djot
+  "dj": "djot",
+  "djot": "djot",
   # DOT
   "dot": "dot",
   "gv": "dot",
index 6cbfbe2d13930992f9ba4072d59fd4351392a926..4ae9b7b025037574a3bc02ee7e09a3730f835294 100644 (file)
@@ -242,6 +242,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     dictdconf: ['dictd.conf', 'dictdfile.conf', 'dictd-file.conf'],
     diff: ['file.diff', 'file.rej'],
     dircolors: ['.dir_colors', '.dircolors', '/etc/DIR_COLORS', 'any/etc/DIR_COLORS'],
+    djot: ['file.dj', 'file.djot'],
     dnsmasq: ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'],
     dockerfile: ['Containerfile', 'Dockerfile', 'dockerfile', 'file.Dockerfile', 'file.dockerfile', 'Dockerfile.debian', 'Containerfile.something'],
     dosbatch: ['file.bat'],
index 2432ba9fb5c73a4afcbaf26ffb8d6489987a1d12..8f4e2fa6d50e74fa8718368a16af2c3e38f1d426 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2062,
 /**/
     2061,
 /**/