Golang template support.

This commit is contained in:
s4l1h 2017-01-13 01:27:28 +03:00
parent d091570860
commit 63947d851e
4 changed files with 31 additions and 0 deletions

View File

@ -82,6 +82,7 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
| gherkin | `Gherkin` |`.feature` | [`Gherkin formatter`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/gherkin.coffee) (Default) | | gherkin | `Gherkin` |`.feature` | [`Gherkin formatter`](https://github.com/Glavin001/atom-beautify/blob/master/src/beautifiers/gherkin.coffee) (Default) |
| GLSL | `C`, `opencl`, `GLSL` |`.vert`, `.frag` | [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) (Default) | | GLSL | `C`, `opencl`, `GLSL` |`.vert`, `.frag` | [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html) (Default) |
| Go | `Go` |`.go` | [`gofmt`](https://golang.org/cmd/gofmt/) (Default) | | Go | `Go` |`.go` | [`gofmt`](https://golang.org/cmd/gofmt/) (Default) |
| Golang Template | `HTML (Go)`, `Go Template` |`.gohtml` | [`Pretty Diff`](https://github.com/prettydiff/prettydiff) (Default) |
| Handlebars | `Handlebars`, `HTML (Handlebars)` |`.hbs`, `.handlebars` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) | | Handlebars | `Handlebars`, `HTML (Handlebars)` |`.hbs`, `.handlebars` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |
| Haskell | `Haskell` |`.hs` | [`stylish-haskell`](https://github.com/jaspervdj/stylish-haskell) (Default) | | Haskell | `Haskell` |`.hs` | [`stylish-haskell`](https://github.com/jaspervdj/stylish-haskell) (Default) |
| HTML | `HTML` |`.html` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) | | HTML | `HTML` |`.html` | [`JS Beautify`](https://github.com/beautify-web/js-beautify) (Default), [`Pretty Diff`](https://github.com/prettydiff/prettydiff) |

View File

@ -66,6 +66,7 @@ module.exports = class PrettyDiff extends Beautifier
Visualforce: true Visualforce: true
"Riot.js": true "Riot.js": true
XTemplate: true XTemplate: true
"Golang Template": true
} }
beautify: (text, language, options) -> beautify: (text, language, options) ->
@ -109,6 +110,8 @@ module.exports = class PrettyDiff extends Beautifier
lang = "scss" lang = "scss"
when "TSS" when "TSS"
lang = "tss" lang = "tss"
when "Golang Template"
lang = "gohtml"
else else
lang = "auto" lang = "auto"

View File

@ -0,0 +1,26 @@
module.exports = {
name: "Golang Template"
description: "Comma-Separated Values"
namespace: "gohtml"
###
Supported Grammars
###
grammars: [
"HTML (Go)",
"Go Template"
]
###
Supported extensions
###
extensions: [
'gohtml'
]
defaultBeautifier: "Pretty Diff"
options: []
}

View File

@ -32,6 +32,7 @@ module.exports = class Languages
"gherkin" "gherkin"
"glsl" "glsl"
"go" "go"
"gohtml"
"fortran" "fortran"
"handlebars" "handlebars"
"haskell" "haskell"