-
-
Notifications
You must be signed in to change notification settings - Fork 199
How to set configurations to client? #201
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
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@TypeFox Any update here? There is no documentation provided on how to do this, and without such documentation it is impossible to use this project with Python language servers among others. |
Oh thank god I finally figured it out (by spending some hours inspecting the innards of new MonacoLanguageClient({
name: "Your Name",
clientOptions: {
documentSelector: [{ pattern: "**" }],
middleware: {
workspace: {
configuration: (params, token, configuration) => {
return [{ foo: "bar" }];
},
},
},
},
connectionProvider: {
get: (errorHandler, closeHandler) =>
Promise.resolve(
createConnection(connection, errorHandler, closeHandler)
),
},
}) (I won't guarantee the other stuff in that code will work for you, I had to hack a bunch of other things as well. But the middleware key should be correct. Of course you must adjust the actual content of the LSP configuration to taste.) The relevant part of |
For anyone wondering how to actually use this project, you can refer to a complete working example integrating with backend language servers for Python, Ruby, Bash, Go, Rust, and 19 other languages. |
Hello @raxod502. What is the middleware key are you referring to? Is it the name of the language server? Or is it something else? |
By "middleware key" I simply meant the data that appears immediately after |
In Riju, I see that you are using Microsoft's python language server. Is the binary available somewhere? Also, what steps did you take to configure it. It would be helpful for my use case to use a standalone server written in a single language rather than a patchwork of different libraries and extensions. |
I suggest referring to the code. |
I am running Microsoft's python language server on a separate machine and want to connect with the monaco editor. And as per language server documentation I need to pass I am using below config for creating MonacoLanguageClient instance.
Its always sending blank setting to language server. Is there anyway to send custom setting to language server? |
I can't speak for the didChangeConfiguration message, Riju (linked above) has support for setting the initializationOptions in the initialize method (key |
@itthought did you ever have any success populating the settings payload? @raxod502 it looks like Riju was taken down, did you perhaps rename it? |
Unfortunately, that's not what happened. Please see https://intuitiveexplanations.com/tech/replit/ for the details. |
Is there a way to send client config settings to a language client, e.g pyls?
I read the example from #32, where a simple example was provided. However the vscode api changed, in fact the provided example does not work.
I tried to adapt the example to the changed api, but my config is not send to
pyls
.Is there any minimal working example for this?
The text was updated successfully, but these errors were encountered: