Skip to content

help: configure sqlfluff for dbt #708

Open
@Velrok

Description

@Velrok

Hi. I've tried to configure sqlfluff with DBT support but I keep getting this error:

2025-05-13 15:35:53[ERROR] Formatter 'sqlfluff' error: 
User Error: The dbt templater does not support stdin input, provide a path instead

Here is my config:

return {
  "stevearc/conform.nvim",
  config = function()
    local opts = {
      format_on_save = {
        lsp_format = "prefer",
        timeout_ms = 500,
      },
      default_format_opts = {
        lsp_format = "prefer",
      },
      formatters = {
        sqlfluff = { stdin = false } -- not sure this is getting picked up
      },
      formatters_by_ft = {
        javascript = { "prettier" },
        typescript = { "prettier" },
        sql = { "sqlfluff" },
      },
    }

    require("conform").setup(opts)
  end,
}

This is not really a bug or feature request.

I could not find anything on the internet so at least having an answer here might others find a resolution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions