sublime-zig-language
sublime-zig-language copied to clipboard
Error when formatting while no folder is open
When formatting a file without an open folder, Sublime Text 3211 and 4126 show an error in the console. I haven't tested this in other Versions.
Console Output:
Traceback (most recent call last):
File "/opt/sublime_text/Lib/python33/sublime_plugin.py", line 1456, in run_
return self.run(**args)
File "/home/$USER/.config/sublime-text-3/Installed Packages/Zig Language.sublime-package/Zig.py", line 149, in run
KeyError: 'folder'
I have encountered the same issue. The problem is line 149 of Zig.py, which looks like this:
working_dir = vars.get('file_path', vars['folder'])
I removed the . vars['folder'] and it works again. This is probably not a proper fix, but this should be the place to fix it.