cshuaimin / ssr.nvim

Treesitter based structural search and replace plugin for Neovim.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expose a command

romgrk opened this issue · comments

Mapping a command is less verbose than mapping a lua function.

Ideally we can use ssr rules with command like :SSR f($a) ==>> $a.f(), but this is not possible now because I don't know how to specify context node. Maybe we should make context optional?

Maybe the context node can be the first match in the current line (or in the selection with '<,'>) ?