extra: nvim: add autocmd to appropriately set filetype
for typst files
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
3458f5f659
commit
e1fa7b8d21
|
@ -92,6 +92,14 @@ vim.api.nvim_create_autocmd('FileType', {
|
|||
end,
|
||||
})
|
||||
|
||||
-- Set appropriate filetype for Typst such that treesitter can do its thing
|
||||
vim.api.nvim_create_autocmd('BufReadPost', {
|
||||
pattern = '*.typ',
|
||||
callback = function()
|
||||
vim.bo.ft = 'typst'
|
||||
end,
|
||||
})
|
||||
|
||||
-- Automatically switch between absolute and relative line numbers when
|
||||
-- entering insert mode
|
||||
local numbertoggle_group = vim.api.nvim_create_augroup('numbertoggle', {})
|
||||
|
|
Loading…
Reference in a new issue