Back to all blog posts
Changelog

Announcing: Terramate VIM Plugin

Today we are happy to introduce another open source project: vim-terramate! The plugin utilizes the Terramate Language Server to provide code diagnostics while editing Terramate files.

Sören Martius
Sören Martius
· min read
Terramate VIM Plugin

Today we are happy to introduce another open source project: vim-terramate ! The plugin utilizes the Terramate Language Server to provide code diagnostics while editing Terramate files.

Installation

  • Install terramate-ls
  • go install github.com/terramate-io/terramate/cmd/terramate-ls@latest
  • Ensure terramate-ls is in your $PATH
  • Install vim-plug
  • Install vim-lsp
  • Install vim-terramate
  • Check the Example vimrc configuration section below if you are using vim-plug for the first time

Example vimrc Configuration

call plug#begin('~/.vim/plugged')
Plug 'prabirshrestha/vim-lsp'
Plug 'terramate-io/vim-terramate', {'branch': 'init'}
call plug#end()

For more information or to contribute or open an issue, check out the repository here .

How to use

Open any .tm or .tm.hcl file and start coding! The extension will highlight the Terramate syntax and give diagnostics for any change in the file.

See the plugin in action below:

Terramate VIM Plugin

Features

Syntax Highlight

The extension highlights HCL language constructs (attributes, blocks, literals, types, etc) and recognizes Terramate keywords e.g. tm_ternary , tm_upper etc.

Real-Time File Diagnostics

For each file change (and save), the extension will asynchronously execute linters in the configuration directory and provide diagnostics for syntax errors, invalid Terramate schema , and configuration conflicts.

Jump to Documentation

If you are interested in reading the documentation of a specific terramate function e.g. tm_ternary , tm_distinct etc. then:

  • Move your cursor to the function expression (e.g. tm_ternary )
  • Press <leader>tm
  • The documentation will be opened in your web browser

We always want to hear from you. Do you have a question? Want to provide feedback? Have a feature you’d like to request? You can join our community on Discord to keep up with all the latest and greatest. You can also check us out on LinkedIn , and X (Formerly Twitter) !

Soren is the co-founder and Chief Executive Officer of Terramate. Prior to founding Terramate, he consulted companies such as Flink and 1Komma5 on designing and implementing cloud and internal developer platforms.