Skip to content

Commit

Permalink
Do not advertise workspaceFolder support (#298)
Browse files Browse the repository at this point in the history
* Do not advertise workspaceFolder support

In #295 the user received a
warning:

> Received unmatched notification: %{"jsonrpc" => "2.0", "method" =>
  "workspace/didChangeWorkspaceFolders"

This occurs because the server advertises that it supports workspace folders:
https://microsoft.github.io/language-server-protocol/specification#workspace_workspaceFolders

This was introduced in #35 which was
actually about didChangeWatchedFiles and not workspace folders.

Fixes #296

* Update changelog
  • Loading branch information
axelson authored Jun 19, 2020
1 parent 785f3de commit 5102f1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Bug Fixes:
- Formatting was returning invalid floating point number (thanks [Thanabodee Charoenpiriyakij](https://github.com/wingyplus)) [#250](https://github.com/elixir-lsp/elixir-ls/pull/250)
- Fix detection of empty hover hints (thanks [Dmitry Gutov](https://github.com/dgutov)) [#279](https://github.com/elixir-lsp/elixir-ls/pull/279)
- Debugger doesn't fail when modules cannot be interpretted (thanks [Łukasz Samson](https://github.com/lukaszsamson)) (such as nifs) [#283](https://github.com/elixir-lsp/elixir-ls/pull/283)
- Do not advertise `workspaceFolders` support (thanks [Jason Axelson](https://github.com/axelson)) [#298](https://github.com/elixir-lsp/elixir-ls/pull/298)

House keeping:
- Server runs with a unique id (and uses it to disambiguate commands) (thanks [Alessandro Tagliapietra](https://github.com/alex88)) [#278](https://github.com/elixir-lsp/elixir-ls/pull/278)
Expand Down
2 changes: 1 addition & 1 deletion apps/language_server/lib/language_server/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ defmodule ElixirLS.LanguageServer.Server do
"codeLensProvider" => %{"resolveProvider" => false},
"executeCommandProvider" => %{"commands" => ["spec:#{server_instance_id}"]},
"workspace" => %{
"workspaceFolders" => %{"supported" => true, "changeNotifications" => true}
"workspaceFolders" => %{"supported" => false, "changeNotifications" => false}
}
}
end
Expand Down

0 comments on commit 5102f1c

Please sign in to comment.