1.0 is here — first stable release1.0 출시 — 첫 안정 버전

FreeMarker,
finally first‑class.
FreeMarker도 이제
제대로 된 언어처럼.

Highlighting that reads, Ctrl+click navigation, diagnostics that catch real mistakes and ftldoc in every hover. For VS Code, Cursor, CodeOSS and Vim / Neovim.

읽기 좋은 하이라이팅, Ctrl+클릭 이동, 진짜 실수만 잡는 진단, 호버마다 보이는 ftldoc까지. VS Code, Cursor, CodeOSS, Vim / Neovim에서.

Free and open source · Apache-2.0 · extension id무료 오픈소스 · Apache-2.0 · 익스텐션 ID nathan-0910.ftl-dev

What 1.0 means1.0이 되면서 달라진 점

From 1.0 on I won't casually rename the things below. If one of them has to change, it comes with a major version bump and a note in the changelog first.

1.0부터는 아래 것들을 함부로 안 바꿉니다. 바꿔야 할 일이 생기면 메이저 버전 올리고, 변경 이력에 먼저 적어 둘게요.

Extension & language id익스텐션·언어 ID

nathan-0910.ftl-dev · freemarker

File types & grammar scope파일 확장자·문법 scope

.ftl .ftlh .ftlx · text.html.freemarker

Settings keys설정 키

ftl-dev.strictVariables, ftl-dev.dataModel, …

Project file프로젝트 파일

.ftl-data-model.json

Features기능

What I needed while writing ftl.

ftl을 쓰면서 필요했던 기능들입니다.

Syntax highlighting하이라이팅

Directives, built-ins, ${…} inside strings, raw strings, square-bracket syntax and the HTML around them are all colored correctly.

디렉티브, built-in, 문자열 안의 ${…}, raw 문자열, 대괄호 문법, 주변 HTML까지 각각 알맞은 색으로 표시합니다.

Go to definition & rename정의로 이동·이름 바꾸기

Ctrl+click a macro, function, variable or #import namespace to go to its declaration. F2 renames, Ctrl+T searches the whole workspace.

매크로, 함수, 변수, #import 네임스페이스에서 Ctrl+클릭하면 선언으로 갑니다. 이름은 F2로 바꾸고, 워크스페이스 전체 검색은 Ctrl+T.

Completion & parameter hints자동완성·인자 힌트

Directives and built-ins up to FreeMarker 2.3.35, directive parameters, and parameter hints for your own #function / #macro.

FreeMarker 2.3.35까지의 디렉티브와 built-in, 디렉티브 인자, 직접 만든 #function / #macro의 인자 힌트가 뜹니다.

Diagnostics문법 검사

Unclosed tags, mismatched blocks, #switch mistakes, deprecated directives. A red line on valid FTL is a bug; please report it.

안 닫힌 태그, 짝 안 맞는 블록, #switch 실수, deprecated 디렉티브를 잡습니다. 올바른 FTL에 빨간 줄이 뜨면 버그이니 알려 주세요.

ftldoc

Write Javadoc-style comments (@param, @return, @deprecated, @example, …) and they show up in hover, parameter hints and completion.

@param, @return, @deprecated, @example 같은 Javadoc식 주석을 달면 호버, 인자 힌트, 자동완성에 그대로 나옵니다.

Closing tags & indent태그 닫기·들여쓰기

Closing tags are inserted automatically, indent follows FTL blocks, and renaming <#if> renames its </#if> too.

닫는 태그는 자동으로 넣고, 들여쓰기는 FTL 블록 기준으로 맞춥니다. <#if> 이름을 고치면 </#if>도 같이 바뀝니다.

Outline & references아웃라인·참조 찾기

Document outline, find all references, separate colors for locals and parameters. Turn on strict mode if you want warnings for undeclared variables.

문서 아웃라인, 모든 참조 찾기, 지역 변수와 인자 구분 색. 선언 안 된 변수까지 경고받고 싶으면 strict 모드를 켜세요.

Vim / Neovim

A separate plugin, ftl-dev.vim, handles syntax, indent and closing tags. On Neovim you can also hook up the ftl-dev language server for hover, completion and diagnostics.

문법, 들여쓰기, 태그 닫기는 별도 플러그인 ftl-dev.vim이 맡습니다. Neovim이면 ftl-dev 언어 서버를 붙여서 호버, 자동완성, 진단도 쓸 수 있어요.

Diagnostics and hover진단과 호버

Some mistakes FreeMarker only reports when it renders the template. ftl-dev shows them while you type.

일부 오류는 FreeMarker가 템플릿을 렌더링할 때에야 드러납니다. ftl-dev는 이런 오류를 입력하는 동안 표시합니다.

  • Mixing #on and #case in one #switch is a ParseException in FreeMarker 2.3.34. ftl-dev marks it as you type.
  • #switch 하나에 #on과 #case를 섞으면 FreeMarker 2.3.34에선 ParseException입니다. ftl-dev는 입력하는 동안 표시합니다.
  • Hover a call to see its ftldoc, parameters and defaults.
  • 호출하는 곳에 마우스를 올리면 ftldoc, 인자, 기본값이 보입니다.
switch.ftl
<#switch count>
  <#on 1, 2>
    one or two
  <#case 3>
    three
</#switch>
Don't mix '#on' and '#case' in the same '#switch'; use only one form ('#on' needs no '#break').switch.ftl · Ln 4, Col 3 · ftl-dev
greet — function

Greets a user by display name.

Parameters

  • name {string} — display name
  • punct (optional, default: "!") — closing mark

Returns — greeting text

Install설치

Install it in your editor and open a .ftl, .ftlh or .ftlx file.

에디터에 설치하고 .ftl, .ftlh, .ftlx 파일을 열면 됩니다.

VS Code

Get it from the Visual Studio Marketplace, or run this in Quick Open (Ctrl+P):

Visual Studio 마켓플레이스에서 받거나, Quick Open(Ctrl+P)에서 아래 명령을 실행하세요.

ext install nathan-0910.ftl-dev

Cursor · CodeOSS

It's on Open VSX. Search FreeMarker (ftl-dev) in the Extensions view, or:

Open VSX에 있습니다. 확장 탭에서 FreeMarker (ftl-dev)를 검색하거나:

code-oss --install-extension nathan-0910.ftl-dev

Vim / Neovim

Use your plugin manager. With vim-plug:

플러그인 매니저로 설치하세요. vim-plug라면:

Plug 'DevNathan/ftl-dev.vim'

Thanks for writing FreeMarker with us. 🎉FreeMarker와 함께해 주셔서 고맙습니다. 🎉

Found a false positive, a missing built-in or an ugly color? Open an issue. Valid FTL getting flagged is always a bug.

헛경고, 빠진 built-in, 이상한 색을 발견하셨나요? 이슈로 알려 주세요. 올바른 FTL에 경고가 뜨면 언제나 버그입니다.