Skip to content

Commit

Permalink
Fixes to restart behavior: missing didOpen and duplicate workspace path.
Browse files Browse the repository at this point in the history
  • Loading branch information
parkert-va committed Sep 16, 2024
1 parent f365d96 commit 3694725
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 3694725

Please sign in to comment.