plugins.lsp-format.setup

The setup option maps |filetypes| to format options.

Type: attribute set of (attribute set)

Default: { }

Example:

{
  go = {
    exclude = [
      "gopls"
    ];
    force = true;
    order = [
      "gopls"
      "efm"
    ];
    sync = true;
  };
}

Declared by:

plugins.lsp-format.setup.<name>.exclude

List of client names to exclude from formatting.

Type: null or (list of string)

Default: null

Declared by:

plugins.lsp-format.setup.<name>.force

If true, the format result will always be written to the buffer, even if the buffer changed.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by:

plugins.lsp-format.setup.<name>.order

List of client names. Formatting is requested from clients in the following order: first all clients that are not in the order table, then the remaining clients in the order as they occur in the order table. (same logic as |vim.lsp.buf.formatting_seq_sync()|).

Type: null or (list of string)

Default: null

Declared by:

plugins.lsp-format.setup.<name>.sync

Whether to turn on synchronous formatting. The editor will block until formatting is done.

Plugin default: false

Type: null or boolean or raw lua code

Default: null

Declared by: