Mercurial > vim
changeset 36201:35d2b36f6072 v9.1.0745
patch 9.1.0745: filetype: bun and deno history files not recognized
Commit: https://github.com/vim/vim/commit/8a2aea8a623ba183dc0703a47970463b105a9399
Author: Wu, Zhenyu <wuzhenyu@ustc.edu>
Date: Sun Sep 29 10:03:19 2024 +0200
patch 9.1.0745: filetype: bun and deno history files not recognized
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 29 Sep 2024 10:15:04 +0200 |
parents | 954da4c04242 |
children | 840eedce3fdc |
files | runtime/filetype.vim src/testdir/test_filetype.vim src/version.c |
diffstat | 3 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -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. 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
--- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -362,7 +362,7 @@ def s:GetFilenameChecks(): dict<list<str 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'],