Closed getify closed 1 year ago
It's possible that the initial build of syntaxes didn't work for some reason. Try this:
JS Custom: Rebuild Syntaxes
.It should successfully build the default syntaxes and show an output panel with success messages, and then the default syntaxes should be in the syntax selection menu. If that doesn't happen, then hopefully it will print an error message either in the console or in the output panel.
Here's what I see when trying to rebuild the syntaxes:
[JS Custom] Building configuration Default…
Exception in thread Thread-169:
Traceback (most recent call last):
File "C:\Users\XXXXXX\AppData\Roaming\Sublime Text 3\Installed Packages\JSCustom.sublime-package\src/atomic.py", line 32, in atomic_replace
yield temp
File "C:\Users\XXXXXX\AppData\Roaming\Sublime Text 3\Installed Packages\JSCustom.sublime-package\src/build.py", line 37, in build_configuration
error_stream=output,
File "C:\Users\XXXXXX\AppData\Roaming\SUBLIM~1\Packages\YAML_M~1\st3\yamlmacros\src\build.py", line 58, in build
serializer.dump(result, stream=output_file)
File "C:\Users\XXXXXX\AppData\Roaming\SUBLIM~1\Packages\RUAMEL~1\st3\ruamel\yaml\main.py", line 439, in dump
return self.dump_all([data], stream, _kw, transform=transform)
File "C:\Users\XXXXXX\AppData\Roaming\SUBLIM~1\Packages\RUAMEL~1\st3\ruamel\yaml\main.py", line 453, in dump_all
self._context_manager.dump(data)
File "C:\Users\XXXXXX\AppData\Roaming\SUBLIM~1\Packages\RUAMEL~1\st3\ruamel\yaml\main.py", line 801, in dump
self._yaml.representer.represent(data)
File "C:\Users\XXXXXX\AppData\Roaming\SUBLIM~1\Packages\RUAMEL~1\st3\ruamel\yaml\representer.py", line 82, in represent
node = self.represent_data(data)
File "C:\Users\XXXXXX\AppData\Roaming\SUBLIM~1\Packages\RUAMEL~1\st3\ruamel\yaml\representer.py", line 109, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "C:\Users\XXXXXX\AppData\Roaming\SUBLIM~1\Packages\RUAMEL~1\st3\ruamel\yaml\representer.py", line 357, in represent_dict
return self.represent_mapping(u'tag:yaml.org,2002:map', data)
File "C:\Users\XXXXXX\AppData\Roaming\SUBLIM~1\Packages\RUAMEL~1\st3\ruamel\yaml\representer.py", line 979, in represent_mapping
node_value = self.represent_data(item_value)
File "C:\Users\XXXXXX\AppData\Roaming\SUBLIM~1\Packages\RUAMEL~1\st3\ruamel\yaml\representer.py", line 109, in represent_data
node = self.yaml_representers[data_types[0]](self, data)
File "C:\Users\XXXXXX\AppData\Roaming\SUBLIM~1\Packages\RUAMEL~1\st3\ruamel\yaml\representer.py", line 357, in represent_dict
return self.represent_mapping(u'tag:yaml.org,2002:map', data)
File "C:\Users\XXXXXX\AppData\Roaming\SUBLIM~1\Packages\RUAMEL~1\st3\ruamel\yaml\representer.py", line 979, in represent_mapping
node_value = self.represent_data(item_value)
File "C:\Users\XXXXXX\AppData\Roaming\SUBLIM~1\Packages\RUAMEL~1\st3\ruamel\yaml\representer.py", line 119, in represent_data
node = self.yaml_representers[None](self, data)
File "C:\Users\XXXXXX\AppData\Roaming\SUBLIM~1\Packages\RUAMEL~1\st3\ruamel\yaml\representer.py", line 390, in represent_undefined
raise RepresenterError('cannot represent an object: %s' % data)
ruamel.yaml.representer.RepresenterError: cannot represent an object: <yamlmacros.lib.extend.Prepend object at 0x000001514D3A40B8>
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./python3.3/threading.py", line 901, in _bootstrap_inner
File "./python3.3/threading.py", line 858, in run
File "C:\Users\XXXXXX\AppData\Roaming\Sublime Text 3\Installed Packages\JSCustom.sublime-package\src/commands/build_syntaxes.py", line 79, in run
build_configuration(name, configuration, str(destination_path), output)
File "C:\Users\XXXXXX\AppData\Roaming\Sublime Text 3\Installed Packages\JSCustom.sublime-package\src/build.py", line 37, in build_configuration
error_stream=output,
File "./python3.3/contextlib.py", line 66, in __exit__
File "C:\Users\XXXXXX\AppData\Roaming\Sublime Text 3\Installed Packages\JSCustom.sublime-package\src/atomic.py", line 46, in atomic_replace
os.unlink(temp_path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\XXXXXX\\AppData\\Roaming\\Sublime Text 3\\Packages\\User\\JS Custom\\Syntaxes\\Default.sublime-syntax.temp-lruk_e'
That's strange. There's some kind of build error, but a) I don't know why that error would be occurring, and b) I don't know why it would be occurring for you, but not for everyone. Unless it it breaking for everyone and you're the first person to post a bug report. I'll try it myself on Windows later today.
MacOS M1 ST4 I have exact same user settings and it is not building for me either.
Settings that I'm using:
{ "configurations": { "Default": { "custom_template_tags": { "html": "scope:text.html.basic", "": "scope:text.html.basic" } } } }
It is not building and produces this error message:
[JS Custom] Configuration changed. Rebuilding some syntaxes. [JS Custom] Deleting configuration React… [JS Custom] Deleting configuration TypeScript (JSX)… [JS Custom] Deleting configuration TypeScript… [JS Custom] Building configuration Default… generating syntax summary Exception in thread Thread-85: Traceback (most recent call last): File "./python3.3/threading.py", line 901, in _bootstrap_inner File "./python3.3/threading.py", line 858, in run File "/Users/paweuek/Library/Application Support/Sublime Text/Installed Packages/JSCustom.sublime-package/src/commands/build_syntaxes.py", line 79, in run build_configuration(name, configuration, str(destination_path), output) File "/Users/paweuek/Library/Application Support/Sublime Text/Installed Packages/JSCustom.sublime-package/src/build.py", line 37, in build_configuration error_stream=output, File "/Users/paweuek/Library/Application Support/Sublime Text/Packages/yaml_macros_engine/st3/yamlmacros/src/build.py", line 58, in build serializer.dump(result, stream=output_file) File "/Users/paweuek/Library/Application Support/Sublime Text/Packages/ruamel-yaml/st3/ruamel/yaml/main.py", line 439, in dump return self.dump_all([data], stream, _kw, transform=transform) File "/Users/paweuek/Library/Application Support/Sublime Text/Packages/ruamel-yaml/st3/ruamel/yaml/main.py", line 453, in dump_all self._context_manager.dump(data) File "/Users/paweuek/Library/Application Support/Sublime Text/Packages/ruamel-yaml/st3/ruamel/yaml/main.py", line 801, in dump self._yaml.representer.represent(data) File "/Users/paweuek/Library/Application Support/Sublime Text/Packages/ruamel-yaml/st3/ruamel/yaml/representer.py", line 82, in represent node = self.represent_data(data) File "/Users/paweuek/Library/Application Support/Sublime Text/Packages/ruamel-yaml/st3/ruamel/yaml/representer.py", line 109, in represent_data node = self.yaml_representers[data_types[0]](self, data) File "/Users/paweuek/Library/Application Support/Sublime Text/Packages/ruamel-yaml/st3/ruamel/yaml/representer.py", line 357, in represent_dict return self.represent_mapping(u'tag:yaml.org,2002:map', data) File "/Users/paweuek/Library/Application Support/Sublime Text/Packages/ruamel-yaml/st3/ruamel/yaml/representer.py", line 979, in represent_mapping node_value = self.represent_data(item_value) File "/Users/paweuek/Library/Application Support/Sublime Text/Packages/ruamel-yaml/st3/ruamel/yaml/representer.py", line 109, in represent_data node = self.yaml_representers[data_types[0]](self, data) File "/Users/paweuek/Library/Application Support/Sublime Text/Packages/ruamel-yaml/st3/ruamel/yaml/representer.py", line 357, in represent_dict return self.represent_mapping(u'tag:yaml.org,2002:map', data) File "/Users/paweuek/Library/Application Support/Sublime Text/Packages/ruamel-yaml/st3/ruamel/yaml/representer.py", line 979, in represent_mapping node_value = self.represent_data(item_value) File "/Users/paweuek/Library/Application Support/Sublime Text/Packages/ruamel-yaml/st3/ruamel/yaml/representer.py", line 119, in represent_data node = self.yaml_representers[None](self, data) File "/Users/paweuek/Library/Application Support/Sublime Text/Packages/ruamel-yaml/st3/ruamel/yaml/representer.py", line 390, in represent_undefined raise RepresenterError('cannot represent an object: %s' % data) ruamel.yaml.representer.RepresenterError: cannot represent an object: <yamlmacros.lib.extend.Prepend object at 0x106fad780>
Only when I leave
{}
syntax user menu shows up.
Same here with macOS, the moment I put something in the User's JS Custom sublime settings, the User
entry from syntaxes disappears. I have no error in the console when rebuilding the syntaxes though.
I was trying to apply https://github.com/kireerik/refo/tree/master/example#sublime-text
ST build: 4126
I was able to build syntaxes on Windows but on MacOS it doesn't even start the build process, I see nothing in the console
Are you manually running the JS Custom: Rebuild Syntaxes
command?
@Thom1729 the rebuild syntaxes command did not even show up for me in the command palette, and nothing would happen when I saved preferences. It shows up no problem and I can build on Windows.
That to me suggests that Sublime is not successfully loading the JS Custom package.
My first guess is that maybe something went wrong during the package installation itself. Try uninstalling and reinstalling JS Custom and see if that fixes it.
My second guess is that there's something weird happening that keeps JS Custom from being loaded. Maybe check to make sure that it's not disabled in Package Control? Otherwise, try reading through the console output right after launching Sublime to see if there are any messages in there about JS Custom.
I have ST4 installed on windows. I also have package manager. I installed JSCustom, and that worked successfully. I even edited the config:
But, none of the JS-Custom's syntaxes appear anywhere in my Syntax menu:
The FAQ says they should be under a "User" category in that list, but as you can see, there is no "User". I've restarted ST and I've forcibly rebuilt the syntaxes. I'm not seeing any errors in the ST console, but the syntax selections are just not showing up.
Ideas?