From 16b5d768b15761778e599a238f373933d08e5808 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 28 May 2020 16:03:27 -0700 Subject: [PATCH] Add support for creating a wirelog This should really be a feature of vim-lsc... --- autoload/lsc/dart.vim | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/autoload/lsc/dart.vim b/autoload/lsc/dart.vim index 80c23f7..abc6977 100644 --- a/autoload/lsc/dart.vim +++ b/autoload/lsc/dart.vim @@ -41,6 +41,12 @@ function! s:FindCommand() abort call add(l:cmd, '--instrumentation-log-file='.l:log_file) echom 'Dart instrumentation log: '.l:log_file endif + if get(g:, 'lsc_dart_enable_wirelog', v:false) + let l:in_log = tempname() + let l:out_log = tempname() + let l:cmd = ['sh', '-c', 'tee '.l:in_log.' | '.join(l:cmd, ' ').' | tee '.l:out_log] + echom 'Dart Analaysis wire logs: In: '.l:in_log.' Out: '.l:out_log + endif return l:cmd endfunction