0

When I use terraform layer with spacemacs, after operate a .tf file, at the status bar it always notices the message below:

Server tfls:3869 exited with status exit(check corresponding stderr buffer for details). Do you want to restart it? (y or n)

What i set in the ~/.spacemacs file is

dotspacemacs-configuration-layers
'(lsp
  git
  (terraform :variables
      terraform-auto-format-on-save t
      terraform-backend 'lsp) 

How to avoid its notice message? Why it always wants to restart?

lsp-log buffer

Command "terraform-lsp" is present on the path.
Command "terraform-lsp" is present on the path.
Found the following clients for /Users/user12/terraform/module1/main.tf: (server-id tfls, priority -1)
The following clients were selected based on priority: (server-id tfls, priority -1)
This server does not support foldingRangeProvider

Message buffer

Loading /Users/user12/.spacemacs...done
(Spacemacs) Warning: Cannot find any of the specified fonts (Source Code Pro)! Font settings may not be correct.
Spacemacs is ready.
Loading /Users/user12/.emacs.d/.cache/recentf...done
Skipping check for new version (reason: dotfile)
Package cl is deprecated
[yas] Prepared just-in-time loading of snippets successfully.
LSP :: Connected to [tfls:33908/starting].
LSP :: tfls:33908 initialized successfully in folders: (/Users/user12/terraform)
LSP :: tfls has exited (exited abnormally with code 2)
1

Emacs is starting tfls for you, but it is exiting abnormally. This usually indicates that it is encountering some sort of error that prevents it from functioning. Emacs is then asking if you want to restart it.

A language server is intended to run in the background and provide answers to queries so that your editor can implement IDE–like features. This allows the language designer to implement these features once, without needing to know anything about all the editors that people might use.

You should look to the tfls documentation or community for answers. tfls is not part of Emacs, and troubleshooting it is beyond the scope of this community.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.