mabasic
mabasic•5mo ago

How to get source code from packages used in Helix editor?

I am using Helix with Deno LSP and everything works except go to definition for third party packages. I just get an empty buffer. In node I can the source code which I can then navigate. Anyone knows a solution for this?
4 Replies
mabasic
mabasicOP•5mo ago
It is not a deal breaker, but after fighting with typescript types, sometimes it is just easier to see the source code in the editor, rather than having to search for the code on the internet and try to match the versions ...
Deno AI Helper
Deno AI Helper•5mo ago
I wasn't able to find the answer to your question in the official Deno documentation. However, based on your message, it seems like you're experiencing an issue with the "go to definition" feature for third-party packages in the Helix editor when using Deno LSP. While I can't provide a solution based on the Deno documentation, I can suggest that you ensure that the third-party packages are properly imported and that their types are available for the Deno LSP to reference. In some cases, if the types are not available or if the package does not include type definitions, the "go to definition" feature may not work as expected. Please note that this advice is not based on the Deno documentation, and I recommend double-checking the accuracy of this advice. Additionally, you may want to consult the Helix editor's documentation or community for more specific guidance on how it handles "go to definition" for third-party packages when integrated with Deno LSP.
holmdunc
holmdunc•4mo ago
I think this is because the file it tries to navigate to is not a real file on disk. It's some kind of virtual file whose path starts with the deno: scheme
Mrcool 🇵🇸
The workaround is to vendor dependencies when you need this, add vendor: true to deno.json