]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1980: filetype: N-Quads files are not recognized v9.1.1980
authorGordian Dziwis <gordian@dziw.is>
Sun, 14 Dec 2025 15:51:34 +0000 (16:51 +0100)
committerChristian Brabandt <cb@256bit.org>
Sun, 14 Dec 2025 15:53:30 +0000 (16:53 +0100)
Problem:  filetype: N-Quads files are not recognized
Solution: Detect *.nq files as nq filetype

Reference:
- https://www.w3.org/TR/n-quads/

closes: #18923

Signed-off-by: Gordian Dziwis <gordian@dziw.is>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/dist/ft.vim
src/testdir/test_filetype.vim
src/version.c

index 56ac5660621d06fdc12f4b101d4fbca120f09fe5..c6f05d09e98579c00266dad2f3eee070ab254e06 100644 (file)
@@ -3,7 +3,7 @@ vim9script
 # Vim functions for file type detection
 #
 # Maintainer:          The Vim Project <https://github.com/vim/vim>
-# Last Change:         2025 Dec 07
+# Last Change:         2025 Dec 14
 # Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 # These functions are moved here from runtime/filetype.vim to make startup
@@ -2371,6 +2371,8 @@ const ft_from_ext = {
   "norg": "norg",
   # Novell netware batch files
   "ncf": "ncf",
+  # N-Quads
+  "nq": "nq",
   # Not Quite C
   "nqc": "nqc",
   # NSE - Nmap Script Engine - uses Lua syntax
index 0681afcd62dcc10798e2cf16b424ac35f9fb6311..65f8bae3289a9c6749e1a8fb83fe7c435a88cd96 100644 (file)
@@ -578,6 +578,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     ninja: ['file.ninja'],
     nix: ['file.nix'],
     norg: ['file.norg'],
+    nq: ['file.nq'],
     nqc: ['file.nqc'],
     nroff: ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'tmac.file'],
     nsis: ['file.nsi', 'file.nsh'],
index d62c453f1bad2ebdc150437745a875f7b0850243..e75a9782c1199c68416bfc230cb3bf1fc8ec7aab 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1980,
 /**/
     1979,
 /**/