aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-06-02 17:31:37 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-06-02 23:01:20 +0200
commit659d3dcd2edf1b178a20015cab399390ffda1a32 (patch)
tree9407873425273b740f1c9ac0f4ebc591fd3aeb14
parent89dc8f8f4e754e70cbe1624f030fb61bded41bc2 (diff)
downloadrneovim-659d3dcd2edf1b178a20015cab399390ffda1a32.tar.gz
rneovim-659d3dcd2edf1b178a20015cab399390ffda1a32.tar.bz2
rneovim-659d3dcd2edf1b178a20015cab399390ffda1a32.zip
vim-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: vim/vim#14897 https://github.com/vim/vim/commit/7577afd5efd0f7ebf0dbbca09713185024263ed7 Co-authored-by: İlyas Akın <ilyas.akin@kuika.com>
-rw-r--r--runtime/lua/vim/filetype.lua1
-rw-r--r--test/old/testdir/test_filetype.vim2
2 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index 500632a2b2..c8f9bcfd84 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -1451,6 +1451,7 @@ local filename = {
['.firebaserc'] = 'json',
['.prettierrc'] = 'json',
['.stylelintrc'] = 'json',
+ ['.lintstagedrc'] = 'json',
['flake.lock'] = 'json',
['.babelrc'] = 'jsonc',
['.eslintrc'] = 'jsonc',
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
index 88cd8fc416..fa62765398 100644
--- a/test/old/testdir/test_filetype.vim
+++ b/test/old/testdir/test_filetype.vim
@@ -365,7 +365,7 @@ func s:GetFilenameChecks() abort
\ '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'],