Commit: patch 9.1.1010: filetype: VisualCode setting file not recognized

5 views
Skip to first unread message

Christian Brabandt

unread,
Jan 12, 2025, 2:15:12 PM1/12/25
to vim...@googlegroups.com
patch 9.1.1010: filetype: VisualCode setting file not recognized

Commit: https://github.com/vim/vim/commit/c200f53cbb03fa11e489a27791d5b9dfc34a6564
Author: Konfekt <Kon...@users.noreply.github.com>
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 <Kon...@users.noreply.github.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

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,
/**/
Reply all
Reply to author
Forward
0 new messages