Commit f201bf1
committed
Rework message handling logic.
The current implementation handles server messages in various different
places. The sidebar does a lot of it. There are also many levels of
`send_message`, `send_request`, `send_chat_message`-type methods that
all do kind-of the same thing and (IMO) redundant and confusing.
- add `.deps` to gitignore.
- remove `deps` from git history
- remove the `EcaServerStatus` command and the corresponding server
status functionality. I don't think it adds anything and makes the
server more complex. We could always add it back in.
- remove `rpc.lua`, all of that functionality lives in `server.lua` now.
- remove `eca.status_bar`
- schedule some functions when we are in a fast event context, used in
logging and in UI functions that change the state of a buffer, for
example
- server has `on_start`, `on_initialized`, `on_stop` callbacks
- `server:stop()` sends a `shutdown` and `exit` request to ECA, or sends
SIGTERM
- `server:start()` uses `vim.system` instead of `jobstart` and
`chan_send`
- all message handling is done in `server.on_stdout()` which can
delegate to other handlers
- pathfinder can be injected into the server constructor
- `message_handler.lua` parses incoming message from the server
- `handle_content` still calls out to sidebar but that will be
refactored out later
- add tests1 parent 49074d5 commit f201bf1
File tree
12 files changed
+712
-895
lines changed- lua/eca
- tests
12 files changed
+712
-895
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | 171 | | |
173 | 172 | | |
174 | 173 | | |
| |||
459 | 458 | | |
460 | 459 | | |
461 | 460 | | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | 461 | | |
466 | 462 | | |
467 | 463 | | |
| |||
515 | 511 | | |
516 | 512 | | |
517 | 513 | | |
518 | | - | |
519 | 514 | | |
520 | 515 | | |
521 | 516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | 160 | | |
189 | 161 | | |
190 | 162 | | |
| |||
293 | 265 | | |
294 | 266 | | |
295 | 267 | | |
296 | | - | |
297 | | - | |
298 | 268 | | |
299 | 269 | | |
300 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | | - | |
20 | | - | |
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
| |||
245 | 242 | | |
246 | 243 | | |
247 | 244 | | |
248 | | - | |
249 | 245 | | |
250 | 246 | | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 247 | + | |
265 | 248 | | |
266 | 249 | | |
267 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
92 | 98 | | |
93 | 99 | | |
94 | 100 | | |
| |||
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
| 107 | + | |
101 | 108 | | |
102 | 109 | | |
103 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
This file was deleted.
0 commit comments