From 1aa2eaff808ca9606a6a8be2b58cf68e01ce7502 Mon Sep 17 00:00:00 2001 From: Ross Manchester <33374742+rossmanch@users.noreply.github.com> Date: Sun, 10 Sep 2023 19:53:15 +0100 Subject: [PATCH] chore: add additional ignore file highlights (#8220) * chore: add additional ignore file highlights Various files use the same syntax highlighting as `.gitignore` and similarly tell different tools what files/folders to ignore. Update the languages file so that other ignore type files use the same highlighting as gitignore. The files added are: - `.ignore` - `.prettierignore` - `.eslintignore` - `.npmignore` * chore: add highlighting for codeowners files Add `CODEOWNERS` as an additional file type for `git-ignore` in the language file. `CODEOWNERS`'s grammar is close enough to that of `.gitignore`, this can be used to avoid making a new grammar specifically for `CODEOWNERS` files. --- languages.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages.toml b/languages.toml index b23cb44895a6..d9cf7ef2c391 100644 --- a/languages.toml +++ b/languages.toml @@ -1380,7 +1380,7 @@ source = { git = "https://github.com/mtoohey31/tree-sitter-gitattributes", rev = name = "git-ignore" scope = "source.gitignore" roots = [] -file-types = [".gitignore", ".gitignore_global"] +file-types = [".gitignore", ".gitignore_global", ".ignore", ".prettierignore", ".eslintignore", ".npmignore", "CODEOWNERS"] injection-regex = "git-ignore" comment-token = "#" grammar = "gitignore"