summaryrefslogtreecommitdiff
path: root/doc/user/project/highlighting.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/user/project/highlighting.md')
-rw-r--r--doc/user/project/highlighting.md11
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/user/project/highlighting.md b/doc/user/project/highlighting.md
index aa8cf4549e2..728f51a8062 100644
--- a/doc/user/project/highlighting.md
+++ b/doc/user/project/highlighting.md
@@ -14,18 +14,23 @@ The [Web IDE](web_ide/index.md) and [Snippets](../snippets.md) use [Monaco Edito
for text editing, which internally uses the [Monarch](https://microsoft.github.io/monaco-editor/monarch.html)
library for syntax highlighting.
+<!-- vale gitlab.Spelling = NO -->
+
If GitLab is guessing wrong, you can override its choice of language using the
-`gitlab-language` attribute in `.gitattributes`. For example, if you are working in a
-<!-- vale gitlab.Spelling = NO --> Prolog <!-- vale gitlab.Spelling = YES -->
+`gitlab-language` attribute in `.gitattributes`. For example, if you are working in a Prolog
project and using the `.pl` file extension (which would normally be highlighted as Perl),
you can add the following to your `.gitattributes` file:
+<!-- vale gitlab.Spelling = YES -->
+
``` conf
*.pl gitlab-language=prolog
```
<!-- vale gitlab.Spelling = NO -->
+
When you check in and push that change, all `*.pl` files in your project are highlighted as Prolog.
+
<!-- vale gitlab.Spelling = YES -->
The paths here are Git's built-in [`.gitattributes` interface](https://git-scm.com/docs/gitattributes). So, if you were to invent a file format called a `Nicefile` at the root of your project that used Ruby syntax, all you need is:
@@ -44,7 +49,7 @@ To disable highlighting entirely, use `gitlab-language=text`. Lots more fun shen
/other-file gitlab-language=text?token=Error
```
-Please note that these configurations only take effect when the `.gitattributes`
+These configurations only take effect when the `.gitattributes`
file is in your [default branch](repository/branches/default.md).
NOTE: