nvim/lua/user/plugins/lsp/conform.lua

14 lines
636 B
Lua

local linters_path = vim.fn.stdpath('data') .. '/lint'
local util = require('user.util.misc')
return {
buf = { filetypes = 'proto' },
fish_indent = { filetypes = 'fish' },
-- goimports = { filetypes = 'go', condition = util.root_has_file({ '.git', 'go.mod', 'go.work' }) },
shfmt = { filetypes = 'sh' },
sql_formatter = { filetypes = 'sql', cmd = linters_path .. '/sql_formatter/node_modules/.bin/sql-formatter' },
stylua = { filetypes = 'lua', condition = util.root_has_file({ 'stylua.toml', '.stylua.toml' }) },
templ = { filetypes = 'templ' },
yamlfmt = { filetypes = { 'yaml', 'yaml.ansible' } },
}