summaryrefslogtreecommitdiff
path: root/cli/lsp/language_server.rs
AgeCommit message (Collapse)Author
2024-06-26refactor: move PackageJson to deno_config (#24348)David Sherret
2024-06-17feat(lsp): multi deno.json resolver scopes (#24206)Nayeem Rahman
2024-06-13perf(lsp): store settings in Arc (#24191)Nayeem Rahman
2024-06-12feat(lsp): respect editor indentation options (#24181)Nayeem Rahman
2024-06-11fix(lsp): don't sort workspace files (#24180)Nayeem Rahman
2024-06-11refactor(lsp): collect npm reqs by scope (#24172)Nayeem Rahman
2024-06-10feat(lsp): workspace jsr resolution (#24121)Nayeem Rahman
2024-06-05fix: better handling of npm resolution occurring on workers (#24094)David Sherret
Closes https://github.com/denoland/deno/issues/24063
2024-06-03refactor: don't share `reqwest::HttpClient` across tokio runtimes (#24092)David Sherret
This also fixes several issues where we weren't properly creating http clients with the user's settings.
2024-06-03fix(lsp): complete exports for import mapped jsr specifiers (#24054)Nayeem Rahman
2024-05-29perf(repl): don't walk workspace in repl language server (#24037)Nayeem Rahman
2024-05-29fix(lsp): don't discover deno.json in vendor dir (#24032)Nayeem Rahman
2024-05-28chore: set lockfile as having no content changes after write (#24023)David Sherret
Slight perf regression when updating deno_lockfile in https://github.com/denoland/deno/pull/23979
2024-05-29perf(lsp): lock out requests until init is complete (#23998)Nayeem Rahman
2024-05-28feat(vendor): support modifying remote files in vendor folder without ↵David Sherret
checksum errors (#23979) Includes: * https://github.com/denoland/deno_graph/pull/486 * https://github.com/denoland/deno_graph/pull/488 * https://github.com/denoland/deno_lockfile/pull/25 * https://github.com/denoland/deno_lockfile/pull/22 * https://github.com/denoland/deno_graph/pull/483 * https://github.com/denoland/deno_graph/pull/470
2024-05-23FUTURE: initial support for .npmrc file (#23560)Bartek Iwańczuk
This commit adds initial support for ".npmrc" files. Currently we only discover ".npmrc" files next to "package.json" files and discovering these files in user home dir is left for a follow up. This pass supports "_authToken" and "_auth" configuration for providing authentication. LSP support has been left for a follow up PR. Towards https://github.com/denoland/deno/issues/16105
2024-05-23refactor(lsp): determine file referrer for each document (#23867)Nayeem Rahman
2024-05-15perf(lsp): Cache semantic tokens for open documents (#23799)Nathan Whitaker
VScode will typically send a `textDocument/semanticTokens/full` request followed by `textDocument/semanticTokens/range`, and occassionally request semantic tokens even when we know nothing has changed. Semantic tokens also get refreshed on each change. Computing semantic tokens is relatively heavy in TSC, so we should avoid it as much as possible. Caches the semantic tokens for open documents, to avoid making TSC do unnecessary work. Results in a noticeable improvement in local benchmarking before: ``` Starting Deno benchmark -> Start benchmarking lsp - Simple Startup/Shutdown (10 runs, mean: 383ms) - Big Document/Several Edits (5 runs, mean: 1079ms) - Find/Replace (10 runs, mean: 59ms) - Code Lens (10 runs, mean: 440ms) - deco-cx/apps Multiple Edits + Navigation (5 runs, mean: 9921ms) <- End benchmarking lsp ``` after: ``` Starting Deno benchmark -> Start benchmarking lsp - Simple Startup/Shutdown (10 runs, mean: 395ms) - Big Document/Several Edits (5 runs, mean: 1024ms) - Find/Replace (10 runs, mean: 56ms) - Code Lens (10 runs, mean: 438ms) - deco-cx/apps Multiple Edits + Navigation (5 runs, mean: 8927ms) <- End benchmarking lsp ```
2024-05-13refactor(lsp): reuse CliGraphResolverOptions::sloppy_imports_resolver (#23764)Nayeem Rahman
2024-05-09refactor(lsp): unify caching into LspCache (#23746)Nayeem Rahman
2024-05-09fix(lsp): move sloppy import resolution from loader to resolver (#23751)Nathan Whitaker
Moves sloppy import resolution from the loader to the resolver. Also adds some test helper functions to make the lsp tests less verbose --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2024-05-08refactor(lsp): cleanup partially locking methods (#23723)Nayeem Rahman
2024-05-07refactor(lsp): reland move resolver fields to LspResolver (#23685)Nayeem Rahman
2024-05-06fix(lsp): Pass diagnostic codes to TSC as numbers (#23720)Nathan Whitaker
Fixes the `Debug Failure` errors described in https://github.com/denoland/deno/issues/23643#issuecomment-2094552765 . The issue here was that we were passing diagnostic codes as strings but TSC expects the codes to be numbers. This resulted in some quick fixes not working (as illustrated by the test added here which fails before this PR). The first commit is the actual fix. The rest are just test related.
2024-05-04fix(lsp): handle multiline semantic tokens (#23691)Nayeem Rahman
2024-05-03fix(lsp): always cache all npm packages (#23679)David Sherret
Closes #23659
2024-05-03refactor(lsp): cleanup cache and module registry update (#23620)Nayeem Rahman
2024-05-01Revert "refactor(lsp): move fields from Documents to LspResolver" (#23626)Divy Srivastava
This reverts commit 5cae3439912ad60eb2866f3d4372a5fe4d0de957. ![image](https://github.com/denoland/deno/assets/34997667/e68e40a1-7baf-453b-80d9-f8b6aae186c7) Caused a +3.3s regression in one of the LSP benchmarks at deno.land/benchmarks.
2024-04-30refactor(lsp): move fields from Documents to LspResolver (#23585)Nayeem Rahman
2024-04-27chore(lsp): remove ConfigSnapshot (#23579)Nayeem Rahman
2024-04-26refactor(lsp): unify resolver types into LspResolver (#23514)Nayeem Rahman
2024-04-22fix(lsp): remove Document::open_data on close (#23483)Nayeem Rahman
2024-04-22perf(lsp): Batch "$projectChanged" notification in with the next JS request ↵Nathan Whitaker
(#23451) The actual handling of `$projectChanged` is quick, but JS requests are not. The cleared caches only get repopulated on the next actual request, so just batch the change notification in with the next actual request. No significant difference in benchmarks on my machine, but this speeds up `did_change` handling and reduces our total number of JS requests (in addition to coalescing multiple JS change notifs into one).
2024-04-20perf(lsp): Pass code action trigger kind to TSC (#23466)Nathan Whitaker
2024-04-20perf(lsp): only store parsed sources for open documents (#23454)Nayeem Rahman
2024-04-19perf(lsp): cleanup document dependencies (#23426)Nayeem Rahman
2024-04-17perf(lsp): release unused documents (#23398)Nayeem Rahman
2024-04-17perf: v8 code cache (#23081)Igor Zinkovsky
This PR enables V8 code cache for ES modules and for `require` scripts through `op_eval_context`. Code cache artifacts are transparently stored and fetched using sqlite db and are passed to V8. `--no-code-cache` can be used to disable. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-04-15fix(lsp): ensure project version is incremented when config changes (#23366)David Sherret
I'm running into a node resolution bug in the lsp only and while tracking it down I noticed this one. Fixed by moving the project version out of `Documents`.
2024-04-12fix(inspector): don't panic if port is not free (#22745)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/22113 Closes https://github.com/denoland/deno/issues/23177 Closes https://github.com/denoland/deno/issues/22883 Closes https://github.com/denoland/deno/issues/22377
2024-04-10perf(lsp): Only evict caches on JS side when things actually change (#23293)Nathan Whitaker
Currently we evict a lot of the caches on the JS side of things on every request, namely script versions, script file names, and compiler settings (as of #23283, it's not quite every request but it's still unnecessarily often). This PR reports changes to the JS side, so that it can evict exactly the caches that it needs too. We might want to do some batching in the future so as not to do 1 request per change.
2024-04-10refactor(lsp): cleanup documents dependents calculation (#23295)Nayeem Rahman
2024-04-06refactor(lsp): remove DocumentInner (#23251)Nayeem Rahman
2024-04-05perf(lsp): use lockfile to reduce npm pkg resolution time (#23247)David Sherret
This functionality was broken. The series of events was: 1. Load the npm resolution from the lockfile. 2. Discover only a subset of the specifiers in the documents. 3. Clear the npm snapshot. 4. Redo npm resolution with the new specifiers (~500ms). What this now does: 1. Load the npm resolution from the lockfile. 2. Discover only a subset of the specifiers in the documents and take into account the specifiers from the lockfile. 3. Do not redo resolution (~1ms).
2024-04-05fix(lsp): respect DENO_FUTURE for BYONM config (#23207)Nayeem Rahman
2024-04-02fix(lsp): Remove client-facing format failure warning (#23196)Nathan Whitaker
Fixes #23163. The client-facing warning doesn't provide any value and is super annoying. We still emit a warning message on the server side for format errors, which should fulfill the same (less intrusive) purpose.
2024-04-02feat(lsp): respect nested deno.json for fmt and lint config (#23159)Nayeem Rahman
2024-03-31fix(lsp): don't apply preload limit to workspace walk (#23123)Nayeem Rahman
2024-03-27fix(lsp): use registry cache for completion search (#23094)Nayeem Rahman
2024-03-27fix(lsp): decoding percent-encoding(non-ASCII) file path correctly (#22582)Hajime-san