summaryrefslogtreecommitdiff
path: root/cli/lsp
AgeCommit message (Collapse)Author
2024-02-12feat(lsp): jsr support first pass (#22382)Nayeem Rahman
This implementation heavily depends on there being a lockfile, meaning JSR specifiers will always diagnose as uncached unless it's there. In practice this affects cases where a `deno.json` isn't being used. Our NPM specifier support isn't subject to this. The reason for this is that the version constraint solving code is currently buried in `deno_graph` and not usable from the LSP, so the only way to reuse that logic is the solved-version map in the lockfile's `packages.specifiers`.
2024-02-10fix(lsp): complete npm specifier versions correctly (#22332)Nayeem Rahman
2024-02-09fix: upgrade to deno_ast 0.33 (#22341)David Sherret
* Uses diagnostics from deno_ast * Real fix for https://github.com/denoland/deno/pull/22310 * Moves `deno lint --json` code here * Upgrades swc Closes #22117 Closes #22109 Closes #21927 Closes #20993
2024-02-06fix(lsp): disable no-cache diagnostics for jsr specifiers (#22284)Nayeem Rahman
2024-02-05refactor(cli): Add TestFailureDescription (#22267)Matt Mastracci
Extract zero-risk changes from #22226
2024-02-01refactor: load bytes in deno_graph (#22212)David Sherret
Upgrades deno_graph to 0.64 where deno_graph is now responsible for turning bytes into a string. This is in preparation for Wasm modules.
2024-01-30fix(lsp): don't normalize urls in cache command params (#22182)Nayeem Rahman
2024-01-28chore(lsp): rename client-side command invocations (#22140)Nayeem Rahman
2024-01-27Revert "refactor(cli): use new sanitizer for resources (#22125)" (#22153)Bartek Iwańczuk
2024-01-26refactor(cli): use new sanitizer for resources (#22125)Matt Mastracci
Step 1 of the Rustification of sanitizers, which unblocks the faster timers. This replaces the resource sanitizer with a Rust one, using the new APIs in deno_core.
2024-01-26feat(lsp): complete parameters as tab stops and placeholders (#22126)Nayeem Rahman
2024-01-25fix(lsp): disable experimentalDecorators by default (#22101)Bartek Iwańczuk
Follow up to https://github.com/denoland/deno/pull/22040. By mistake I forgot to disable "experimental decorators" in the LSP.
2024-01-23feat(lsp): include scope uri in "deno/didChangeDenoConfiguration" (#22002)Nayeem Rahman
2024-01-21fix(lsp): improved npm specifier to import map entry mapping (#22016)David Sherret
Upgrades to the latest deno_semver
2024-01-18fix(lsp): regression - formatting was broken on windows (#21972)David Sherret
~~Waiting on: https://github.com/denoland/deno_config/pull/31~~ Closes #21971 Closes https://github.com/denoland/vscode_deno/issues/1029
2024-01-17feat(lsp): send "deno/didChangeDenoConfiguration" on init (#21965)Nayeem Rahman
2024-01-15refactor: use globbing from deno_config (#21925)David Sherret
2024-01-14feat: remove conditional unstable type-checking (#21825)Bartek Iwańczuk
This commit removes conditional type-checking of unstable APIs. Before this commit `deno check` (or any other type-checking command and the LSP) would error out if there was an unstable API in the code, but not `--unstable` flag provided. This situation hinders DX and makes it harder to configure Deno. Failing during runtime unless `--unstable` flag is provided is enough in this case.
2024-01-11refactor(lsp): store project version on documents (#21892)Nayeem Rahman
2024-01-09fix: update deno_lint and swc (#21718)Bartek Iwańczuk
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-01-09fix(lsp): use a dedicated thread for the parent process checker (#21869)David Sherret
Ensures the Deno process is brought down even when the runtime gets hung up on something. Marvin found that the lsp was running without a parent vscode around so this is maybe/probably related.
2024-01-08perf: skip expanding exclude globs (#21817)David Sherret
We were calling `expand_glob` on our excludes, which is very expensive and unnecessary because we can pattern match while traversing instead. 1. Doesn't expand "exclude" globs. Instead pattern matches while walking the directory. 2. Splits up the "include" into base paths and applicable file patterns. This causes less pattern matching to occur because we're only pattern matching on patterns that might match and not ones in completely unrelated directories.
2024-01-05fix(lsp): show test code lens for template literal names (#21798)Nayeem Rahman
2024-01-03fix(lsp): support test code lens for Deno.test.{ignore,only}() (#21775)Nayeem Rahman
2024-01-02feat(lsp): cache jsxImportSource automatically (#21687)Nayeem Rahman
2024-01-01chore: update to Rust 1.75 (#21731)林炳权
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-12-28perf(lsp): use LanguageServiceHost::getProjectVersion() (#21719)Nayeem Rahman
2023-12-22feat(lsp): allow to connect V8 inspector (#21482)Bartek Iwańczuk
This commit adds a way to connect to the TS compiler host that is run as part of the "deno lsp" subcommand. This can be done by specifying "DENO_LSP_INSPECTOR" variable. --------- Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2023-12-15fix(lsp): apply specifier rewrite to CompletionItem::text_edit (#21564)Nayeem Rahman
2023-12-12perf(lsp): use null types instead of stub modules (#21541)Nayeem Rahman
2023-12-12perf(lsp): collect counts and durations of all requests (#21540)Bartek Iwańczuk
In addition to collecting details per-request metrics of the last 3000 request this commit adds aggregate metrics for all requests.
2023-12-11perf(lsp): instrument all ops with performance marks (#21536)Bartek Iwańczuk
Adds performance measurements for all ops used by the LSP. Also changes output of "Language server status" page to include more precise information. Current suspicion is that computing "script version" takes a long time for some users.
2023-12-11perf(lsp): simplify some of the startup code (#21538)Bartek Iwańczuk
Remove some dead code in "99_main_compiler.js". Eagerly start the LSP TSC host, it was adding some not needed complexity around the TSC thread code.
2023-12-08feat(lsp): debug log file (#21500)Nayeem Rahman
2023-12-08feat(lsp): provide quick fixes for specifiers that could be resolved ↵David Sherret
sloppily (#21506)
2023-12-07feat: add suggestions to module not found error messages for file urls (#21498)David Sherret
2023-12-07feat(unstable): ability to resolve specifiers with no extension, specifiers ↵David Sherret
for a directory, and TS files from JS extensions (#21464) Adds an `--unstable-sloppy-imports` flag which supports the following for `file:` specifiers: * Allows writing `./mod` in a specifier to do extension probing. - ex. `import { Example } from "./example"` instead of `import { Example } from "./example.ts"` * Allows writing `./routes` to do directory extension probing for files like `./routes/index.ts` * Allows writing `./mod.js` for *mod.ts* files. This functionality is **NOT RECOMMENDED** for general use with Deno: 1. It's not as optimal for perf: https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-2/ 1. It makes tooling in the ecosystem more complex in order to have to understand this. 1. The "Deno way" is to be explicit about what you're doing. It's better in the long run. 1. It doesn't work if published to the Deno registry because doing stuff like extension probing with remote specifiers would be incredibly slow. This is instead only recommended to help with migrating existing projects to Deno. For example, it's very useful for getting CJS projects written with import/export declaration working in Deno without modifying module specifiers and for supporting TS ESM projects written with `./mod.js` specifiers. This feature will output warnings to guide the user towards correcting their specifiers. Additionally, quick fixes are provided in the LSP to update these specifiers:
2023-12-03perf(lsp): check tsc request cancellation before execution (#21447)Nayeem Rahman
2023-12-03perf(lsp): fix redundant clones for ts responses (#21445)Nayeem Rahman
2023-12-03refactor: faster args for op_load in TSC (#21438)Bartek Iwańczuk
This commit changes the argument that "op_load" accepts, from a serde struct to "&str". This should equal to a slightly better performance.
2023-12-02chore: update std to 0.208.0 (#21318)Asher Gomez
Re-attempt at #21284. I was more thorough this time. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-12-01perf(lsp): better op performance logging (#21423)Bartek Iwańczuk
2023-12-01feat(compile): support discovering modules for more dynamic arguments (#21381)David Sherret
This PR causes Deno to include more files in the graph based on how a template literal looks that's provided to a dynamic import: ```ts const file = await import(`./dir/${expr}`); ``` In this case, it will search the `dir` directory and descendant directories for any .js/jsx/etc modules and include them in the graph. To opt out of this behaviour, move the template literal to a separate line: ```ts const specifier = `./dir/${expr}` const file = await import(specifier); ```
2023-12-01refactor(lsp): log names (#21413)Bartek Iwańczuk
This commit changes LSP log names by prefixing them, we now have these prefixes: - `lsp.*` - requests coming from the client - `tsc.request.*` - requests coming from clients that are routed to TSC - `tsc.op.*` - ops called by the TS host - `tsc.host.*` - requests that call JavaScript runtime that runs TypeScript compiler host Additionall `Performance::mark` was split into `Performance::mark` and `Performance::mark_with_args` to reduce verbosity of code and logs.
2023-11-30perf(lsp): avoid redundant getNavigationTree() calls (#21396)Nayeem Rahman
2023-11-30perf(lsp): cancel ts requests on future drop (#21387)Nayeem Rahman
When an old request is obsoleted while the user is typing, the client will say so to the server and tower-lsp will drop the future associated with that request. This wires that up to the ts server by having any request's token be cancelled when the surrounding state is dropped.
2023-11-29perf(lsp): add performance marks for TSC requests (#21383)Bartek Iwańczuk
This should help us get a better picture where most of the time is spent (the TSC or the surrounding Rust code).
2023-11-24fix(lsp): handle byonm specifiers in jupyter notebooks (#21332)David Sherret
Part of https://github.com/denoland/deno/issues/21308
2023-11-22fix(lsp): force shutdown after a timeout (#21251)Nayeem Rahman