feat(nvim): register bash ts parser for zsh filetypes

This commit is contained in:
Price Hiller 2024-03-01 04:14:35 -06:00
parent 63b19315f2
commit b11ca1a51c
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -14,9 +14,17 @@ M.setup = function()
},
})
vim.treesitter.language.register("yaml", "azure-pipelines")
vim.treesitter.language.register("gitignore", "dockerignore")
vim.treesitter.language.register("html", "xml")
---Maps a given file type to a treesitter language to use for the given file type
---@type table<string, string>
local fts_to_lang_registration = {
["azure-pipelines"] = "yaml",
["dockerignore"] = "gitignore",
["zsh"] = "bash"
}
vim.iter(fts_to_lang_registration):each(function(filetype, language)
vim.treesitter.language.register(language, filetype)
end)
end
return M