Change way layers receive settings
Right now we do something like this:
:layers
[
:core
:git
:clojure
:python
]
To set config we do
;; stuff for proton
["proton.core.showTabBar" false]
["proton.core.relativeLineNumbers" true]
Maybe we should think about going the spacemacs way and doing something like
:layers
[
:core
:git
:clojure
[:python {"showTabBar" false
"relativeLineNumbers" true}
]
instead. This would make it more clear that a config is for a layer only.
So I think you are on the right track here, but weren't able to come up with the right example because we don't currently support config options per layer. (The two configs you set here were actually no specific to the python layer -- they were at the proton level itself)
I don't think we actually have any config options for any of our existing layers. The way spacemacs does it is they conditionally enable or disable the functionality of a particular layer, based on config value passed when enabling that layer.
For example in the python layer you can have spacmacs automatically run yapf whenever you save a python file. This option is defined here and can be enabled by putting:
(python :variables
python-enable-yapf-format-on-save t)
In the layer config section of ~/.spacemacs.
I think doing this would be awesome!
Somewhat inline with this is the way configuration is pretty verbose. Right now I'm setting Editor :configuration this way:
;; Editor
["editor.fontFamily" "Hack"]
["editor.fontSize" 10]
["editor.lineHeight" 1.6]
["editor.backUpBeforeSaving" true]
["editor.scrollPastEnd" true]
["editor.showIndentGuide" true]
It would be nice if we could group stuff (I have no experience with Clojure so no idea of the syntax is even remotely valid :stuck_out_tongue:) like this:
;; Editor
["editor" {"fontFamily" "Hack"
"fontSize" 10
"lineHeight" 1.6
"backUpBeforeSaving" true
"scrollPastEnd" true
"showIndentGuide" true}]
Would it be ok to upgrade to clojure 1.9 and add clojure.spec.alpha? Basically this would make it really simple to spec out any style of config and validate it and parse it.
I can spec out the current config + spec out this new style.