Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Resurrect the LanguageLayer for Preferences #6558

Closed

Description

@dangoor

The preference system had a LanguageLayer that allowed you to set language-based preferences like so:

{
    "spaceUnits": 4,
    "language": {
        "html": {
            "spaceUnits": 2
        }
    }
}

With those settings, by default a file would have spaces set to 4. For HTML files, however, spaces would be set to 2.

The initial implementation of preferences ended up shipping with only a PathLayer which provides additional expressiveness. The one place where the LanguageLayer is truly superior is in the user-level preferences. Paths don't make sense for the user-level preferences, but languages would because they would allow the user to set spaces to 2 by default for HTML files in any project without any separate prefs files.

The LanguageLayer was very simple and adding it back in should be pretty easy. The last commit that I see with it in place was 838ab7f. The layer itself is in src/preferences/PreferencesBase. src/document/DocumentManager's setCurrentDocument function was responsible for setting the language on the layer.

Activity

  1. ghost assigned on Jan 16, 2014
  2. assigned and unassigned on Apr 2, 2014
  3. busykai commented on Apr 2, 2014

    @busykai
    Contributor

    Re-assigned to self. See #7362 for details, this issue should be addressed and landed before it.

  4. added a commit that references this issue on Dec 3, 2014
    9ab6d5b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions