Package Details: tree-sitter-typst-git v0.11.0.r3.g3924cb9-1

Git Clone URL: https://aur.archlinux.org/tree-sitter-typst-git.git (read-only, click to copy)
Package Base: tree-sitter-typst-git
Description: Typst grammar for tree-sitter
Upstream URL: https://github.com/uben0/tree-sitter-typst
Licenses: MIT
Groups: tree-sitter-grammars
Provides: libtree-sitter-typst.so
Submitter: usao
Maintainer: usao
Last Packager: usao
Votes: 2
Popularity: 0.049651
First Submitted: 2023-10-04 15:15 (UTC)
Last Updated: 2024-05-13 04:07 (UTC)

Dependencies (3)

Required by (0)

Sources (1)

Latest Comments

usao commented on 2024-05-13 04:29 (UTC)

@132ikl Addressed in the updated PKGBUILD.

132ikl commented on 2024-05-10 17:09 (UTC)

Hi, starting with Arch neovim package version 0.9.5-3, the entire /usr/lib/tree_sitter directory is symlinked to /usr/share/nvim/runtime/parser. This change causes conflicts between tree-sitter-typst-git and the neovim package, as tree-sitter-typst-git still treats /usr/share/nvim/runtime/parser as a folder rather than a symlink. Therefore, libtree-sitter-typst.so should be symlinked to /usr/lib/tree_sitter rather than directly to /usr/share/nvim/runtime/parser. Here a is a patch which fixes this:

diff --git a/PKGBUILD b/PKGBUILD
index 42b5a40..8376bdf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
 # Maintainer: Wing Hei Chan <whmunkchan@outlook.com>
 _pkgname=tree-sitter-typst
 pkgname="$_pkgname-git"
-pkgver=v0.9.0.1.r13.g1651d6e
+pkgver=v0.11.0.r3.g3924cb9
 pkgrel=1
 pkgdesc="A TreeSitter grammar for the Typst language."
 arch=('x86_64')
@@ -34,9 +34,9 @@ build() {
 package() {
   install -Dm 644 {,"$pkgdir/usr/lib/"}libtree-sitter-typst.so

-  local nvim="$pkgdir/usr/share/nvim/runtime/parser"
-  mkdir -p "$nvim"
-  ln -s /usr/lib/libtree-sitter-typst.so "$nvim/typst.so"
+  install -d "$pkgdir"/usr/lib/tree_sitter
+  ln -s /usr/lib/lib$_pkgname.so \
+    "$pkgdir"/usr/lib/tree_sitter/${_pkgname#tree-sitter-}.so

   install -Dm 644 "$_pkgname/LICENSE" -t \
     "$pkgdir/usr/share/licenses/$pkgname"

jb53 commented on 2023-11-28 02:03 (UTC)

Yes it builds now, thanks!

usao commented on 2023-11-28 01:15 (UTC)

@jb53 Can you confirm that it builds now? I must have missed the dependency because I have it installed (from Neovim I suppose). That’s guilty of me for copying PKGBUILD from other AUR packages.

jb53 commented on 2023-11-27 23:44 (UTC)

This package doesn't build.

parser.c:1:10: fatal error: tree_sitter/parser.h: No such file or directory
    1 | #include <tree_sitter/parser.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.