This repository has been archived by the owner on Jan 7, 2019. It is now read-only.
forked from Glavin001/atom-beautify
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add elixir formatter. Fix Glavin001#545
- Loading branch information
Showing
10 changed files
with
182 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
defmodule MyApp do | ||
use SomeLib | ||
|
||
def run(data) do | ||
{:ok, data} | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
defmodule MyApp, do: ( | ||
use( SomeLib ) | ||
def run( data ), do: { | ||
:ok, | ||
data | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
### | ||
Requires https://github.com/lpil/exfmt | ||
### | ||
"use strict" | ||
Beautifier = require('./beautifier') | ||
|
||
module.exports = class Exfmt extends Beautifier | ||
name: "exfmt" | ||
link: "https://github.com/lpil/exfmt" | ||
isPreInstalled: false | ||
|
||
options: { | ||
Elixir: true | ||
} | ||
|
||
beautify: (text, language, options) -> | ||
@run("mix", [ | ||
'exfmt', | ||
@tempFile("input", text, ".ex") | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
module.exports = { | ||
|
||
name: "Elixir" | ||
namespace: "ex" | ||
|
||
### | ||
Supported Grammars | ||
### | ||
grammars: [ | ||
"Elixir" | ||
] | ||
|
||
### | ||
Supported extensions | ||
### | ||
extensions: [ | ||
"ex", | ||
"exs" | ||
] | ||
|
||
defaultBeautifier: "exfmt" | ||
|
||
### | ||
### | ||
options: [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ module.exports = class Languages | |
"csv" | ||
"d" | ||
"ejs" | ||
"elixir" | ||
"elm" | ||
"erb" | ||
"erlang" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters