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

What's the proper way to submit language server settings? #971

Open
aivarannamaa opened this issue Dec 30, 2024 · 1 comment
Open

What's the proper way to submit language server settings? #971

aivarannamaa opened this issue Dec 30, 2024 · 1 comment
Labels
awaiting response waiting for more info from the author - will eventually close if they don't respond config issues relating to config (pyproject.toml, pyrightconfig.json, LSP config or vscode extension) language server

Comments

@aivarannamaa
Copy link

This is not a bug-report but help request.

I'm in the process of adding LSP support for Thonny IDE. As it is a Python-only IDE, my only server will be basedpyright.

I've been able to get it mostly working, but I'm stuck in setting language server settings. In particular, I want to use different typeshed directory in MicroPython mode.

I tried setting initializationOptions in the params of initialize method like this:

...
   "initializationOptions":{
      "basedpyright":{
         "analysis":{
            "diagnosticMode":"openFilesOnly",
            "typeshedPaths":[
               "/absolute/path/to/my/typeshed"
            ]
         }
      }
   }
...

but it doesn't look like the new typeshed is being taken into account. The same typeshed directory does work when specified via stubPath in pyrightconfig.json.

I also tried sending the same settings via workspace/didChangeConfiguration but this didn't help either.

I tried intecepting the communication between Helix and basedpyright. The initialize message sent from Helix didn't look much different from mine, but unfortunately I couldn't see the rest of the message flow. Probably my interception script had some flows.

What should I check next? Are there some client capabilities, which are required for making initializationOptions work? Or some specific flow of messages?

@KotlinIsland KotlinIsland added language server config issues relating to config (pyproject.toml, pyrightconfig.json, LSP config or vscode extension) needs investigation awaiting verification by a maintainer that the issue is valid labels Dec 30, 2024
@DetachHead
Copy link
Owner

i think those settings can only be sent via workspace/didChangeConfiguration, not initialize

@DetachHead DetachHead added awaiting response waiting for more info from the author - will eventually close if they don't respond and removed needs investigation awaiting verification by a maintainer that the issue is valid labels Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response waiting for more info from the author - will eventually close if they don't respond config issues relating to config (pyproject.toml, pyrightconfig.json, LSP config or vscode extension) language server
Projects
None yet
Development

No branches or pull requests

3 participants