]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.2059: filetype: Nickel files are not recognized v9.1.2059
authorHoang Nguyen <folliekazetani@protonmail.com>
Tue, 6 Jan 2026 14:46:26 +0000 (14:46 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 6 Jan 2026 14:49:51 +0000 (14:49 +0000)
Problem:  filetype: Nickel files are not recognized
Solution: Detect *.ncl files as nickel filetype
          (Hoang Nguyen)

Reference:
- https://nickel-lang.org/getting-started/
- https://github.com/tweag/nickel/tree/master/examples

closes: #19102

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 66028d0b1a7a2bac0b0b3e6666e6323622f2b167..d67f07ad0c1febcb7ab9ac534a03643a326ba59a 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 Jan 02
+# Last Change:         2026 Jan 06
 # Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 # These functions are moved here from runtime/filetype.vim to make startup
@@ -2368,6 +2368,8 @@ const ft_from_ext = {
   # N1QL
   "n1ql": "n1ql",
   "nql": "n1ql",
+  # Nickel
+  "ncl": "nickel",
   # Nim file
   "nim": "nim",
   "nims": "nim",
index bebdefd83780dbd4543bc78512eb98ef21cfa787..23df47680ab201c4da34dd8bc1ecb5340ba280cc 100644 (file)
@@ -578,6 +578,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     neomuttrc: ['Neomuttrc', '.neomuttrc', '.neomuttrc-file', '/.neomutt/neomuttrc', '/.neomutt/neomuttrc-file', 'Neomuttrc', 'Neomuttrc-file', 'any/.neomutt/neomuttrc', 'any/.neomutt/neomuttrc-file', 'neomuttrc', 'neomuttrc-file' ],
     netrc: ['.netrc'],
     nginx: ['file.nginx', 'nginxfile.conf', 'filenginx.conf', 'any/etc/nginx/file', 'any/usr/local/nginx/conf/file', 'any/nginx/file.conf'],
+    nickel: ['file.ncl'],
     nim: ['file.nim', 'file.nims', 'file.nimble'],
     ninja: ['file.ninja'],
     nix: ['file.nix'],
index 22df517ce1113d7b3287089ee383b5305d03ca67..82784754700672460cac9d3023c070e8d36e4afa 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2059,
 /**/
     2058,
 /**/