Skip to content

kgrotel/terraform-ts-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.