From 0c4dc7883daffd54e7caee9888c3e8c07e54b0cb Mon Sep 17 00:00:00 2001 From: calve Date: Wed, 24 Jul 2019 18:23:08 +0200 Subject: [PATCH] Document usage with emacs lsp-mode --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index eca67eb..9ed6cfa 100644 --- a/README.md +++ b/README.md @@ -124,7 +124,17 @@ This is LSP(Language Server Protocol) for Terraform ### Emacs -- Should work with emacs-lsp(need confirmation) +- Work with [emacs-lsp/lsp-mode](https://github.com/emacs-lsp/lsp-mode) while still a little buggy + ```lisp + (add-to-list 'lsp-language-id-configuration '(terraform-mode . "terraform")) + + (lsp-register-client + (make-lsp-client :new-connection (lsp-stdio-connection '("/path/to/terraform-lsp/terraform-lsp" "-enable-log-file")) + :major-modes '(terraform-mode) + :server-id 'terraform-ls)) + + (add-hook 'terraform-mode-hook #'lsp) + ``` ### Others