Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Document LS settings and options #678

Closed
esn89 opened this issue Feb 28, 2019 · 4 comments
Closed

Document LS settings and options #678

esn89 opened this issue Feb 28, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request tech debt
Milestone

Comments

@esn89
Copy link

esn89 commented Feb 28, 2019

Hi all,

I can't seem to find much documentation on this repo on how to enable diagnostics. What are the settings/configs we should be sending to the LS?

Things like linting for example, 2 lines between function definitions, unused imports, etc.

@MikhailArkhipov MikhailArkhipov self-assigned this Mar 1, 2019
@MikhailArkhipov
Copy link

Will add document when new LS is published

@MikhailArkhipov MikhailArkhipov added this to the March 2019.1 milestone Mar 1, 2019
@MikhailArkhipov MikhailArkhipov added enhancement New feature or request tech debt labels Mar 1, 2019
@esn89
Copy link
Author

esn89 commented Mar 2, 2019

Thanks a bunch @MikhailArkhipov , looking forward!

@MikhailArkhipov MikhailArkhipov changed the title Diagnostics output on the side Document LS settings and options Mar 6, 2019
jakebailey added a commit that referenced this issue Mar 20, 2019
For #720.
Fixes #608.
Fixes #678.

This is the first set of configuration cleanup changes. This is a backwards compatible change, and will work on the existing build of the extension.

A future PR will modify how searchPaths and get_search_paths.py work.
@esn89
Copy link
Author

esn89 commented Mar 20, 2019

Thanks for the PR. One thing that is still not clear to me is the:

Linting can be controlled via the user configuration. In VS Code, this is settings.json, but other clients would send this via workspace/didChangeConfiguration

If I have a configuration like this for Sublime Text as seen here, will I need to make a new json block INSIDE "interpreter:" like:

"workspace": {
    "didChangeConfiguration":  stuffhere
    }

Furthermore, the link for "A full list can be seen in the source code" gives a 404.
This one: https://github.com/Microsoft/python-language-server/blob/446cb262eb4250ce53dc21a03e92c7a7febb7f5c/src%5CAnalysis%5CImpl%5CDiagnostics%5CErrorCodes.cs

@jakebailey
Copy link
Member

That document was contributed; we don't really maintain it. I can only guess as to what the right way to do it is. workspace/didChangeConfiguration is a language server protocol method name, it is not a setting. It's a message that gets sent by the client to the server. You'd need to look at how the Sublime plugin allows you to send that (as there must be a way; that's how configuration works in LSP).

That link should have gone here: https://github.com/Microsoft/python-language-server/blob/master/src/Analysis/Ast/Impl/Diagnostics/ErrorCodes.cs

No idea why GitHub escaped the slashes, but I'll try to figure out a way to fix it.

jakebailey added a commit to jakebailey/python-language-server that referenced this issue Nov 1, 2019
For microsoft#720.
Fixes microsoft#608.
Fixes microsoft#678.

This is the first set of configuration cleanup changes. This is a backwards compatible change, and will work on the existing build of the extension.

A future PR will modify how searchPaths and get_search_paths.py work.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request tech debt
Projects
None yet
Development

No branches or pull requests

3 participants