]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0745: filetype: bun and deno history files not recognized v9.1.0745
authorWu, Zhenyu <wuzhenyu@ustc.edu>
Sun, 29 Sep 2024 08:03:19 +0000 (10:03 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 29 Sep 2024 08:03:19 +0000 (10:03 +0200)
Problem:  filetype: bun and deno history files not recognized
Solution: detect '.bun_repl_history' and 'deno_history.txt' as
          javascript filetype (Wu, Zhenyu)

closes: #15761

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

index 85412f4df063cb0c9725a6f3bce1ba4e6d9f4414..1667d21799cdc8bf004f78fe494aa4fcbf89af04 100644 (file)
@@ -301,6 +301,9 @@ endif
 " Busted (Lua unit testing framework - configuration files)
 au BufNewFile,BufRead .busted                  setf lua
 
+" Bun history
+au BufNewFile,BufRead .bun_repl_history                setf javascript
+
 " Bundle config
 au BufNewFile,BufRead */.bundle/config                 setf yaml
 
@@ -652,6 +655,9 @@ au BufNewFile,BufRead */etc/apt/sources.list                setf debsources
 au BufNewFile,BufRead */etc/apt/sources.list.d/*.list  setf debsources
 au BufNewFile,BufRead */etc/apt/sources.list.d/*.sources       setf deb822sources
 
+" Deno history
+au BufNewFile,BufRead deno_history.txt         setf javascript
+
 " Deny hosts
 au BufNewFile,BufRead denyhosts.conf           setf denyhosts
 
index 8977d7e3eaa5a55c4a45a0e451bfac39e357b746..61272ec92456cbed998785746673dd3efe239514 100644 (file)
@@ -362,7 +362,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     janet: ['file.janet'],
     java: ['file.java', 'file.jav'],
     javacc: ['file.jj', 'file.jjt'],
-    javascript: ['file.js', 'file.jsm', 'file.javascript', 'file.es', 'file.mjs', 'file.cjs', '.node_repl_history'],
+    javascript: ['file.js', 'file.jsm', 'file.javascript', 'file.es', 'file.mjs', 'file.cjs', '.node_repl_history', '.bun_repl_history', 'deno_history.txt'],
     'javascript.glimmer': ['file.gjs'],
     javascriptreact: ['file.jsx'],
     jess: ['file.clp'],
index 7378bab803d776d60db06d61b2a1e83ec188ab3b..cde28a3cd5a1bb4a59b0e95469c37fac7b8b77f5 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    745,
 /**/
     744,
 /**/