@@ -65,13 +65,19 @@ local function disconnect()
65
65
return with_conn_or_warn (_5_ )
66
66
end
67
67
_2amodule_2a [" disconnect" ] = disconnect
68
- local function send (msg , cb , row , col , file_path )
69
- local function _6_ (conn )
68
+ local function send (opts )
69
+ local _let_6_ = opts
70
+ local msg = _let_6_ [" msg" ]
71
+ local cb = _let_6_ [" cb" ]
72
+ local row = _let_6_ [" row" ]
73
+ local col = _let_6_ [" col" ]
74
+ local file_path = _let_6_ [" file-path" ]
75
+ local function _7_ (conn )
70
76
remote .send (conn , (" \255 (parser/where (dyn :parser) " .. row .. " " .. col .. " )" ))
71
77
remote .send (conn , (" \254 source \" " .. file_path .. " \" " ), nil , true )
72
78
return remote .send (conn , msg , cb , true )
73
79
end
74
- return with_conn_or_warn (_6_ )
80
+ return with_conn_or_warn (_7_ )
75
81
end
76
82
_2amodule_locals_2a [" send" ] = send
77
83
local function connect (opts )
@@ -82,21 +88,21 @@ local function connect(opts)
82
88
disconnect ()
83
89
else
84
90
end
85
- local function _8_ (err )
91
+ local function _9_ (err )
86
92
display_conn_status (err )
87
93
return disconnect ()
88
94
end
89
- local function _9_ ()
95
+ local function _10_ ()
90
96
return display_conn_status (" connected" )
91
97
end
92
- local function _10_ (err )
98
+ local function _11_ (err )
93
99
if err then
94
100
return display_conn_status (err )
95
101
else
96
102
return disconnect ()
97
103
end
98
104
end
99
- return a .assoc (state (), " conn" , remote .connect ({host = host , port = port , [" on-failure" ] = _8_ , [" on-success" ] = _9_ , [" on-error" ] = _10_ }))
105
+ return a .assoc (state (), " conn" , remote .connect ({host = host , port = port , [" on-failure" ] = _9_ , [" on-success" ] = _10_ , [" on-error" ] = _11_ }))
100
106
end
101
107
_2amodule_2a [" connect" ] = connect
102
108
local function try_ensure_conn ()
109
115
_2amodule_locals_2a [" try-ensure-conn" ] = try_ensure_conn
110
116
local function eval_str (opts )
111
117
try_ensure_conn ()
112
- local function _13_ (msg )
118
+ local function _14_ (msg )
113
119
local clean = text [" trim-last-newline" ](msg )
114
120
if opts [" on-result" ] then
115
121
opts [" on-result" ](text [" strip-ansi-escape-sequences" ](clean ))
@@ -121,15 +127,15 @@ local function eval_str(opts)
121
127
return nil
122
128
end
123
129
end
124
- return send ((opts .code .. " \n " ), _13_ , ( a [" get-in" ](opts .range , {" start" , 1 }) or 1 ), ( a [" get-in" ](opts .range , {" start" , 2 }) or 1 ), opts [" file-path" ])
130
+ return send ({ msg = (opts .code .. " \n " ), cb = _14_ , row = a [" get-in" ](opts .range , {" start" , 1 }, 1 ), col = a [" get-in" ](opts .range , {" start" , 2 }, 1 ), [ " file-path " ] = opts [" file-path" ]} )
125
131
end
126
132
_2amodule_2a [" eval-str" ] = eval_str
127
133
local function doc_str (opts )
128
134
try_ensure_conn ()
129
- local function _16_ (_241 )
135
+ local function _17_ (_241 )
130
136
return (" (doc " .. _241 .. " )" )
131
137
end
132
- return eval_str (a .update (opts , " code" , _16_ ))
138
+ return eval_str (a .update (opts , " code" , _17_ ))
133
139
end
134
140
_2amodule_2a [" doc-str" ] = doc_str
135
141
local function eval_file (opts )
0 commit comments