Loaded Gist does not syntax highlight
Opened this issue · 9 comments
Hi,
I've just created my new workflow with Gist and my TODO lists. I am using PlainTasks plugin for handling lists, but when I load that todo file from Gist it is not syntax highlighted by default and i have to change highlight manualy.
Is this an issue of Gist plugin?
Thanks in advance.
Biosek.
Same here. I loaded a JSON (filename is BR.sublime-completions
though) and the syntax hiliting is Plain text. If I load the file myself, ST somehow detects JSON.
Same problem on Sublime Text 3. Seems like package fail to set any syntax then gist is loaded.
Same here, I am getting this error message:
error: Error loading syntax file "Packages/Shell/Shell.tmLanguage": Unable to open Packages/Shell/Shell.tmLanguage
Selecting the syntax manually works fine.
The same problem on my Windows 7 machine. I've got an error on loading Gist file with plain text:
Unable to open Packages/Text/Text.tmLanguage
I solved that by creating a new one folder in my Package
directory.
I am also struggling with this problem. Is there any chance for a fix or did anyone find a way to get it work? Would be really appreciated.
Having this error too.
Error loading syntax file "Packages/Shell/Shell.tmLanguage": Unable to open Packages/Shell/Shell.tmLanguage
Have to manually set the syntax for syntax highlighting.
is there anything being done in this issue? this is a very pain point for me, I use for plain task, and I wish I didn't have to do this every single time.
I did some debugging, and turns out this is problem:
https://github.com/condemil/Gist/blob/2eabc3f3cf853014a9b3f3ee17fca8f0e76bdc89/gist_60_helpers.py#L96-L97
Github doesn't treat .todo
files as any language, and this actually tries not to set language. And I think that's the problem.
I think we should query sublime text to see what syntax should it use to handle those file types in case language is set to None.
I'll try to file a PR later when I have time IF I manage to get this working.
I did find a way to get this working BUT it's not very clean.
Turns out there's no way to get syntax by extension as mentioned here
We'd either have to parse all settings file (including inside sublime-package
files), or use a dirty hack to get syntax. (I went for lazy method)
basically I create a temp file inside /tmp
, open file, get syntax, close file immediately.
then set the syntax.
here's a PR (#188) which is working on my machine.