Golang template support.
This commit is contained in:
parent
d091570860
commit
63947d851e
|
@ -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) |
|
||||
| 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) |
|
||||
| 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) |
|
||||
| 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) |
|
||||
|
|
|
@ -66,6 +66,7 @@ module.exports = class PrettyDiff extends Beautifier
|
|||
Visualforce: true
|
||||
"Riot.js": true
|
||||
XTemplate: true
|
||||
"Golang Template": true
|
||||
}
|
||||
|
||||
beautify: (text, language, options) ->
|
||||
|
@ -109,6 +110,8 @@ module.exports = class PrettyDiff extends Beautifier
|
|||
lang = "scss"
|
||||
when "TSS"
|
||||
lang = "tss"
|
||||
when "Golang Template"
|
||||
lang = "gohtml"
|
||||
else
|
||||
lang = "auto"
|
||||
|
||||
|
|
|
@ -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: []
|
||||
|
||||
}
|
|
@ -32,6 +32,7 @@ module.exports = class Languages
|
|||
"gherkin"
|
||||
"glsl"
|
||||
"go"
|
||||
"gohtml"
|
||||
"fortran"
|
||||
"handlebars"
|
||||
"haskell"
|
||||
|
|
Loading…
Reference in New Issue