Skip to content

Commit

Permalink
Merge branch 'master' into grammar-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Alhadis committed Oct 17, 2016
2 parents d7c689f + 8e9c224 commit dc54735
Show file tree
Hide file tree
Showing 25 changed files with 2,545 additions and 36 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Expand Up @@ -27,10 +27,10 @@ We try only to add languages once they have some usage on GitHub. In most cases

To add support for a new language:

0. Add an entry for your language to [`languages.yml`][languages].
0. Add a grammar for your language: `script/add-grammar https://github.com/JaneSmith/MyGrammar` Please only add grammars that have [one of these licenses][licenses].
0. Add an entry for your language to [`languages.yml`][languages]. Omit the `language_id` field for now.
0. Add a grammar for your language: `script/add-grammar https://github.com/JaneSmith/MyGrammar`. Please only add grammars that have [one of these licenses][licenses].
0. Add samples for your language to the [samples directory][samples] in the correct subdirectory.
0. Add a `language_id` for your language. See `script/set-language-ids` for more information. **You should only ever need to run `script/set-language-ids --update`. Anything other than this risks breaking GitHub search :cry:**
0. Add a `language_id` for your language using `script/set-language-ids`. **You should only ever need to run `script/set-language-ids --update`. Anything other than this risks breaking GitHub search :cry:**
0. Open a pull request, linking to a [GitHub search result](https://github.com/search?utf8=%E2%9C%93&q=extension%3Aboot+NOT+nothack&type=Code&ref=searchresults) showing in-the-wild usage.

In addition, if your new language defines an extension that's already listed in [`languages.yml`][languages] (such as `.foo`) then sometimes a few more steps will need to be taken:
Expand Down
78 changes: 46 additions & 32 deletions lib/linguist/languages.yml
Expand Up @@ -19,7 +19,7 @@
# language_id - Integer used as a language-name-independent indexed field so that we can rename
# languages in Linguist without reindexing all the code on GitHub. Must not be
# changed for existing languages without the explicit permission of GitHub staff.
# color - CSS hex color to represent the language.
# color - CSS hex color to represent the language. Only used if type is "programming" or "prose"
# tm_scope - The TextMate scope that represents this programming
# language. This should match one of the scopes listed in
# the grammars.yml file. Use "none" if there is no grammar
Expand Down Expand Up @@ -103,7 +103,6 @@ APL:
language_id: 6
ASN.1:
type: data
color: "#aeead0"
extensions:
- ".asn"
- ".asn1"
Expand Down Expand Up @@ -228,7 +227,6 @@ Apex:
language_id: 17
Apollo Guidance Computer:
type: programming
color: "#0B3D91"
group: Assembly
extensions:
- ".agc"
Expand Down Expand Up @@ -370,7 +368,6 @@ Bison:
extensions:
- ".bison"
ace_mode: text
color: "#6A463F"
language_id: 31
BitBake:
type: programming
Expand Down Expand Up @@ -564,6 +561,17 @@ COLLADA:
codemirror_mode: xml
codemirror_mime_type: text/xml
language_id: 49
CSON:
type: data
group: CoffeeScript
tm_scope: source.coffee
ace_mode: coffee
codemirror_mode: coffeescript
codemirror_mime_type: text/x-coffeescript
searchable: false
extensions:
- ".cson"
language_id: 424
CSS:
type: markup
tm_scope: source.css
Expand Down Expand Up @@ -694,7 +702,6 @@ CoffeeScript:
- "._coffee"
- ".cake"
- ".cjsx"
- ".cson"
- ".iced"
filenames:
- Cakefile
Expand All @@ -703,7 +710,6 @@ CoffeeScript:
language_id: 63
ColdFusion:
type: programming
group: ColdFusion
ace_mode: coldfusion
color: "#ed2cd6"
search_term: cfm
Expand All @@ -720,7 +726,6 @@ ColdFusion CFC:
type: programming
group: ColdFusion
ace_mode: coldfusion
color: "#ed2cd6"
search_term: cfc
aliases:
- cfc
Expand Down Expand Up @@ -1038,7 +1043,6 @@ ECLiPSe:
language_id: 94
EJS:
type: markup
color: "#a91e50"
group: HTML
extensions:
- ".ejs"
Expand Down Expand Up @@ -1726,11 +1730,9 @@ Haml:
ace_mode: haml
codemirror_mode: haml
codemirror_mime_type: text/x-haml
color: "#ECE2A9"
language_id: 154
Handlebars:
type: markup
color: "#01a9d6"
group: HTML
aliases:
- hbs
Expand Down Expand Up @@ -1909,7 +1911,6 @@ J:
language_id: 172
JFlex:
type: programming
color: "#DBCA00"
group: Lex
extensions:
- ".flex"
Expand Down Expand Up @@ -2041,19 +2042,6 @@ JavaScript:
- ".pac"
- ".sjs"
- ".ssjs"
- ".sublime-build"
- ".sublime-commands"
- ".sublime-completions"
- ".sublime-keymap"
- ".sublime-macro"
- ".sublime-menu"
- ".sublime-mousemap"
- ".sublime-project"
- ".sublime-settings"
- ".sublime-theme"
- ".sublime-workspace"
- ".sublime_metrics"
- ".sublime_session"
- ".xsjs"
- ".xsjslib"
filenames:
Expand Down Expand Up @@ -2126,7 +2114,6 @@ LFE:
type: programming
extensions:
- ".lfe"
color: "#004200"
group: Erlang
tm_scope: source.lisp
ace_mode: lisp
Expand Down Expand Up @@ -2183,7 +2170,6 @@ Lasso:
language_id: 195
Latte:
type: markup
color: "#A8FF97"
group: HTML
extensions:
- ".latte"
Expand All @@ -2208,7 +2194,6 @@ Less:
ace_mode: less
codemirror_mode: css
codemirror_mime_type: text/css
color: "#A1D9A1"
language_id: 198
Lex:
type: programming
Expand Down Expand Up @@ -2429,6 +2414,7 @@ Makefile:
extensions:
- ".mak"
- ".d"
- ".make"
- ".mk"
- ".mkfile"
filenames:
Expand Down Expand Up @@ -2795,7 +2781,6 @@ NumPy:
ace_mode: text
codemirror_mode: python
codemirror_mime_type: text/x-python
color: "#9C8AF9"
language_id: 254
OCaml:
type: programming
Expand Down Expand Up @@ -3679,7 +3664,6 @@ SCSS:
codemirror_mime_type: text/x-scss
extensions:
- ".scss"
color: "#CF649A"
language_id: 329
SMT:
type: programming
Expand Down Expand Up @@ -3805,7 +3789,6 @@ Sass:
ace_mode: sass
codemirror_mode: sass
codemirror_mime_type: text/x-sass
color: "#CF649A"
language_id: 340
Scala:
type: programming
Expand Down Expand Up @@ -3932,7 +3915,6 @@ Slash:
Slim:
group: HTML
type: markup
color: "#ff8f77"
extensions:
- ".slim"
tm_scope: text.slim
Expand Down Expand Up @@ -4040,6 +4022,28 @@ SubRip Text:
ace_mode: text
tm_scope: text.srt
language_id: 360
Sublime Text Config:
type: data
group: JSON
tm_scope: source.js
ace_mode: javascript
codemirror_mode: javascript
codemirror_mime_type: text/javascript
extensions:
- ".sublime-build"
- ".sublime-commands"
- ".sublime-completions"
- ".sublime-keymap"
- ".sublime-macro"
- ".sublime-menu"
- ".sublime-mousemap"
- ".sublime-project"
- ".sublime-settings"
- ".sublime-theme"
- ".sublime-workspace"
- ".sublime_metrics"
- ".sublime_session"
language_id: 423
SuperCollider:
type: programming
color: "#46390b"
Expand Down Expand Up @@ -4072,6 +4076,17 @@ SystemVerilog:
codemirror_mode: verilog
codemirror_mime_type: text/x-systemverilog
language_id: 363
TI Program:
type: programming
ace_mode: text
color: "#A0AA87"
extensions:
- ".8xp"
- ".8xk"
- ".8xk.txt"
- ".8xp.txt"
language_id: 422
tm_scope: none
TLA:
type: programming
extensions:
Expand Down Expand Up @@ -4254,7 +4269,6 @@ Unified Parallel C:
ace_mode: c_cpp
codemirror_mode: clike
codemirror_mime_type: text/x-csrc
color: "#4e3617"
extensions:
- ".upc"
tm_scope: source.c
Expand Down
72 changes: 72 additions & 0 deletions samples/CSON/base.cson
@@ -0,0 +1,72 @@
'atom-text-editor':
# Platform Bindings
'home': 'editor:move-to-first-character-of-line'
'end': 'editor:move-to-end-of-screen-line'
'shift-home': 'editor:select-to-first-character-of-line'
'shift-end': 'editor:select-to-end-of-line'

'atom-text-editor:not([mini])':
# Atom Specific
'ctrl-C': 'editor:copy-path'

# Sublime Parity
'tab': 'editor:indent'
'enter': 'editor:newline'
'shift-tab': 'editor:outdent-selected-rows'
'ctrl-K': 'editor:delete-line'

'.select-list atom-text-editor[mini]':
'enter': 'core:confirm'

'.tool-panel.panel-left, .tool-panel.panel-right':
'escape': 'tool-panel:unfocus'

'atom-text-editor !important, atom-text-editor[mini] !important':
'escape': 'editor:consolidate-selections'

# allow standard input fields to work correctly
'body .native-key-bindings':
'tab': 'core:focus-next'
'shift-tab': 'core:focus-previous'
'enter': 'native!'
'backspace': 'native!'
'shift-backspace': 'native!'
'delete': 'native!'
'up': 'native!'
'down': 'native!'
'shift-up': 'native!'
'shift-down': 'native!'
'alt-up': 'native!'
'alt-down': 'native!'
'alt-shift-up': 'native!'
'alt-shift-down': 'native!'
'cmd-up': 'native!'
'cmd-down': 'native!'
'cmd-shift-up': 'native!'
'cmd-shift-down': 'native!'
'ctrl-up': 'native!'
'ctrl-down': 'native!'
'ctrl-shift-up': 'native!'
'ctrl-shift-down': 'native!'
'left': 'native!'
'right': 'native!'
'shift-left': 'native!'
'shift-right': 'native!'
'alt-left': 'native!'
'alt-right': 'native!'
'alt-shift-left': 'native!'
'alt-shift-right': 'native!'
'cmd-left': 'native!'
'cmd-right': 'native!'
'cmd-shift-left': 'native!'
'cmd-shift-right': 'native!'
'ctrl-left': 'native!'
'ctrl-right': 'native!'
'ctrl-shift-left': 'native!'
'ctrl-shift-right': 'native!'
'ctrl-b': 'native!'
'ctrl-f': 'native!'
'ctrl-F': 'native!'
'ctrl-B': 'native!'
'ctrl-h': 'native!'
'ctrl-d': 'native!'
59 changes: 59 additions & 0 deletions samples/CSON/config.cson
@@ -0,0 +1,59 @@
directoryIcons:

Atom:
icon: "atom"
match: /^\.atom$/
colour: "dark-green"

Bower:
icon: "bower"
match: /^bower[-_]components$/
colour: "bower"

Dropbox:
icon: "dropbox"
match: /^(?:Dropbox|\.dropbox\.cache)$/
colour: "medium-blue"

Git:
icon: "git"
match: /^\.git$/

GitHub:
icon: "github"
match: /^\.github$/

Meteor:
icon: "meteor"
match: /^\.meteor$/

NodeJS:
icon: "node"
match: /^node_modules$/
colour: "medium-green"

Package:
icon: "package"
match: /^\.bundle$/i

TextMate:
icon: "textmate"
match: ".tmBundle"


fileIcons:

ABAP:
icon: "abap"
scope: "abp"
match: ".abap"
colour: "medium-orange"

ActionScript: # Or Flash-related
icon: "as"
match: [
[".swf", "medium-blue"]
[".as", "medium-red", scope: /\.(?:flex-config|actionscript(?:\.\d+)?)$/i, alias: /ActionScript\s?3|as3/i]
[".jsfl", "auto-yellow"]
[".swc", "dark-red"]
]

0 comments on commit dc54735

Please sign in to comment.