redhat-developer / redhat-developer/vscode-java
Provide a way to let Formatter profile settings take precedence over VS Code's
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 546
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
I have a configured formatter profile which has, among others, the following property:
<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="tab"/>
<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/>
If I go to a file and change, using the the option on the bottom right of VSCode to use a different attribute (ex.: space: 8) to code automatically formats to that selection, ignoring the formatted profile.
The problem is that after doing that, the formatter option for tabulations stop working. There should be a way to force format according the formatter profile, or to remove these individual file formatter options. Right now, I have some files where I pressed this and I don't know which ones, and can't force them to be formatted properly
Environment
- Operating System: Windows 10 Pro
- JDK version: 1.8.0_172
- Visual Studio Code version: 1.28.0
- Java extension version: 0.32
Steps To Reproduce
- Create and apply a formatter profile with tabulation char TAB and size: 4
- Open .java file and format it. It applies this profile format
- Using VSCode bottom right menu, change tabulation char and size. Ex.: SPACE and size: 8. The file applies this profile format.
- Now you can't change this specific file to apply the profile configured tabulation char and size.
Current Result
The project applies to manually selected configuration. Can't revert to use profile format.
Expected
One of the following:
- Allow to format all project according to profile formatter
- Force format a single file to apply profile formatter
- Ignore profile formatter for a list of files (but this needs to be visible/editable on settings)
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在 Java 扩展中对一个 .java 文件复现 formatter-profile 和 VS Code 右下角格式设置的更改。跟踪按文件选择的格式选项如何覆盖配置文件;完成标准是用户可以为单个文件或项目恢复或强制使用配置文件格式,并且活动的覆盖设置可见或可编辑。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, typescript, vscode
- 领域
- developer-experience, tooling
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100