Closed tayloraswift closed 2 years ago
Again this is most likely Sourcekit-LSP. The vscode-swift extension does nothing with the semantic highlighting
can you please transfer this issue to https://github.com/apple/sourcekit-lsp/issues ? i do not have write access to either repo
It appears transfer issue only works within an organisation. So I can't transfer to the apple organisation.
there are three bugs covered by this issue, you are correct in that one of them was actually a sourcekit-lsp issue, and i have refiled it there. the other two are vscode bugs, as they originate from faulty rules in their repository: https://github.com/microsoft/vscode/blob/main/extensions/swift/syntaxes/swift.tmLanguage.json
closing this issue
Hi folks, I'm obviously quite late to this ticket, but I'm the maintainer of the upstream repo that the vscode grammar is generated from. I'm trying to understand the reported issue exactly, but I'm kind of confused because as far as I can tell the grammar is handling this line correctly in TextMate and GitHub (which also uses the TM grammar):
infix operator ?= :ComparisonPrecedence
Is the issue only present in the vscode extension specifically?
@tayloraswift can you help here
i am still seeing invalid.illegal.character-not-allowed-here.swift meta.definition.operator.swift source.swift
for the colon in that example.
i’m on version v1.7.0 of the swift extension, but i imagine this is coming from the TextMate grammar that ships with VSCode (1.83.1), and not the swift extension.
Yep, sounds like it must be a VS Code specific issue then. If anyone knows a quick way to use an updated tmlanguage in vscode for testing purposes, let me know. I will try it out and see if I can figure out where the discrepancy comes from.
I believe the root cause of the issue is https://github.com/microsoft/vscode-textmate/issues/140. There seems to be a simple enough workaround so I believe it I can get this fixed easily.
Describe the bug
operator lexeme declarations with explicit precedence groups are (incorrectly) flagged as invalid syntax:
there are three bugs here. two are vscode-swift bugs, and the other one is a sourcekit-lsp bug:
?=
:
ComparisonPrecedence
identifier
identifier
identifier
operator
invalid
invalid
operator
Environment