Skip to content

Differentiate color coding more #53

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

Open
AllNamesRTaken opened this issue Nov 6, 2019 · 3 comments
Open

Differentiate color coding more #53

AllNamesRTaken opened this issue Nov 6, 2019 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@AllNamesRTaken
Copy link

AllNamesRTaken commented Nov 6, 2019

Currently the color coding is just white for the following:

  • functions
  • scopes
  • local parameters
  • non-local parameters
  • -> [ ] ( ) , = | etc

Expected Behavior

I would like to see the option to display more information about the code using colors. To instantly know which are functions and which are local vs non-local etc.

Current Behavior

All the mentioned artifacts are white (in dark theme) or black (in light theme) which makes reading the code for a beginner harder.

Possible Solution

Technicolor!

Context

As a beginner I want all the help I can get to read and understand Elm code. Also when I try to entice other non Elm devs I find that they become adverse due to the lack of clarity.

Your Environment

Elm 0.19.0
Windows 10
VSCode 1.39.2
Elm 0.7.2 plugin
node: 12.0.0

@razzeee
Copy link
Member

razzeee commented Nov 7, 2019

I think more color would also be good. But there are poeple that don't like that. Anyway, I'm mostly waiting for microsoft/vscode#77140 and an api for that feature to bridge the gap to the language server. So that we can support coloring in all IDEs at once.

There are projects like https://github.com/georgewfraser/vscode-tree-sitter which could be used for vscode only, but the current vscode api does not seem to be good/fast.

https://github.com/GrayJack/language-elm-treesitter for atom ide is also noteworthy

For vscode only this is currently done via the files in the syntaxes dir https://github.com/elm-tooling/elm-language-client-vscode/tree/master/syntaxes

Specifically this one imported from a tmgrammar file https://github.com/elm-tooling/elm-language-client-vscode/blob/master/syntaxes/elm.json

I guess adding highlighting to more infix operators should be easy. Parameters and functions might be hard via the json file. https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer might be an option if you just want colored brackets.

@razzeee razzeee added the enhancement New feature or request label Dec 30, 2019
@razzeee razzeee added this to the Backlog milestone Jan 15, 2021
@razzeee
Copy link
Member

razzeee commented Jan 31, 2021

Functions seem to color fine with a theme that colors them.
Not sure I get what you exactly mean with

scopes
local parameters
non-local parameters

I don't think we want -> [ ] ( ) , = | etc more colored then now.

@joestrkr
Copy link

Coloring of functions seem to only work for top level definition but not when the function is actually called. There, the scope defaults to meta.value.elm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants