aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMicah Halter <micah@mehalter.com>2024-06-19 22:23:16 -0400
committerGitHub <noreply@github.com>2024-06-19 22:23:16 -0400
commit9a06e83527407a7600a2fe4e0d10adf432b6215e (patch)
treedf05a50b789471da27e9c17da9aedce7a3b799c2 /doc
parentbde3bee1773c96212b6c49f009e05174f932c23a (diff)
doc: add LSP annotations for `lsp_format` options (#461)
* doc: add LSP annotations for `lsp_format` options * doc: regenerate documentation --------- Co-authored-by: Steven Arcangeli <stevearc@stevearc.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/conform.txt27
1 files changed, 16 insertions, 11 deletions
diff --git a/doc/conform.txt b/doc/conform.txt
index a3d3c2e..4d2c0b6 100644
--- a/doc/conform.txt
+++ b/doc/conform.txt
@@ -119,12 +119,12 @@ setup({opts}) *conform.setu
{opts} `nil|conform.setupOpts`
{formatters_by_ft} `nil|table<string, conform.FiletypeFormatter>` Map
of filetype to formatters
- {format_on_save} `nil|conform.FormatOpts|fun(bufnr: integer): nil|conform.FormatOpts` I
- f this is set, Conform will run the formatter on
+ {format_on_save} `nil|conform.FormatOpts|fun(bufnr: integer): nil|conform.FormatOpts`
+ If this is set, Conform will run the formatter on
save. It will pass the table to conform.format().
This can also be a function that returns the table.
- {format_after_save} `nil|conform.FormatOpts|fun(bufnr: integer): nil|conform.FormatOpts` I
- f this is set, Conform will run the formatter
+ {format_after_save} `nil|conform.FormatOpts|fun(bufnr: integer): nil|conform.FormatOpts`
+ If this is set, Conform will run the formatter
asynchronously after save. It will pass the table
to conform.format(). This can also be a function
that returns the table.
@@ -133,8 +133,8 @@ setup({opts}) *conform.setu
the location of the log file.
{notify_on_error} `nil|boolean` Conform will notify you when a
formatter errors (default true).
- {formatters} `nil|table<string, conform.FormatterConfigOverride|fun(bufnr: integer): nil|conform.FormatterConfigOverride>` C
- ustom formatters and overrides for built-in
+ {formatters} `nil|table<string, conform.FormatterConfigOverride|fun(bufnr: integer): nil|conform.FormatterConfigOverride>`
+ Custom formatters and overrides for built-in
formatters.
format({opts}, {callback}): boolean *conform.format*
@@ -152,11 +152,16 @@ format({opts}, {callback}): boolean *conform.forma
the buffer
{formatters} `nil|string[]` List of formatters to run. Defaults to all
formatters for the buffer filetype.
- {lsp_format} `nil|"never"|"fallback"|"prefer"|"first"|"last"` "fallbac
- k" LSP formatting when no other formatters are available,
- "prefer" only LSP formatting when available, "first" LSP
- formatting then other formatters, "last" other formatters
- then LSP.
+ {lsp_format} `nil|conform.LspFormatOpts` Configure if and when LSP
+ should be used for formatting. Defaults to "never".
+ `"never"` never use the LSP for formatting (default)
+ `"fallback"` LSP formatting is used when no other formatters are
+ available
+ `"prefer"` use only LSP formatting when available
+ `"first"` LSP formatting is used when available and then other
+ formatters
+ `"last"` other formatters are used then LSP formatting when
+ available
{quiet} `nil|boolean` Don't show any notifications for warnings
or failures. Defaults to false.
{range} `nil|table` Range to format. Table must contain `start`