Fix conform SQL formatter id: sql-formatter -> sql_formatter
`sql-formatter` is the Mason/executable name, not a conform formatter id, so
conform found no such formatter and SQL formatting silently failed. conform
ships `lua/conform/formatters/sql_formatter.lua` (id `sql_formatter`, whose
`command = 'sql-formatter'`). Use the underscore id.
Verified headless: `require('conform').list_formatters(0)` on an sql buffer
reports `name=sql_formatter available=true command=sql-formatter`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
4f0c0471cd
commit
64fe673c47
5
init.lua
5
init.lua
|
|
@ -844,8 +844,9 @@ do
|
||||||
-- You can use 'stop_after_first' to run the first available formatter from the list
|
-- You can use 'stop_after_first' to run the first available formatter from the list
|
||||||
javascript = { 'prettierd', 'prettier', stop_after_first = true },
|
javascript = { 'prettierd', 'prettier', stop_after_first = true },
|
||||||
-- conform matches the lowercase `vim.bo.filetype`, so the key must be `sql`
|
-- conform matches the lowercase `vim.bo.filetype`, so the key must be `sql`
|
||||||
-- (an uppercase `SQL` key would never fire).
|
-- (an uppercase `SQL` key would never fire). The formatter id is
|
||||||
sql = { 'sql-formatter' },
|
-- `sql_formatter` (conform's name); it wraps the `sql-formatter` executable.
|
||||||
|
sql = { 'sql_formatter' },
|
||||||
-- Wire in installed-but-previously-unused Mason tools:
|
-- Wire in installed-but-previously-unused Mason tools:
|
||||||
java = { 'google-java-format' },
|
java = { 'google-java-format' },
|
||||||
tex = { 'latexindent' },
|
tex = { 'latexindent' },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue