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

Update to match last version of gleam #86

Merged
merged 8 commits into from
Aug 15, 2024
Merged

Conversation

Betelgeuse1
Copy link

@Betelgeuse1 Betelgeuse1 commented Jul 26, 2024

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 :

  • Equality operators are the same for all types
  • Modulo operator does not make sens for floats
  • Fixing multiple outdated regexes
  • Missing 'Nil' highlight

Thomas Teixeira added 2 commits July 26, 2024 17:08
- Equality operators are the same for all types
- Modulo operator does not make sens for floats
- Fixing multiple regexes
- Missing 'Nil' highlight
@Betelgeuse1 Betelgeuse1 changed the title Updaet to match last version of gleam Update to match last version of gleam Jul 26, 2024
Copy link
Member

@lpil lpil left a 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.

@@ -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"
Copy link
Member

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

},
"nil": {
"name": "constant.language.null.gleam",
"match": "\\bNil\\b",
Copy link
Member

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.

"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",
Copy link
Member

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?

}
]
},
"binary_number": {
"name": "constant.numeric.binary.gleam",
"match": "\\b0[bB](_?[01])+\\b",
"match": "\\b0[bB][01]+\\b",
Copy link
Member

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?

"patterns": []
},
"octal_number": {
"name": "constant.numeric.octal.gleam",
"match": "\\b0[oO](_?[0-7])+\\b",
"match": "\\b0[oO][0-7]+\\b",
Copy link
Member

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 lpil marked this pull request as draft July 26, 2024 17:14
@Betelgeuse1
Copy link
Author

@lpil
You merge gleam-lang/gleam.vim#14, where Nil constant is highlighted as a value, just like True or False.
Should I reinstate this logic in the vscode plugin ?
You asked me to remove it but kept it there, even though I pushed a comment.

@Betelgeuse1 Betelgeuse1 marked this pull request as ready for review July 29, 2024 16:20
@lpil
Copy link
Member

lpil commented Jul 30, 2024

Oh, that's a mistake. Nil, True, and False should not get special treatment. I will fix that bug.

@lpil lpil marked this pull request as draft July 30, 2024 15:32
Betelgeuse1 pushed a commit to Betelgeuse1/vim-polyglot that referenced this pull request Jul 31, 2024
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.
@Betelgeuse1 Betelgeuse1 marked this pull request as ready for review July 31, 2024 07:34
Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

@lpil lpil merged commit 6ed1e8a into gleam-lang:main Aug 15, 2024
lpil pushed a commit that referenced this pull request Aug 15, 2024
lpil pushed a commit that referenced this pull request Aug 15, 2024
lpil pushed a commit that referenced this pull request Aug 15, 2024
lpil pushed a commit that referenced this pull request Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants