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

Reserved keywords in function names are highlighted incorrectly #164

Open
Christophoclese opened this issue Dec 16, 2019 · 2 comments
Open

Comments

@Christophoclese
Copy link

If a reserved keyword is used as the beginning of a hyphenated function name (e.g., Do-Something or If-Thing) the beginning part of the function name that matches the reserved keyword is highlighted in red.

image

@theaquamarine
Copy link
Contributor

This is actually an issue with the language definition from https://github.com/PowerShell/EditorSyntax thing rather than the module, so would have to be fixed there - it's still present in the current version of the definition (and functions the same way in VSCode).

That said, it's possible they won't view it as a bug - comments on PowerShell/EditorSyntax#80 suggest they're only interested in approved verbs, which Do and If aren't.

@Christophoclese
Copy link
Author

That makes sense. Thanks for the response.

I guess the takeaway is they don't really want you using hyphens in your function names unless you're going to stick to approved verbs?

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