Configuration seems to not work for non-default languages.
axkirillov opened this issue · comments
Hi! First of all, thanks for the awesome plugin.
I tried configuring this for php like so
require("ts-node-action").setup({
php = {
["arguments"] = require("ts-node-action").toggle_multiline,
},
})
To check if the default action will work, but I get the:
No action defined for 'php' node type: 'arguments'
Do you have any ideas?
Hi! Check out how toggle_multiline
is called here:
https://github.com/CKolkey/ts-node-action/blob/master/lua/ts-node-action/filetypes/javascript.lua#L8
The padding
table is optional, but you can use it to fix the whitespace on any unnamed nodes (like commas, colons, parens, etc). So it should look something like this:
require("ts-node-action").setup({
php = {
["arguments"] = require("ts-node-action.actions.toggle_multiline")(),
},
})
Let me know if that helps :)
Thanks for the swift reply! In the meantime I figured it out myself and was about to close the issue! But good to know, that padding is optional. It works for me now 👍🏻