Skip to content

Commit

Permalink
fix false positives in feature reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszsamson committed Oct 24, 2023
1 parent d4d8a30 commit d2eb6f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions apps/elixir_ls_debugger/lib/debugger/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -728,11 +728,12 @@ defmodule ElixirLS.Debugger.Server do
to_string(Map.get(config, "exitAfterTaskReturns", true)),
"elixir_ls.noDebug" => to_string(Map.get(config, "noDebug", false)),
"elixir_ls.breakOnDbg" => to_string(Map.get(config, "breakOnDbg", true)),
"elixir_ls.env" => to_string(Map.has_key?(config, "env")),
"elixir_ls.requireFiles" => to_string(Map.has_key?(config, "requireFiles")),
"elixir_ls.env" => to_string(Map.get(config, "env", %{}) != %{}),
"elixir_ls.requireFiles" => to_string(Map.get(config, "requireFiles", []) != []),
"elixir_ls.debugInterpretModulesPatterns" =>
to_string(Map.has_key?(config, "debugInterpretModulesPatterns")),
"elixir_ls.excludeModules" => to_string(Map.has_key?(config, "excludeModules")),
to_string(Map.get(config, "debugInterpretModulesPatterns", []) != []),
"elixir_ls.excludeModules" =>
to_string(Map.get(config, "excludeModules", []) != []),
"elixir_ls.task" => to_string(Map.get(config, "task", ":default_task"))
},
%{}
Expand Down
6 changes: 3 additions & 3 deletions apps/language_server/lib/language_server/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ defmodule ElixirLS.LanguageServer.Server do
JsonRpc.telemetry(
"lsp_config",
%{
"elixir_ls.projectDir" => to_string(Map.has_key?(settings, "projectDir")),
"elixir_ls.projectDir" => to_string(Map.get(settings, "projectDir", "") != ""),
"elixir_ls.autoBuild" => to_string(Map.get(settings, "autoBuild", true)),
"elixir_ls.dialyzerEnabled" => to_string(Map.get(settings, "dialyzerEnabled", true)),
"elixir_ls.fetchDeps" => to_string(Map.get(settings, "fetchDeps", false)),
Expand All @@ -1481,8 +1481,8 @@ defmodule ElixirLS.LanguageServer.Server do
to_string(Map.get(settings, "signatureAfterComplete", true)),
"elixir_ls.enableTestLenses" => to_string(Map.get(settings, "enableTestLenses", false)),
"elixir_ls.languageServerOverridePath" =>
to_string(Map.has_key?(settings, "languageServerOverridePath")),
"elixir_ls.envVariables" => to_string(Map.has_key?(settings, "envVariables")),
to_string(Map.get(settings, "languageServerOverridePath", "") != ""),
"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.dialyzerFormat" =>
Expand Down

0 comments on commit d2eb6f3

Please sign in to comment.