Merge pull request #733 from LaurentTreguier/master
Adding dfmt support for D
This commit is contained in:
commit
2b6b026cc6
|
@ -60,7 +60,7 @@ Or Settings/Preferences ➔ Packages ➔ Search for `atom-beautify`
|
|||
- [x] [Objective-C](https://github.com/Glavin001/atom-beautify/issues/57)
|
||||
- Requires [Uncrustify](http://sourceforge.net/projects/uncrustify/)
|
||||
- [x] [D](https://github.com/Glavin001/atom-beautify/issues/57)
|
||||
- Requires [Uncrustify](http://sourceforge.net/projects/uncrustify/)
|
||||
- Requires [Uncrustify](http://sourceforge.net/projects/uncrustify/) or [dfmt](https://github.com/Hackerpilot/dfmt)
|
||||
- [x] [Fortran](https://github.com/Glavin001/atom-beautify/issues/300)
|
||||
- Requires [GNU Emacs](http://www.gnu.org/software/emacs/)
|
||||
- [x] [Pawn](https://github.com/Glavin001/atom-beautify/issues/57)
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
class Test
|
||||
{
|
||||
private int member;
|
||||
public auto func(string str)
|
||||
{
|
||||
import std.stdio;
|
||||
|
||||
writeln("Hello world !");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
class Test{
|
||||
private int member ;
|
||||
public auto func ( string str )
|
||||
{
|
||||
import std.stdio; writeln("Hello world !");}}
|
|
@ -21,7 +21,7 @@ describe "BeautifyLanguages", ->
|
|||
|
||||
# Activate all of the languages
|
||||
allLanguages = [
|
||||
"c", "coffee-script", "css", "html",
|
||||
"c", "coffee-script", "css", "d", "html",
|
||||
"java", "javascript", "json", "less",
|
||||
"mustache", "objective-c", "perl", "php",
|
||||
"python", "ruby", "sass", "sql", "svg",
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
###
|
||||
Requires [dfmt](https://github.com/Hackerpilot/dfmt)
|
||||
###
|
||||
"use strict"
|
||||
Beautifier = require('./beautifier')
|
||||
|
||||
module.exports = class Dfmt extends Beautifier
|
||||
name: "dfmt"
|
||||
|
||||
options: {
|
||||
D: true
|
||||
}
|
||||
|
||||
beautify: (text, language, options) ->
|
||||
@run("dfmt", [
|
||||
@tempFile("input", text)
|
||||
])
|
|
@ -38,6 +38,7 @@ module.exports = class Beautifiers extends EventEmitter
|
|||
'coffee-formatter'
|
||||
'coffee-fmt'
|
||||
'clang-format'
|
||||
'dfmt'
|
||||
'elm-format'
|
||||
'htmlbeautifier'
|
||||
'csscomb'
|
||||
|
|
|
@ -16,6 +16,8 @@ module.exports = {
|
|||
extensions: [
|
||||
]
|
||||
|
||||
defaultBeautifier: "dfmt"
|
||||
|
||||
options:
|
||||
configPath:
|
||||
type: 'string'
|
||||
|
|
Loading…
Reference in New Issue