-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Update to match last version of gleam #86
Conversation
- Equality operators are the same for all types - Modulo operator does not make sens for floats - Fixing multiple regexes - Missing 'Nil' highlight
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I've left some questions inline.
syntaxes/gleam.tmLanguage.json
Outdated
@@ -26,7 +26,7 @@ | |||
"patterns": [ | |||
{ | |||
"name": "keyword.control.gleam", | |||
"match": "\\b(as|use|case|if|fn|import|let|assert|pub|type|opaque|const|todo|panic)\\b" | |||
"match": "\\b(import|pub|panic|use|type|let|as|if|else|todo|const|case|assert|try|opaque|fn)\\b" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference here? Please don't make meaningless formatting changes as it makes it very challenging to review
syntaxes/gleam.tmLanguage.json
Outdated
}, | ||
"nil": { | ||
"name": "constant.language.null.gleam", | ||
"match": "\\bNil\\b", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this. Nil is not a special type and should not get special treatment.
syntaxes/gleam.tmLanguage.json
Outdated
"patterns": [] | ||
}, | ||
"decimal_number": { | ||
"name": "constant.numeric.decimal.gleam", | ||
"match": "\\b[[:digit:]]+(_?[[:digit:]])*(\\.[[:digit:]]*)?(e-?[[:digit:]]*)?\\b", | ||
"match": "\\b[[:digit:]](_?[[:digit:]])*(\\.([[:digit:]](_?[[:digit:]])*)?(e-?[[:digit:]]|[[:digit:]]?)(_?[[:digit:]])*)?\\b", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this change do?
syntaxes/gleam.tmLanguage.json
Outdated
} | ||
] | ||
}, | ||
"binary_number": { | ||
"name": "constant.numeric.binary.gleam", | ||
"match": "\\b0[bB](_?[01])+\\b", | ||
"match": "\\b0[bB][01]+\\b", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right?
syntaxes/gleam.tmLanguage.json
Outdated
"patterns": [] | ||
}, | ||
"octal_number": { | ||
"name": "constant.numeric.octal.gleam", | ||
"match": "\\b0[oO](_?[0-7])+\\b", | ||
"match": "\\b0[oO][0-7]+\\b", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also seems not right?
@lpil |
Oh, that's a mistake. |
See gleam-lang/vscode-gleam#86 (comment) > @lpil > Oh, that's a mistake. Nil, True, and False should not get special treatment. I will fix that bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
I just created another pull request to fix gleam.vim issues too. Since I was at it, I thought I would fix issues here too.
Sadly, I couldn't test my changes yet, let me know if something seems off :)
Fixes :