Skip to content

Commit 3a738fc

Browse files
Marces Engelchrisbra
authored andcommitted
patch 9.1.1026: filetype: swc configuration files are not recognized
Problem: filetype: swc configuration files are not recognized Solution: detect .swcrc files as json filetype (Marces Engel) References: https://swc.rs/docs/configuration/swcrc closes: #16462 Signed-off-by: Marces Engel <marces@facemurphy.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 9cfdabb commit 3a738fc

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

runtime/filetype.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,7 @@ au BufNewFile,BufRead *.ipynb,*.jupyterlab-settings setf json
12711271
au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace setf json
12721272

12731273
" Other files that look like json
1274-
au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock,deno.lock setf json
1274+
au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock,deno.lock,.swcrc setf json
12751275

12761276
" JSONC (JSON with comments)
12771277
au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc,bun.lock setf jsonc

src/testdir/test_filetype.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ def s:GetFilenameChecks(): dict<list<string>>
397397
jq: ['file.jq'],
398398
json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings',
399399
'.prettierrc', '.firebaserc', '.stylelintrc', '.lintstagedrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace',
400-
'file.bd', 'file.bda', 'file.xci', 'flake.lock', 'pack.mcmeta', 'deno.lock'],
400+
'file.bd', 'file.bda', 'file.xci', 'flake.lock', 'pack.mcmeta', 'deno.lock', '.swcrc'],
401401
json5: ['file.json5'],
402402
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")],
403403
jsonl: ['file.jsonl'],

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
1026,
707709
/**/
708710
1025,
709711
/**/

0 commit comments

Comments
 (0)