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

Fixes to restart behavior: missing didOpen and duplicate workspace path. #3685

Merged
merged 1 commit into from
Sep 17, 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
4 changes: 2 additions & 2 deletions autoload/go/lsp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ function! s:newlsp() abort
\ }
call go#statusline#Update(l:wd, l:status)

let self.workspaceDirectories = add(self.workspaceDirectories, l:wd)
let self.workspaceDirectories = s:dedup(add(self.workspaceDirectories, l:wd))
let l:msg = self.newMessage(go#lsp#message#Initialize(l:wd))

let l:state = s:newHandlerState('')
Expand Down Expand Up @@ -458,7 +458,7 @@ function! s:newlsp() abort
call call('go#lsp#AddWorkspaceDirectory', l:workspaces)
" * send DidOpen messages for all buffers that have b:did_lsp_open set
" TODO(bc): check modifiable and filetype, too?
bufdo if get(b:, 'go_lsp_did_open', 0) | if &modified | call go#lsp#DidOpen(expand('%:p')) | else | call go#lsp#DidChange(expand('%:p')) | endif | endif
bufdo! if get(b:, 'go_lsp_did_open', 0) | let b:go_lsp_did_open = 0 | if &modified | call go#lsp#DidOpen(expand('%:p')) | else | call go#lsp#DidChange(expand('%:p')) | endif | endif
let l:lsp.queue = extend(l:lsp.queue, l:queue)
return
endfunction
Expand Down
Loading