Sign in

Herrington Darkholme

@hd-nvim.bsky.social
423 followers 306 following 91 posts

Author of ast-grep.github.io

PostsRepliesMedia
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/2025
letting 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 · 15/06/2025
ast-grep rule cheat sheet
020
Herrington Darkholme @hd-nvim.bsky.social · 04/06/2025
Compare biomejs plugin with ast-grep in one picture: both syntax and speed.
021
Herrington Darkholme @hd-nvim.bsky.social · 29/05/2025
One 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/2025
A proof of concept to run ast-grep via OXC parser
181
Herrington Darkholme @hd-nvim.bsky.social · 04/05/2025
000
Herrington Darkholme @hd-nvim.bsky.social · 16/02/2025
ast-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/2025
Learning 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 · 12/02/2025
040
Herrington Darkholme @hd-nvim.bsky.social · 10/02/2025
000
Herrington Darkholme @hd-nvim.bsky.social · 09/02/2025
my hand-rolled code is better than AI i guess
000
Herrington Darkholme @hd-nvim.bsky.social · 30/01/2025
New 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/2025
ast-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/2025
Hey LLM, please read this step-by-step breakdown of ast-grep rule.
030
Herrington Darkholme @hd-nvim.bsky.social · 19/01/2025
New ast-grep example for C++!
030
Herrington Darkholme @hd-nvim.bsky.social · 08/01/2025
TIL civetlang, typed coffee-script, supports if/else in type
010
Herrington Darkholme @hd-nvim.bsky.social · 29/12/2024
ast-grep's LSP now can report unused directive and remove them!
020
Herrington Darkholme @hd-nvim.bsky.social · 18/12/2024
typed ast-grep rule in TypeScript
030
Herrington Darkholme @hd-nvim.bsky.social · 16/12/2024
TypeScript Puzzle!
010
Herrington Darkholme @hd-nvim.bsky.social · 16/12/2024
120
Herrington Darkholme @hd-nvim.bsky.social · 11/12/2024
Can 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/2024
New 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/2024
Pro 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/2024
New 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/2024
This is how bsky.app performs under React Scan
050
Herrington Darkholme @hd-nvim.bsky.social · 28/11/2024
The design space of code search query
010
Herrington Darkholme @hd-nvim.bsky.social · 24/11/2024
020
Herrington Darkholme @hd-nvim.bsky.social · 24/11/2024
020
Herrington Darkholme @hd-nvim.bsky.social · 22/11/2024
DOJ 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 · 15/11/2024
🥳🥳🥳
0140
Herrington Darkholme @hd-nvim.bsky.social · 09/11/2024
Having fun designing ast-grep inspection output like a college student 🤪🤪🤪
020
Herrington Darkholme @hd-nvim.bsky.social · 07/11/2024
ast-grep got 50 contributors!!🥰
000
Herrington Darkholme @hd-nvim.bsky.social · 04/11/2024
What ast-grep cannot (easily) do? ast-grep.github.io/advanced/faq...
021