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

Fix: Completion on last character of embedded language blocks #75

Conversation

idillon-sfl
Copy link
Member

@idillon-sfl idillon-sfl commented Jan 23, 2024

Completion was broken on the last character of Python or Bash blocks.

For example, in the following code, if the cursor was on just after the h in ech, the user would see "normal" bitbake completion items instead of bash completion items.

test() {
    ech
}

Completion is still not as responsive as we'd like it to be, especially in Python. I am still looking for a solution.

The tests would not detect that completion was broken when the cursor was on the last character of a Python or Bash région (it has been fixed in the previous commit). Now it should.
Copy link
Contributor

@WilsonZiweiWang WilsonZiweiWang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my side, I only have the completion for bash language but everything else seems gone.

@idillon-sfl
Copy link
Member Author

idillon-sfl commented Jan 26, 2024

are you sure? For me the Python parts work only once the scan is done, and sometimes it still takes a bit longer to load.

Plus the completion on Python is not very responsive (I hope to find a solution). It appears randomly as I am typing. That being said, I always can trigger it manually with ctrl+space.

Also you will get wrong completion if you type before a function because of this issue: tree-sitter-grammars/tree-sitter-bitbake#16

@deribaucourt
Copy link
Member

Works as expected on my end. However, no bash specific completion is suggested if I place my cursor on an empty final newline of a bash function. Which can be addressed separately and is not critical.
image

@idillon-sfl idillon-sfl merged commit 682e7bc into yoctoproject:staging Feb 2, 2024
2 checks passed
@idillon-sfl idillon-sfl deleted the Feature-13910-Completion-in-embedded-bash branch February 2, 2024 15:33
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

Successfully merging this pull request may close these issues.

3 participants