tree-sitter-wgsl icon indicating copy to clipboard operation
tree-sitter-wgsl copied to clipboard

Undefined symbol tree_sitter_wgsl_external_scanner_create

Open miyoku157 opened this issue 2 years ago • 4 comments

Hi, I'm trying to add wgsl for nvim. I already had it installed for rust mainly (treesitter is installed with packer) I tried to follow the readme, i also saw the PR which had src/scanner.c and try the solution here: https://github.com/szebniok/tree-sitter-wgsl/issues/8 But i always have this error :

indent-blankline: Failed to load parser: uv_dlopen: /home/miyoarch/.local/share/nvim/site/pack/packer/sta
rt/nvim-treesitter/parser/wgsl.so: undefined symbol: tree_sitter_wgsl_external_scanner_create

My init.lua file is inside ~/.config/nvim/ and i put the queries folder inside it too. Am i doing something wrong?

miyoku157 avatar Feb 12 '23 13:02 miyoku157

I've got the same problem and fixed it by removing the parser_config snippet in my config, and removing/reinstalling treesitter:

        -- REMOVED
	-- local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
	-- parser_config.wgsl = {
	-- 	install_info = {
	-- 		url = "https://github.com/szebniok/tree-sitter-wgsl",
	-- 		files = {"src/parser.c"}
	-- 	},
	-- }

davawen avatar Mar 13 '23 12:03 davawen

A bit late but I can confirm @davawen's solution works. Not sure why, though.

samvv avatar Oct 08 '23 22:10 samvv

I think it's because tree-sitter has pulled wgsl as an official parser, so the installation instructions in this repo are outdated 🤔

davawen avatar Oct 09 '23 04:10 davawen

I see. Thanks!

samvv avatar Oct 09 '23 08:10 samvv