Mercurial > vim
changeset 35316:a978ae2e996f v9.1.0460
patch 9.1.0460: filetype: lintstagedrc files are not recognized
Commit: https://github.com/vim/vim/commit/7577afd5efd0f7ebf0dbbca09713185024263ed7
Author: ?lyas Ak?n <ilyas.akin@kuika.com>
Date: Sun Jun 2 16:57:00 2024 +0200
patch 9.1.0460: filetype: lintstagedrc files are not recognized
Problem: filetype: lintstagedrc files are not recognized
Solution: recognize '.lintstagedrc' files as json filetype
(?lyas Ak?n)
see: https://github.com/lint-staged/lint-staged
closes: #14897
Signed-off-by: ?lyas Ak?n <ilyas.akin@kuika.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 02 Jun 2024 17:15:03 +0200 |
parents | 92491f79a578 |
children | dd25edaf7ce9 |
files | runtime/filetype.vim src/testdir/test_filetype.vim src/version.c |
diffstat | 3 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -1177,7 +1177,7 @@ au BufNewFile,BufRead *.ipynb,*.jupyterl au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace setf json " Other files that look like json -au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,flake.lock setf json +au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock setf json " JSONC (JSON with comments) au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc setf jsonc
--- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -364,7 +364,7 @@ def s:GetFilenameChecks(): dict<list<str jq: ['file.jq'], jovial: ['file.jov', 'file.j73', 'file.jovial'], jproperties: ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'], - json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', '.prettierrc', '.firebaserc', '.stylelintrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace', 'file.bd', 'file.bda', 'file.xci', 'flake.lock'], + 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'], 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'], jsonl: ['file.jsonl'],