combobulate icon indicating copy to clipboard operation
combobulate copied to clipboard

Question about navigation use case

Open chaoyi opened this issue 2 years ago • 1 comments

Hi, I want to improve my code navigation skill and I am glad I found combobulate. I am trying to adapt it for Rust. However, I run into an issue that I am not able to navigate to some node.

For example, I have setup combobulate as such

(setq combobulate-navigation-node-types '(source_file
                                          call_expression
                                          arguments
                                          identifier)))

I have reduced my use case to a snippet

f(g());
f2();

print from tree-sitter-debug-mode

source_file:
  call_expression:
    identifier:
    arguments:
      call_expression:
        identifier:
        arguments:
  call_expression:
    identifier:
    arguments:

My cursor is at f the first call_expression. I want to navigate to f2 which is the second call_expression but I am not able to do so. I tried combobulate-navigate-next but it doesn't work for me. I think combobulate considers my current node is at identifier node which has the same start position as call_expression node. Is there a way to tell combobulate to select the parent node to disambiguate my intention?

chaoyi avatar Apr 30 '22 17:04 chaoyi

Hi chaoyi,

I just tried it out and yeah there's apparently a bit of a problem with overlap here; if call_expression is removed from the navigable node types, the code seems to work fine.

mickeynp avatar May 10 '22 10:05 mickeynp