aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-09-29 10:46:00 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-09-29 11:13:27 +0200
commit1405034ba3b1765e451304be0ee8ddc4d285ee87 (patch)
tree0ef9bc78b1e9b7c30ec5c34771223b1a129b83fd
parent1ff0a1712ad6ecab37b7126a3a7278bb9dab0d6b (diff)
downloadrneovim-1405034ba3b1765e451304be0ee8ddc4d285ee87.tar.gz
rneovim-1405034ba3b1765e451304be0ee8ddc4d285ee87.tar.bz2
rneovim-1405034ba3b1765e451304be0ee8ddc4d285ee87.zip
vim-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: vim/vim#15761 https://github.com/vim/vim/commit/8a2aea8a623ba183dc0703a47970463b105a9399 Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
-rw-r--r--runtime/lua/vim/filetype.lua2
-rw-r--r--test/old/testdir/test_filetype.vim2
2 files changed, 3 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index 2e175dff21..035cb6f69f 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -1581,7 +1581,9 @@ local filename = {
['ipf.conf'] = 'ipfilter',
['ipf6.conf'] = 'ipfilter',
['ipf.rules'] = 'ipfilter',
+ ['.bun_repl_history'] = 'javascript',
['.node_repl_history'] = 'javascript',
+ ['deno_history.txt'] = 'javascript',
['Pipfile.lock'] = 'json',
['.firebaserc'] = 'json',
['.prettierrc'] = 'json',
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
index 8a1ed413c0..7480b15bed 100644
--- a/test/old/testdir/test_filetype.vim
+++ b/test/old/testdir/test_filetype.vim
@@ -362,7 +362,7 @@ func s:GetFilenameChecks() abort
\ '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'],