mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -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
|
||||
|
||||
---@type ParserInfo[]
|
||||
local list = {}
|
||||
if vim.fn.has "nvim-0.11" == 0 then
|
||||
setmetatable(list, {
|
||||
__newindex = function(table, parsername, parserconfig)
|
||||
rawset(table, parsername, parserconfig)
|
||||
local list = setmetatable({}, {
|
||||
__newindex = function(table, parsername, parserconfig)
|
||||
rawset(table, parsername, parserconfig)
|
||||
if parserconfig.filetype or vim.fn.has "nvim-0.11" == 0 then
|
||||
ts.language.register(parsername, parserconfig.filetype or parsername)
|
||||
end,
|
||||
})
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
list.ada = {
|
||||
install_info = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue