aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-12-26 18:56:31 +0100
committerChristian Clason <ch.clason+github@icloud.com>2024-12-27 11:40:38 +0100
commit69fbb58385d14a623be6652fcd2d4c3ff65de1d3 (patch)
tree5b81d1645ef6f9ac1f6ec45a1947fc2402ca561f
parent46c7faa00b165a1ad1b7cef8245df30d3dc3ef56 (diff)
downloadrneovim-69fbb58385d14a623be6652fcd2d4c3ff65de1d3.tar.gz
rneovim-69fbb58385d14a623be6652fcd2d4c3ff65de1d3.tar.bz2
rneovim-69fbb58385d14a623be6652fcd2d4c3ff65de1d3.zip
vim-patch:9.1.0962: filetype: bun.lock file is not recognized
Problem: filetype: bun.lock file is not recognized Solution: detect 'bun.lock' file as jsonc filetype (Anton Kastritskii) closes: vim/vim#16308 https://github.com/vim/vim/commit/f07ae5b3bdb7331ee0e65adcb74402eef74f0a2b Co-authored-by: Anton Kastritskii <halloy52@gmail.com>
-rw-r--r--runtime/lua/vim/filetype.lua1
-rw-r--r--test/old/testdir/test_filetype.vim2
2 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index ad74a16e09..d6a29ed84d 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -1636,6 +1636,7 @@ local filename = {
['.luaurc'] = 'jsonc',
['.swrc'] = 'jsonc',
['.vsconfig'] = 'jsonc',
+ ['bun.lock'] = 'jsonc',
['.justfile'] = 'just',
['justfile'] = 'just',
['Justfile'] = 'just',
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
index f556d551dd..94bf208b67 100644
--- a/test/old/testdir/test_filetype.vim
+++ b/test/old/testdir/test_filetype.vim
@@ -391,7 +391,7 @@ func s:GetFilenameChecks() abort
\ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'],
\ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', '.prettierrc', '.firebaserc', '.stylelintrc', '.lintstagedrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace', 'file.bd', 'file.bda', 'file.xci', 'flake.lock', 'pack.mcmeta', 'deno.lock'],
\ 'json5': ['file.json5'],
- \ 'jsonc': ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.jscsrc', '.vsconfig', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json', '.luaurc'],
+ \ 'jsonc': ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.jscsrc', '.vsconfig', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json', '.luaurc', 'bun.lock'],
\ 'jsonl': ['file.jsonl'],
\ 'jsonnet': ['file.jsonnet', 'file.libsonnet'],
\ 'jsp': ['file.jsp'],