Questions tagged [erlang-mode]

Major mode for the Erlang programming language.

Major mode for the Erlang programming language. It is distributed as part of the Erlang distributed. It was written by Robert Virding, Anders Lindgren (Lindydancer), and many others.

The mode contains many features like indentation, font-lock, running Erlang processes, skeletons etc.

10 questions
6
votes
3 answers

Turn a non prog-mode derived major-mode into a prog-mode derived major-mode

erlang-mode is not a derived prog-mode. Is there any way to make it part of the prog-mode-hook ?
syl20bnr
  • 2,095
  • 11
  • 21
3
votes
2 answers

Mapping RET to use the same indentation level as the previous line

I code in Erlang, and I dislike the default indentation style that erlang.el provides: it tends to push code way too far to the right for my likings. I'd like to have a simple automatic indentation scheme: (1) pressing RET creates a newline with the…
3
votes
1 answer

Is it possible to achieve erlang formatting like this?

As I was going through learnyousomeerlang I came across code formatted like so: if X > Y -> a() ; true -> b() end Presently As close as I can get is: if X > Y -> a() ; -> I am assuming this is due to the electric > and electric ;. In…
2
votes
1 answer

Exist an ob-erlang for src code block on org mode

I'm looking for an ob-erlang library in order to execute erlang in source code blocks in org-mode; I looked on the language table, googled and on github and I didn't fin anything for erlang. I know there is distel and edtgs for interacting with…
anquegi
  • 739
  • 5
  • 21
1
vote
1 answer

How to support `<` and `>` as balanced parens without impacting ability to use them as comparison operators?

Languages like Erlang and Elixir use << >> for binaries and bit-string syntax, but they also use the classical < and > for comparison operators as well as -> and <- in list comprehensions. Emacs syntax-table has the ability to identify pairs of…
PRouleau
  • 744
  • 3
  • 10
1
vote
1 answer

How to prevent smartparens slurp from slurping item separator?

I am looking into Erlang support for smartparens and would like to be able to slurp a string into the current list without including the Erlang statement termination colon in the list. In an erlang-mode buffer, with point identified as ∎, if I start…
PRouleau
  • 744
  • 3
  • 10
1
vote
1 answer

Adding a new code formatter

How can I add a custom formatter that will be picked up by doom-emacs' format ((format +onsave)) module? I want to run the erlfmt program on save when editing Erlang files, but I'm not sure how I should configure that. Doom seems to be using…
beta
  • 131
  • 6
0
votes
0 answers

Why is Erlang executable not found from `alchemist-iex-run`?

Trying to launch alchemist-iex-run in emacs and getting this error: /opt/homebrew/Cellar/elixir/1.12.1/bin/elixir: line 230: exec: erl: not found Process Alchemist-IEx exited abnormally with code 127 However, run-erlang (erlang-shell) works fine.…
Gavin
  • 183
  • 8
0
votes
1 answer

How to access Erlang shell JCL Mode inside an Emacs inferior-erlang shell?

Inside an Erlang shell one can access the Erlang shell User Switch Command menu (also called Erlang shell JCL Mode) by typing Ctrl-G. When running the Erlang shell inside Emacs (as an inferior-erlang) typing C-g once or twice or any other number of…
PRouleau
  • 744
  • 3
  • 10
0
votes
0 answers

Can I force erlang-mode to use 4-spaces for indents?

I'm working within a small team writing Erlang. I'm the only developer using Emacs. The Erlang code the rest of the team outputs is indented using multiples of 4 spaces. For example: store_data_somewhere(Data) -> StandardProplist = fun(Arg1,…
Phill Oldham
  • 227
  • 1
  • 9