Document how to actually use the server with an editor - #984
Open
ZayanKhan-12 wants to merge 2 commits into
Open
ZayanKhan-12 wants to merge 2 commits into
ZayanKhan-12 wants to merge 2 commits into
Conversation
The README explains how to install the package and how to develop the server against VS Code, but never how to connect it to an editor as a user. Two people asked for exactly that on palantir#194 and neither got an answer: "Can we add some documentation on enabling it for some IDEs? I assumed that installing the pip package would somehow register it for vscode to catch", and later "there's so little support on actually using it". Adds a section covering that the package installs a pyls executable, that clients launch it over stdin and stdout, that --tcp exists for clients that cannot spawn it, that -v is the first thing to reach for when an editor reports nothing, and which LSP clients people commonly use per editor. Both invocations were checked against a running server. It also records, where someone looking for an extension will actually find it, that there is no official VS Code extension and no plans for one, and that the vscode-client directory is not that extension: it is unpublished, and it exists to develop the server rather than to use it. That question has been asked repeatedly since 2017. Refs palantir#194 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The example was fenced with markdown backticks inside an .rst file, so docutils reported "Possible title underline, too short for the title" and rendered the snippet as ordinary text. README.rst is the long_description in setup.py, so this affects the PyPI page as well as GitHub. With this the README parses without warnings. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Member
|
Thanks for your interest in palantir/python-language-server, @ZayanKhan-12! Before we can accept your pull request, you need to sign our contributor license agreement - just visit https://cla.palantir.com/ and follow the instructions. Once you sign, I'll automatically update this pull request. |
ZayanKhan-12
pushed a commit
to ZayanKhan-12/python-language-server
that referenced
this pull request
Sep 16, 2026
…tion Document how to actually use the server with an editor (refs palantir#194) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Refs #194.
This does not publish a VS Code extension, and is not a fix for #194 as titled. @ccordoba12 already answered that in 2020 — "we don't have plans to create a VSCode extension for this server because most contributors use it for other editors and IDEs" — and that is not a contributor's call to overturn.
What the thread does contain is a request that was never answered. @munael, right after that reply:
and @Stercator in 2022:
They are right that the docs do not cover this. The README explains how to
pip installthe package, and has a "Develop against VS Code" section for developing the server, but nothing anywhere says how a user connects it to an editor. #834, "Unable to run pyls with VS code", is still open.Changes
A "Using the server with an editor" section covering:
pylsexecutable; clients launch it and talk over stdin/stdout.--tcp --host --portexists for clients that cannot spawn the process.pyls -vis the first thing to reach for when an editor reports no results.pyls.plugins.pydocstyle.enabledare sent by the client, so they live in the client's config — which is not obvious and is the shape of several existing issues.I verified both invocations rather than transcribing them from the argument parser:
pylsover stdio andpyls --tcp --port 8799each complete an LSPinitializehandshake and advertise the full capability set.And a short Visual Studio Code subsection, placed where someone hunting for an extension will actually find it, recording that there is no official extension and no plans for one, linking your answer in #194. It also states plainly that
vscode-client/is not that extension — it is unpublished, it is version0.0.1under an inherited publisher, and its own README says it launches a separate VS Code instance because it conflicts with other Python extensions. Someone arriving at that directory expecting a usable extension currently has no way to know this.The second commit is separate and independent. The pydocstyle example in the Configuration section is fenced with markdown backticks inside an
.rstfile, so docutils reportsPossible title underline, too short for the titleand renders the snippet as ordinary text.README.rstis thelong_descriptioninsetup.py, so that affects the PyPI page too. I noticed it because I link to that section. With it fixed, README.rst parses with no warnings at all. Drop that commit if you would rather keep this PR to one thing.Verification
README.rstparses clean under docutils (no warnings, versus one before), and renders to HTML without error.setup.pystill reads it aslong_description.pytest test/: 12 failed, 99 passed, 8 skipped — identical to the baseline ondevelop, as expected for a docs-only change. Those 12 are pre-existing and track linter versions that moved on since 2020.pycodestyleclean,pyflakesunchanged (one pre-existing_utils.pywarning).Notes
I have deliberately not named a specific third-party VS Code extension. Recommending one by name in your README implies a level of endorsement and review I am not in a position to offer, and those extensions come and go; describing the mechanism seemed more honest and more durable. Happy to add one if you have a preference.
If you would rather close #194 outright given the 2020 answer, this section at least means the next person to ask finds the answer in the README instead of eight years of issue history.
CLAUDE.mdlives in my other open PR (#982) and is not duplicated here.