runtime(json): Add json formating plugin (Issue #11426) (#11506)

related: #11426

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Maxim Kim
2023-12-11 01:57:41 +11:00
committed by GitHub
parent f6869212c9
commit ca7c9b1b59
3 changed files with 195 additions and 0 deletions

View File

@ -610,6 +610,18 @@ The mapping can be disabled with: >
let g:no_gprof_maps = 1
JSON-FORMAT *ft-json-plugin*
JSON filetype can be extended to use 'formatexpr' and "json.FormatExpr()"
function for json formatting (using |gq|).
Add following lines to $HOME/.vim/ftplugin/json.vim: >
vim9script
import autoload 'dist/json.vim'
setl formatexpr=json.FormatExpr()
MAIL *ft-mail-plugin*
Options: