diff options
author | Grolaf <75337003+Grolaf@users.noreply.github.com> | 2024-07-16 06:07:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-15 21:07:55 -0700 |
commit | 1d1362b0261d06a0b91872e916c172320bbb988a (patch) | |
tree | 599c2cfe050dafb4e824fc83ab505613c0c80517 /doc/conform.txt | |
parent | cc1ba956b61543641ddeeb7694c7cdaa33cd157c (diff) |
feat: add undojoin as a format option (#488)
* feat: add new format option: undojoin
This option allow user to automatically perform undojoin command before
formatting. This is useful if the user uses an autosave plugin + format
on save, because in case of undo, it will undo the last change AND the
formatting. Without this option, it will only undo the formatting.
* fix: passed linting
* fix: apply undojoin for LSP formatting
* doc: fix type annotations for apply_format
* doc: regenerate documentation
---------
Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
Diffstat (limited to 'doc/conform.txt')
-rw-r--r-- | doc/conform.txt | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/doc/conform.txt b/doc/conform.txt index e27d9b7..3f6568f 100644 --- a/doc/conform.txt +++ b/doc/conform.txt @@ -150,6 +150,8 @@ format({opts}, {callback}): boolean *conform.forma completes, the formatting will be discarded. {dry_run} `nil|boolean` If true don't apply formatting changes to the buffer + {undojoin} `nil|boolean` Use undojoin to merge formatting changes + with previous edit (default false) {formatters} `nil|string[]` List of formatters to run. Defaults to all formatters for the buffer filetype. {lsp_format} `nil|conform.LspFormatOpts` Configure if and when LSP |