mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	chore(ts): show grammar that triggers the error
to help debugging
This commit is contained in:
		| @@ -171,7 +171,7 @@ int tslua_add_language(lua_State *L) | |||||||
|  |  | ||||||
|   TSLanguage *lang = lang_parser(); |   TSLanguage *lang = lang_parser(); | ||||||
|   if (lang == NULL) { |   if (lang == NULL) { | ||||||
|     return luaL_error(L, "Failed to load parser: internal error"); |     return luaL_error(L, "Failed to load parser %s: internal error", path); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   uint32_t lang_version = ts_language_version(lang); |   uint32_t lang_version = ts_language_version(lang); | ||||||
| @@ -179,7 +179,8 @@ int tslua_add_language(lua_State *L) | |||||||
|       || lang_version > TREE_SITTER_LANGUAGE_VERSION) { |       || lang_version > TREE_SITTER_LANGUAGE_VERSION) { | ||||||
|     return luaL_error( |     return luaL_error( | ||||||
|         L, |         L, | ||||||
|         "ABI version mismatch : supported between %d and %d, found %d", |         "ABI version mismatch for %s: supported between %d and %d, found %d", | ||||||
|  |         path, | ||||||
|         TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION, |         TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION, | ||||||
|         TREE_SITTER_LANGUAGE_VERSION, lang_version); |         TREE_SITTER_LANGUAGE_VERSION, lang_version); | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Matthieu Coudron
					Matthieu Coudron