Language server for Zotonic, the Erlang Web Framework.
Syntax highlight for Zotonic Template Language (.tpl).
Zotonic completion for .tpl
and Erlang
files by pressing Ctrl + Space.
In template files use act
prefix for actions, m
for models, val
for validators, |
for filters and for tags just the tag name.
Also some special completions are provided, like the atoms true
, false
and undefined
, for
loops, map
tag and more.
A great help is the models snippets. Typing m.
all models are listed and picking one shows all m_get
possibilities.
- HTML: Typing
<
outside a.tpl
expression popups HTML snippets.
Navigate to files in the .tpl
by pressing Ctrl + Click over file names.
Zotonic documentation is displayed hovering tags, actions, filters, validators, models and translations.
Download and install the extension for free at the Visual Studio Marketplace or directly in the VSCode extensions feature.
- Improve semantic highlight. See:
- Review arguments and tabstops;
- CSS completions;
- Javascript completions.
- Review links;
- Improve style.
If you like this tool, please consider sponsoring me.
I'm thankful for your never-ending support ❤️
I also accept coffees ☕
Special thanks go to @mworrel for buying me 5x coffees! o/
Feels free to submit an issue on Github.
git clone https://github.com/williamthome/zotonic-ls
cd zotonic-ls
npm install
code .
Make sure you have ESlint and Prettier ESLint extensions installed.
Optionally you can install the Todo Tree extension to see things TODO, to FIXME, or BUG.
- Open user or workspace
settings.json
by:- Windows/Linux: CTRL + SHIFT + P or
File > Preferences > Settings
- MacOS: CMD + SHIFT + P or
Code > Preferences > Settings
- Windows/Linux: CTRL + SHIFT + P or
- Add this to the settings file:
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
"editor.formatOnSave": true,
Press F5 to start debugging. To reload, if in dev window, press Ctrl + Shift + F5 or, if in extension host window, Ctrl + R.
See this article for more information about debugging.