mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Add CSON samples
This commit is contained in:
		
							
								
								
									
										72
									
								
								samples/CSON/base.cson
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										72
									
								
								samples/CSON/base.cson
									
									
									
									
									
										Normal file
									
								
							| @@ -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
									
								
								samples/CSON/config.cson
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								samples/CSON/config.cson
									
									
									
									
									
										Normal file
									
								
							| @@ -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"] | ||||||
|  | 		] | ||||||
							
								
								
									
										108
									
								
								samples/CSON/ff-sfd.cson
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										108
									
								
								samples/CSON/ff-sfd.cson
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,108 @@ | |||||||
|  | name: "Spline Font Database" | ||||||
|  | scopeName: "text.sfd" | ||||||
|  | fileTypes: ["sfd"] | ||||||
|  | firstLineMatch: "^SplineFontDB: [\\d.]+" | ||||||
|  | patterns: [include: "#main"] | ||||||
|  |  | ||||||
|  | repository: | ||||||
|  | 	main: | ||||||
|  | 		patterns: [ | ||||||
|  | 			{include: "#punctuation"} | ||||||
|  | 			{include: "#private"} | ||||||
|  | 			{include: "#image"} | ||||||
|  | 			{include: "#pickleData"} | ||||||
|  | 			{include: "#sections"} | ||||||
|  | 			{include: "#copyright"} | ||||||
|  | 			{include: "#property"} | ||||||
|  | 			{include: "#control"} | ||||||
|  | 			{include: "#address"} | ||||||
|  | 			{include: "#encoding"} | ||||||
|  | 			{include: "source.fontforge#shared"} | ||||||
|  | 			{include: "#colour"} | ||||||
|  | 		] | ||||||
|  | 	 | ||||||
|  | 	punctuation: | ||||||
|  | 		patterns: [ | ||||||
|  | 			{match: "<|>",  name: "punctuation.definition.brackets.angle.sfd"} | ||||||
|  | 			{match: "[{}]", name: "punctuation.definition.brackets.curly.sfd"} | ||||||
|  | 		] | ||||||
|  |  | ||||||
|  | 	private: | ||||||
|  | 		name: "meta.section.private.sfd" | ||||||
|  | 		begin: "^BeginPrivate(?=:)" | ||||||
|  | 		end:   "^EndPrivate\\b" | ||||||
|  | 		beginCaptures: 0: name: "keyword.control.begin.private.sfd" | ||||||
|  | 		endCaptures:   0: name: "keyword.control.end.private.sfd" | ||||||
|  | 		patterns: [ | ||||||
|  | 			{match: "^\\S+", name: "entity.name.private.property.sfd"} | ||||||
|  | 			{include: "$self"} | ||||||
|  | 		] | ||||||
|  | 	 | ||||||
|  | 	image: | ||||||
|  | 		name: "meta.image.sfd" | ||||||
|  | 		begin: "^(Image)(?=:)(.+)$" | ||||||
|  | 		end:   "^(EndImage)\\b" | ||||||
|  | 		contentName: "string.unquoted.raw.data.sfd" | ||||||
|  | 		beginCaptures: | ||||||
|  | 			1: name: "keyword.control.begin.image.sfd" | ||||||
|  | 			2: patterns: [include: "$self"] | ||||||
|  | 		endCaptures: | ||||||
|  | 			1: name: "keyword.control.end.image.sfd" | ||||||
|  |  | ||||||
|  | 	pickleData: | ||||||
|  | 		name: "meta.pickle-data.sfd" | ||||||
|  | 		begin: "^(PickledData)(:)\\s*(\")" | ||||||
|  | 		end:   '"' | ||||||
|  | 		beginCaptures: | ||||||
|  | 			1: name: "entity.name.property.sfd" | ||||||
|  | 			2: name: "punctuation.separator.dictionary.key-value.sfd" | ||||||
|  | 			3: name: "punctuation.definition.string.begin.sfd" | ||||||
|  | 		endCaptures: | ||||||
|  | 			0: name: "punctuation.definition.string.end.sfd" | ||||||
|  | 		patterns: [match: "\\\\.", name: "constant.character.escape.sfd"] | ||||||
|  |  | ||||||
|  | 	sections: | ||||||
|  | 		name: "meta.section.${2:/downcase}.sfd" | ||||||
|  | 		begin: "^(Start|Begin)([A-Z]\\w+)(?=:)" | ||||||
|  | 		end:   "^(End\\2)\\b" | ||||||
|  | 		beginCaptures: 0: name: "keyword.control.begin.${2:/downcase}.sfd" | ||||||
|  | 		endCaptures:   0: name: "keyword.control.end.${2:/downcase}.sfd" | ||||||
|  | 		patterns: [include: "$self"] | ||||||
|  |  | ||||||
|  | 	control: | ||||||
|  | 		name: "keyword.control.${1:/downcase}.sfd" | ||||||
|  | 		match: "\\b(Fore|Back|SplineSet|^End\\w+)\\b" | ||||||
|  |  | ||||||
|  | 	colour: | ||||||
|  | 		name: "constant.other.hex.colour.sfd" | ||||||
|  | 		match: "(#)[A-Fa-f0-9]{3,}|(?<=\\s)[A-Fa-f0-9]{6,8}" | ||||||
|  | 		captures: | ||||||
|  | 			1: name: "punctuation.definition.colour.sfd" | ||||||
|  |  | ||||||
|  | 	encoding: | ||||||
|  | 		name: "constant.language.encoding.sfd" | ||||||
|  | 		match: "(?i)\\b(ISO[-\\w]+)(?<=\\d)(?=\\s|$)" | ||||||
|  |  | ||||||
|  | 	# Don't highlight numbers in freeform strings (years/version strings) | ||||||
|  | 	copyright: | ||||||
|  | 		name: "meta.${1:/downcase}-string.sfd" | ||||||
|  | 		begin: "^(Copyright|U?Comments?|\\w+Name)(:)" | ||||||
|  | 		end:   "$" | ||||||
|  | 		beginCaptures: | ||||||
|  | 			1: name: "entity.name.property.sfd" | ||||||
|  | 			2: name: "punctuation.separator.dictionary.key-value.sfd" | ||||||
|  | 		patterns: [include: "source.fontforge#stringEscapes"] | ||||||
|  | 	 | ||||||
|  | 	# No idea what this is, but it looks distracting without a fix | ||||||
|  | 	# Assuming it's referring to a memory register or something. | ||||||
|  | 	address: | ||||||
|  | 		match: "\\d+[xX][A-Fa-f0-9]+" | ||||||
|  | 		name: "constant.numeric.hexadecimal.sfd" | ||||||
|  | 	 | ||||||
|  | 	property: | ||||||
|  | 		match: "^([^:]+)(:)" | ||||||
|  | 		name: "meta.dictionary.key-value.sfd" | ||||||
|  | 		captures: | ||||||
|  | 			1: name: "entity.name.property.sfd" | ||||||
|  | 			2: name: "punctuation.separator.dictionary.key-value.sfd" | ||||||
|  | 	 | ||||||
							
								
								
									
										11
									
								
								samples/CSON/wercker-status.cson
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								samples/CSON/wercker-status.cson
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | |||||||
|  | 'menu': [ | ||||||
|  |   { | ||||||
|  |     'label': 'Packages' | ||||||
|  |     'submenu': [ | ||||||
|  |       'label': 'Wercker Status' | ||||||
|  |       'submenu': [ | ||||||
|  |         { 'label': 'Check now!', 'command': 'wercker-status:checknow' } | ||||||
|  |       ] | ||||||
|  |     ] | ||||||
|  |   } | ||||||
|  | ] | ||||||
		Reference in New Issue
	
	Block a user