Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Support scoped settings #46

Merged
merged 2 commits into from
Oct 24, 2014
Merged

Support scoped settings #46

merged 2 commits into from
Oct 24, 2014

Conversation

benogle
Copy link
Contributor

@benogle benogle commented Oct 24, 2014

This adds support for scoped settings. All the settings are now scoped to language. .source.jade language defaults removeTrailingWhitespace to false.

Additionally, now you can override these in your config file on a per language basis. For example:

'.source.gfm':
  whitespace: 
    removeTrailingWhitespace: false
    ignoreWhitespaceOnCurrentLine: false
    # ...

Closes #36

@@ -62,10 +62,20 @@ describe "Whitespace", ->
atom.config.set("whitespace.removeTrailingWhitespace", false)

it "does not trim trailing whitespace", ->
editor.insertText "don't trim me "
editor.insertText "don't trim me \n\n"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without these, it doesnt event trim with atom.config.set("whitespace.removeTrailingWhitespace", true) cause of ignoreWhitespaceOnCurrentLine.

@mjrk
Copy link
Contributor

mjrk commented Jun 29, 2015

I tried and search how to achieve the same thing with slim (ruby-slim as well as slim-language packages):

".source.slim":
  whitespace:
    removeTrailingWhitespace: false

[EDIT] Please see the solution in #72 (comment). The right scopeName is .slim.text

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

Successfully merging this pull request may close these issues.

2 participants