How to configure the livebook code formatter?

Hey there, doea anybody know if there is a way to configure livebook’s code formatter? Where is its .formatter.exs?

1 Like

It is currently not possible. Which kind of customization are you looking for in particular?

1 Like

Beautify button I guess.

I was looking for it as well.

I formatted elixir code separately before plopping it into the LiveBook. :sweat_smile:

You can already format code in livebook e.g. using right click > format document

5 Likes

I see, thank you for the answer.

Which kind of customization are you looking for in particular?

I was looking for a way to configure :import_deps and/or :locals_without_parens for a specific livebook.

3 Likes

I’m also looking for a way to do this :slight_smile:

2 Likes

There used to be a right ciick, format document but it appears to have stopped working on recent chrome versions

This has nothing to do with the browser. Livebook changed their code editor library.

2 Likes

You can use the “f Format Elixir code” keyboard shortcut.

4 Likes

Thanks both :slight_smile:

According to the latest LiveBook shortcuts, Ctrl+Shift+i formats the code.

1 Like