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 <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Konfekt
2025-01-12 20:02:04 +01:00
committed by Christian Brabandt
parent 7c7a4e6d1a
commit c200f53cbb
3 changed files with 5 additions and 1 deletions

View File

@ -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

View File

@ -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'],

View File

@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1010,
/**/
1009,
/**/