Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add additional ignore file highlights #8220

Merged

Conversation

rossmanch
Copy link
Contributor

Various files use the same syntax highlighting as .gitignore and similarly tell different tools what files/folders to ignore. Update the languages files so that other ignore type files use the same highlighting gitignore. The files added are:

  • .ignore
  • .prettierignore
  • .eslintignore
  • .npmignore

Resolves: #8089

@pascalkuthe
Copy link
Member

I think you can add CODEOWNERS here aswell to also resolve #8091

languages.toml Outdated
@@ -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"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
file-types = [".gitignore", ".gitignore_global", ".ignore", "prettierignore", ".eslintignore", ".npmignore"]
file-types = [".gitignore", ".gitignore_global", ".ignore", ".prettierignore", ".eslintignore", ".npmignore"]

@rossmanch
Copy link
Contributor Author

Thanks for the suggestions - both addressed in new commit.

@pascalkuthe pascalkuthe linked an issue Sep 9, 2023 that may be closed by this pull request
pascalkuthe
pascalkuthe previously approved these changes Sep 9, 2023
languages.toml Outdated Show resolved Hide resolved
@rossmanch
Copy link
Contributor Author

Looks like I need to go back and learn how to read diffs as you didn't wrap it all. Hopefully now it's ok....

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`

Resolves: helix-editor#8089
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.

Resolves: helix-editor#8091
@the-mikedavis the-mikedavis merged commit 0d986fc into helix-editor:master Sep 10, 2023
6 checks passed
dgkf pushed a commit to dgkf/helix that referenced this pull request Jan 30, 2024
* 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.
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
* 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.
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Highlight CODEOWNERS files Highlight .ignore files (and other \.(\w)*ignore files)
3 participants