init.lua/filetype.lua(view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
if not vim.filetype then
return
end
vim.filetype.add {
extension = {
lock = "yaml",
gotmpl = "gotmpl",
org_archive = "org",
vil = "json",
},
filename = {
[".eslintrc"] = "jsonc",
[".prettierrc"] = "jsonc",
[".babelrc"] = "jsonc",
[".flake8"] = "dosini",
[".editorconfig"] = "dosini",
[".stignore"] = "gitignore",
["todo.txt"] = "todotxt",
["done.txt"] = "todotxt",
["obtf.txt"] = "markdown",
},
pattern = {
["%.env%.[%w_.-]+"] = "sh",
["*.Dockerfile.*"] = "dockerfile",
["*/templates/**/*.html"] = "htmldjango",
[".*/hypr/.+%.conf"] = "hyprlang",
[".*/kitty/.+%.conf"] = "kitty",
},
}
|