Replies: 2 comments
-
Goto definition is entirely server side. It's a very simple request that involves no optional features/capabilities. The only difference I can think of is that nvim might have a longer timeout than helix. The timeout in helix can be configured and defaults to a pretty slow 30s tough so that would surprise me. Most likely this is an upstream issue since there is really no way the client can mess up a textDocument/definition request. |
Beta Was this translation helpful? Give feedback.
-
Altough this does sound suspect but I doubt its causing this since the the other definition requests work |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
When using Pyright as LSP for python, command
gd
can redirect current buffer to the correct positions for modules and functions of numpy, torch, and some other packages, but fails for those of transformers. However, it would succeed if I jump to transformers package first and then go to definitions of some components in it. I guess this relates to the way of helix calling Pyright, because I could do the same using Neovim with Pyright except for its long loading time.Reproduction Steps
I use a python script as following.
Move cursor to

set_state
and then pressgd
, I gotGo back and move cursor to

Module
and then pressgd
, I gotGo back and move cursor to

GPT2Tokenizer
and thengd
, I gotIf I move cursor to

transformers
andgd
, I gotGo back and repeat step 3, I got

For the first time of performing step 3, Pyright could not return a valid result.
Helix log
~/.cache/helix/helix.log
Platform
macOS
Terminal Emulator
iterm2
Helix Version
helix 23.03 (3cf0372)
Beta Was this translation helpful? Give feedback.
All reactions