Visitar URL original
[Feature Request] Appending settings in project · Issue #1935 · SublimeLinter/SublimeLinter · GitHub
Skip to content

[Feature Request] Appending settings in project #1935

Description

@WZ-Tong

When I need some common parameters ("args" field) and some "project specific" parameters, I have to copy all the common ones into my project settings.

If there is any way to append/override some default settings, this would be helpful.

Example:

SublimeLinter:

{
    "linters": {
        "mylinter": {
            "args": ["-c", "common_args", "-o", "override_args"],
    	},    
    },
}

Project:

{
    "settings": {
        "SublimeLinter.linters.mylinter.args.override": [
        	"-a", "additional_args"
        	"-o", "project_override_args",
        ],
    },
}

Activity

  1. kaste commented on Apr 24, 2024

    @kaste
    Member

    It would be "SublimeLinter.linters.mylinter.args.append" from my understanding. From the implementation side, the key of the setting then is args.append, and you could also choose "SublimeLinter.linters.mylinter.additional_args" or extend_args, you get it, everything after the prefix is the key name of just another setting. That would be my perspective on it right now.

    The implementation would be a trivial one-liner probably, plus a lot more for the unit tests. Bike-shedding the name is probably difficult.

  2. kaste commented on Feb 18, 2025

    @kaste
    Member

    I think we should go with "SublimeLinter.linters.mylinter.+args" (I prefer that over "SublimeLinter.linters.mylinter.args+"). It should denote that it appends to args, "+args" == additional args, or "args +args" which is what we literally would do in the code. This can be expanded to some other settings, namely "excludes", "filter_errors", and "env".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions