CKolkey / ts-node-action

Neovim Plugin for running functions on nodes.
359 stars 20 forks source link

feat: support injected languages #39

Closed alexpw closed 1 year ago

alexpw commented 1 year ago

Implements feature requested by #38

alexpw commented 1 year ago

^ The spec/filetypes/sql_spec.lua:125 succeeds and fails for me randomly, like a coin flip, locally. 🤯

CKolkey commented 1 year ago

Yeah, Ive had the same issue. Not sure whats up with it, and I don't think its related to this PR. Regardless, thanks for taking this on! I think it looks fine, so Ill try to merge it later today :)

alexpw commented 1 year ago

Happy to help!

Notes:

I noticed a method, vim.treesitter.language.get_filetypes(lang), but it didn't make sense to me to use it, since filetypes are an alias for a lang and we already have it.

CKolkey commented 1 year ago

Yea, the lang change makes perfect sense. And, agreed, there's no need to break people's setup for a semantic change like this :)

Didn't notice the change for get_node(). How about name it M._get_node() and add a ---@private comment?

CKolkey commented 1 year ago

Great work :)