summaryrefslogtreecommitdiff
path: root/cli/lsp/language_server.rs
AgeCommit message (Collapse)Author
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
2024-03-26refactor(lsp): unify config file data into ConfigTree (#23032)Nayeem Rahman
2024-03-21feat(lint): `deno lint --fix` and lsp quick fixes (#22615)David Sherret
Adds a `--fix` option to deno lint. This currently doesn't work for basically any rules, but we can add them over time to deno lint.
2024-03-21refactor(lsp): factor out workspace walk from resolver update (#22937)Nayeem Rahman
2024-03-11chore: enable clippy unused_async rule (#22834)David Sherret
2024-03-06feat(unstable/pm): support npm packages in 'deno add' (#22715)Nayeem Rahman
2024-03-06fix(node): improve cjs tracking (#22673)David Sherret
We were missing saying that a file is CJS when some Deno code imported from the node_modules directory at runtime.
2024-03-04feat(lsp): include registry url in jsr import hover text (#22676)Nayeem Rahman
2024-03-01fix(lsp): output more information on error (#22665)David Sherret
2024-03-01fix(lsp): regression - caching in lsp broken when config with imports has ↵David Sherret
comments (#22666) Caused by https://github.com/denoland/deno/pull/22553 Closes #22664
2024-02-29feat(lsp): jsr specifier completions (#22612)Nayeem Rahman
2024-02-27feat(publish): discover jsr.json and jsr.jsonc files (#22587)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/22491
2024-02-24fix(lsp): import map expansion (#22553)David Sherret
2024-02-20perf(jsr): fast check cache and lazy fast check graph (#22485)David Sherret
2024-02-14feat(lsp): jsr support with cache probing (#22418)Nayeem Rahman
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-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-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-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-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-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-02feat(lsp): cache jsxImportSource automatically (#21687)Nayeem Rahman
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>