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

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

Merged

Conversation

rgoya
Copy link
Contributor

@rgoya rgoya commented Apr 7, 2024

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:

" This hold previous content for each language servers to make
" DidChangeTextDocumentParams. The key is buffer numbers:
" {
" 1: {
" "golsp": [ "first-line", "next-line", ... ],
" "bingo": [ "first-line", "next-line", ... ]
" },
" 2: {
" "pylsp": [ "first-line", "next-line", ... ]
" }
" }
let s:file_content = {}

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.

@rgoya rgoya changed the title Bugfix: Correctly identify the type of content update request to use for each LSP server Bugfix: Correctly identify the type of content update notification to use for each LSP server Apr 7, 2024
@prabirshrestha prabirshrestha merged commit 6b7aabd into prabirshrestha:master Jul 20, 2024
18 checks passed
@prabirshrestha
Copy link
Owner

Merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants