plugins.conform-nvim.enable

Whether to enable conform-nvim.

Type: boolean

Default: false

Example: true

Declared by:

plugins.conform-nvim.package

Which package to use for the conform-nvim plugin.

Type: package

Default: <derivation vimplugin-conform.nvim-2024-05-16>

Declared by:

plugins.conform-nvim.extraOptions

These attributes will be added to the table parameter for the setup function. Typically, it can override NixVim’s default settings.

Type: attribute set of anything

Default: { }

Declared by:

plugins.conform-nvim.formatAfterSave

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.

Plugin default: see documentation

Type: null or lua function string or (submodule)

Default: null

Declared by:

plugins.conform-nvim.formatOnSave

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. See :help conform.format for details.

Plugin default: see documentation

Type: null or lua function string or (submodule)

Default: null

Declared by:

plugins.conform-nvim.formatters

Custom formatters and changes to built-in formatters

Plugin default: see documentation

Type: null or (attribute set of anything)

Default: null

Declared by:

plugins.conform-nvim.formattersByFt

  # Map of filetype to formatters
  formattersByFt =
    {
      lua = [ "stylua" ];
      # Conform will run multiple formatters sequentially
      python = [ "isort" "black" ];
      # Use a sub-list to run only the first available formatter
      javascript = [ [ "prettierd" "prettier" ] ];
      # Use the "*" filetype to run formatters on all filetypes.
      "*" = [ "codespell" ];
      # Use the "_" filetype to run formatters on filetypes that don't
      # have other formatters configured.
      "_" = [ "trim_whitespace" ];
     };

Plugin default: see documentation

Type: null or (attribute set of anything)

Default: null

Declared by:

plugins.conform-nvim.logLevel

Set the log level. Use :ConformInfo to see the location of the log file.

Type: null or unsigned integer, meaning >=0, or one of “off”, “error”, “warn”, “info”, “debug”, “trace”

Default: "error"

Declared by:

plugins.conform-nvim.notifyOnError

Conform will notify you when a formatter errors

Plugin default: true

Type: null or boolean or raw lua code

Default: null

Declared by: