Skip to content

Commit 295e4a9

Browse files
authored
Update README.md - Add troubleshooting tip for emacs when using symlinked project dirs
I kept getting a crash immediately on startup. I spent many hours researching this, so I wanted to suggest adding this as a troubleshooting tip in case it helps anyone else, even though it is probably rare. ``` LSP :: Connected to [elixir-ls:127582/starting /path/to/project]. LSP :: Unable to autoconfigure company-mode. [2 times] LSP :: elixir-ls:127582 initialized successfully in folders: (/path/to/project) LSP :: Unable to autoconfigure company-mode. [2 times] LSP :: Project directory change detected. ElixirLS will restart. LSP :: elixir-ls has exited (finished) LSP :: Sending to process failed with the following error: Process elixir-ls not running: finished Server elixir-ls:127582 exited (check corresponding stderr buffer for details). Do you want to restart it? (y or n) n ``` It comes from here in the LSP source code: https://github.com/elixir-lsp/elixir-ls/blob/3a77d8c899c9dc7f94c9b4345b2eb24f99a62c7c/apps/language_server/lib/language_server/server.ex#L2208 Adding this emacs setting is easier than fixing the LSP code to expand both paths here, which would avoid the problem also.
1 parent 9c03105 commit 295e4a9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ For `eglot`, use:
9393
(add-to-list 'eglot-server-programs '(elixir-mode "path-to-elixir-ls/release/language_server.sh"))
9494
```
9595

96+
If you access any projects via symlinks, and the lsp crashes immediately on startup in those projects, you might need this:
97+
98+
```elisp
99+
(setq find-file-visit-truename t)
100+
```
101+
96102
</details>
97103

98104
## Supported Elixir and OTP versions

0 commit comments

Comments
 (0)