prabirshrestha / vim-lsp

async language server protocol plugin for vim and neovim
MIT License
3.07k stars 303 forks source link

Bugfix: Correctly identify the type of content update notification to use for each LSP server #1548

Closed rgoya closed 1 week ago

rgoya commented 3 months ago

Fixes #1547

The s:file_content object has an entry for each buffer, and each buffer entry has an entry for each LSP server it has been synced with: https://github.com/prabirshrestha/vim-lsp/blob/f7ccf006df1aefd327c0e2c55cc8632a2db577c1/autoload/lsp.vim#L9-L20

When deciding whether an LSP has been sent a copy of the buffer or not, the current code only inspects whether the buffer entry exists. It should, instead, additionally verify whether the entry for the corresponding LSP server exists.

This PR adds such a check.

prabirshrestha commented 1 week ago

Merged. Thanks!