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

Completions not displaying in some cases #63

Open
Wats0ns opened this issue Jan 22, 2024 · 1 comment
Open

Completions not displaying in some cases #63

Wats0ns opened this issue Jan 22, 2024 · 1 comment

Comments

@Wats0ns
Copy link

Wats0ns commented Jan 22, 2024

Hello,
i'm having completions that do not display, and I've managed to track this to the should_complete function.
Here's what happens:

def test():
  if {cursor_position}

In this case, tree.root_node().descendant_for_point_range and tree.root_node() are equal, and a CompletionType::MultiLine is returned.
However, if I try to complete this:

for a in range(5):
  {cursor_position}
  if a == 2:
    break

Then the tree.root_node().descendant_for_point_range evaluates to for_node, and CompletionType:SingLine is returned. Because most of my completions start with a \n, nothing is displayed (due to the way SingleLine completions are handled)

I'm having trouble understanding the logic behind the should_complete function, is there some documentation I could find on the expected output ?
Thanks a lot !

@MathieuBsqt
Copy link

MathieuBsqt commented May 7, 2024

Having the same problem. Did you manage to fix the issue or find some documentation?

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