brantou / spacemacs-crystal-layer

Spacemacs layer for Crystal
GNU General Public License v3.0
9 stars 1 forks source link

Only add the formatter in Crystal mode #2

Closed marten closed 6 years ago

marten commented 6 years ago

I found that the formatter would also run on my Ruby code, and discovered that it seemed to actually be active in all major modes, and just would appear not to do anything because most non-Crystal files wouldn't parse correctly, and thus wouldn't get reformatted.

This change will make it so that the tool formatter is only hooked up when in crystal-mode.