diff options
author | Maxim Kim <habamax@gmail.com> | 2023-12-11 01:57:41 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-10 15:57:41 +0100 |
commit | ca7c9b1b59263938eea8dd5a197ca8312ffa91ac (patch) | |
tree | 2ee0666cc4aab7653d674c5e4f1125f6aa3276f5 /runtime/doc | |
parent | f6869212c9e19ec8f2a4434732dd28f84f170163 (diff) |
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>
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/filetype.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index e35ffb83b5..1960865424 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -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: |