Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to prioritize local config dotfiles over user-specified config_path #66

Closed
bitst0rm opened this issue Oct 10, 2024 · 0 comments
Closed
Labels
info This is for informational purposes

Comments

@bitst0rm
Copy link
Contributor

local config dotfiles are those files within your project like .prettierrc, .clang-format, eslint.config.mjs, pyproject.toml, setup.cfg, tox.ini, etc...

All versions prior to version 1.7.0, the rules for prioritizing config file were as follows:

  1. user-specified config_path first
  2. local config dotfiles last

Starting from version 1.7.0, the rules have been reversed to prioritize local config dotfiles for projects:

  1. local config dotfiles first
  2. user-specified config_path last

These changes have been documented in README.md and in Formatter.sublime-settings:

            // - Any auto-detected local config dotfile within the file
            //   tree always takes precedence over this option.
            // To ignore the local config dotfile in favor of this option:
            // 1. Set "ignore_dotfiles" to true, OR
            // 2. Remove or rename the detected local config dotfile, OR
            // 3. Use the Quick Options: Ignore Config Dotfiles, OR
            // 4. Place an '.sublimeformatter.ignore.json' file inside
            //    the working root folder. The structure of this file is
            //    explained in README.md > Auto-detect Formatting
            "config_path": {
                "ignore_dotfiles": false,
                "css": "${packages}/User/formatter.assets/config/only_css_rc.json",
                "php": "${packages}/User/formatter.assets/config/only_php_rc.json",
                "default": "${packages}/User/formatter.assets/config/css_plus_js_plus_php_rc.json"
            },

The local config dotfile will be resolved starting from the location of the file being formatted, and searching up the file tree until a config file is found.

Also, the Quick Options Ignore Config Path has been removed in favor of Ignore Config Dotfiles

@bitst0rm bitst0rm added the info This is for informational purposes label Oct 10, 2024
@bitst0rm bitst0rm pinned this issue Oct 10, 2024
@bitst0rm-pub bitst0rm-pub locked as spam and limited conversation to collaborators Oct 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info This is for informational purposes
Projects
None yet
Development

No branches or pull requests

1 participant