Skip to content

Commit d2f373d

Browse files
add autocmd for setting htmldjango filetype in tests directory
1 parent dab4e71 commit d2f373d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.lazy.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,12 @@ vim.lsp.config["djls"] = {
44
root_markers = { "manage.py", "pyproject.toml" },
55
}
66
vim.lsp.enable("djls")
7+
8+
vim.api.nvim_create_autocmd({ "BufRead", "BufNewFile" }, {
9+
pattern = "*/tests/**/*.html",
10+
callback = function()
11+
vim.bo.filetype = "htmldjango"
12+
end,
13+
})
14+
715
return {}

0 commit comments

Comments
 (0)