Open kenielf opened 6 months ago
You should definitely submit a PR!
I also found that I need to run silicon --build-cache
with ~/.config/silicon
as my working directory, otherwise it looks for themes
in whatever else my working directory is.
I also found that I need to run
silicon --build-cache
with~/.config/silicon
as my working directory, otherwise it looks forthemes
in whatever else my working directory is.
I have just tested this, and yes - it needs the cwd to contain both the directories for themes
and syntaxes
- if not, the command fails.
The Issue
If I was adding a custom theme, I would normally not need to also create a
syntaxes
directory, however, the application crashes with the following when trying to rebuild its cache:Note: this also happens if I was trying to just add custom syntaxes without creating the theme directory
Workaround
Although this can be easily circumvented by simply creating all necessary directories:
However, it might be better to just check first in the code if the directories exist, and if they don't, just skip them altogether.
Fix
Looking into it, the issue seems to be easily resolved by tweaking the
add_from_folder
function in theimpl HighlightingAssets
to first check if the directory exists, in the cases where it does not, just skip the building.I have tested a simple solution and it is working normally on my end:
I can submit a PR myself if desired.