]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1026: filetype: swc configuration files are not recognized v9.1.1026
authorMarces Engel <marces@facemurphy.com>
Fri, 17 Jan 2025 12:10:15 +0000 (13:10 +0100)
committerChristian Brabandt <cb@256bit.org>
Fri, 17 Jan 2025 12:10:15 +0000 (13:10 +0100)
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>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 095114ed39a85ed06bb06c8f11f4a4285b50bc42..f9d189f6311f5f5dbcc7577f8ece90dab97ccbd1 100644 (file)
@@ -1271,7 +1271,7 @@ au BufNewFile,BufRead *.ipynb,*.jupyterlab-settings       setf json
 au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace setf json
 
 " Other files that look like json
-au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock,deno.lock  setf json
+au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock,deno.lock,.swcrc   setf json
 
 " JSONC (JSON with comments)
 au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc,bun.lock     setf jsonc
index 1a54db995524e196c2bf20ed0faf0cb0910d96fd..a9eac865447d75e76be9925e1462bb5a1669577b 100644 (file)
@@ -397,7 +397,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     jq: ['file.jq'],
     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'],
+    'file.bd', 'file.bda', 'file.xci', 'flake.lock', 'pack.mcmeta', 'deno.lock', '.swcrc'],
     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', expand("$HOME/.config/VSCodium/User/settings.json")],
     jsonl: ['file.jsonl'],
index 93f94c13649fa652f2eeaa01ce57275cde655425..46c4818b1cbe36eb17d89d7d70ff368c7d78e907 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1026,
 /**/
     1025,
 /**/