aboutsummaryrefslogtreecommitdiff
path: root/test/functional/treesitter/highlight_spec.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-04-28 16:27:47 +0200
committerGitHub <noreply@github.com>2024-04-28 16:27:47 +0200
commit26b5405d181e8c9e75c4b4ec9aae963cc25f285f (patch)
tree94526234bb67a08a6d2708f05a7579cc3301773f /test/functional/treesitter/highlight_spec.lua
parent4625394a767fab311f75ef40f4f15c661156e071 (diff)
downloadrneovim-26b5405d181e8c9e75c4b4ec9aae963cc25f285f.tar.gz
rneovim-26b5405d181e8c9e75c4b4ec9aae963cc25f285f.tar.bz2
rneovim-26b5405d181e8c9e75c4b4ec9aae963cc25f285f.zip
fix(treesitter): enforce lowercase language names (#28546)
* fix(treesitter): enforce lowercase language names Problem: On case-insensitive file systems (e.g., macOS), `has_parser` will return `true` for uppercase aliases, which will then try to inject the uppercase language unsuccessfully. Solution: Enforce and assume parser names to be lowercase when resolving language names.
Diffstat (limited to 'test/functional/treesitter/highlight_spec.lua')
-rw-r--r--test/functional/treesitter/highlight_spec.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/treesitter/highlight_spec.lua b/test/functional/treesitter/highlight_spec.lua
index 1d7ee00818..69984b3233 100644
--- a/test/functional/treesitter/highlight_spec.lua
+++ b/test/functional/treesitter/highlight_spec.lua
@@ -484,7 +484,7 @@ describe('treesitter highlighting (C)', function()
exec_lua [[
vim.treesitter.language.register("c", "foo")
local parser = vim.treesitter.get_parser(0, "c", {
- injections = {c = '(preproc_def (preproc_arg) @injection.content (#set! injection.language "fOO")) (preproc_function_def value: (preproc_arg) @injection.content (#set! injection.language "fOO"))'}
+ injections = {c = '(preproc_def (preproc_arg) @injection.content (#set! injection.language "foo")) (preproc_function_def value: (preproc_arg) @injection.content (#set! injection.language "foo"))'}
})
local highlighter = vim.treesitter.highlighter
test_hl = highlighter.new(parser, {queries = {c = hl_query}})