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

Feat: Add completion for Yocto defined variables in embedded languages #84

Conversation

idillon-sfl
Copy link
Member

@idillon-sfl idillon-sfl commented Feb 3, 2024

This adds completion items for Yocto variables inside Python datastore functions.
Screenshot from 2024-02-02 19-42-56

This also add completion items for Yocto tasks inside Python and Shell functions.
Screenshot from 2024-02-02 19-40-44
Screenshot from 2024-02-02 19-41-11

Completion items for variable expansions inside Shell regions is waiting for a fix on tree-sitter-bitbake (see PR19)

Copy link
Member

@deribaucourt deribaucourt left a comment

Choose a reason for hiding this comment

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

I only get functions completions in d Python functions instead of variable names:
image

server/src/connectionHandlers/onCompletion.ts Show resolved Hide resolved
@idillon-sfl idillon-sfl force-pushed the feature-13380-add-completion-for-yocto-defined-variables-in-embedded-languages branch 3 times, most recently from ac882ac to 591ed11 Compare February 6, 2024 03:36
@idillon-sfl
Copy link
Member Author

I was not handling the case were the string is empty. Should be fixed now.

@idillon-sfl idillon-sfl force-pushed the feature-13380-add-completion-for-yocto-defined-variables-in-embedded-languages branch from 591ed11 to 80f8568 Compare February 6, 2024 03:57
@deribaucourt
Copy link
Member

SImilarly, I don't think completion is handled in bash regions on new line (should suggest commands like echo)
can be done in another PR

@idillon-sfl
Copy link
Member Author

SImilarly, I don't think completion is handled in bash regions on new line (should suggest commands like echo) can be done in another PR

It works on my side. I have these suggestions on empty new lines.

I expect we might want to fine tune some behaviors in the future, thought.

@idillon-sfl idillon-sfl merged commit 3b84ca7 into yoctoproject:staging Feb 6, 2024
2 checks passed
@idillon-sfl idillon-sfl deleted the feature-13380-add-completion-for-yocto-defined-variables-in-embedded-languages branch February 6, 2024 14:51
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.

2 participants