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

Add per-project settings #6

Open
Iristyle opened this issue Mar 11, 2013 · 2 comments
Open

Add per-project settings #6

Iristyle opened this issue Mar 11, 2013 · 2 comments

Comments

@Iristyle
Copy link
Contributor

I thought that this was a general feature of Sublime, but it turns out that it's not.

Essentially, I would like to add a "RelatedFiles" section to the .sublime-project file to make the configuration project specific.

For instance, with SublimeLinter I can have something like the following in my Demo.sublime-project file.

{
  "folders":
  [
    {
      "path": "..\\Demo",
      "file_exclude_patterns":
      [
        "*.hgignore",
        "*.gitignore",
        "generated/*",
        "dist/*",
        "node_modules/*",
        "components/*",
        "coverages/*"
      ]
    }
  ],
  "settings":
  {
    "tab_size": 2,
    "SublimeLinter":
    {
      "sublimelinter_executable_map":
      {
        "javascript":"c:\\Program Files (x86)\\nodejs\\node.exe",
        "css":"c:\\Program Files (x86)\\nodejs\\node.exe"
      },
      "sublimelinter_delay": 0.3,
      "sublimelinter_gutter_marks": true,
      "sublimelinter_popup_errors_on_save": true,
      // http://www.jshint.com/options/ for more info. eval *NOT* allowed
      "jshint_options":
      {
        "indent": 0,
        "evil": false,
        "regexdash": true,
        "browser": true,
        "wsh": false,
        "trailing": true,
        "sub": false
      },
      "coffeelint_options":
      {
        "no_tabs":                { "level": "error"  },
        "no_trailing_whitespace": { "level": "error"  },
        "max_line_length":        { "level": "error", "value": 80 },
        "camel_case_classes":     { "level": "error"  },
        "indentation":            { "level": "error", "value": 2 },
        //TODO: https://github.com/clutchski/coffeelint/issues/50
        "no_implicit_braces":     { "level": "ignore"  },
        "no_implicit_parens":     { "level": "ignore" },
        "no_trailing_semicolons": { "level": "error"  },
        "no_plusplus":            { "level": "ignore" },
        "no_throwing_strings":    { "level": "error"  },
        "cyclomatic_complexity":  { "level": "ignore", "value": 11 },
        "line_endings":           { "level": "ignore" },
        "no_backticks":           { "level": "error" },
        "no_stand_alone_at":      { "level": "error" }
      },
      // Set to true to highlight annotations
      "sublimelinter_notes": true,
      // The set of annotation phrases to highlight
      "annotations": ["TODO", "README", "FIXME", "HACK"]
    }
  }
}

I would like to be able to add a "RelatedFiles" section just like the "SublimeLinter" section, that would look something like.

"RelatedFiles": {
  "patterns": {
    // AngularJS constructs
    ".+\/app\/js\/(controllers|directives|filters|responseInterceptors|services)\/(.+)\\.coffee":
      [
        "app/js/*.coffee",
        "app/partials/$2/**",
        "app/data/$2*",
        "test/e2e/$1/$2.coffee",
        "test/spec/$1/$2.coffee"
      ],

    // AngularJS tests
    ".+\/test\/(e2e|spec)\/(.+)\/(.+)\\.coffee":
      [
        "app/js/*.coffee",
        "app/js/$2/$3.coffee",
        "app/partials/$3/**",
        "app/data/$3*",
        "test/*.*"
      ]
  }
}

I've run out of time to figure out how to do this, but I'm sure it's somewhere in their code -> https://github.com/SublimeLinter/SublimeLinter

@maximeaubaret
Copy link

I'd like to have this too, since i'm working with different projects types. It also simplifies collaboration. 👍 @Iristyle

@fabiokr
Copy link
Owner

fabiokr commented Jan 29, 2014

Added on 2232a47, could you give it a shot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants