kgrotel / terraform-ts-mode

Terraform major mode with treesit and eglot support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License: GPL 3

terraform-ts-mode.el

Major mode of Terraform configuration file. This mode uses Tresitter for syntax highlighting and eglot as LSP

Compatibilty

OS emacs 29.1 emacs Snapshot
Ubuntu Tests Tests
MacOS Tests Tests
Windows Tests Tests

Installation

currently only manual installation is supported. eglot requires a running terraform-ls. The mode will attach to it automatically and configure eglot accordingly.

In case treesitter terraform grammar is not installed it will be installed.

Features

  • Syntax highlighting
  • Indentation
  • format on save (via eglot-format)
  • Code Suggestions

Notes & Usage

  • regarding indentation: terraform-ls and with it eglot-format does not support indentation aside 2 which means indentation should not be changed. Nevertheless treesit-identation is set but only correct identation while editing
  • currently eglot auto creates imenu which is not fitting very well (working on this is next)

Contribute

This mode is currently far from perfect i use it for my daily work, but lot of stuff could be done better.

About

Terraform major mode with treesit and eglot support

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%