mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Merge pull request #2689 from edendramis/master
Add FreeMarker syntax highlighting
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -680,3 +680,6 @@
|
|||||||
[submodule "vendor/grammars/Stata.tmbundle"]
|
[submodule "vendor/grammars/Stata.tmbundle"]
|
||||||
path = vendor/grammars/Stata.tmbundle
|
path = vendor/grammars/Stata.tmbundle
|
||||||
url = https://github.com/pschumm/Stata.tmbundle
|
url = https://github.com/pschumm/Stata.tmbundle
|
||||||
|
[submodule "vendor/grammars/FreeMarker.tmbundle"]
|
||||||
|
path = vendor/grammars/FreeMarker.tmbundle
|
||||||
|
url = https://github.com/freemarker/FreeMarker.tmbundle
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ vendor/grammars/Docker.tmbundle:
|
|||||||
- source.dockerfile
|
- source.dockerfile
|
||||||
vendor/grammars/Elm.tmLanguage:
|
vendor/grammars/Elm.tmLanguage:
|
||||||
- source.elm
|
- source.elm
|
||||||
|
vendor/grammars/FreeMarker.tmbundle:
|
||||||
|
- text.html.ftl
|
||||||
vendor/grammars/G-Code/:
|
vendor/grammars/G-Code/:
|
||||||
- source.LS
|
- source.LS
|
||||||
- source.MCPOST
|
- source.MCPOST
|
||||||
|
|||||||
@@ -1037,6 +1037,16 @@ Frege:
|
|||||||
tm_scope: source.haskell
|
tm_scope: source.haskell
|
||||||
ace_mode: haskell
|
ace_mode: haskell
|
||||||
|
|
||||||
|
FreeMarker:
|
||||||
|
type: programming
|
||||||
|
color: "#0050b2"
|
||||||
|
aliases:
|
||||||
|
- ftl
|
||||||
|
extensions:
|
||||||
|
- .ftl
|
||||||
|
tm_scope: text.html.ftl
|
||||||
|
ace_mode: ftl
|
||||||
|
|
||||||
G-code:
|
G-code:
|
||||||
type: data
|
type: data
|
||||||
extensions:
|
extensions:
|
||||||
|
|||||||
31
samples/FreeMarker/example.ftl
Normal file
31
samples/FreeMarker/example.ftl
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<#import "layout.ftl" as layout>
|
||||||
|
|
||||||
|
<#assign results = [
|
||||||
|
{
|
||||||
|
"title": "Example Result",
|
||||||
|
"description": "Lorem ipsum dolor sit amet, pede id pellentesque, sollicitudin turpis sed in sed sed, libero dictum."
|
||||||
|
}
|
||||||
|
] />
|
||||||
|
|
||||||
|
<@layout.page title="FreeMarker Example">
|
||||||
|
<#if results?size == 0>
|
||||||
|
There were no results.
|
||||||
|
<#else>
|
||||||
|
<ul>
|
||||||
|
<#list results as result>
|
||||||
|
<li>
|
||||||
|
<strong>${result.title}</strong>
|
||||||
|
<p>${result.description}</p>
|
||||||
|
</li>
|
||||||
|
</#list>
|
||||||
|
</ul>
|
||||||
|
</#if>
|
||||||
|
|
||||||
|
<#-- This is a FreeMarker comment -->
|
||||||
|
<@currentTime />
|
||||||
|
</@layout.page>
|
||||||
|
|
||||||
|
|
||||||
|
<#macro currentTime>
|
||||||
|
${.now?string.full}
|
||||||
|
</#macro>
|
||||||
32
samples/FreeMarker/layout.ftl
Normal file
32
samples/FreeMarker/layout.ftl
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
<#ftl strip_text=true />
|
||||||
|
|
||||||
|
<#macro page title>
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="${.lang}">
|
||||||
|
<head>
|
||||||
|
<title>${title}</title>
|
||||||
|
<@metaTags />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<#nested />
|
||||||
|
<@footer />
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
|
||||||
|
<#---
|
||||||
|
Default meta tags
|
||||||
|
-->
|
||||||
|
<#macro metaTags>
|
||||||
|
<#compress>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
|
<meta name="format-detection" content="telephone=no">
|
||||||
|
</#compress>
|
||||||
|
</#macro>
|
||||||
|
|
||||||
|
<#macro footer>
|
||||||
|
<p>This page is using FreeMarker v${.version}</p>
|
||||||
|
</#macro>
|
||||||
1
vendor/grammars/FreeMarker.tmbundle
vendored
Submodule
1
vendor/grammars/FreeMarker.tmbundle
vendored
Submodule
Submodule vendor/grammars/FreeMarker.tmbundle added at 6b7b880c53
Reference in New Issue
Block a user