changeset 32467:89abdbbfb27d v9.0.1565

patch 9.0.1565: json lines files are not recognized Commit: https://github.com/vim/vim/commit/6fadbc1e8c1f4c5b03eb6a78aeb023ca2c2a9a7d Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 18 16:42:17 2023 +0100 patch 9.0.1565: json lines files are not recognized Problem: Json lines files are not recognized. Solution: Add a pattern to detect "jsonl" files. (issue https://github.com/vim/vim/issues/7520)
author Bram Moolenaar <Bram@vim.org>
date Thu, 18 May 2023 17:45:04 +0200
parents e98fd1d81815
children 0d5315db2a5d
files runtime/filetype.vim src/testdir/test_filetype.vim src/version.c
diffstat 3 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1063,6 +1063,9 @@ au BufNewFile,BufRead .jshintrc,.hintrc,
 " 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
 
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -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'],
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1565,
+/**/
     1564,
 /**/
     1563,