From a227ea8074fc8a15742e46819c6b6729b25a0795 Mon Sep 17 00:00:00 2001 From: Brymer Meneses <68867487+brymer-meneses@users.noreply.github.com> Date: Fri, 9 Aug 2024 03:03:03 +0800 Subject: [PATCH] add syntax highlighting for `x-macro` files (#4205) This tells Github to detect files having the extension .def as C++ files, which ensures that these files get syntax highlighted prpperly. I'm not sure whether more files like these are present throughout the repo. FWIW, it can also be configured to do other things, such as detect generated, vendored files and exclude these from the Github stats. See https://github.com/github-linguist/linguist/blob/master/docs/overrides.md. --- .gitattributes | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000000..dcbbceff83ce --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +# Part of the Carbon Language project, under the Apache License v2.0 with LLVM +# Exceptions. See /LICENSE for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +# This tells Github to detect files having the extension `.def` as `C++` files, which +# ensures that these files get syntax highlighted properly. +*.def linguist-language=C++