Skip to content

Commit f61fdd5

Browse files
author
Étienne Lévesque
committed
Update code lenses provider documentation
1 parent 642aa8b commit f61fdd5

File tree

3 files changed

+24
-7
lines changed

3 files changed

+24
-7
lines changed

apps/language_server/lib/language_server/providers/code_lens.ex

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
defmodule ElixirLS.LanguageServer.Providers.CodeLens do
22
@moduledoc """
3-
Collects the success typings inferred by Dialyzer, translates the syntax to Elixir, and shows them
4-
inline in the editor as @spec suggestions.
3+
Provides different code lenses to the client.
54
6-
The server, unfortunately, has no way to force the client to refresh the @spec code lenses when new
7-
success typings, so we let this request block until we know we have up-to-date results from
8-
Dialyzer. We rely on the client being able to await this result while still making other requests
9-
in parallel. If the client is unable to perform requests in parallel, the client or user should
10-
disable this feature.
5+
Supports the following code lenses:
6+
* Suggestions for Dialyzer @spec definitions
7+
* Shortcuts for executing tests
118
"""
129

1310
alias ElixirLS.LanguageServer.Providers.CodeLens

apps/language_server/lib/language_server/providers/code_lens/test.ex

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
defmodule DescribeBlock do
2+
@moduledoc """
3+
Identifies test execution targets and provides code lenses for automatically executing them.
4+
5+
Supports the following execution targets:
6+
* Test modules (any module that imports ExUnit.Case)
7+
* Describe blocks (any call to describe/2 inside a test module)
8+
* Test blocks (any call to test/2 or test/3 inside a test module)
9+
"""
10+
211
alias ElixirSense.Core.State.Env
312

413
@struct_keys [:line, :name, :body_scope_id]

apps/language_server/lib/language_server/providers/code_lens/type_spec.ex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
defmodule ElixirLS.LanguageServer.Providers.CodeLens.TypeSpec do
2+
@moduledoc """
3+
Collects the success typings inferred by Dialyzer, translates the syntax to Elixir, and shows them
4+
inline in the editor as @spec suggestions.
5+
6+
The server, unfortunately, has no way to force the client to refresh the @spec code lenses when new
7+
success typings, so we let this request block until we know we have up-to-date results from
8+
Dialyzer. We rely on the client being able to await this result while still making other requests
9+
in parallel. If the client is unable to perform requests in parallel, the client or user should
10+
disable this feature.
11+
"""
12+
213
alias ElixirLS.LanguageServer.Providers.CodeLens
314
alias ElixirLS.LanguageServer.{Server, SourceFile}
415
alias Erl2ex.Convert.{Context, ErlForms}

0 commit comments

Comments
 (0)