Rework message handling logic #32
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 thatall do kind-of the same thing and (IMO) redundant and confusing.
.deps
to gitignore.deps
from git historyEcaServerStatus
command and the corresponding serverstatus functionality. I don't think it adds anything and makes the
server more complex. We could always add it back in.
rpc.lua
, all of that functionality lives inserver.lua
now.eca.status_bar
logging and in UI functions that change the state of a buffer, for
example
on_start
,on_initialized
,on_stop
callbacksserver:stop()
sends ashutdown
andexit
request to ECA, or sendsSIGTERM
server:start()
usesvim.system
instead ofjobstart
andchan_send
server.on_stdout()
which candelegate to other handlers
message_handler.lua
parses incoming message from the serverhandle_content
still calls out to sidebar but that will berefactored out later