Describe the syntax error
There is a syntax error when a variable declaration is not followed by a type annotation. A function declaration after such a variable declartion is not recognized.
Consider this example:
@Environment(\.dynamicTypeSize) var dynamicTypeSize
func subtitle() -> LocalizedStringKey {
In this case, the func keyword is not recognized. It gets the scope variable.other.swift instead of keyword.declaration.function.swift.
This is how it looks in Sublime Text:
Expected behavior
The function should be recognized even if there is no type annotation in the previous variable declaration.
This is how it should look:
Minimum Reproducible Snippet of Swift code
@Environment(\.dismiss) var dismiss
func test() {
Environment (please complete the following information):
- OS: macOS
- Sublime Text: 4156
Additional context
I think this can be fixed by adding - include: reserved-word-pop to declaration-variable: and declaration-constant:.
Describe the syntax error
There is a syntax error when a variable declaration is not followed by a type annotation. A function declaration after such a variable declartion is not recognized.
Consider this example:
In this case, the
funckeyword is not recognized. It gets the scopevariable.other.swiftinstead ofkeyword.declaration.function.swift.This is how it looks in Sublime Text:
Expected behavior
The function should be recognized even if there is no type annotation in the previous variable declaration.
This is how it should look:
Minimum Reproducible Snippet of Swift code
Environment (please complete the following information):
Additional context
I think this can be fixed by adding
- include: reserved-word-poptodeclaration-variable:anddeclaration-constant:.