-
I have a new textobjects.scm query that I'm trying to add. My rtp from Would love any debugging tips |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
It would be good to find out the Which parser are you targeting? Do the built-in in text objects work (if existing)? |
Beta Was this translation helpful? Give feedback.
-
My understanding from debugging after I realised that an invalid query in the lib folder would throw: Code is here: https://github.com/neovim/neovim/blob/38e38d1b4/runtime/lua/vim/treesitter/query.lua#L94 local query_path = string.format('queries/%s/%s.scm', "tsx", "textobjects")
print(dump(vim.api.nvim_get_runtime_file(query_path, true)))
print(dump(vim.treesitter.query.get_files("tsx", "textobjects"))) First useful commands to see what is found, first print gets all the query files found (local config is found), second is what ends up being returned (doesn't have my file). Then from reading the code, looks like it needs to have an extends on top, and just randomly tried, needs to be in the after folder |
Beta Was this translation helpful? Give feedback.
My understanding from debugging after I realised that an invalid query in the lib folder would throw:
Code is here: https://github.com/neovim/neovim/blob/38e38d1b4/runtime/lua/vim/treesitter/query.lua#L94
First useful commands to see what is found, first print gets all the query files found (local config is found), second is what ends up being returned (doesn't have my file).
Then from reading the code, looks like it needs to have an extends on top, and just randomly tried, needs to be in …