feat: Set correct filetype and shiftwidth for typst files

This commit is contained in:
kalmenn 2024-06-08 16:01:26 +02:00
parent 1f8fa75f33
commit 2ae15f73e9
Signed by: kalmenn
GPG key ID: F500055C44BC3834
2 changed files with 10 additions and 0 deletions

View file

@ -20,5 +20,6 @@ require("lazy").setup({ { import = "plugins" } })
require("sets") require("sets")
require("remaps") require("remaps")
require("filetypes")
vim.notify("starting nvim 🏕️") vim.notify("starting nvim 🏕️")

9
lua/filetypes.lua Normal file
View file

@ -0,0 +1,9 @@
vim.filetype.add({
extension = {
typ = function(_, bufnr)
vim.bo[bufnr].shiftwidth = 2
vim.bo[bufnr].tabstop = 2
return "typst"
end,
},
})