SublimeREPL icon indicating copy to clipboard operation
SublimeREPL copied to clipboard

Error loading syntax file "Packages/Elixir/Elixir.tmLanguage":

Open darthdeus opened this issue 12 years ago • 9 comments

When I launch my Elixir REPL, I get the following error

error

but the REPL works, and if I close it and open it again, the error doesn't appear anymore.

darthdeus avatar Sep 04 '13 01:09 darthdeus

Install https://sublime.wbond.net/packages/Elixir

At some point in the future we'll probably bundle all non-standard tmLanguage files with SublimeREPL

wuub avatar Sep 04 '13 08:09 wuub

I already have that installed, which is the weird thing. The Elixir package itself works fine, I can even build things and it finds the right executable.

darthdeus avatar Sep 04 '13 08:09 darthdeus

Oh, Elixir package changed the location of tmLanguage file.

Please adjust this: https://github.com/wuub/SublimeREPL/blob/master/config/Elixir/Main.sublime-menu#L19

"syntax": "Packages/Elixir/Syntaxes/Elixir.tmLanguage",

It should help for now, and I'll try to create more robust solution in the next release.

wuub avatar Sep 04 '13 09:09 wuub

Cool it works, thanks.

darthdeus avatar Sep 04 '13 22:09 darthdeus

With SublimeText 3083 and the ST packages Elixir 2015.03.04.11.47.26 and SublimeREPL 2.1.1 this workaround doesn't work around. The config change mentioned above is ignored and the loose file (Elixir.tmLanguage) isn't available anyway.

I had to:

  1. Extract InstalledPackages/Elixir.sublime-package
  2. Create a new folder Packages/Elixir
  3. Move the extracted Elixir/Syntaxes/Elixir.tmLanguage to the new folder Packages/Elixir

ylg avatar Mar 31 '15 16:03 ylg

Yeah, like @ylg I'm having users on ST3 getting my package installed to Installed Packages by default instead of to Packages. Is there a solution for this? I can't set the syntax file to Packages/... if a lot of my users have it installed in Installed Packages/...

deadfoxygrandpa avatar Dec 14 '15 00:12 deadfoxygrandpa

it works for me,thank you @ylg if I use a foldername happy-elx or other, the folder will be delete

leisurem avatar Apr 26 '16 06:04 leisurem

Thank you @ylg ,this worked great for MagicPython syntax as well.

For those who are trying to get MagicPython syntax to work in SublimeRepl, this is how I got it to work for me (Sublime build 3176 Portable version). I'm pretty sure this will work for any syntax though...

  1. Navigate to 'SublimeText3/data/Installed Packages'
  2. Copy the file 'MagicPython.sublime-package' to a different directory
  3. Rename the extension of the file to an archive format (.rar, .zip, .7z, etc)
  4. Extract the archive and locate 'MagicPython.tmLanguage' in the folder 'MagicPython/grammars'
  5. Back in the SublimeText3 directory, navigate to 'SublimeText3/data/Packages' and create a new folder called 'MagicPython'. Move the 'MagicPython.tmLanguage' file from step 4 into this folder you just created.
  6. Change all 3 syntax lines of the 'SublimeRepl/Python/Main.sublime-menu' file to 'Packages/MagicPython/MagicPython.tmLanguage'. Restart sublime and you should be all set

WirlyWirly avatar Jun 26 '18 01:06 WirlyWirly

As of 2018-07-12, this issue still occurs and I can confirm that the workaround mentioned by @ylg above works like a charm with Sublime 3.1.1 (Build 3176) under Windows 10. I wasn't aware that the Elixir.sublime-package is actually an archive of sorts, which had me stumped for a while, because I couldn't find the Elixir\Elixir.tmLanguage directory/file. I had to rename Elixir.sublime-package to Elixir.zip and extract it to reveal the contents of the package.

leifericf avatar Jul 12 '18 09:07 leifericf