feat(treesitter): show filetype associated with parser (#17633)

to ease debug. At one point I had an empty filetype and the current message was not helpful enough
This commit is contained in:
Matthieu Coudron
2023-01-22 16:51:17 +01:00
committed by GitHub
parent 80bede1dfc
commit 151b9fc52e
2 changed files with 3 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ describe('treesitter language API', function()
pcall_err(exec_lua, "parser = vim.treesitter.get_parser(0, 'borklang')"))
-- actual message depends on platform
matches("Failed to load parser: uv_dlopen: .+",
matches("Failed to load parser for language 'borklang': uv_dlopen: .+",
pcall_err(exec_lua, "parser = vim.treesitter.require_language('borklang', 'borkbork.so')"))
-- Should not throw an error when silent