feat: Set correct filetype and shiftwidth for typst files
This commit is contained in:
parent
1f8fa75f33
commit
2ae15f73e9
1
init.lua
1
init.lua
|
@ -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
9
lua/filetypes.lua
Normal 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,
|
||||||
|
},
|
||||||
|
})
|
Loading…
Reference in a new issue