Giter Site home page Giter Site logo

vs-freemarker's Introduction

⚠️ This repository or library is not maintained by me anymore. If you want to contribute, feel free to ping me and I'll transfer ownership of the repo ⚠️

FreeMarker for Visual Studio Code

FreeMarker language colorization extension for Visual Studio Code. You can read more about FreeMarker here.

Usage

Install the extension and open any .ftl file.

FreeMarker Syntax Highlight

This is based on the TextMate bundle found on this repo.

Alternative FreeMarker syntax with square brackets is fully supported.

Snippets

Type # followed by the first letters of a FreeMarker tag name and the editor will propose you all the available autocomplete options. Snippets are also available for alternative FreeMarker syntax. They will have the same shortcuts of regular ones, with an underscore _ character at the end. For instance:

  • with #if shortcut, you will get:
    <#if (condition)>
        
    </#if>
    
  • while with #if_ shortcut the result will be:
    [#if (condition)]
        
    [/#if]
    

FreeMarker Snippet Example

Snippets list

Shortcut Description
dir Directive
d Simple Directive
mdef Macro definition
ma Macro
m Simple Macro
a #assign short
assign #assign long
l #local short
local #local long
g #global short
global #global long
set #setting short
setting #setting long
if #if
e #else
eif #elseif
li #list
include #include
imp #import
function #function / #return
sw #switch / #case / #default
ca #case
att #attempt / #recover

Contributing

Contributions are welcome. Fork the repo and create a pull request with your changes.

vs-freemarker's People

Contributors

cbezmen avatar dcortes92 avatar enjoyma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vs-freemarker's Issues

Selected Element Issue

When clicking a div, every other div on the page is being highlighted. Please can you fix it so that the when you select an opening div, only the matching closing div is selected?

Donations?

Our company has a donations program for open source projects that we use on the job.
But I don't see a way to donate for the development of this extension.

Some sequence hangs the syntax highlighting

Take the following example:

<script>
window.myVar=${myVar?c};
</script>

<#if myTest>
  <input type="text">
</#if>

<#if myTest>
</#if>

The second if statement has no syntax highlighting. Nor does most of the rest of the file. My original file is huge and almost half of it isn't highlighted. For some reason, at some point in the file, the highlighting returns.

Removing ?c makes it work. Removing the > in the first </#if makes it work. Removing the <input> makes it work. But as it is it doesn't work. I can't get my head around this one.

multi-line highlight problem?

example:
<#assign map = {
"A" : "1" ,
"B" : "2" ,
"C" : "3" ,
"D" : "4" }
/>
sorry, my English is not good :)

Add preview panel

Hi @dcortes92

I guess a nice to have could be an PREVIEW PANEL to test the template.

Based on Try FreeMarker, a developer could supply an source file (or directly a text) and the preview can run freemarker-cli in order to show how should be the expected result.

In this way we can help developers daily tasks and produce better and error prone templates.

Make sense?

The program freezes and falls off when using the plug-in "FreeMarker"

From @PavelHancharou on June 26, 2018 9:20

The program freezes and falls off when using the plug-in "FreeMarker"

Steps to Reproduce:

  1. Open VSC
  2. Select Language Mode - FreeMarker (.ftl)
  3. Write next text:
    ${abcdefghijklmnopqrstuvwxyzabcdefj
  4. VSCode stop to work

vscodebug

The problem is currectly with FreeMarker Plugin, and when there is NO closing quote "}" in the text

Copied from original issue: microsoft/vscode#52886

Fix readme

There's a problem with the readme shown in the marketplace. Screenshot attached.

readme-issue

Add testing

Add testing to make merging process easier.

Integrates Freemarker Language Server.

It should be cool if we could have advanced features like syntax validation. To do that I have started a Freemarker Language Server https://github.com/angelozerr/freemarker-languageserver written in Java that you could consume it.

You could do the same thing than https://github.com/microclimate-devops/xml-language-server/blob/master/client-vscode/xml-client/client/extension.js which consumes an XML Language Server written in Java.

If you are interested:

vs-code freezes when using this extension with large files

If I enabled this extension and use it on a large file (4k+ lines) vs-code freezes

No problems with small ones.

Maybe is a bug similar to this I don't know...

Version: 1.29.0-insider (user setup)
Commit: 43823dae97f07760958ffbb5e16c7f219307159c
Date: 2018-10-24T05:21:57.644Z
Electron: 2.0.11
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Redesign logo

Current logo is good, but I'd like a different one for this year.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.