You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can attach more than one action to a given node type, but this forces us to make a choice each time. For example I am going to author a new node action on a property_identifier for a few of the languages I use often which will grab the var name and make a simple debug print out of it in the next line of code.
But I don't want to have to delete the existing actions.cycle_case() mapped to property_identifier, and neither do i want to insert another action to make to trigger this.
I'd prefer to be able to establish different sets of node actions that are mapped to different key binds! So I could have, say, a mapping that will apply "traditional" actions like cycle case and toggle multiline/operator/quote etc, a separate mapping that applies "expanding" refactoring automations as an example, another mapping that applies "contracting" refactoring automations... etc. You get the idea.
The text was updated successfully, but these errors were encountered:
I discovered require("ts-node-action").available_actions() from the doc, so I think i will be able to make binds that call this and do something appropriate based on what this emits.
vim.keymap.set('n', '<leader>E', function ()
localactions=require('ts-node-action').available_actions()
-- run the last onelog('actions and last', actions, actions[#actions].action())
end, {
desc="Node Action -- last"
})
We can attach more than one action to a given node type, but this forces us to make a choice each time. For example I am going to author a new node action on a property_identifier for a few of the languages I use often which will grab the var name and make a simple debug print out of it in the next line of code.
But I don't want to have to delete the existing
actions.cycle_case()
mapped toproperty_identifier
, and neither do i want to insert another action to make to trigger this.I'd prefer to be able to establish different sets of node actions that are mapped to different key binds! So I could have, say, a mapping that will apply "traditional" actions like cycle case and toggle multiline/operator/quote etc, a separate mapping that applies "expanding" refactoring automations as an example, another mapping that applies "contracting" refactoring automations... etc. You get the idea.
The text was updated successfully, but these errors were encountered: