patch 9.1.1010: filetype: VisualCode setting file not recognized
Commit:
https://github.com/vim/vim/commit/c200f53cbb03fa11e489a27791d5b9dfc34a6564
Author: Konfekt <[email protected]>
Date: Sun Jan 12 20:02:04 2025 +0100
patch 9.1.1010: filetype: VisualCode setting file not recognized
Problem: filetype: VisualCode setting file not recognized
Solution: detect json files in VSCode config directory as jsonc filetype
(Konfekt)
closes: #16400
Signed-off-by: Konfekt <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 29f702f27..c4d32398f 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1274,6 +1274,8 @@ au BufNewFile,BufRead
.prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.l
" JSONC (JSON with comments)
au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc,bun.lock setf
jsonc
au BufNewFile,BufRead
.jshintrc,.jscsrc,.vsconfig,.hintrc,.swrc,[jt]sconfig*.json setf jsonc
+" Visual Studio Code settings
+au BufRead,BufNewFile ~/*/{Code,VSCodium}/User/*.json setf jsonc
" JSON
au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest setf json
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index 3b3b2f920..3a6306f6f 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -399,7 +399,7 @@ def s:GetFilenameChecks(): dict<list<string>>
'.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', 'bun.lock'],
+ jsonc: ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc',
'.jscsrc', '.vsconfig', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json',
'tsconfig.test.json', 'tsconfig-test.json', '.luaurc', 'bun.lock',
expand("$HOME/.config/VSCodium/User/settings.json")],
jsonl: ['file.jsonl'],
jsonnet: ['file.jsonnet', 'file.libsonnet'],
jsp: ['file.jsp'],
diff --git a/src/version.c b/src/version.c
index 19c08b9f7..b7a22dd49 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1010,
/**/
1009,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1tX3QO-007gpZ-4T%40256bit.org.