diff options
author | Nogweii | 2023-06-15 16:29:18 -0700 |
---|---|---|
committer | Nogweii | 2023-06-15 16:30:11 -0700 |
commit | 4566ea7eb60556e25f2a76d7539acfc22cf584ab (patch) | |
tree | 30526fb71602545922c487139cd49c1dc015c22f | |
parent | cec0a6a756560233986e835f08a0a16b1bbcf61e (diff) | |
download | aur-4566ea7eb60556e25f2a76d7539acfc22cf584ab.tar.gz |
Make the package be more isolated and include queries
Switching from -uNORC to -uNONE means all files in the runtimepath will
be ignored and not automatically loaded at startup, nearly completely
isolating the neovim instance from the system. It shouldn't be impacted
by anything installed elsewhere.
The queries shipped in the repo are meant to match with the version of
the parser marked in the lock file, so ship the queries as well.
Otherwise a mismatch between the parser and query versions will lead to
a bunch of treesitter errors, especially in the highlighter.
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 16 |
2 files changed, 11 insertions, 9 deletions
@@ -1,7 +1,7 @@ pkgbase = nvim-treesitter-parsers-git pkgdesc = All of the registered tree sitter parsers used by Neovim - pkgver = r595.a0251c98 - pkgrel = 2 + pkgver = r1067.10b0da9f + pkgrel = 1 url = https://github.com/nvim-treesitter/nvim-treesitter arch = x86_64 license = Apache @@ -1,7 +1,7 @@ # Maintainer: Nogweii <packages@nogweii.net> pkgname=nvim-treesitter-parsers-git -pkgver=r595.a0251c98 -pkgrel=2 +pkgver=r1067.10b0da9f +pkgrel=1 pkgdesc="All of the registered tree sitter parsers used by Neovim" arch=(x86_64) url="https://github.com/nvim-treesitter/nvim-treesitter" @@ -26,13 +26,15 @@ pkgver() { build() { cd "$srcdir/${_dirname}" - nvim -u NORC --headless --cmd "set rtp+=$(pwd)" -c "TSInstallSync all" -c "q" + nvim -u NONE --headless --cmd "set rtp+=$(pwd)" -c "lua require('nvim-treesitter').setup()" -c "TSInstallSync all" -c "q" } package() { cd "$srcdir/${_dirname}" - mkdir -p "$pkgdir/usr/share/nvim/runtime/parser/" - cp parser/*.so -t "$pkgdir/usr/share/nvim/runtime/parser/" - mkdir -p "$pkgdir/usr/share/nvim/runtime/parser-info/" - cp parser-info/*.revision -t "$pkgdir/usr/share/nvim/runtime/parser-info/" + mkdir -p "$pkgdir/etc/xdg/nvim/parser/" + cp parser/*.so -t "$pkgdir/etc/xdg/nvim/parser/" + mkdir -p "$pkgdir/etc/xdg/nvim/parser-info/" + cp parser-info/*.revision -t "$pkgdir/etc/xdg/nvim/parser-info/" + mkdir -p "$pkgdir/etc/xdg/nvim/queries/" + cp -r queries/* -t "$pkgdir/etc/xdg/nvim/queries/" } |