redhat-developer / redhat-developer/vscode-java
Unable to off the auto format
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
In my .devcontainer/devcontainer.json I have "editor.formatOnSave": true, but I want to disable auto format on save for this particular workspace. So in my .vscode/settings.json I have these
{
...
"editor.formatOnSave": false,
"[java]": {
"editor.defaultFormatter": null,
"editor.formatOnSave": false
},
"java.format.enabled": false,
"java.format.onType.enabled": false,
"java.format.settings.url": "",
"java.format.settings.profile": ""
}
As you can see I tried everything I think relates to the issue, but nothing actually works. The plugin continues formatting .java files on save. Only if I disable the plugin it stops.
I also tried to set "editor.formatOnSave": false in devcontainer.json it doesn't matter as well.
Please also note I tried only "java.format.enabled": false option leaving "java.format.settings.url" & "java.format.settings.profile" default.
Environment
- Plugin Version: 1.40.0
- OS: Manjaro Linux
- Dev Container OS: Ubuntu 24.04 LTS
- Java: openjdk version "21.0.6" 2025-01-21
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用所列出的 Java、VS Code 扩展和 dev-container 环境,以及报告中的 .devcontainer/devcontainer.json 和 .vscode/settings.json 配置,复现该行为。首先确定保存 .java 文件时仍会调用哪个格式化程序,以及哪个设置具有优先权。完成标准是:在插件保持启用的同时,为工作区禁用格式化,并通过经过验证的测试或有记录的复现覆盖相关配置行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- developer-experience, tooling
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100