nirix / atom-editor-settings

Atom package to add support for editor settings per-language, file extension and directory.
https://atom.io/packages/editor-settings
MIT License
21 stars 10 forks source link

Per-language settings not being picked up under macOS Sierra #31

Open jonpearse opened 7 years ago

jonpearse commented 7 years ago

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.

  1. set Atom’s default editor settings to use soft tabs, with four spaces per tab
  2. create a grammar configuration for Ruby, using hard tabs, set to two spaces per tab
  3. create a number of empty Ruby files in a blank directory, and open it with Atom.
  4. open one of the files. You should find that hitting tab will insert soft tab at 4 spaces
  5. open and close the grammar configuration: hitting tab in the Ruby file should now insert a hard tab at 2 spaces
  6. open one of the other Ruby files. Hitting tab should continue to insert a hard tab at2 spaces
  7. close both Ruby files and re-open one. This should reset back to inserting a soft tab at 4 spaces.
  8. open + close the grammar configuration (back to a hard tab at 2 spaces)
  9. create a new Ruby file. This should go back to a hard tab at 2 spaces until you open/close the grammar config again
  10. 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

nirix commented 7 years ago

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.