-- lx syntax
local syntax = require("core.syntax")

syntax.add({
	name = "SRT Subtitles File",
	shortname = "SRT",
	author = "liqube",
	extensions = "srt",
	headers = "^1",
	
	patterns = {
		{ pattern = "%d%d:%d%d:%d%d%,%d%d%d", type = "symbol", line_start = true },
		{ pattern = "%-%->", type = "symbol" },
		{ pattern = "%d%d:%d%d:%d%d%,%d%d%d", type = "symbol" },
		{ pattern = "[%a_%-]+:%S+", type = "comment" },

		{ pattern = "%d+", type = "number", line_start = true },
	},
	outline_patterns = {
		{ pattern = "%d%d:%d%d:%d%d%,%d%d%d%s+%-%->%s+%d%d:%d%d:%d%d%,%d%d%d", line_start = true },
	},
})
