denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
98k stars 5.39k forks source link

LSP: completions in deno.json #25959

Open marvinhagemeister opened 1 month ago

marvinhagemeister commented 1 month ago

The LSP should complete the latest package version of an npm: or jsr: specifier, similar to the built-in TSC server in package.json.

Deno:

Screenshot 2024-10-01 at 12 03 05 Screenshot 2024-10-01 at 12 03 21

Node:

Screenshot 2024-10-01 at 12 03 40
HasanAlrimawi commented 1 month ago

I have tried debugging this issue, and I can't find where completions for json files are generated or fetched neither in cli/lsp/langauge_server.rs nor cli/lsp/completions.rs while they can be found for Ts/js/Jsx/Mjs/Cjs/Tsx/Mts/Cts/Dts/Dmts/Dcts.

I think that completions for json files are made addressed in using js code more specifically in cli/tsc/00_typescript.js or 99_main_compiler.js. Any helping insights?