From 09cbb79f4740a212247ede698d90fc8e1496140b Mon Sep 17 00:00:00 2001 From: SafetyMary <72537260+SafetyMary@users.noreply.github.com> Date: Wed, 11 Sep 2024 16:46:54 +0800 Subject: [PATCH] add sql dialect to sqlfluff --- lua/kickstart/plugins/conform.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/kickstart/plugins/conform.lua b/lua/kickstart/plugins/conform.lua index 67736a0b005..d07c18d6689 100644 --- a/lua/kickstart/plugins/conform.lua +++ b/lua/kickstart/plugins/conform.lua @@ -10,6 +10,7 @@ vim.api.nvim_create_user_command('Format', function(args) end -- Use CLI args instead of LSP server settings require('conform').formatters.ruff_format = { append_args = { '--line-length', '120' } } + require('conform').formatters.sqlfluff = { append_args = { '--dialect', 'postgres' } } require('conform').format { async = true, lsp_format = 'fallback', range = range } end, { range = true }) @@ -43,6 +44,7 @@ return { 'f', function() require('conform').formatters.ruff_format = { append_args = { '--line-length', '120' } } + require('conform').formatters.sqlfluff = { append_args = { '--dialect', 'postgres' } } require('conform').format { async = true, lsp_format = 'fallback' } end, mode = '',