【问题标题】:Is it possible to put an editorconfig file not at the top level root dir?是否可以将 editorconfig 文件不在顶级根目录中?
【发布时间】:2016-07-21 10:43:48
【问题描述】:

所以我有一个这样的编辑器配置文件:

# Indent preferences
indent_style = space
indent_size = 2

# Do not change these
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = true

我的文件结构如下:

|-- src
|-- tools
|-- test
|-- config
    .editorconfig

如您所见,我有一个配置目录,我想在其中保留所有与配置相关的内容。我希望在整个项目中使用 .editorconfig 文件,但显然它不在顶级根目录中。这可能吗?

【问题讨论】:

    标签: configuration config text-editor atom-editor editorconfig


    【解决方案1】:

    目前不可能:.editorconfig文件从根目录加载到每个目录级别的文件目录。在config 目录中支持这样的功能很容易搞砸。

    【讨论】:

    • @LEO EditorConfig 主要针对为项目定义相同的编码风格,同时允许开发人员使用不同的编辑器。如果是个人编辑器配置,你可以在你的编辑器设置中进行。
    猜你喜欢
    • 2017-08-27
    • 1970-01-01
    • 2020-06-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-21
    • 2018-01-27
    • 2012-08-09
    相关资源
    最近更新 更多