]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1565: json lines files are not recognized v9.0.1565
authorBram Moolenaar <Bram@vim.org>
Thu, 18 May 2023 15:42:17 +0000 (16:42 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 18 May 2023 15:42:17 +0000 (16:42 +0100)
Problem:    Json lines files are not recognized.
Solution:   Add a pattern to detect "jsonl" files. (issue #7520)

runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 16bf8f9dd563da011d5a58c8fab15884d64e8d26..2f446a1aa2285f8a9ca44ec12cbb82c993e98f41 100644 (file)
@@ -1063,6 +1063,9 @@ au BufNewFile,BufRead .jshintrc,.hintrc,.swrc,[jt]sconfig*.json   setf jsonc
 " JSON
 au BufNewFile,BufRead *.json,*.jsonp,*.webmanifest     setf json
 
+" JSON Lines
+au BufNewFile,BufRead *.jsonl                  setf jsonl
+
 " Jsonnet
 au BufNewFile,BufRead *.jsonnet,*.libsonnet    setf jsonnet
 
index ceaee8ab1d2d3d067f325c3794b2c915e6c07fbf..e02872fd7cb3f1e4ffa580f5848d7bf07994876f 100644 (file)
@@ -305,6 +305,7 @@ let s:filename_checks = {
     \ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', '.prettierrc', '.firebaserc', '.stylelintrc', 'file.slnf'],
     \ 'json5': ['file.json5'],
     \ 'jsonc': ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json'],
+    \ 'jsonl': ['file.jsonl'],
     \ 'jsonnet': ['file.jsonnet', 'file.libsonnet'],
     \ 'jsp': ['file.jsp'],
     \ 'julia': ['file.jl'],
index 6cf7de948efe0e7dfd7b24e21cd7aa0d79b6f7f1..ca6d79245f995e910c8a6e4dc0f4b5df5ad9e97b 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1565,
 /**/
     1564,
 /**/