[Qt-creator] [LSP] Use case of multiple active language servers per document

David Schulz David.Schulz at qt.io
Mon May 4 08:11:30 CEST 2020


Hi Alexis,

It would be definitely easier to just close the document. The reason I wanted to have it open in all running language server for a file type is the following:

Imagine a session with two projects A and B, where B depends on A. And you have a language server per project. Now if you modify content of a file of A the language server of B needs to know this change. So you have to open/cannot close the file A for language server B.

Greetings
David

-----Original Message-----
From: Alexis Murzeau <amubtdx at gmail.com> 
Sent: Samstag, 2. Mai 2020 18:40
To: David Schulz <David.Schulz at qt.io>
Cc: qt-creator at qt-project.org
Subject: [LSP] Use case of multiple active language servers per document

Hi David,

I saw as you said on gerrit, that document activation and deactivation is used when opening / closing a document and switching the active client for a document using the editor's toolbar icon.

I think this would be easier if when switching the active language server, a didClose request is sent for the previously active language server and a didOpen for the now active one.
This would avoid the requirement of keeping a file state per client and possibly take advantage of what state TextEditor keeps itself already.

So I guess there is a good reason for this, and I'm wondering of the use case behind this functionality of having multiple active language servers for one source file ?


Thanks :)

-- 
Alexis Murzeau
PGP: B7E6 0EBB 9293 7B06 BDBC  2787 E7BD 1904 F480 937F



More information about the Qt-creator mailing list