Skip to content

Conversation

@SteffenDE
Copy link
Contributor

No description provided.

@josevalim
Copy link
Collaborator

@tmbb i would love to have your take on this project idea. While I still believe makeup is a great tool for Elixir and other BEAM languages, having to implement lexers for JavaScript and Rust is a lot of work. So do you think we should still promote writing them in Elixir or it is fine to delegate some of them to a third party?

@josevalim josevalim merged commit f2ad2d1 into elixir-makeup:master Feb 6, 2025
2 checks passed
@josevalim
Copy link
Collaborator

Merging this for documentation purposes, but we can have the convo anytime @tmbb!

@tmbb
Copy link
Collaborator

tmbb commented Feb 9, 2025

So do you think we should still promote writing them in Elixir or it is fine to delegate some of them to a third party?

MakeupSyntect is what I would have written instead of Makeup if RustPrecompiled had existed at the time (and if I knew more than basic rust). I don't think there's any need to write lexers in Elixir now. I think we should actively discourage people to develop new Elixir lexers from now on. I think the Makeup behaviours are still useful as some kind of common language to implement lexers, but I don't think we should waste the hundreds (thousands?) of man-hours behing the language files used by Syntect.

It might be useful to keep some control over the Elixir lexer to be able to add pseudo-keywords and stuff like that (like @josevalim) has done with the is_guard macro and simple stuff like that). In a language like Elixir, where most "keywords" are actually community conventions there might be a need to add them occasionaly (or even support dynamic lists of def-like keywords, maybe). Bu in general I think with MakeupSyntect syntax highlighting in Elixir is pretty much a done task.

Of course we should link Syntect in the docs!

@josevalim
Copy link
Collaborator

josevalim commented Feb 9, 2025

@tmbb thank you! Something else to keep in mind is that we ship an ex_doc executable to be used by Erlang projects, and that won't work with precompiled Rustler too. So any language we want embeddable into ExDoc needs to be done in Elixir. That is currently restricted to erlang, elixir and c.

We have deprecated makeup_rust but it may make sense to deprecate makeup_json and makeup_diff too (or maybe not, given how trivial they are).

EDIT: nevermind on makeup_diff. It would be nice if we could compose parsers on diff and syntect does not do it, so it is something we could implement. So the question is if we want to stick around with makeup_json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants