File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
33## Unreleased
4+ - Made ` tree-sitter-langs-install-grammars ` download platform-specific binaries (mainly for Apple Silicon).
45
56## 0.10.15 - 2022-01-27
67- Added ` haskell ` grammar.
Original file line number Diff line number Diff line change @@ -252,10 +252,21 @@ infrequent (grammar-only changes). It is different from the version of
252252 " Return the grammar bundle file's name, with optional EXT.
253253If VERSION and OS are not spcified, use the defaults of
254254`tree-sitter-langs--bundle-version' and `tree-sitter-langs--os' ."
255- (format " tree-sitter-grammars-%s -%s .tar%s "
256- (or os tree-sitter-langs--os)
257- (or version tree-sitter-langs--bundle-version)
258- (or ext " " )))
255+ (setq version (or version tree-sitter-langs--bundle-version))
256+ (setq os (or os tree-sitter-langs--os))
257+ (setq ext (or ext " " ))
258+ (if (version<= " 0.10.13" version)
259+ (format " tree-sitter-grammars.%s .v%s .tar%s "
260+ ; ; FIX: Implement this correctly, refactoring 'OS' -> 'platform'.
261+ (pcase os
262+ (" windows" " x86_64-pc-windows-msvc" )
263+ (" linux" " x86_64-unknown-linux-gnu" )
264+ (" macos" (if (string-prefix-p " aarch64" system-configuration)
265+ " aarch64-apple-darwin"
266+ " x86_64-apple-darwin" )))
267+ version ext)
268+ (format " tree-sitter-grammars-%s -%s .tar%s "
269+ os version ext)))
259270
260271(defun tree-sitter-langs-compile (lang-symbol &optional clean target )
261272 " Download and compile the grammar for LANG-SYMBOL.
You can’t perform that action at this time.
0 commit comments