Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle tree sitter nodes with the same starting location #4

Closed
wstevick opened this issue Feb 10, 2023 · 2 comments
Closed

handle tree sitter nodes with the same starting location #4

wstevick opened this issue Feb 10, 2023 · 2 comments

Comments

@wstevick
Copy link

I have discovered that often, two nodes have the same starting location. This happens when one is the first child of the other. For instance, ```lua
local function something()
if sometest() then
function_in_if()
end
other_function()
end

If you're cursor is on `function_in_if`, there's not way to select just the if-block without selecting the entire function body.
@ggandor
Copy link
Owner

ggandor commented Feb 10, 2023

Yes, I don't think this can be solved in a satisfying way. See also mfussenegger/nvim-treehopper#23 (comment), and the whole discussion above/below.

@wstevick
Copy link
Author

Okay. Thanks anyway.

@wstevick wstevick closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants