<reponame>smridge/vscode_rails_syntax<gh_stars>10-100

{
  "scopeName": "action_view",
  "injectionSelector": "L:source -comment -string -source.ruby.gemfile",
  "patterns": [
    { "include": "#helpers_text_helper" },
    { "include": "#helpers_translation_helper" },
    { "include": "#helpers_url_helper" },
    { "include": "#helpers_cache_helper" },
    { "include": "#helpers_tag_helper" }
  ],
  "repository": {
    "helpers_text_helper": {
      "patterns": [
        {
          "name": "support.function.text-helper.action-view.rails",
          "match": "(?<!\\.)\\b(concat|current_cycle|cycle|excerpt|highlight|pluralize|reset_cycle|safe_concat|simple_format|truncate|word_wrap)\\b(?=\\s|\\()",
          "comment": "https://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html"
        }
      ]
    },
    "helpers_translation_helper": {
      "patterns": [
        {
          "name": "support.function.text-translation.action-view.rails",
          "match": "(?<!\\.)\\b(l|localize|t|translate)\\b(?=\\s|\\()",
          "comment": "https://api.rubyonrails.org/classes/ActionView/Helpers/TranslationHelper.html"
        }
      ]
    },
    "helpers_url_helper": {
      "patterns": [
        {
          "name": "support.function.url-helper.action-view.rails",
          "match": "(?<!\\.)\\b(button_to|link_to|link_to_if|link_to_unless|link_to_unless_current)\\b(?=\\s|\\()",
          "comment": "https://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html"
        },
        {
          "name": "support.function.url-helper.action-view.rails",
          "match": "(?<!\\.)\\b(current_page\\?)\\B(?=\\s|\\()",
          "comment": "https://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html"
        }
      ]
    },
    "helpers_cache_helper": {
      "patterns": [
        {
          "name": "support.function.cache-helper.action-view.rails",
          "match": "(?<!\\.)\\b(cache|cache_fragment_name|cache_if|cache_unless)\\b(?=\\s|\\()",
          "comment": "https://api.rubyonrails.org/classes/ActionView/Helpers/CacheHelper.html"
        }
      ]
    },
    "helpers_tag_helper": {
      "patterns": [
        {
          "name": "support.function.action-view.helpers.rails",
          "match": "(?<!\\.)\\b(cdata_section|content_tag|escape_once|tag)\\b(?=\\040+|\t+|\\()",
          "comment": "https://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html"
        },
        {
          "name": "support.function.action-view.helpers.rails",
          "match": "(?<!\\.)\\b(tag)\\b(?=\\.)",
          "comment": "https://api.rubyonrails.org/classes/ActionView/Helpers/TagHelper.html"
        }
      ]
    }
  }
}
