Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported language for grammar 'YAML' with extension '.yml'. #312

Closed
s905060 opened this issue May 4, 2015 · 41 comments
Closed

Unsupported language for grammar 'YAML' with extension '.yml'. #312

s905060 opened this issue May 4, 2015 · 41 comments

Comments

@s905060
Copy link

s905060 commented May 4, 2015

[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 0.196.0
System: Mac OS X 10.10.3
Thrown From: atom-beautify package, v0.26.4

Stack Trace

Unsupported language for grammar 'YAML' with extension '.yml'.

At Unsupported language for grammar 'YAML' with extension '.yml'.

Error: Unsupported language for grammar 'YAML' with extension '.yml'.
  at /Users/jashl/.atom/packages/atom-beautify/src/beautifiers/index.coffee:351:28
  at tryCatcher (/Users/jashl/.atom/packages/atom-beautify/node_modules/bluebird/js/main/util.js:24:31)
  at Promise._resolveFromResolver (/Users/jashl/.atom/packages/atom-beautify/node_modules/bluebird/js/main/promise.js:427:31)
  at new Promise (/Users/jashl/.atom/packages/atom-beautify/node_modules/bluebird/js/main/promise.js:53:37)
  at Beautifiers.module.exports.Beautifiers.beautify (/Users/jashl/.atom/packages/atom-beautify/src/beautifiers/index.coffee:230:20)
  at Object.beautify (/Users/jashl/.atom/packages/atom-beautify/src/beautify.coffee:133:16)
  at TextBuffer.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/emissary/lib/emitter.js:118:15)
  at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:910:14)
  at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/text-buffer/lib/text-buffer.js:899:19)
  at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app.asar/src/text-editor.js:592:26)
  at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:523:18)
  at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:506:19)
  at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace.js:585:35)
  at atom-workspace.atom.commands.add.core:save (/Applications/Atom.app/Contents/Resources/app.asar/src/workspace-element.js:310:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:238:29)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:519:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:354:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:178:20)

Commands

  3x -4:55.8.0 core:paste (atom-text-editor.editor)
     -3:57.3.0 core:save (atom-text-editor.editor)
  3x -3:24.3.0 core:paste (atom-text-editor.editor)
  2x -3:00.2.0 core:save (atom-text-editor.editor)
  2x -2:33.2.0 core:backspace (atom-text-editor.editor)
  4x -2:29.9.0 core:save (atom-text-editor.editor)
     -1:27.2.0 core:move-down (ol.tree-view.list-tree.has-collapsable-children.focusable-panel.full-menu)
     -1:04.1.0 core:move-left (atom-text-editor.editor.is-focused)
     -1:03.8.0 editor:newline (atom-text-editor.editor.is-focused)
     -0:36.3.0 core:copy (atom-text-editor.editor)
     -0:28.4.0 core:paste (atom-text-editor.editor.is-focused)
  2x -0:25.7.0 core:backspace (atom-text-editor.editor.is-focused)
     -0:23.2.0 core:save (atom-text-editor.editor.is-focused)
     -0:15 core:move-right (atom-text-editor.editor.is-focused)
  8x -0:14.6.0 core:backspace (atom-text-editor.editor.is-focused)
  2x -0:09.6.0 core:save (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "themes": [
      "seti-ui",
      "monokai"
    ]
  },
  "atom-beautify": {
    "_analyticsUserId": "250400a8-e03f-4d36-ac7f-fb71bea392b6",
    "beautifyOnSave": true,
    "python_autopep8_path": "/usr/local/bin/autopep8",
    "python_indent_size": 4,
    "analytics": false,
    "beautifyEntireFileOnSave": false,
    "css_indent_size": 4
  }
}

Installed Packages

# User
atom-beautify, v0.26.4
autoclose-html, v0.15.0
autocomplete-css, v0.6.0
autocomplete-html, v0.6.0
autocomplete-plus, v2.12.1
autocomplete-snippets, v1.3.0
compare-files, v0.4.1
highlight-selected, v0.9.2
indent-guide-improved, v1.1.1
linter, v0.12.1
linter-coffeelint, v0.2.2
linter-htmlhint, v0.0.13
linter-js-yaml, v1.0.0
linter-pylint, v0.2.1
linter-shellcheck, v0.0.7
minimap, v4.8.0
monokai, v0.14.0
seti-ui, v0.7.1

# Dev
No dev packages
@Glavin001
Copy link
Owner

YAML simply is not a supported language that can be beautified by Atom Beautify. I will be making this notification less aggressive with #317.

Closing this as it is expected behaviour and not an error.

@Glavin001 Glavin001 added this to the v0.27.0 milestone May 5, 2015
@Glavin001 Glavin001 modified the milestones: v0.28.0, v0.27.0 May 5, 2015
@Glavin001
Copy link
Owner

I'll look into YAML beautification support.

@Glavin001 Glavin001 reopened this May 5, 2015
@opusmagnum
Copy link

Thanks in advance for YAML beautification support!

@Glavin001 Glavin001 removed this from the v0.28.0 milestone Jun 1, 2015
@Glavin001
Copy link
Owner

This may work: https://www.npmjs.com/package/align-yaml

YAML users please try and let me know if it works for you. If so, this beautifier could be added! 👍

@ghost
Copy link

ghost commented Aug 25, 2015

i am using app engine and the yml files need to be like "blahblah.yaml"

SO this does not work for me.
I just tried it.

@joshoohaah
Copy link

I agree the proposed alternative does not work. An addition for beautify to add in YAML would be much appreciated!

@esetnik
Copy link

esetnik commented Dec 31, 2015

+1 let me know if I can help in any way. I'd love a yaml beautifier in atom.

@dixhuit
Copy link

dixhuit commented Jan 8, 2016

Also pretty keen to see YAML supported here. Thanks for the great package BTW :)

@JoshZA
Copy link

JoshZA commented Jan 12, 2016

👍

@marcosscriven
Copy link

Just came here looking for YAML support too.

@kikulikov
Copy link

+1

4 similar comments
@mjrk
Copy link

mjrk commented Feb 8, 2016

+1

@alrighttheresham
Copy link

+1

@fernandopro
Copy link

+1

@basnijholt
Copy link

+1

@prettydiff prettydiff mentioned this issue Mar 11, 2016
3 tasks
@aioue
Copy link

aioue commented Apr 8, 2016

+1

@tomdavidson
Copy link

align-yaml works great for me so far. Hope to see this functionality in atom-beautify, in the mean time we can added it to atom save commands or what not.

@aioue
Copy link

aioue commented May 9, 2016

@tomdavidson doesn't look like it sorts and/or preserves comment locations

@prasket
Copy link

prasket commented Nov 8, 2016

If I can make some time soon I am going to try and fork this project and add in the align-yaml from @Glavin001 recommendation. It might not be until after the holidays but I would really like to do this.

I use YAML daily in Atom for AWS stuff, being able to beautify it so I don't get dumb formatting errors in CloudFormation.

@robert-john-small
Copy link

+1

2 similar comments
@Isarstyle
Copy link

+1

@Trandel
Copy link

Trandel commented Dec 19, 2016

+1

@Glavin001
Copy link
Owner

This would be great and I am definitely interested in reviewing and merging a Pull Request implementing YAML support. Please let me know if you have any questions about adding languages and beautifiers to Atom-Beautify!

@jr00n
Copy link

jr00n commented Jan 17, 2017

+1

3 similar comments
@nchinan
Copy link

nchinan commented Jan 25, 2017

+1

@Shinigami92
Copy link

+1

@cesasol
Copy link

cesasol commented Feb 22, 2017

+1

@basnijholt
Copy link

Please stop with the +1. Give the original post a thumps up instead.

@str4nge-m4g1c
Copy link

Has there been any progress on this feature? Really looking forward to it.

@polarathene
Copy link

I just tried align-yaml and it works fine with the example. I don't have any more extensive yaml examples to test with. I could probably follow the atom-beautify docs to add support for it but with the efforts to transition towards Unibeautify, I'm not sure if there is any point? For now it might be better to use one of the many online ones that you can copy/paste to.

I don't presently have the motivation to work on this as I haven't worked with yaml in a while, nor does it seem worth the effort. If someone is interested in working on it or would contribute support for Unibeautify instead, perhaps you can help by providing a decent yaml sample for tests(required part of the process for submission).

@Glavin001
Copy link
Owner

@polarathene since you have confirmed align-yaml works well enough then we can add it to Atom-Beautify. I am still accepting Pull Requests for Atom-Beautify pre-Unibeautify and I will likely personally migrate them all over to Unibeautify when I am ready. Thank you all for your patience!

@Glavin001 Glavin001 removed their assignment Apr 9, 2017
@polarathene
Copy link

@Glavin001 I didn't have any other yaml source to try with beyond the example given on the repo that handles alignment. That worked fine however :)

@Glavin001
Copy link
Owner

Awesome! Pull Requests welcome: https://github.com/Glavin001/atom-beautify/blob/master/docs/add-languages-and-beautifiers.md
Please let me know if you have any questions.

@Glavin001 Glavin001 self-assigned this Apr 15, 2017
Glavin001 added a commit that referenced this issue Apr 16, 2017
See #312. Add align-yaml as YAML beautifier
@Glavin001
Copy link
Owner

Since I received no Pull Request, I implemented it on my own: #1600

Will be in the next release.

@Glavin001
Copy link
Owner

Published to v0.29.22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests