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

syntax.add({
	name = "Visual C++ Project File",
	shortname = "vcxproj",
	author = "liqube",

	extensions = {
		"vcxproj", -- Visual Studio Project
		"cbproj", -- C++ Builder Project
		"groupproj", -- RAD Studio Group Projet
	},

	inherit = {
		syntax = "module:xml",
		keys = { "headers", "patterns", "block_comment" },
	},

	patterns = {
		-- Match braced GUID payloads anywhere in the file
		patterns.guid_braced(),
	},

	outline_patterns = {
		{ pattern = "%s*<Project%s+", line_start = true },
		{ pattern = "%s*<ItemGroup%s+", line_start = true },
		{ pattern = "%s*<ItemGroup>", line_start = true },
		{ pattern = "%s*<PropertyGroup%s+", line_start = true },
		{ pattern = "%s*<ItemDefinitionGroup%s+", line_start = true },
		{ pattern = "%s*<ImportGroup%s+", line_start = true },
	},
})
