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

elm: Improve syntax highlighting and bracket handling #22293

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

edkv
Copy link

@edkv edkv commented Dec 20, 2024

Fixes various issues with current syntax highlighting for Elm: modules and patterns are not highlighted, number literals are treated as constants etc.

New highlights are mostly copied from nvim-treesitter with some modifications and removals of things that are not supported by Zed. In particular, @modules are highlighted as @title, similarly to how it's done in Zed's Haskell extension.

Also added brackets.scm.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 20, 2024
@maxdeviant maxdeviant changed the title Improve Elm syntax highlighting and bracket handling elm: Improve syntax highlighting and bracket handling Dec 20, 2024
@edkv
Copy link
Author

edkv commented Dec 22, 2024

I also changed the default tab_size to 4 as that's how most of Elm projects are formatted. elm-format uses 4 spaces and it's not configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant