Skip to content

Commit

Permalink
Merge pull request #3685 from parkert-va/master
Browse files Browse the repository at this point in the history
Fixes to restart behavior: missing didOpen and duplicate workspace path.
  • Loading branch information
bhcleek authored Sep 17, 2024
2 parents f365d96 + 3694725 commit 648ad63
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 648ad63

Please sign in to comment.