Mechanism for passing arbitrary extra config to formatters
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- vim
- 领域
- tooling
调研方向
该 issue 将 .clang-format 和 .editorconfig 列为可能的项目本地配置源,并以 js-beautify 的 --type 和 --aosp 为例。首先梳理当前如何选择 formatter 专用选项;完成的标准是确定一种按 formatter 和按路径的机制,避免相互冲突的 defaults 和意外传播。
由索引模型根据 Issue 内容生成。
描述
Lots of formatters have extra config users may want to pass, and creating a top-level flag for each one will get cumbersome. We should consider a generic mechanism for passing flags through to formatters.
Factors to consider:
- These should be attached to the fine-grained formatter name, not the language, because we don't want to accidentally pass them to a different formatter that doesn't support them when the user switches formatter.
- Some might conflict with default flags. For instance, a user might want to pass
--typeto js-beautify and find that it conflicts with the--typeflag we already pass by default. - Most config would be per-path rather than global preferences. For instance, a user will want to configure an
--aospflag when working on Android Java, but then be surprised if it's applied to other Java code they're working on later. - If possible, these config options should live in some project-local config file like
.clang-formator.editorconfig, not something codefmt-specific, and codefmt should just try to be smart about detecting and not conflicting with such config where appropriate.
- 主要语言
- Vim Script
- 星标
- 1.1k
- 派生
- 102
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
google/vim-codefmt 的其他 Issue
-
enhancement
难度 1/5 1-3 小时 新手友好度 68/100
google/vim-codefmt#53 ·
-
Add meson format 未关闭new formatter
难度 3/5 1-2 天 新手友好度 45/100
google/vim-codefmt#243 ·
-
难度 3/5 1-2 天 新手友好度 52/100
google/vim-codefmt#240 · 1 条评论 ·
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
google/vim-codefmt#234 · 2 条评论 ·
-
难度 1/5 1-3 小时 新手友好度 45/100
google/vim-codefmt#222 · 3 条评论 ·
查看 google/vim-codefmt 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
vercel-labs/just-bash#464 ·
-
Bug
难度 2/5 1-3 小时 新手友好度 70/100
Automattic/safe-publish#594 ·
-
bug
难度 1/5 1 小时以内 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
bug feat:crypto feat:utils
难度 2/5 1-3 小时 新手友好度 70/100