Skip to content

Failed to run lsp-goto-type-definition and lsp-goto-implementation. #97

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

Open
hongyi-zhao opened this issue Oct 17, 2021 · 1 comment · May be fixed by #645
Open

Failed to run lsp-goto-type-definition and lsp-goto-implementation. #97

hongyi-zhao opened this issue Oct 17, 2021 · 1 comment · May be fixed by #645
Labels
enhancement New feature or request

Comments

@hongyi-zhao
Copy link

hongyi-zhao commented Oct 17, 2021

I test the python-lsp-server with the following python code snippet:

import numpy as np
from numpy import pi, sin

a = np.array([1], dtype=bool)
if np.invert(a) == ~a:
    print('ok')

I put the point at the following position of the above code snippet (denoted by |):

if np.in|vert(a) == ~a:

Then I do the following testings:

M-x lsp-goto-type-definition failed with the following message:

if: The connected server(s) does not support method textDocument/typeDefinition.
To find out what capabilities support your server use ‘M-x lsp-describe-session’
and expand the capabilities section

M-x lsp-goto-implementation failed with the following message:

if: The connected server(s) does not support method textDocument/implementation.
To find out what capabilities support your server use ‘M-x lsp-describe-session’
and expand the capabilities section

I would like to see information similar to that provided by pycharm, as shown below:

image
image

Any hints for this problem?

Regards,
HZ

@smheidrich
Copy link

smheidrich commented May 11, 2025

As the error message says, these are just not yet implemented. The currently implemented capabilities are:

"codeActionProvider": True,
"codeLensProvider": {
"resolveProvider": False, # We may need to make this configurable
},
"completionProvider": {
"resolveProvider": True, # We could know everything ahead of time, but this takes time to transfer
"triggerCharacters": ["."],
},
"documentFormattingProvider": True,
"documentHighlightProvider": True,
"documentRangeFormattingProvider": True,
"documentSymbolProvider": True,
"definitionProvider": True,
"executeCommandProvider": {
"commands": flatten(self._hook("pylsp_commands"))
},
"hoverProvider": True,
"referencesProvider": True,
"renameProvider": True,
"foldingRangeProvider": True,
"signatureHelpProvider": {"triggerCharacters": ["(", ",", "="]},
"textDocumentSync": {
"change": lsp.TextDocumentSyncKind.INCREMENTAL,
"save": {
"includeText": True,
},
"openClose": True,
},
"notebookDocumentSync": {
"notebookSelector": [{"cells": [{"language": "python"}]}]
},
"workspace": {
"workspaceFolders": {"supported": True, "changeNotifications": True}
},
"experimental": merge(self._hook("pylsp_experimental_capabilities")),

This issue can be left open as a feature request for these IMO.

@ccordoba12 ccordoba12 added the enhancement New feature or request label May 12, 2025
@Hoblovski Hoblovski linked a pull request May 13, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants