Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
nvim-trevJ.lua
Nvim-plugin for doing the opposite of join-line (J) of arguments, powered by treesitter
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
To clarify a bit, "a regex approach" doesn't mean s// :). For example, I've got a few mini-parsers for specific cases like rust structs or ruby methods and hashes that handle nesting and more complex structures. Vim's built-in search functions also allow checking the syntax tree, which is how vim-ruby implements a few basic text objects, too. I feel like there's a common misconception that all of Vim is just dumb regex-matching, while regexes are just one of the tools available.
You can check it out here: https://github.com/CKolkey/ts-node-action
there is also https://github.com/Wansmer/treesj for those looking for alternatives / inspiration.
PS: The video in the post (with Ruby's do vs {}) -- that I watched before I read what the plugin actually does -- reminded me of the structural search-and-replace plugin someone presented a while ago on this subreddit.