ide-python icon indicating copy to clipboard operation
ide-python copied to clipboard

Does this still support hyperclick for 'go to definition'?

Open jonboiser opened this issue 4 years ago • 7 comments

I'm wondering if this package provides support for hyperclick, since I've seen it mentioned in some older issues (https://github.com/atom-community/ide-python/issues/143) and ide-python is mentioned as definition-location-provider in the readme for atom-ide-definitions.

Nor do I see an implementation for a function like getSuggestionForWord as in the autocomplete-python package

Currently, I think I have all the packages to make this work:

  • atom-ide-definitions
  • atom-ide-base
  • atom-ide-hyperclick
  • ide-python

But I can only use the "go to definition" command from the command palette.

jonboiser avatar Jan 06 '21 00:01 jonboiser

Doesn't CTRL+Click work for you?

hyperclick

aminya avatar Jan 06 '21 01:01 aminya

I use CMD-click on mac, and that doesn't work. Also running atom-ide-hyperlick:confirm-cursor from the command palette doesn't work when I'm view Python code (on JS and Vue code, for which I have hyperclick providers, CMD+click still works).

Here are my installed packages if that's helpful:

Community Packages (41) /Users/jon/.atom/packages
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] (disabled)
├── [email protected] (disabled)
├── [email protected] (disabled)
├── [email protected] (disabled)
├── [email protected]
├── [email protected]
├── [email protected] (disabled)
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] (disabled)
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

jonboiser avatar Jan 06 '21 03:01 jonboiser

@UziTech any thoughts?

Oh, by the way, you have the lsp installed, right? @jonboiser

aminya avatar Jan 06 '21 03:01 aminya

Oh, by the way, you have the lsp installed, right?

Yes, it is installed globally on my system, but not necessarily in the virtualenvs I use for my projects, if that's relevant.

jonboiser avatar Jan 06 '21 03:01 jonboiser

I just updated my config for atom-ide-definitions, which seems to help

  "atom-ide-definitions":
    clickGrammarScopes: [
      "source.python"
      "text.html.vue"
      "source.js"
    ]

But it's not as performant as my experience with autocomplete-python (nearly instantaneous when clicking to definition). Here's a GIF that shows how slowly it goes. What isn't shown is that the MacOS spinner icon appears where the cursor is, above the blue screen of lines. After about 3-4 seconds the pointer turns into the hand, and then the symbol is clickable.

CleanShot 2021-01-05 at 19 18 18

jonboiser avatar Jan 06 '21 03:01 jonboiser

I just updated my config for atom-ide-definitions, which seems to help

Hmm. It should work without adding that, I need to check.

But it's not as performant as my experience with

We can diagnose the performance. The Python LSP is generally slow because it is written in Python. If there are Python LSPs written in a more performant language, we can add support for that.

aminya avatar Jan 06 '21 03:01 aminya

Is there a way to configure the definition provider? I notice that sometimes the definitions go very deep, like into the site_packages directory and into things like Django source code. Maybe it can be configured to not do such a deep search for definitions.

As a sanity check, I made a project with a simple python script and the jump-to-definition behavior is pretty good.

jonboiser avatar Jan 06 '21 03:01 jonboiser