Skip to content

Instantly share code, notes, and snippets.

@NikolaRusakov
Created March 11, 2026 16:49
Show Gist options
  • Select an option

  • Save NikolaRusakov/f7b7bc1abc3f1358d5e631e74f0f5b67 to your computer and use it in GitHub Desktop.

Select an option

Save NikolaRusakov/f7b7bc1abc3f1358d5e631e74f0f5b67 to your computer and use it in GitHub Desktop.

Revisions

  1. NikolaRusakov created this gist Mar 11, 2026.
    1 change: 1 addition & 0 deletions ast-grep.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    You run in an environment where `ast-grep` is available; whenever a search requires syntax-aware or structural matching, default to `ast-grep --lang rust -p '<pattern>'` (or set `--lang` appropriately) and avoid falling back to text-only tools like `rg` or `grep` unless I explicitly request a plain-text search.