mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-12 08:20:05 -04:00
fix(parsers): register explicit filetypes unconditionally (#7202)
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
This commit is contained in:
parent
df0f8cb58e
commit
707e352df6
1 changed files with 7 additions and 8 deletions
|
|
@ -58,15 +58,14 @@ end
|
||||||
---@field readme_name string|nil
|
---@field readme_name string|nil
|
||||||
|
|
||||||
---@type ParserInfo[]
|
---@type ParserInfo[]
|
||||||
local list = {}
|
local list = setmetatable({}, {
|
||||||
if vim.fn.has "nvim-0.11" == 0 then
|
__newindex = function(table, parsername, parserconfig)
|
||||||
setmetatable(list, {
|
rawset(table, parsername, parserconfig)
|
||||||
__newindex = function(table, parsername, parserconfig)
|
if parserconfig.filetype or vim.fn.has "nvim-0.11" == 0 then
|
||||||
rawset(table, parsername, parserconfig)
|
|
||||||
ts.language.register(parsername, parserconfig.filetype or parsername)
|
ts.language.register(parsername, parserconfig.filetype or parsername)
|
||||||
end,
|
end
|
||||||
})
|
end,
|
||||||
end
|
})
|
||||||
|
|
||||||
list.ada = {
|
list.ada = {
|
||||||
install_info = {
|
install_info = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue