Skip to content

Commit 845cd2e

Browse files
authored
Update readme to cover setup.fish (#1065)
Also add a small section about debugging setup scripts
1 parent 505dc69 commit 845cd2e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,14 +439,19 @@ This section provides additional information on how to set up the ElixirLS local
439439

440440
When launching ElixirLS from an IDE that is itself launched from a graphical shell, the environment may not be complete enough to find or run the correct Elixir/OTP version. To address this on Unix or Linux, the ElixirLS wrapper scripts try to configure [ASDF](https://github.com/asdf-vm/asdf) (a version manager for Elixir and other languages), but that may not always be what is needed.
441441

442-
To ensure that the correct environment is set up, you can create a setup script at `$XDG_CONFIG_HOME/elixir_ls/setup.sh` (for Unix-based systems) or `%APPDATA%\elixir_ls\setup.bat` (for Windows).
442+
To ensure that the correct environment is set up, you can create a setup script. The setup script location varies based on platform and shell:
443+
- Unix-based systems using bash or zsh: `$XDG_CONFIG_HOME/elixir_ls/setup.sh` (by default `~/.config/elixir_ls/setup.sh`)
444+
- Unix-based systems using fish: `$XDG_CONFIG_HOME/elixir_ls/setup.fish` (by default `~/.config/elixir_ls/setup.fish`)
445+
- Windows-based systems `%APPDATA%\elixir_ls\setup.bat`
443446

444447
In the setup script, the environment variable `ELS_MODE` is available and set to either `debug_adapter` or `language_server` to help you decide what to do.
445448

446449
Note: The setup script must not read from `stdin` or write to `stdout`. On Unix, Linux, and macOS
447450
this might be accomplished by adding `>/dev/null` at the end of any line that produces
448451
output; for a Windows batch script, you will want to add `@echo off` at the top and use `>nul`.
449452

453+
If you want to debug your setup script you can write to stderr.
454+
450455
### Development
451456

452457
Please refer to [DEVELOPMENT.md](DEVELOPMENT.md).

0 commit comments

Comments
 (0)