-
-
Notifications
You must be signed in to change notification settings - Fork 81
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
Adding support for gleam programming language #2280
base: main
Are you sure you want to change the base?
Conversation
queries/gleam.scm
Outdated
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.
I plan to add comments for each of these queries to explain what they're doing
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.
Great; I'll wait to review this file in too much detail until there are more tests / comments, as that makes it easier for me to see what's going on. Lmk if there's anything in particular here that you want some feedback on in the meantime though!
|
||
[Removal] = 0:7-0:9 | ||
>--< | ||
0| let a = 3 |
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.
should this removal range include the equals?
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.
yes that's what we usually do, esp if declaring a variable without assigning a value is supported in the language
|
||
const { supported } = ScopeSupportFacetLevel; | ||
|
||
export const gleamScopeSupport: LanguageScopeSupportFacetMap = { |
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.
I went through the list of all of these scopes support facets and chose all the ones that I think apply to gleam. Not all of them are implemented in the queries or in the tests yet though
data/playground/gleam/gleam.gleam
Outdated
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.
I also plan to tidy up this file -- right now I've just put some random stuff in for testing
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.
Sure, tho fwiw the standard for these playground files is quite low; they're mainly just a nice-to-have. Tbh the only thing that jumps out at me here is lack of final trailing newline
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.
Ah nvm re trailing newline; looks like our pre-commit bot just took care of that one for you 🤖😊
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.
Great start! Left some minor comments
[Removal] = 0:4-0:6 | ||
>--< |
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.
We usually prefer
[Removal] = 0:4-0:6 | |
>--< | |
[Removal] = 0:0-0:9 | |
>--------< |
[#2 Content] = | ||
[#2 Domain] = 0:11-0:14 | ||
>---< | ||
0| type Aaa = Int |
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.
Hmm I don't think this is usually supported in Cursorless, but I could go either way on it? cc/ @AndreasArvidsson
|
||
[Removal] = 0:7-0:9 | ||
>--< | ||
0| let a = 3 |
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.
yes that's what we usually do, esp if declaring a variable without assigning a value is supported in the language
data/playground/gleam/gleam.gleam
Outdated
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.
Sure, tho fwiw the standard for these playground files is quite low; they're mainly just a nice-to-have. Tbh the only thing that jumps out at me here is lack of final trailing newline
queries/gleam.scm
Outdated
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.
Great; I'll wait to review this file in too much detail until there are more tests / comments, as that makes it easier for me to see what's going on. Lmk if there's anything in particular here that you want some feedback on in the meantime though!
This pull request is definitely not ready to merge yet but I wanted to get my progress out there in case I'm going in totally the wrong direction.
I plan to add support for the gleam programming language.
Checklist