Patch 9.0.1082
Problem:    Some jsonc files are not recognized.
Solution:   Add patterns for jsonc and move some from json to jsonc.
            (closes #11711)
Files:      runtime/filetype.vim, src/testdir/test_filetype.vim


*** ../vim-9.0.1081/runtime/filetype.vim        2022-12-05 21:40:33.155131915 
+0000
--- runtime/filetype.vim        2022-12-19 20:38:16.876275826 +0000
***************
*** 993,1015 ****
  " Jovial
  au BufNewFile,BufRead *.jov,*.j73,*.jovial    setf jovial
  
- " JSON
- au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest    setf json
- 
  " JSON5
  au BufNewFile,BufRead *.json5                 setf json5
  
  " JSON Patch (RFC 6902)
! au BufNewFile,BufRead *.json-patch                    setf json
  
  " Jupyter Notebook is also json
! au BufNewFile,BufRead *.ipynb                         setf json
  
  " Other files that look like json
! au BufNewFile,BufRead .babelrc,.eslintrc,.prettierrc,.firebaserc  setf json
  
! " JSONC
! au BufNewFile,BufRead *.jsonc                 setf jsonc
  
  " Jsonnet
  au BufNewFile,BufRead *.jsonnet,*.libsonnet   setf jsonnet
--- 993,1016 ----
  " Jovial
  au BufNewFile,BufRead *.jov,*.j73,*.jovial    setf jovial
  
  " JSON5
  au BufNewFile,BufRead *.json5                 setf json5
  
  " JSON Patch (RFC 6902)
! au BufNewFile,BufRead *.json-patch            setf json
  
  " Jupyter Notebook is also json
! au BufNewFile,BufRead *.ipynb                 setf json
  
  " Other files that look like json
! au BufNewFile,BufRead .prettierrc,.firebaserc setf json
  
! " JSONC (JSON with comments)
! au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc     setf jsonc
! au BufNewFile,BufRead .jshintc,.hintrc,.swrc,[jt]sconfig*.json        setf 
jsonc
! 
! " JSON
! au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest    setf json
  
  " Jsonnet
  au BufNewFile,BufRead *.jsonnet,*.libsonnet   setf jsonnet
*** ../vim-9.0.1081/src/testdir/test_filetype.vim       2022-12-14 
16:42:11.286755477 +0000
--- src/testdir/test_filetype.vim       2022-12-19 20:41:33.160108820 +0000
***************
*** 287,295 ****
      \ 'jgraph': ['file.jgr'],
      \ '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.webmanifest', 'Pipfile.lock', 'file.ipynb', '.babelrc', '.eslintrc', 
'.prettierrc', '.firebaserc', 'file.slnf'],
      \ 'json5': ['file.json5'],
!     \ 'jsonc': ['file.jsonc'],
      \ 'jsonnet': ['file.jsonnet', 'file.libsonnet'],
      \ 'jsp': ['file.jsp'],
      \ 'julia': ['file.jl'],
--- 287,295 ----
      \ 'jgraph': ['file.jgr'],
      \ '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.webmanifest', 'Pipfile.lock', 'file.ipynb', '.prettierrc', '.firebaserc', 
'file.slnf'],
      \ 'json5': ['file.json5'],
!     \ 'jsonc': ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', 
'.jshintc', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 
'tsconfig.test.json', 'tsconfig-test.json'],
      \ 'jsonnet': ['file.jsonnet', 'file.libsonnet'],
      \ 'jsp': ['file.jsp'],
      \ 'julia': ['file.jl'],
*** ../vim-9.0.1081/src/version.c       2022-12-19 20:28:34.061118368 +0000
--- src/version.c       2022-12-19 20:39:36.268203892 +0000
***************
*** 697,698 ****
--- 697,700 ----
  {   /* Add new patch number below this line */
+ /**/
+     1082,
  /**/

-- 
Witches prefer brooms: vacuum-cleaners need extension cords!

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221219204324.A86DD1C09DC%40moolenaar.net.

Raspunde prin e-mail lui