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

Function names do not auto-complete when there are syntax errors #3047

Open
skdzuoyi opened this issue Sep 15, 2024 · 2 comments
Open

Function names do not auto-complete when there are syntax errors #3047

skdzuoyi opened this issue Sep 15, 2024 · 2 comments
Labels
Enhancement New feature request

Comments

@skdzuoyi
Copy link

When there are syntax errors in the code, such as unclosed parentheses () or curly braces {}, some function names do not get auto-completed. This can be quite inconvenient during the coding process as it slows down the development workflow. It would be great if the auto-completion feature could still work properly even in the presence of such syntax errors or at least provide a warning or indication that the syntax error might be affecting the auto-completion.

Steps to Reproduce:
Start a mission where some functions are imported from other modules (e.g. consecutively from sound).
Start typing a function name in the code editor.
Introduce a syntax error by intentionally leaving a parenthesis or curly brace unclosed.
Observe that the function name auto-completion does not work.

@RichDom2185
Copy link
Member

if the auto-completion feature could still work properly even in the presence of such syntax errors or at least provide a warning or indication that the syntax error might be affecting the auto-completion

Since it's a syntax error, the program cannot be parsed properly, thus there is no way to generate the autocompletion symbols for the (syntactically incorrect) program.

Perhaps what we can do is:

If there's a syntax error, the auto-completion should use the most recent valid program (most recent version of the program that is free of syntax errors, and thus, parseable).

But this comes at a downside which is people might not know why the autocomplete is not working with newly added symbols. But I think it's fine.

@RichDom2185 RichDom2185 added the Enhancement New feature request label Sep 16, 2024
@martin-henz
Copy link
Member

Nice ideas and options. Let's see if we can define a CP3108 project along these lines. I feel that we need to properly define the problem before we look for a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature request
Projects
None yet
Development

No branches or pull requests

3 participants