atom-editor-settings
atom-editor-settings copied to clipboard
Per-language settings not being picked up under macOS Sierra
I’m using atom-editor-settings 1.1.2 with Atom 1.14.1, and have recently upgraded to macOS 10.12.3.
Since upgrading my OS, I’ve noticed that atom-editor-settings doesn’t seem to be applying per-language settings by default when opening a file. Thus, tab length, soft tabs, etc are configured as per Atom’s default.
However, if I then open the grammar config file from the command palette and close it again, the settings are now correctly applied to both the open file, plus any subsequently-opened files using the same grammar. This will continue until all files that use that grammar are closed, or a new file that should use that grammar is created, whereupon Atom’s defaults will be used instead.
Steps to reproduce
Note: I’m using Ruby as an example, but I can reproduce this with every language I’ve tried where I’ve also specified a grammar configuration.
- set Atom’s default editor settings to use soft tabs, with four spaces per tab
- create a grammar configuration for Ruby, using hard tabs, set to two spaces per tab
- create a number of empty Ruby files in a blank directory, and open it with Atom.
- open one of the files. You should find that hitting tab will insert soft tab at 4 spaces
- open and close the grammar configuration: hitting tab in the Ruby file should now insert a hard tab at 2 spaces
- open one of the other Ruby files. Hitting tab should continue to insert a hard tab at2 spaces
- close both Ruby files and re-open one. This should reset back to inserting a soft tab at 4 spaces.
- open + close the grammar configuration (back to a hard tab at 2 spaces)
- create a new Ruby file. This should go back to a hard tab at 2 spaces until you open/close the grammar config again
- close all ruby files, and re-open one. You should be back with soft tabs at 4 spaces once more
…
My apologies for the long issue, but I wanted to give as much information as I could. Please do let me know if I can provide you with any further information that might help.
J
No need to apologise for a long issue, the more information the better 👍
I still use El Capitan on my primary Mac, but will test this out on another that has Sierra.