Skip to content

Commit

Permalink
feat(formatters): add sqlfluff
Browse files Browse the repository at this point in the history
  • Loading branch information
creativenull committed May 7, 2024
1 parent 51cb919 commit f477186
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lua/efmls-configs/formatters/sqlfluff.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- Metadata
-- languages: sql
-- url: https://github.com/sql-formatter-org/sql-formatter

local fs = require('efmls-configs.fs')

local formatter = 'sqlfluff'
local command = string.format(
'%s format --dialect ansi --nocolor --ignore ${INPUT}',
fs.executable(formatter, fs.Scope.NODE)
)

return {
formatCommand = command,
formatStdin = false,
}

0 comments on commit f477186

Please sign in to comment.