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

Failed to import TextMate grammar #40760

Closed
svanimpe opened this issue Dec 23, 2017 · 3 comments
Closed

Failed to import TextMate grammar #40760

svanimpe opened this issue Dec 23, 2017 · 3 comments
Assignees
Labels
javascript JavaScript support issues

Comments

@svanimpe
Copy link
Contributor

  • VSCode Version: 1.19.1
  • OS Version: macOS 10.13.2

Steps to Reproduce:

  1. yo code
  2. Select 'New Language Support'
  3. Enter the path to the attached grammar (unzip it first of course).
  4. Crash:
events.js:188
      throw err;
      ^

Error: Unhandled "error" event. (Problems loading language definition file: ENOENT: no such file or directory, open '/Users/steven/Desktop/stencil.tmLanguage ')
    at constructor.emit (events.js:186:19)
    at Immediate._onImmediate (/usr/local/lib/node_modules/generator-code/node_modules/yeoman-generator/lib/base.js:446:16)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)

This grammar has been written using TextMate and works fine there.

stencil.tmLanguage.zip

@vscodebot vscodebot bot added the javascript JavaScript support issues label Dec 23, 2017
@mxschmitt
Copy link
Member

mxschmitt commented Dec 23, 2017

Hi,

I tried to reproduce this and on my system it works fine.

ENOENT: no such file or directory, open '/Users/steven/Desktop/stencil.tmLanguage '

According to your logs, you put a space at the end of the filename at your path. Maybe Copy Paste failure.

Best regards
Max

@svanimpe
Copy link
Contributor Author

To my embarrassment, that was indeed the problem.
It appears macOS adds a space when you copy/paste a path or drag in a file from Finder. I did not notice this at all. Thanks for noticing it!

@mxschmitt
Copy link
Member

Maybe we could add that spaces will be trimmed of the path.

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
javascript JavaScript support issues
Projects
None yet
Development

No branches or pull requests

3 participants