You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

DataGrip函数调用参数格式化样式设置问题求助

DataGrip 函数调用参数格式化配置方案

当前格式化效果:

response.success(JSONB_BUILD_OBJECT('sessionId', v_session_id, 'config', v_application.config),
                        'APPLICATON_HANDSHAKE_SUCCESS');

期望格式化效果:

response.success(
    JSONB_BUILD_OBJECT(
        'sessionId', 
        v_session_id, 
        'config', 
        v_application.config
    ),
    'APPLICATON_HANDSHAKE_SUCCESS'
);

配置步骤:

  • 打开设置:File → Settings → Editor → Code Style → PostgreSQL(使用其他数据库则选择对应类型)
  • 进入Wrapping and Braces标签页:
    • 找到「Function call arguments」,将换行规则改为「Wrap always」,并勾选「Align when multiline」
    • 找到「Nested function calls」,同样设置为「Wrap always」,确保嵌套函数的参数自动换行
  • 进入Tabs and Indents标签页,设置「Continuation indent」为4(对应示例中的缩进空格数)
  • 保存设置后,用快捷键Ctrl+Alt+L(Windows/Linux)或Cmd+Opt+L(Mac)重新格式化代码即可达到预期效果

内容的提问来源于stack exchange,提问作者Ersin

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.11 21:42:02