Better support for configuration options


#1

At the moment we’re limited to checkboxes and text fields. We need textareas, drop downs, sliders, field descriptions, help text etc. Hell, we can’t even add brackets to our config field titles at the moment as far as I’m aware.

Perhaps instead of

configDefaults: {
  app: 'Terminal.app'
  args: ''
},

we could get

configDefaults: {
  app: 'Terminal.app'
  args: {
    title: 'Command line Arguments',
    default: '',
    type: 'textarea',
    comment: 'These will be added before the filepath'
  },
  someDropdown: {
    type: 'select',
    options: ['foo', 'bar'],
    default: 'foo'
  }
},

The above would keep support for the old config style so nothing would break but also support a much more configurable new method. It would even let us do cool stuff like

  configDefaults: {
    args: {
      title: 'Command line Arguments',
      default: '',
      type: 'my_custom_field_type'
    }
  },

where my_custom_field_type can be a coffee file by the same name that outputs in any way we want. This would be useful, for example, if we only wanted to show options under certain circumstances.


How to create a shortcut to cycle between ERB tags?
#2

I like this idea. We are slowly adding more features to the Settings View package to handle cases like these. The trick is to keep ~/.atom/config.cson editable and as human readable as possible while still making the Settings View easy to use.


#3

That’s where keeping the old way of doing things comes in handy :slight_smile: The standard 1 line with string or true/false will still suffice for 90% of settings. Great to hear you guys are on it.