Hi! I built this small plugin that adds JSX/TSX text-objects and motions using Treesitter: jsx-element.nvim. I was surprised that it (to my knowledge) doesn’t exist yet.
From the README:
Use
]t/[tto go to the next/previous JSX/TSX element.Use
it/atto use JSX/TSX elements as text-objects. For exampleditfor “delete inside tag”. This works with self-closing elements:<Checkbox value="checkedA" /> ╰───── it ─────╯ ╰─────────── at ────────────╯It also works with paired elements:
<Button variant="text">This is a button</Button> ╰───── it ─────╯ ╰───────────────────── at ─────────────────────╯
You must log in or register to comment.


