Adds support for per-language, file extension and directory editor settings.
Open a file you'd like to configure the settings for, ensure that its grammar is correctly
detected (look at the grammar selector in the bottom right corner of Atom or press ⌃⇧L)
and open the command palette (⌘⇧P or ⌃⇧P). Type
Editor Settings: Open Grammar Config
and press ⏎.
.cson file for the grammar of the file you had open should show with the current
editor settings for the given grammar. Edit it and save.
The language/grammar settings files are saved in the
grammar-config directory located
in the main Atom configuration directory with a lower-case file name format.
For example, the config file for CoffeeScript would be
For a per directory based configuration, you can create a
.editor-settings file in the
The API for setting editor settings currently only supports:
The following example is for CoffeeScript, it sets the tab length to
2, but if
the file extension is
.cson it sets it to
tabLength: 2 extensionConfig: cson: tabLength: 4
fontFamily: 'Source Code Pro' grammarConfig: 'GitHub Markdown': fontFamily: 'monospace'
All options not nested under a specific grammar are used for all grammar and extensions.
tabLength: 2 themes: ['atom-light-ui', 'atom-light-syntax'] grammarConfig: 'PHP': tabLength: 4 softTabs: true extensionConfig: phtml: softTabs: false
If there is a feature you'd like added simply create an issue or fork and implement it and send a pull request.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.