mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Add Closure Templates (#3634)
* Add Closure Templates to languages.yml * Run script/add-grammar * Add sample * Run script/set-language-ids * Add codemirror_mime_type
This commit is contained in:
		
				
					committed by
					
						 Colin Seymour
						Colin Seymour
					
				
			
			
				
	
			
			
			
						parent
						
							234ee8b6d2
						
					
				
				
					commit
					20fdac95f6
				
			
							
								
								
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							| @@ -845,3 +845,6 @@ | |||||||
| [submodule "vendor/grammars/dartlang"] | [submodule "vendor/grammars/dartlang"] | ||||||
| 	path = vendor/grammars/dartlang | 	path = vendor/grammars/dartlang | ||||||
| 	url = https://github.com/dart-atom/dartlang | 	url = https://github.com/dart-atom/dartlang | ||||||
|  | [submodule "vendor/grammars/language-closure-templates"] | ||||||
|  | 	path = vendor/grammars/language-closure-templates | ||||||
|  | 	url = https://github.com/mthadley/language-closure-templates | ||||||
|   | |||||||
| @@ -358,6 +358,8 @@ vendor/grammars/language-click: | |||||||
| - source.click | - source.click | ||||||
| vendor/grammars/language-clojure: | vendor/grammars/language-clojure: | ||||||
| - source.clojure | - source.clojure | ||||||
|  | vendor/grammars/language-closure-templates: | ||||||
|  | - text.html.soy | ||||||
| vendor/grammars/language-coffee-script: | vendor/grammars/language-coffee-script: | ||||||
| - source.coffee | - source.coffee | ||||||
| - source.litcoffee | - source.litcoffee | ||||||
|   | |||||||
| @@ -2,8 +2,7 @@ | |||||||
| # | # | ||||||
| # type              - Either data, programming, markup, prose, or nil | # type              - Either data, programming, markup, prose, or nil | ||||||
| # aliases           - An Array of additional aliases (implicitly | # aliases           - An Array of additional aliases (implicitly | ||||||
| #                     includes the lowercase name with spaces replaced | #                     includes name.downcase) | ||||||
| #                     by dashes) |  | ||||||
| # ace_mode          - A String name of the Ace Mode used for highlighting whenever | # ace_mode          - A String name of the Ace Mode used for highlighting whenever | ||||||
| #                     a file is edited. This must match one of the filenames in http://git.io/3XO_Cg. | #                     a file is edited. This must match one of the filenames in http://git.io/3XO_Cg. | ||||||
| #                     Use "text" if a mode does not exist. | #                     Use "text" if a mode does not exist. | ||||||
| @@ -688,6 +687,18 @@ Clojure: | |||||||
|   filenames: |   filenames: | ||||||
|   - riemann.config |   - riemann.config | ||||||
|   language_id: 62 |   language_id: 62 | ||||||
|  | Closure Templates: | ||||||
|  |   type: markup | ||||||
|  |   group: HTML | ||||||
|  |   ace_mode: soy_template | ||||||
|  |   codemirror_mode: soy | ||||||
|  |   codemirror_mime_type: text/x-soy | ||||||
|  |   alias: | ||||||
|  |   - soy | ||||||
|  |   extensions: | ||||||
|  |   - ".soy" | ||||||
|  |   tm_scope: text.html.soy | ||||||
|  |   language_id: 357046146 | ||||||
| CoffeeScript: | CoffeeScript: | ||||||
|   type: programming |   type: programming | ||||||
|   tm_scope: source.coffee |   tm_scope: source.coffee | ||||||
|   | |||||||
							
								
								
									
										24
									
								
								samples/Closure Templates/example.soy
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								samples/Closure Templates/example.soy
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | |||||||
|  | {namespace Exmaple} | ||||||
|  |  | ||||||
|  | /** | ||||||
|  |  * Example | ||||||
|  |  */ | ||||||
|  | {template .foo} | ||||||
|  |   {@param count: string} | ||||||
|  |   {@param? name: int} | ||||||
|  |  | ||||||
|  |   {if isNonnull($name)} | ||||||
|  |     <h1>{$name}</h1> | ||||||
|  |   {/if} | ||||||
|  |  | ||||||
|  |   <div class="content"> | ||||||
|  |     {switch count} | ||||||
|  |       {case 0} | ||||||
|  |         {call Empty.view} | ||||||
|  |           {param count: $count /} | ||||||
|  |         {/call} | ||||||
|  |       {default} | ||||||
|  |         <h2>Wow, so many!</h2> | ||||||
|  |     {/switch} | ||||||
|  |   </div> | ||||||
|  | {/template} | ||||||
							
								
								
									
										1
									
								
								vendor/README.md
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/README.md
									
									
									
									
										vendored
									
									
								
							| @@ -59,6 +59,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting | |||||||
| - **Click:** [stenverbois/language-click](https://github.com/stenverbois/language-click) | - **Click:** [stenverbois/language-click](https://github.com/stenverbois/language-click) | ||||||
| - **CLIPS:** [psicomante/CLIPS-sublime](https://github.com/psicomante/CLIPS-sublime) | - **CLIPS:** [psicomante/CLIPS-sublime](https://github.com/psicomante/CLIPS-sublime) | ||||||
| - **Clojure:** [atom/language-clojure](https://github.com/atom/language-clojure) | - **Clojure:** [atom/language-clojure](https://github.com/atom/language-clojure) | ||||||
|  | - **Closure Templates:** [mthadley/language-closure-templates](https://github.com/mthadley/language-closure-templates) | ||||||
| - **CMake:** [textmate/cmake.tmbundle](https://github.com/textmate/cmake.tmbundle) | - **CMake:** [textmate/cmake.tmbundle](https://github.com/textmate/cmake.tmbundle) | ||||||
| - **COBOL:** [bitbucket:bitlang/sublime_cobol](https://bitbucket.org/bitlang/sublime_cobol) | - **COBOL:** [bitbucket:bitlang/sublime_cobol](https://bitbucket.org/bitlang/sublime_cobol) | ||||||
| - **CoffeeScript:** [atom/language-coffee-script](https://github.com/atom/language-coffee-script) | - **CoffeeScript:** [atom/language-coffee-script](https://github.com/atom/language-coffee-script) | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								vendor/grammars/language-closure-templates
									
									
									
									
										vendored
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								vendor/grammars/language-closure-templates
									
									
									
									
										vendored
									
									
										Submodule
									
								
							 Submodule vendor/grammars/language-closure-templates added at beed1f87f3
									
								
							
							
								
								
									
										26
									
								
								vendor/licenses/grammar/language-closure-templates.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								vendor/licenses/grammar/language-closure-templates.txt
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | |||||||
|  | --- | ||||||
|  | type: grammar | ||||||
|  | name: language-closure-templates | ||||||
|  | license: mit | ||||||
|  | --- | ||||||
|  | MIT License | ||||||
|  |  | ||||||
|  | Copyright (c) 2017 Michael T. Hadley | ||||||
|  |  | ||||||
|  | Permission is hereby granted, free of charge, to any person obtaining a copy | ||||||
|  | of this software and associated documentation files (the "Software"), to deal | ||||||
|  | in the Software without restriction, including without limitation the rights | ||||||
|  | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||||||
|  | copies of the Software, and to permit persons to whom the Software is | ||||||
|  | furnished to do so, subject to the following conditions: | ||||||
|  |  | ||||||
|  | The above copyright notice and this permission notice shall be included in all | ||||||
|  | copies or substantial portions of the Software. | ||||||
|  |  | ||||||
|  | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||||||
|  | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||||||
|  | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||||||
|  | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||||||
|  | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||||||
|  | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||||||
|  | SOFTWARE. | ||||||
		Reference in New Issue
	
	Block a user