mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-30 04:01:31 +08:00 
			
		
		
		
	feat(code): add Nix language
This commit is contained in:
		
							parent
							
								
									ce5debd9bf
								
							
						
					
					
						commit
						2b192eb1b9
					
				| @ -107,6 +107,7 @@ export const MIME_TYPES_DICT: readonly MimeTypeDefinition[] = Object.freeze([ | |||||||
|     { title: "msgenny", mime: "text/x-msgenny" }, |     { title: "msgenny", mime: "text/x-msgenny" }, | ||||||
|     { title: "MUMPS", mime: "text/x-mumps" }, |     { title: "MUMPS", mime: "text/x-mumps" }, | ||||||
|     { title: "MySQL", mime: "text/x-mysql", highlightJs: "sql" }, |     { title: "MySQL", mime: "text/x-mysql", highlightJs: "sql" }, | ||||||
|  |     { title: "Nix", mime: "text/x-nix" }, | ||||||
|     { title: "Nginx", mime: "text/x-nginx-conf", highlightJs: "nginx" }, |     { title: "Nginx", mime: "text/x-nginx-conf", highlightJs: "nginx" }, | ||||||
|     { title: "NSIS", mime: "text/x-nsis", highlightJs: "nsis" }, |     { title: "NSIS", mime: "text/x-nsis", highlightJs: "nsis" }, | ||||||
|     { title: "NTriples", mime: "application/n-triples" }, |     { title: "NTriples", mime: "application/n-triples" }, | ||||||
|  | |||||||
| @ -107,6 +107,7 @@ export const MIME_TYPES_DICT: readonly MimeTypeDefinition[] = Object.freeze([ | |||||||
|     { title: "msgenny", mime: "text/x-msgenny" }, |     { title: "msgenny", mime: "text/x-msgenny" }, | ||||||
|     { title: "MUMPS", mime: "text/x-mumps" }, |     { title: "MUMPS", mime: "text/x-mumps" }, | ||||||
|     { title: "MySQL", mime: "text/x-mysql", highlightJs: "sql" }, |     { title: "MySQL", mime: "text/x-mysql", highlightJs: "sql" }, | ||||||
|  |     { title: "Nix", mime: "text/x-nix" }, | ||||||
|     { title: "Nginx", mime: "text/x-nginx-conf", highlightJs: "nginx" }, |     { title: "Nginx", mime: "text/x-nginx-conf", highlightJs: "nginx" }, | ||||||
|     { title: "NSIS", mime: "text/x-nsis", highlightJs: "nsis" }, |     { title: "NSIS", mime: "text/x-nsis", highlightJs: "nsis" }, | ||||||
|     { title: "NTriples", mime: "application/n-triples" }, |     { title: "NTriples", mime: "application/n-triples" }, | ||||||
|  | |||||||
| @ -29,6 +29,7 @@ | |||||||
| *   Code notes: | *   Code notes: | ||||||
|     *   Updated to a new generation of CodeMirror. Since it's a significant update, bug reports are welcome. |     *   Updated to a new generation of CodeMirror. Since it's a significant update, bug reports are welcome. | ||||||
|     *   Added the GDScript (Godot) language. |     *   Added the GDScript (Godot) language. | ||||||
|  |     *   Added the Nix language. | ||||||
| *   Mermaid diagrams: basic syntax highlight (not all diagram types are supported) and code folding. | *   Mermaid diagrams: basic syntax highlight (not all diagram types are supported) and code folding. | ||||||
| 
 | 
 | ||||||
| ## 📖 Documentation | ## 📖 Documentation | ||||||
|  | |||||||
| @ -31,6 +31,7 @@ | |||||||
|     "@codemirror/legacy-modes": "6.5.1", |     "@codemirror/legacy-modes": "6.5.1", | ||||||
|     "@codemirror/search": "6.5.10", |     "@codemirror/search": "6.5.10", | ||||||
|     "@codemirror/view": "6.36.7", |     "@codemirror/view": "6.36.7", | ||||||
|  |     "@replit/codemirror-lang-nix": "6.0.1", | ||||||
|     "@replit/codemirror-vim": "6.3.0", |     "@replit/codemirror-vim": "6.3.0", | ||||||
|     "@ssddanbrown/codemirror-lang-smarty": "1.0.0", |     "@ssddanbrown/codemirror-lang-smarty": "1.0.0", | ||||||
|     "@ssddanbrown/codemirror-lang-twig": "1.0.0", |     "@ssddanbrown/codemirror-lang-twig": "1.0.0", | ||||||
|  | |||||||
| @ -127,6 +127,7 @@ const byMimeType: Record<string, (() => Promise<StreamParser<unknown> | Language | |||||||
|     "text/x-mssql": async () => (await import('@codemirror/legacy-modes/mode/sql')).msSQL, |     "text/x-mssql": async () => (await import('@codemirror/legacy-modes/mode/sql')).msSQL, | ||||||
|     "text/x-mumps": async () => (await import('@codemirror/legacy-modes/mode/mumps')).mumps, |     "text/x-mumps": async () => (await import('@codemirror/legacy-modes/mode/mumps')).mumps, | ||||||
|     "text/x-mysql": async () => (await import('@codemirror/legacy-modes/mode/sql')).mySQL, |     "text/x-mysql": async () => (await import('@codemirror/legacy-modes/mode/sql')).mySQL, | ||||||
|  |     "text/x-nix": async () => (await import('@replit/codemirror-lang-nix')).nix(), | ||||||
|     "text/x-nginx-conf": async () => (await import('@codemirror/legacy-modes/mode/nginx')).nginx, |     "text/x-nginx-conf": async () => (await import('@codemirror/legacy-modes/mode/nginx')).nginx, | ||||||
|     "text/x-nsis": async () => (await import('@codemirror/legacy-modes/mode/nsis')).nsis, |     "text/x-nsis": async () => (await import('@codemirror/legacy-modes/mode/nsis')).nsis, | ||||||
|     "text/x-objectivec": async () => (await import('@codemirror/legacy-modes/mode/clike')).objectiveC, |     "text/x-objectivec": async () => (await import('@codemirror/legacy-modes/mode/clike')).objectiveC, | ||||||
|  | |||||||
							
								
								
									
										24
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										24
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							| @ -1187,6 +1187,9 @@ importers: | |||||||
|       '@codemirror/view': |       '@codemirror/view': | ||||||
|         specifier: 6.36.7 |         specifier: 6.36.7 | ||||||
|         version: 6.36.7 |         version: 6.36.7 | ||||||
|  |       '@replit/codemirror-lang-nix': | ||||||
|  |         specifier: 6.0.1 | ||||||
|  |         version: 6.0.1(@codemirror/autocomplete@6.18.6)(@codemirror/language@6.11.0)(@codemirror/state@6.5.2)(@codemirror/view@6.36.7)(@lezer/common@1.2.3)(@lezer/highlight@1.2.1)(@lezer/lr@1.4.2) | ||||||
|       '@replit/codemirror-vim': |       '@replit/codemirror-vim': | ||||||
|         specifier: 6.3.0 |         specifier: 6.3.0 | ||||||
|         version: 6.3.0(@codemirror/commands@6.8.1)(@codemirror/language@6.11.0)(@codemirror/search@6.5.10)(@codemirror/state@6.5.2)(@codemirror/view@6.36.7) |         version: 6.3.0(@codemirror/commands@6.8.1)(@codemirror/language@6.11.0)(@codemirror/search@6.5.10)(@codemirror/state@6.5.2)(@codemirror/view@6.36.7) | ||||||
| @ -4298,6 +4301,17 @@ packages: | |||||||
|   '@radix-ui/rect@1.1.0': |   '@radix-ui/rect@1.1.0': | ||||||
|     resolution: {integrity: sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==} |     resolution: {integrity: sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg==} | ||||||
| 
 | 
 | ||||||
|  |   '@replit/codemirror-lang-nix@6.0.1': | ||||||
|  |     resolution: {integrity: sha512-lvzjoYn9nfJzBD5qdm3Ut6G3+Or2wEacYIDJ49h9+19WSChVnxv4ojf+rNmQ78ncuxIt/bfbMvDLMeMP0xze6g==} | ||||||
|  |     peerDependencies: | ||||||
|  |       '@codemirror/autocomplete': ^6.0.0 | ||||||
|  |       '@codemirror/language': ^6.0.0 | ||||||
|  |       '@codemirror/state': ^6.0.0 | ||||||
|  |       '@codemirror/view': ^6.0.0 | ||||||
|  |       '@lezer/common': ^1.0.0 | ||||||
|  |       '@lezer/highlight': ^1.0.0 | ||||||
|  |       '@lezer/lr': ^1.0.0 | ||||||
|  | 
 | ||||||
|   '@replit/codemirror-vim@6.3.0': |   '@replit/codemirror-vim@6.3.0': | ||||||
|     resolution: {integrity: sha512-aTx931ULAMuJx6xLf7KQDOL7CxD+Sa05FktTDrtLaSy53uj01ll3Zf17JdKsriER248oS55GBzg0CfCTjEneAQ==} |     resolution: {integrity: sha512-aTx931ULAMuJx6xLf7KQDOL7CxD+Sa05FktTDrtLaSy53uj01ll3Zf17JdKsriER248oS55GBzg0CfCTjEneAQ==} | ||||||
|     peerDependencies: |     peerDependencies: | ||||||
| @ -19411,6 +19425,16 @@ snapshots: | |||||||
| 
 | 
 | ||||||
|   '@radix-ui/rect@1.1.0': {} |   '@radix-ui/rect@1.1.0': {} | ||||||
| 
 | 
 | ||||||
|  |   '@replit/codemirror-lang-nix@6.0.1(@codemirror/autocomplete@6.18.6)(@codemirror/language@6.11.0)(@codemirror/state@6.5.2)(@codemirror/view@6.36.7)(@lezer/common@1.2.3)(@lezer/highlight@1.2.1)(@lezer/lr@1.4.2)': | ||||||
|  |     dependencies: | ||||||
|  |       '@codemirror/autocomplete': 6.18.6 | ||||||
|  |       '@codemirror/language': 6.11.0 | ||||||
|  |       '@codemirror/state': 6.5.2 | ||||||
|  |       '@codemirror/view': 6.36.7 | ||||||
|  |       '@lezer/common': 1.2.3 | ||||||
|  |       '@lezer/highlight': 1.2.1 | ||||||
|  |       '@lezer/lr': 1.4.2 | ||||||
|  | 
 | ||||||
|   '@replit/codemirror-vim@6.3.0(@codemirror/commands@6.8.1)(@codemirror/language@6.11.0)(@codemirror/search@6.5.10)(@codemirror/state@6.5.2)(@codemirror/view@6.36.7)': |   '@replit/codemirror-vim@6.3.0(@codemirror/commands@6.8.1)(@codemirror/language@6.11.0)(@codemirror/search@6.5.10)(@codemirror/state@6.5.2)(@codemirror/view@6.36.7)': | ||||||
|     dependencies: |     dependencies: | ||||||
|       '@codemirror/commands': 6.8.1 |       '@codemirror/commands': 6.8.1 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran