summaryrefslogtreecommitdiffstats
path: root/runtime/doc/filetype.txt
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/doc/filetype.txt')
-rw-r--r--runtime/doc/filetype.txt12
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: