Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lsp: improve debug logging #3646

Merged
merged 1 commit into from
Feb 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions autoload/go/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,7 @@ function! s:debugasync(timer) abort
silent file `='__GOLSP_LOG__'`
setlocal buftype=nofile bufhidden=wipe nomodified nobuflisted noswapfile nowrap nonumber nocursorline
setlocal filetype=golsplog
setlocal fileencoding=utf-8
call win_gotoid(l:winid)
endif

Expand All @@ -1380,11 +1381,8 @@ function! s:debugasync(timer) abort
call appendbufline(l:name, '$', split(l:data, "\r\n"))
endfor

" TODO(bc): how to move the window's cursor position without switching
" to the window?
call win_gotoid(l:logwinid)
normal! G
call win_gotoid(l:winid)
" Move the window's cursor position without switching to the window
call win_execute(l:logwinid, 'normal! G')
call setbufvar(l:name, '&modifiable', 0)
finally
endtry
Expand Down
Loading