]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0238: filetype: jupyterlab and sublime config are not recognized v9.1.0238
authorWu, Zhenyu <wuzhenyu@ustc.edu>
Sun, 31 Mar 2024 17:08:07 +0000 (19:08 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 31 Mar 2024 17:08:07 +0000 (19:08 +0200)
Problem:  filetype: jupyterlab and sublime config are not recognized
Solution: Detect jupyterlab and sublime config files as json
          (Wu, Zhenyu)

closes: #14359

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index cbd677ceff68950dd4196978110c9e885959ae17..bda088531a68e9c58d718e1d15139f4e35a77aaf 100644 (file)
@@ -1098,8 +1098,11 @@ au BufNewFile,BufRead *.json-patch               setf json
 " Geojson is also json
 au BufNewFile,BufRead *.geojson                        setf json
 
-" Jupyter Notebook is also json
-au BufNewFile,BufRead *.ipynb                  setf json
+" Jupyter Notebook and jupyterlab config is also json
+au BufNewFile,BufRead *.ipynb,*.jupyterlab-settings    setf json
+
+" Sublime config
+au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace setf json
 
 " Other files that look like json
 au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc     setf json
index b1af7026d133f928ca7b79fc13b43c12a996ec19..d84805f166b347c2403017176650065487f1665e 100644 (file)
@@ -350,7 +350,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     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'],
index 2bf701cf6e7fab6cf8a6b3ab804d3ac4160c230e..b1844bfdaa5f17a081ab9eb033e3151df597f7f8 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    238,
 /**/
     237,
 /**/