elixir-editors / emacs-elixir

Emacs major mode for Elixir
446 stars 94 forks source link

Support for `defn`? #474

Open anildigital opened 3 years ago

anildigital commented 3 years ago

Elixir have added new keyword named defn for defining numerical definitions

More at https://dashbit.co/blog/nx-numerical-elixir-is-now-publicly-available

jsmestad commented 3 years ago

Am I correct that it is not in the core language but provided by Nx?

wingyplus commented 2 years ago

Am I correct that it is not in the core language but provided by Nx?

Yes it is

victorolinasc commented 1 year ago

My opinion is that we can add defn and defnp only because elixir-nx is a core project maintained by people that are close to the core language. I don't think we will, though, add all possible macros there are in the language. We "should" be able to add a customization for that so that people may choose to add other defsomething macros. Not sure how to achieve that now as it should be a compile-time configuration as we are regex-driven in this mode (and all modes pre-tree-sitter).

PRs would be appreciated! It is an easy first fix I guess.