huggingface / huggingface/llm-ls

Completions not displaying in some cases

Open
#63 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Rust
Stars
881
Forks
71
Avg merge
33m
Merged PRs (30d)
1

Description

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:
```python
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:
```python
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 !

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.