Closed deathaxe closed 7 months ago
You first need to edit the settings and fill in the python path. Python 3.8 is already old and I had to install that version first (I used rye
. Unfortuantely I couldn't use rye
in the plugin's folder because Sublime locked some files and I couldn't use rye sync
so I had to install python to a separate dir.). Then restart Sublime. Then you also need a C++ compiler. On Windows for each subprocess.run
a cmd window pops up. The typical
STARTUPINFO = None
if sys.platform == "win32":
STARTUPINFO = subprocess.STARTUPINFO()
STARTUPINFO.dwFlags |= subprocess.STARTF_USESHOWWINDOW
must be set startupinfo=STARTUPINFO
to hide that.
It is likely that compiling fails (e.g. you don't have the c compiler installed). Then it should also print the error message or generally stdout to the console. Right now it only prints that the command had a non-zero exit status.
The plugin works after that. 🌞
In that case this issue is a blocker for adding it to package control channel.
Plugins should not have such external dependencies, especially as it is not always easy to have multiple python versions on linux without hazzle of setting them up manually.
This would be poor UX for ST.
I also commented on package control. For the actual installation, if we could e.g. make it work with rye
(rye
is cross-platform and easy to install) it would be already way easier as rye
grabs old python versions and can keep them separate from everything else.
This is closed by this release: https://github.com/sublime-treesitter/TreeSitter/releases/tag/1.1.0
STS now bundles tree_sitter
and tree_sitter_languages
as dependencies. Setting python_path
is no longer required. Thanks deathaxe and kaste
See more context here: https://github.com/wbond/package_control_channel/pull/8862#issuecomment-1916027470
I'd expect newly installed TreeSitter to install dependencies automatically.
Instead it only raises following exception.