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