atom / language-ruby-on-rails

Ruby on Rails package for Atom
Other
48 stars 41 forks source link

Highlighting like ACE Cloud9 #28

Open xpepermint opened 9 years ago

xpepermint commented 9 years ago

I started the descusion here. The code is much more readable in ACE. In the example bellow the if:, unless:, presence: should be colored differently (now with the same color).

class Product < ActiveRecord::Base
  belongs_to :project

  enum status: { enabled: 1, disabled: 2 }

  validates :project, :type, presence: true
  with_options if: :something?, unless: :something? do |step|
    step.validates :name, :description, presence: true
  end
end

Can we add this?

lee-dohm commented 9 years ago

I disagree. The if:, unless: and presence: in your example are all symbols and should be colored the same as other symbols, such as status:, enabled: and disabled: from your example. Unless there is some concrete and repeatable heuristic you can describe other than "symbols that have the same text as keywords"? (Though that wouldn't explain your suggestion that presence: be colored differently.)