302: WIP: Support tracing lsp requests. r=DJMcNab a=DJMcNab

EDIT: We need to work out a better way to handle settings before this can be merged. Help wanted

TODO: Debug why decorations are sent even when highlightingOn is disabled
This makes the log volume so high its impossible to work with anyway.
(Continuation of #84 [#99 only disabled using it, not making sure we don't send it]).

These logs can be used in https://microsoft.github.io/language-server-protocol/inspector/

Co-authored-by: DJMcNab <36049421+djmcnab@users.noreply.github.com>
This commit is contained in:
bors[bot] 2018-12-24 13:47:27 +00:00
commit b052059f86
4 changed files with 47 additions and 9 deletions

View file

@ -54,7 +54,7 @@ enum Task {
pub fn main_loop(
internal_mode: bool,
ws_root: PathBuf,
publish_decorations: bool,
supports_decorations: bool,
msg_receiver: &Receiver<RawMessage>,
msg_sender: &Sender<RawMessage>,
) -> Result<()> {
@ -83,7 +83,7 @@ pub fn main_loop(
let mut subs = Subscriptions::new();
let main_res = main_loop_inner(
internal_mode,
publish_decorations,
supports_decorations,
&pool,
msg_sender,
msg_receiver,
@ -156,7 +156,7 @@ impl fmt::Debug for Event {
fn main_loop_inner(
internal_mode: bool,
publish_decorations: bool,
supports_decorations: bool,
pool: &ThreadPool,
msg_sender: &Sender<RawMessage>,
msg_receiver: &Receiver<RawMessage>,
@ -240,7 +240,7 @@ fn main_loop_inner(
update_file_notifications_on_threadpool(
pool,
state.snapshot(),
publish_decorations,
supports_decorations,
task_sender.clone(),
subs.subscriptions(),
)