Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ Below is a list of configuration options supported by the ElixirLS language serv
<dt>elixirLS.enableTestLenses</dt><dd>Show code lenses to run tests in terminal.</dd>
<dt>elixirLS.additionalWatchedExtensions</dt><dd>Additional file types capable of triggering a build on change</dd>
<dt>elixirLS.languageServerOverridePath</dt><dd>Absolute path to an alternative ElixirLS release that will override the packaged release</dd>
<dt>elixirLS.stdlibSrcDir</dt><dd>Path to Elixir's std lib source code. See [here](https://github.com/elixir-lsp/elixir_sense/pull/277) for more info</dd>
</dl>

## Debug Adapter configuration options
Expand Down
6 changes: 6 additions & 0 deletions apps/language_server/lib/language_server/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1849,6 +1849,11 @@ defmodule ElixirLS.LanguageServer.Server do
mix_target = Map.get(settings, "mixTarget")
project_dir = Map.get(settings, "projectDir")
additional_watched_extensions = Map.get(settings, "additionalWatchedExtensions", [])
stdlib_src_dir = to_string(Map.get(settings, "stdlibSrcDir", ""))

if stdlib_src_dir != "" do
Application.put_env(:language_server, :elixir_src, stdlib_src_dir)
end

state =
state
Expand Down Expand Up @@ -1887,6 +1892,7 @@ defmodule ElixirLS.LanguageServer.Server do
"elixir_ls.envVariables" => to_string(Map.get(settings, "envVariables", %{}) != %{}),
"elixir_ls.mixEnv" => to_string(Map.get(settings, "mixEnv", "test")),
"elixir_ls.mixTarget" => to_string(Map.get(settings, "mixTarget", "host")),
"elixir_ls.stdlibSrcDir" => stdlib_src_dir,
"elixir_ls.dialyzerFormat" =>
if(Map.get(settings, "dialyzerEnabled", true),
do: Map.get(settings, "dialyzerFormat", "dialyxir_long"),
Expand Down
Loading