-
Notifications
You must be signed in to change notification settings - Fork 177
VSCode highlights for common method prefixes
MahtraDR edited this page Apr 28, 2022
·
1 revision
I use an extension called Hilight
With that extension, and this settings.json
file, I get contextual highlights for common methods.
Caveats... this looks for all instances of common methods not using their correct DRC*
prefix. Sometimes you get false positives, so don't just search and replace, but look through as well... In particular words in comments (the word "message" is popular for example) will get prefixed, and as the project grew, folks re-used def names... so be mindful of that too...
{
"files.associations": {
"*.lic": "ruby"
},
"highlight.decorations": {
"rangeBehavior": 0 }, // Default decorations from which all others inherit from
"highlight.maxMatches": 250, // Maximum number of matches to decorate per regex, in order not to crash the app with accidental cathastropic regexes
"highlight.regexes": {
"(include DRC\\s|((?<!DRC\\.)(bput|wait_for_script_to_complete|can_see_sky\\\\?|forage\\\\?|collect|kick_pile\\\\?|rummage|get_skins|get_gems|get_materials|list_to_array|box_list_to_adj_and_noun|list_to_nouns|get_noun|remove_flavor_text|get_town_name|beep|fix_standing|listen\\\\?|assess_teach|hide\\\\?|fix_dr_bullshit|left_hand|right_hand|left_hand_noun|right_hand_noun|release_invisibility|check_encumbrance|retreat|text2num|play_song\\\\?|stop_playing|clean_instrument|pause_all|unpause_all|smart_pause_all|unpause_all_list|set_stance|atmo|bold|message|initialize|send_slack_token|validate|confirm|valid\\\\?|send_bankbot_balance|send_bankbot_location|send_bankbot_help|in_game\\\\?)\\b))": {
"filterFileRegex": ".*\\.lic",
"decorations": [
{
"backgroundColor": "#FF2D00",
"color": "#1f1f1f",
"fontWeight": "bold"
}
]
},
"(include DRCA\\s|((?<!DRCA\\.)(infuse_om|harness\\\\?|harness_mana|start_khris|activate_khri\\\\?|kneel_for_khri\\\\?|start_barb_abilities|activate_barb_buff\\\\?|prepare\\\\?|spell_preparing\\\\?|spell_prepared\\\\?|spell_preparing|ritual|prepare_to_cast_runestone\\\\?|get_runestone\\\\?|cast\\\\?|find_charge_invoke_stow|find_focus|stow_focus|find_cambrinth|stow_cambrinth|skilled_to_charge_while_worn\\\\?|charge_and_invoke|invoke|charge\\\\?|release_cyclics|parse_regalia|shatter_regalia\\\\?|parse_mana_message|perc_mana|perc_aura|cast_spells|cast_spell\\\\?|cast_spell|segue\\\\?|check_discern|calculate_mana|check_to_harness|crafting_cast_spell|crafting_prepare_spell|crafting_magic_routine|do_buffs|update_avtalia|invoke_avtalia|charge_avtalia|choose_avtalia|check_elemental_charge|perc_symbiotic_research|release_magical_research)\\b))": {
"filterFileRegex": ".*\\.lic",
"decorations": [
{
"backgroundColor": "#FF00EC",
"color": "#1f1f1f",
"fontWeight": "bold"
}
]
},
"(include DRCC\\s|((?<!DRCC\\.)(empty_crucible?|find_empty_crucible|clean_anvil?|find_wheel|find_anvil|find_grindstone|find_sewing_room|find_loom_room|find_shaping_room|find_press_grinder_room|find_enchanting_room|recipe_lookup|find_recipe|get_crafting_item|stow_crafting_item|logbook_item|order_enchant|fount|clean_brazier?|empty_brazier)\\b))": {
"filterFileRegex": ".*\\.lic",
"decorations": [
{
"backgroundColor": "#FF7C00",
"color": "#1f1f1f",
"fontWeight": "bold"
}
]
},
"(include DRCM\\s|((?<!DRCM\\.)(minimize_coins|convert_to_copper|get_canonical_currency|convert_currency|hometown_currency|check_wealth|wealth|get_total_wealth|ensure_copper_on_hand|withdraw_exact_amount\\\\?|get_money_from_bank|debt|deposit_coins|town_currency)\\b))": {
"filterFileRegex": ".*\\.lic",
"decorations": [
{
"backgroundColor": "#1BB324",
"color": "#1f1f1f",
"fontWeight": "bold"
}
]
},
"(include DRCH\\s|((?<!DRCH\\.)(has_tendable_bleeders\\\\?|check_health|perceive_health|perceive_health_other|parse_perceived_health|parse_bleeders|parse_wounds|parse_parasites|parse_lodged_items|bind_wound|unwrap_wound|skilled_to_tend_wound\\\\?|calculate_score)\\b))": {
"filterFileRegex": ".*\\.lic",
"decorations": [
{
"backgroundColor": "#FFFFFF",
"color": "#1f1f1f",
"fontWeight": "bold"
}
]
},
"(include DRCI\\s|((?<!DRCI\\.)(dispose_trash|search\\\\?|wearing\\\\?|inside\\\\?|exists\\\\?|tap|in_hands\\\\?|in_left_hand\\\\?|in_right_hand\\\\?|in_hand\\\\?|have_item_by_look\\\\?|count_item_parts|count_items|count_items_in_container|count_lockpick_container|get_box_list_in_container|count_all_boxes|stow_hands|stow_hand|get_item_if_not_held\\\\?|get_item\\\\?|get_item|get_item_safe\\\\?|get_item_safe|get_item_unsafe|get_item_from_eddy_portal\\\\?|tie_item\\\\?|untie_item\\\\?|wear_item\\\\?|wear_item_safe\\\\?|wear_item_unsafe\\\\?|remove_item\\\\?|remove_item_safe\\\\?|remove_item_unsafe\\\\?|stow_item\\\\?|stow_item_safe\\\\?|stow_item_unsafe\\\\?|lower_item\\\\?|container_is_empty\\\\?|get_inventory_by_type|get_item_list|rummage_container|look_in_container|put_away_item\\\\?|put_away_item_safe\\\\?|put_away_item_unsafe\\\\?|open_container\\\\?|close_container\\\\?|give_item\\\\?|accept_item\\\\?)\\b))": {
"filterFileRegex": ".*\\.lic",
"decorations": [
{
"backgroundColor": "#00FFF7",
"color": "#1f1f1f",
"fontWeight": "bold"
}
]
},
"(include DRCMM\\s|((?<!DRCMM\\.)(observe|predict|study_sky|get_telescope\\\\?|store_telescope\\\\?|get_telescope|store_telescope|peer_telescope|center_telescope|align|get_bones\\\\?|store_bones\\\\?|get_bones|store_bones|roll_bones|get_div_tool\\\\?|store_div_tool\\\\?|get_div_tool|store_div_tool|use_div_tool|wear_moon_weapon\\\\?|drop_moon_weapon\\\\?|holding_moon_weapon\\\\?|hold_moon_weapon\\\\?|is_moon_weapon\\\\?|moon_used_to_summon_weapon|update_astral_data|find_visible_planets|set_planet_data|set_moon_data|moons_visible\\\\?|visible_moons|check_moonwatch)\\b))": {
"filterFileRegex": ".*\\.lic",
"decorations": [
{
"backgroundColor": "#CF4FFF",
"color": "#1f1f1f",
"fontWeight": "bold"
}
]
},
"(include DRCS\\s|((?<!DRCS\\.)(summon_weapon|get_ingot|stow_ingot|break_summoned_weapon|shape_summoned_weapon|identify_summoned_weapon|turn_summoned_weapon|push_summoned_weapon|pull_summoned_weapon|summon_admittance)\\b))": {
"filterFileRegex": ".*\\.lic",
"decorations": [
{
"backgroundColor": "#00FFC9",
"color": "#1f1f1f",
"fontWeight": "bold"
}
]
},
"(include DRCTH\\s|((?<!DRCTH\\.)(has_holy_water\\\\?|has_flint\\\\?|has_holy_oil\\\\?|has_incense\\\\?|has_jalbreth_balm\\\\?|buying_cleric_item_requires_bless\\\\?|buy_cleric_item\\\\?|buy_single_supply|quick_bless_item|empty_cleric_hands|empty_cleric_right_hand|empty_cleric_left_hand|sprinkle_holy_water\\\\?|sprinkle_holy_oil\\\\?|sprinkle_holy_water|sprinkle_holy_oil|sprinkle\\\\?|apply_jalbreth_balm|wave_incense\\\\?|commune_sense)\\b))": {
"filterFileRegex": ".*\\.lic",
"decorations": [
{
"backgroundColor": "#8B00FF",
"color": "#1f1f1f",
"fontWeight": "bold"
}
]
},
"(include DRCT\\s|((?<!DRCT\\.)(sell_item|buy_item|ask_for_item\\\\?|order_item|dispose|refill_lockpick_container|walk_to|tag_to_id|retreat|find_empty_room|sort_destinations|find_sorted_empty_room|time_to_room|reverse_path|get_hometown_target_id)\\b))": {
"filterFileRegex": ".*\\.lic",
"decorations": [
{
"backgroundColor": "#ffcc00",
"color": "#1f1f1f",
"fontWeight": "bold"
}
]
}
},
"redhat.telemetry.enabled": true,
"telemetry.telemetryLevel": "off",
"html.format.contentUnformatted": ""
}