Skip to content

Commit

Permalink
Add support for generic option-lists like .ackrc (github-linguist#6088
Browse files Browse the repository at this point in the history
)

Co-authored-by: Colin Seymour <[email protected]>
  • Loading branch information
Alhadis and lildude authored Oct 19, 2022
1 parent ab040f2 commit 977f8cc
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4578,6 +4578,20 @@ OpenType Feature File:
tm_scope: source.opentype
ace_mode: text
language_id: 374317347
Option List:
type: data
color: "#476732"
aliases:
- opts
- ackrc
filenames:
- ".ackrc"
- "ackrc"
tm_scope: source.opts
ace_mode: sh
codemirror_mode: shell
codemirror_mime_type: text/x-sh
language_id: 723589315
Org:
type: prose
color: "#77aa99"
Expand Down
17 changes: 17 additions & 0 deletions samples/Option List/filenames/.ackrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--smart-case
--follow

# Always use coloured output
--colour

--ignore-directory=is:.bundle
--ignore-directory=is:tmp
--ignore-file=is:samples.json

--type-add=coffeescript=.cson
--type-add=ruby=Gemfile,Rubyfile
--type-add=xml=.xmp,.dae,.plist
--type-add=yaml=.yaml-tmlanguage,.sublime-syntax
--type-add=js=.mjs,.cjs
--type-add=ts=.mts,.cts
--type-add=json=.jsonc
28 changes: 28 additions & 0 deletions samples/Option List/filenames/ackrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# lexically sort filenames
--sort-files

--type-add=ruby=rake,haml,erb
--type-add=vim=vimrc
--type-add=js=json
--type-set=css=sass

# add types ack doesn't know about
--type-set=MARKDOWN=md,mkd,markdown
--type-set=RDOC=rdoc

# useful options, almost same as defined in vimrc
-H
--smart-case

# ackignore
--ignore-dir=.binstubs
--ignore-dir=vendor/bundle
--ignore-dir=vendor/cache
--ignore-dir=bower_components
--ignore-dir=node_modules
--ignore-dir=dist
--ignore-dir=log
--ignore-dir=tmp
--ignore-dir=vim/bundle
--ignore-file=is:Session.vim
--ignore-file=is:tags
1 change: 1 addition & 0 deletions vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **OpenSCAD:** [tbuser/openscad.tmbundle](https://github.com/tbuser/openscad.tmbundle)
- **OpenStep Property List:** [atom/language-property-list](https://github.com/atom/language-property-list)
- **OpenType Feature File:** [Alhadis/language-fontforge](https://github.com/Alhadis/language-fontforge)
- **Option List:** [Alhadis/language-etc](https://github.com/Alhadis/language-etc)
- **Ox:** [andreashetland/sublime-text-ox](https://github.com/andreashetland/sublime-text-ox)
- **Oz:** [eregon/oz-tmbundle](https://github.com/eregon/oz-tmbundle)
- **P4:** [TakeshiTseng/atom-language-p4](https://github.com/TakeshiTseng/atom-language-p4)
Expand Down

0 comments on commit 977f8cc

Please sign in to comment.