aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-03-31 19:10:01 +0200
committerChristian Clason <c.clason@uni-graz.at>2024-04-01 12:01:47 +0200
commitce69056e956ba0957714ef649062828743545c6c (patch)
tree86581657fc1cb44e787895c6ddbe998c7378d2b7
parentf29ba3c46cc72b6281927fbcc9a5101dab0badd2 (diff)
downloadrneovim-ce69056e956ba0957714ef649062828743545c6c.tar.gz
rneovim-ce69056e956ba0957714ef649062828743545c6c.tar.bz2
rneovim-ce69056e956ba0957714ef649062828743545c6c.zip
vim-patch:9.1.0238: filetype: jupyterlab and sublime config are not recognized
Problem: filetype: jupyterlab and sublime config are not recognized Solution: Detect jupyterlab and sublime config files as json (Wu, Zhenyu) closes: vim/vim#14359 https://github.com/vim/vim/commit/75c607dff7c9e02766ae0fd3588e08da00394d0f Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
-rw-r--r--runtime/lua/vim/filetype.lua4
-rw-r--r--test/old/testdir/test_filetype.vim2
2 files changed, 5 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
index c788ae4413..7ab01402cc 100644
--- a/runtime/lua/vim/filetype.lua
+++ b/runtime/lua/vim/filetype.lua
@@ -576,6 +576,10 @@ local extension = {
geojson = 'json',
webmanifest = 'json',
ipynb = 'json',
+ ['jupyterlab-settings'] = 'json',
+ ['sublime-project'] = 'json',
+ ['sublime-settings'] = 'json',
+ ['sublime-workspace'] = 'json',
['json-patch'] = 'json',
json5 = 'json5',
jsonc = 'jsonc',
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
index 7b4787e64d..7d4c8e7318 100644
--- a/test/old/testdir/test_filetype.vim
+++ b/test/old/testdir/test_filetype.vim
@@ -340,7 +340,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', '.prettierrc', '.firebaserc', '.stylelintrc', 'file.slnf'],
+ \ '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'],
\ 'json5': ['file.json5'],
\ 'jsonc': ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json', '.luaurc'],
\ 'jsonl': ['file.jsonl'],