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

Add support for multiple variable completions for attribute values and fix current logic that removes $ { and } #324

Open
cherylking opened this issue Dec 6, 2024 · 0 comments
Assignees

Comments

@cherylking
Copy link
Member

The current logic for completion on attribute values removes all $, { and } with no regard to context. If someone typed myValueWith$Sign, the current logic would try do variable completion for myValueWithSign.

The current attribute value needs to be parsed to look for the pattern ${xyz} where xyz is some alpha-numeric value and do completion on xyz. We should probably also support matching the pattern ${xyz with no ending bracket. If neither of those patterns are detected, completion should just be done on what was entered without removing any characters.

If there are multiple matches those patterns, we need to determine what our code can do. Can the current cursor position be used to determine which portion of the attribute value we should do completion on?

${myFirstVar}/${mySecond

For example, if the above attribute value is entered and the user triggers completion after the d, can we only provide completion for mySecond and just replace that var and not change the rest of the attribute value when they select a completion value?

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