-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
feat: add odin mode #5169
feat: add odin mode #5169
Conversation
Thanks for your contribution, could you also add an example doc for the mode to the |
@akoreman I have added the things you asked :) |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #5169 +/- ##
==========================================
+ Coverage 86.96% 86.98% +0.01%
==========================================
Files 562 565 +3
Lines 45016 45103 +87
Branches 6922 6931 +9
==========================================
+ Hits 39147 39231 +84
- Misses 5869 5872 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Thanks :) I've been comparing your mode with the syntax highlighting found in the Odin docs examples and it seems to match that pretty well. One small quirk I noticed was highlighting for names which start with a capital (see picture, e.g. Vector3): I don't know enough about Odin to tell what the desired behaviour is here but could you take a look at this? Could you also add a test covering the indent/outdent behavior (for an example of such tests, see e.g. here). |
@akoreman I've added the tests, let me know if they are ok like this. Also removed the uppercase === constant rule because of the issue you were having and also that it can cause false-positives anyway. |
Thanks for adding the tests, they look good to me. Correct me if I'm wrong, but I think you might have removed the wrong lines from the highlight file. The lines you removed are for |
@akoreman You are totally correct, my bad, I have updated it |
Issue #, if available: N/A
Description of changes: Added a basic mode for Odin
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.