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

Remove the contributed ino language and grammar, reuse it from the default VS Code C++ contibution #43

Open
kittaakos opened this issue Dec 12, 2023 · 2 comments
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@kittaakos
Copy link
Contributor

Due to the lack of workforce on this project, all grammar and language customizations should be avoided. Let's stick to the default C++ behavior from VS Code that is used by a large number of developers.

IDE2 users complain about the syntax highlighting (arduino/arduino-ide#2305), which seems to be a reasonable complaint; however, this is how syntax coloring works in VS Code, Eclipse Theia, GitHub, etc., and this project also provides the same behavior. There is no real reason for copying outdated grammar and syntax into this project.

Acceptance criteria:

@kittaakos kittaakos added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Dec 12, 2023
@kittaakos kittaakos self-assigned this Dec 12, 2023
@per1234
Copy link
Contributor

per1234 commented Dec 13, 2023

My feeling is that, at least for the initial implementation, the ability to customize the grammar is not required.

I don't see much value in the customization of setup and loop. The stock C++ grammar will highlight these as functions and I think that is perfectly fine. The current grammar seems to try to give these two keywords special treatment:

{
"match": "\\b(loop|setup)\\b",
"name": "support.function"
},

However, in practice it seems they are highlighted as any other function:

image

So if they were no longer included explicitly in the grammar after the migration to the new system, that would not actually be a regression. Nobody has complained about setup and loop being highlighted the same as any other function. So I would not single these specific keywords out.

We have received reports about the lack of highlighting for other things: arduino/arduino-ide#380. I do think it would be nice if we could eventually customize the grammar to cover the fundamental Arduino core API keywords such as the ones mentioned in arduino/arduino-ide#380. So it would be worth investigating whether the new system has the capability to accommodate such customization. However, the current system does not cover them, so it would not be a regression if a new system didn't cover them either.

@kittaakos
Copy link
Contributor Author

kittaakos pushed a commit to arduino/arduino-ide that referenced this issue Dec 15, 2023
Ref: arduino/vscode-arduino-tools#43
Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
@kittaakos kittaakos removed their assignment Feb 23, 2024
2lambda123 added a commit to 2lambda123/arduino-arduino-ide that referenced this issue Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants