elixir-ls icon indicating copy to clipboard operation
elixir-ls copied to clipboard

Helpful features stop working after a compile fails

Open hazardfn opened this issue 3 years ago • 0 comments

Environment

  • Elixir & Erlang versions (elixir --version): Erlang/OTP 23 [erts-11.1.8] / Elixir 1.11.3 (compiled with Erlang/OTP 23)
  • Operating system: OSX 11.2.2 (Intel)
  • Editor or IDE name (e.g. Emacs/VSCode): Emacs 27.1
  • Editor Plugin/LSP Client name: Spacemacs elixir layer w/ LSP-Mode

I have foregone the troubleshooting and log steps because I don't believe they apply here, I think the issue I have is more of a feature request or potentially some kind of limitation with LS.

It seems as you're writing code and save the file with a simple syntax error (maybe a missed comma or incorrect field name on a struct or something) you suddenly lose a lot of the helpful features of the plugin because the last compile failed... Is there any plan to maybe remember the context from the last run and use that in the case of a compilation error? Is this a uniquely Emacs problem?

For example, normally, when I highlight over a module name I get the docs in the UI for it and can see the field names/type specs etc. when the last compilation succeeded. As soon as a compile fails once I lose that (including even autocompletion!) until I make the compilation succeed again. Is this a known limitation?

EDIT: the reason I post this here is because the error from the plugin seems to related: LSP :: Error from the Language Server: [DocumentSymbols] Compilation error while parsing source file (Server End Error) [13 times] what I'm not sure is if the convenience I'm asking for is implemented here or in the lsp/elixir layers.

hazardfn avatar Mar 06 '21 21:03 hazardfn