You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I'm not sure where to talk about the subject, so I prefer open an issue. 🙂
Those days, I was trying to see if we can improve the syntax highlighting for Gleam.
Currently, in the syntax highlighting, we got all functions calls highlighted as records access when they're done in a fully qualified way.
importmy_packagepubfnmain(){my_package.function()// <-- On Zed, this is highlighted as record property, and not function.}
What do you think to modify the Gleam syntax highlighting (i.e. highlights.scm) to highlight every functions used from records with proper functions highlighting? I tried to implement it here to figure out how it can be. (I'm absolutely not sure it's correctly implemented, I mainly wanted to prove myself it was possible.) I also joined two screenshots on how it feels directly in the editor.
I know tree sitter can not know if the field is a function or not (because we can have a constant, so calling it will result in an error), but the LSP could take care of this, and — in my opinion — having a proper function highlighting for fields called as functions will improve readability.
If applicable, add mockups / screenshots to help present your vision of the feature
Function syntax highlighted
Record syntax highlighted
The text was updated successfully, but these errors were encountered:
Hey @ghivert, we recently moved the zed-gleam repo to the Gleam org, so I went ahead and moved this issue over there. Had to do it manually, but here is the link:
Check for existing issues
Describe the feature
Hi! I'm not sure where to talk about the subject, so I prefer open an issue. 🙂
Those days, I was trying to see if we can improve the syntax highlighting for Gleam.
Currently, in the syntax highlighting, we got all functions calls highlighted as records access when they're done in a fully qualified way.
What do you think to modify the Gleam syntax highlighting (i.e.
highlights.scm
) to highlight every functions used from records with proper functions highlighting? I tried to implement it here to figure out how it can be. (I'm absolutely not sure it's correctly implemented, I mainly wanted to prove myself it was possible.) I also joined two screenshots on how it feels directly in the editor.I know tree sitter can not know if the field is a function or not (because we can have a constant, so calling it will result in an error), but the LSP could take care of this, and — in my opinion — having a proper function highlighting for fields called as functions will improve readability.
If applicable, add mockups / screenshots to help present your vision of the feature
Function syntax highlighted
Record syntax highlighted
The text was updated successfully, but these errors were encountered: