Herrington Darkholme @hd-nvim.bsky.social · 28/07/2025#ast_grep_trick ast-grep's rule is heavily inspired by CSS selectors. The rule `identifier` node is `inside` the node `call_expression` is something similar to `call_expression > identifier` 030
Herrington Darkholme @hd-nvim.bsky.social · 19/06/2025letting AI write an ast-grep rule for me. I'm using cursor, ast-grep mcp tool, custom cursor rule and gemini-2.5pro 120
Herrington Darkholme @hd-nvim.bsky.social · 04/06/2025Compare biomejs plugin with ast-grep in one picture: both syntax and speed. 021
Herrington Darkholme @hd-nvim.bsky.social · 29/05/2025One pic to compare ast-grep rule syntax with biome plugin syntax. The example shows the rule no-implicit-bool-jsx-attr, e.g. <div draggable /> => <div draggable={true} /> 011
Herrington Darkholme @hd-nvim.bsky.social · 04/05/2025A proof of concept to run ast-grep via OXC parser 181
Herrington Darkholme @hd-nvim.bsky.social · 16/02/2025ast-grep playground now shows the wasm parser version it is using. convenient to debug parser version difference from CLI 010
Herrington Darkholme @hd-nvim.bsky.social · 13/02/2025Learning a tool can be overwhelming, but ast-grep's new UI makes it easier to explore bit by bit. 📊 Better visuals: Show more rule information 🔍 Filter examples: By rules, features, and languages 📈 Sort by complexity: Start with easy rules and explore sophisticated ones 100
Herrington Darkholme @hd-nvim.bsky.social · 09/02/2025my hand-rolled code is better than AI i guess 000
Herrington Darkholme @hd-nvim.bsky.social · 30/01/2025New ast-grep example from @tmcw.mastodon.social.ap.brid.gy ! ast-grep.github.io/catalog/tsx/... 000
Herrington Darkholme @hd-nvim.bsky.social · 20/01/2025ast-grep now has HTML rule example! BTW you can also use it with Vue, Svelte or Astro! 110
Herrington Darkholme @hd-nvim.bsky.social · 20/01/2025Hey LLM, please read this step-by-step breakdown of ast-grep rule. 030
Herrington Darkholme @hd-nvim.bsky.social · 08/01/2025TIL civetlang, typed coffee-script, supports if/else in type 010
Herrington Darkholme @hd-nvim.bsky.social · 29/12/2024ast-grep's LSP now can report unused directive and remove them! 020
Herrington Darkholme @hd-nvim.bsky.social · 11/12/2024Can switching colorscheme when editing Nextjs files helps telling if it is client or server component? github.com/HerringtonDa... 1100
Herrington Darkholme @hd-nvim.bsky.social · 04/12/2024New ast-grep feature! You can now use `range` to select AST nodes in the source code. Why will it be useful? Find nodes using sources like Rust Analyzer, TypeScript, and other language tools! e.g. Use tsc to find errors and tell ast-grep to fix them! 021
Herrington Darkholme @hd-nvim.bsky.social · 03/12/2024Pro tip: You can combine three ast-grep flags: `--stdin` , `--inline-rules`, and `--json`, to use the tool programmatically without API! The image is an example of using bash to invoke ast-grep. 010
Herrington Darkholme @hd-nvim.bsky.social · 02/12/2024New ast-grep perf improvement for multi-language projects! Previously the CLI scans all files even if a file has no matching rule. Now it is will only scan candidate files which can produce lint errors. In Next.js, where sg lints only Rust, the trick improves linting time by 90% 130
Herrington Darkholme @hd-nvim.bsky.social · 01/12/2024This is how bsky.app performs under React Scan 050
Herrington Darkholme @hd-nvim.bsky.social · 22/11/2024DOJ is requesting Google to sell all "Chrome", including Chrome, Chromium, and its underlying infrastructure such as the V8 JavaScript engine. This can result in serious web technology stagnation. 121
Herrington Darkholme @hd-nvim.bsky.social · 09/11/2024Having fun designing ast-grep inspection output like a college student 🤪🤪🤪 020
Herrington Darkholme @hd-nvim.bsky.social · 04/11/2024What ast-grep cannot (easily) do? ast-grep.github.io/advanced/faq... 021