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

Elixir syntax highlighting not working properly for doc attributes (and more) #5865

Closed
1 task done
ryanwinchester opened this issue Dec 30, 2022 · 3 comments
Closed
1 task done
Labels
defect [core label] elixir Elixir programming language support language An umbrella label for all programming languages syntax behaviors

Comments

@ryanwinchester
Copy link

ryanwinchester commented Dec 30, 2022

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

It appears as though things are mostly correct but the @doc, @moduledoc, and @typedoc are not being recognized as comments. They are being highlighted as normal module attributes and multiline strings, when really they should be comments.

Environment

Zed 0.66.1 – /Applications/Zed.app
macOS 13.1
architecture x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

Zed:

Screenshot 2022-12-30 at 2 24 52 PM

VS Code:

Screenshot 2022-12-30 at 2 25 36 PM

GitHub:

Screenshot 2023-02-18 at 12 04 06 PM

link to same file as screenshots:

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue

No response

@ryanwinchester ryanwinchester added defect [core label] triage Maintainer needs to classify the issue labels Dec 30, 2022
@JosephTLyons JosephTLyons added elixir Elixir programming language support language An umbrella label for all programming languages syntax behaviors and removed triage Maintainer needs to classify the issue labels Dec 30, 2022
@ryanwinchester
Copy link
Author

Another thing is that there are some special macros with double underscores being highlighted as ignored variables (single underscore prefix).

Screenshot 2022-12-30 at 2 40 23 PM

i.e.: __ENV__/0, __MODULE__/0, __DIR__/0, __STACKTRACE__/0, and __CALLER__/0
from https://hexdocs.pm/elixir/Kernel.SpecialForms.html

@ryanwinchester
Copy link
Author

ryanwinchester commented Feb 18, 2023

Apparently this file has all the goodies:

Should help with the two issues I mentioned, and likely more.

(Shout-out to @jonatanklosko)

@ryanwinchester ryanwinchester changed the title Elixir syntax highlighting not working properly for doc attributes Elixir syntax highlighting not working properly for doc attributes (and more) Feb 18, 2023
@JosephTLyons
Copy link
Contributor

This should be fixed in v0.90.0.

@JosephTLyons JosephTLyons transferred this issue from zed-industries/community Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] elixir Elixir programming language support language An umbrella label for all programming languages syntax behaviors
Projects
None yet
Development

No branches or pull requests

2 participants