CKolkey / ts-node-action

Neovim Plugin for running functions on nodes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Notice of Breaking Changes

CKolkey opened this issue · comments

Given the 'pre-1.0' nature of this plugin, there are going to be some breaking changes as we figure out a nice API. I'll post those changes here, so subscribe if you're interested.

#13

Built-in actions are now higher-order functions to easily support overriding options

28ec04a
Removes helpers indent_node_text and indent_text

#18
Changes returned values from builtin actions. Instead of getting a function back, they now return a table, to ease integration with lsp CodeActions.

The returned table looks like this:

{
  { function, name = "Action Name" },
}

Assigning functions to a node type without wrapping them in a table will still work just fine (and I have no plans to change that), but you won't get the name of the function in the CodeAction menu.

Users who have assigned multiple functions to a node type will be unaffected, as this reuses that API.