How to use Language Server (LSP) with editors opened using IVSUIShell.CreateDocumentWindow

Sajith 11 Reputation points
2024-08-08T15:13:00.8066667+00:00

I have a Visual Studio extension that opens editors using IVSUIShell.CreateDocumentWindow.

I am now trying to use Language Server (LSP) for the editors from this extension -

https://learn.microsoft.com/en-us/visualstudio/extensibility/adding-an-lsp-extension?view=vs-2022

But on opening the editor, Language Client is not getting invoked. Is this because ContentType for the editor is not set? How to set ContentType for an editor opened using IVSUIShell.CreateDocumentWindow ?

Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
212 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.