29 lines
560 B
Lua
29 lines
560 B
Lua
return function()
|
|
vim.filetype.add {
|
|
extension = {
|
|
avsc = "json",
|
|
},
|
|
}
|
|
vim.filetype.add {
|
|
extension = {
|
|
dataviewjs = "javascript",
|
|
},
|
|
}
|
|
|
|
local ft_to_parser = require("nvim-treesitter.parsers").filetype_to_parsername
|
|
ft_to_parser.dataviewjs = "javascript"
|
|
|
|
-- Set up custom filetypes
|
|
-- vim.filetype.add {
|
|
-- extension = {
|
|
-- foo = "fooscript",
|
|
-- },
|
|
-- filename = {
|
|
-- ["Foofile"] = "fooscript",
|
|
-- },
|
|
-- pattern = {
|
|
-- ["~/%.config/foo/.*"] = "fooscript",
|
|
-- },
|
|
-- }
|
|
end
|