mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 03:40:04 -04:00
fix: add used_by in parser setter
This commit is contained in:
parent
34bb66c48f
commit
21799c9ed6
1 changed files with 5 additions and 1 deletions
|
|
@ -17,7 +17,11 @@ local list = setmetatable({}, {
|
||||||
|
|
||||||
rawset(table, parsername, setmetatable(parserconfig, {
|
rawset(table, parsername, setmetatable(parserconfig, {
|
||||||
__newindex = function(parserconfigtable, key, value)
|
__newindex = function(parserconfigtable, key, value)
|
||||||
rawset(parserconfigtable, key, value)
|
if key == "used_by" then
|
||||||
|
ft_to_parsername[value] = parsername
|
||||||
|
else
|
||||||
|
rawset(parserconfigtable, key, value)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue