diff --git a/PKGBUILD b/PKGBUILD index 8a2b005..4d721e4 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -26,19 +26,10 @@ build() { v run build.vsh gcc msg "Building treesitter grammar..." - # Patch the language server files & build the shared library - # Neovim wants all functions in the grammar library to correctly use the - # filetype, which in this case is vlang. However, the standard codebase - # uses v as the name. - mv tree_sitter_v tree_sitter_vlang - - find tree_sitter_vlang \ - -\( -iname '*.v' -or -iname '*.c' -or -iname '*.h' -\) \ - -exec sed -i 's/tree_sitter_v/tree_sitter_vlang/' "{}" \; # Building with -prod is required because otherwise, the binary contains # tcc symbols which isn't usually installed on the user's system. - v -shared -prod tree_sitter_vlang + v -shared -prod tree_sitter_v } package() { @@ -50,8 +41,7 @@ package() { # Install treesitter grammar # This package installs the parser & queries for Neovim in its runtimepath install -dm755 "$pkgdir/usr/share/nvim/runtime/parser" - install -dm755 "$pkgdir/usr/share/nvim/runtime/queries/vlang" - install -Dm755 "$pkgname/tree_sitter_vlang/tree_sitter_vlang.so" "$pkgdir/usr/share/nvim/runtime/parser/vlang.so" - install -m644 "$pkgname/tree_sitter_vlang/queries"/* "$pkgdir/usr/share/nvim/runtime/queries/vlang" - + install -dm755 "$pkgdir/usr/share/nvim/runtime/queries/v" + install -Dm755 "$pkgname/tree_sitter_v/tree_sitter_v.so" "$pkgdir/usr/share/nvim/runtime/parser/v.so" + install -m644 "$pkgname/tree_sitter_v/queries"/* "$pkgdir/usr/share/nvim/runtime/queries/v" }