File tree Expand file tree Collapse file tree 4 files changed +5
-10
lines changed
lib/language_server/experimental Expand file tree Collapse file tree 4 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ defmodule ElixirLS.LanguageServer.Experimental.Protocol.Proto.Macros.Parse do
71
71
Field . extract (
72
72
unquote ( splat_opt ) ,
73
73
:.. ,
74
- Map . reject ( unquote ( map_parameter_var ) , fn { k , _ } -> k in unquote ( known_keys ) end )
74
+ unquote ( map_parameter_var )
75
+ |> Enum . reject ( fn { k , _ } -> k in unquote ( known_keys ) end )
76
+ |> Map . new ( )
75
77
) }
76
78
end
77
79
Original file line number Diff line number Diff line change @@ -48,10 +48,6 @@ defmodule ElixirLS.LanguageServer.Experimental.SourceFile.Conversions do
48
48
position
49
49
end
50
50
51
- def to_elixir ( % LSPosition { } = position , % SourceFile { } = source_file ) do
52
- to_elixir ( position , source_file . document )
53
- end
54
-
55
51
def to_elixir ( % LSPosition { } = position , % Document { } = document ) do
56
52
document_size = Document . size ( document )
57
53
# we need to handle out of bounds line numbers, because it's possible to build a document
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ defmodule ElixirLS.LanguageServer.Experimental.Server.StateTest do
78
78
setup [ :with_an_open_document ]
79
79
80
80
test "can be changed" , % { state: state } do
81
- assert { :ok , state } = State . apply ( state , change_notification ( ) )
81
+ assert { :ok , _state } = State . apply ( state , change_notification ( ) )
82
82
83
83
assert { :ok , file } = SourceFile.Store . fetch ( uri ( ) )
84
84
assert file . dirty?
@@ -98,7 +98,7 @@ defmodule ElixirLS.LanguageServer.Experimental.Server.StateTest do
98
98
test "should clear the dirty field when saved" , ctx do
99
99
assert { :ok , save } = build ( Notifications.DidSave , text_document: [ uri: uri ( ) ] )
100
100
assert { :ok , % { dirty?: true } } = SourceFile.Store . fetch ( uri ( ) )
101
- assert { :ok , state } = State . apply ( ctx . state , save )
101
+ assert { :ok , _state } = State . apply ( ctx . state , save )
102
102
103
103
assert { :ok , % { dirty?: false } } = SourceFile.Store . fetch ( uri ( ) )
104
104
end
Original file line number Diff line number Diff line change @@ -5,10 +5,7 @@ defmodule ElixirLS.LanguageServer.Experimental.SourceFileTest do
5
5
use Patch
6
6
7
7
alias ElixirLS.LanguageServer.Experimental
8
- alias ElixirLS.LanguageServer.Experimental.SourceFile.Conversions
9
8
alias ElixirLS.LanguageServer.SourceFile
10
-
11
- import ExUnit.CaptureIO
12
9
import ElixirLS.LanguageServer.Experimental.SourceFile , except: [ to_string: 1 ]
13
10
14
11
def text ( % Experimental.SourceFile { } = source ) do
You can’t perform that action at this time.
0 commit comments