summaryrefslogtreecommitdiff
path: root/cli/lsp/language_server.rs
AgeCommit message (Collapse)Author
2023-09-30refactor(npm): create `cli::npm::managed` module (#20740)David Sherret
Creates the `cli::npm::managed` module and starts moving more functionality into it.
2023-09-29refactor(cli): make `CliNpmResolver` a trait (#20732)David Sherret
This makes `CliNpmResolver` a trait. The terminology used is: - **managed** - Deno manages the node_modules folder and does an auto-install (ex. `ManagedCliNpmResolver`) - **byonm** - "Bring your own node_modules" (ex. `ByonmCliNpmResolver`, which is in this PR, but unimplemented at the moment) Part of #18967
2023-09-28refactor(ext/node): remove dependency on deno_npm and deno_semver (#20718)David Sherret
This is required from BYONM (bring your own node_modules). Part of #18967
2023-09-27fix(lsp): allow query strings for "deno:/status.md" (#20697)Nayeem Rahman
2023-09-26chore(lsp): bump tower-lsp to 0.20.0 (#20693)Nayeem Rahman
2023-09-26feat(lsp): support more vscode built-in settings (#20679)Nayeem Rahman
2023-09-24feat(lsp): cache all dependencies quick fix (#20665)Nayeem Rahman
2023-09-24fix(lsp): resolve remote import maps (#20651)Nayeem Rahman
2023-09-24refactor(lsp): implement "deno.cacheOnSave" server-side (#20632)Nayeem Rahman
2023-09-21refactor(lsp): store language sections in WorkspaceSettings (#20593)Nayeem Rahman
When sending configuration requests to the client, reads `javascript` and `typescript` sections in addition to `deno`. The LSP's initialization options now accepts `javascript` and `typescript` namespaces.
2023-09-18refactor(lsp): cleanup document preload (#20520)Nayeem Rahman
2023-09-18fix(lsp): pass quote preference to tsc (#20547)Nayeem Rahman
2023-09-16feat(lsp): include source in auto import completion label (#20523)Nayeem Rahman
2023-09-13feat(lsp): WorkspaceSettings::disablePaths (#20475)Nayeem Rahman
2023-09-10fix(lsp): always enable semantic tokens responses (#20440)Nayeem Rahman
2023-09-09fix(lsp): respect configured exclusions for testing APIs (#20427)Nayeem Rahman
LSP testing APIs now obey the various file inclusion settings: - Modules shown in the text explorer now respect the `exclude`, `test.exclude` and `test.include` fields in `deno.json`, as well as `deno.enablePaths` in VSCode settings. - Modules with testing code lens now respect the `"exclude"`, `test.exclude` and `test.include` fields in `deno.json`. Code lens already respects `deno.enablePaths`.
2023-09-09Reland "refactor(lsp): clean up "enablePaths" handling (#20388)" (#20423)Nayeem Rahman
2023-09-08Revert "refactor(lsp): clean up "enablePaths" handling (#20388)" (#20419)Nayeem Rahman
This reverts commit 4a11603c76b13ecf92ce3141ec317a42ae9f8d1d.
2023-09-08refactor(lsp): clean up "enablePaths" handling (#20388)Nayeem Rahman
Previously we pre-computed enabled paths into `Config::enabled_paths`, and had to keep updating it. Now we determine enabled paths directly from `Config::settings` on demand as a single source of truth. Removes `Config::root_uri`. If `InitializeParams::rootUri` is given, and it doesn't correspond to a folder in `InitializeParams::workspaceFolders`, prepend it to `Config::workspace_folders` as a mocked folder. Includes groundwork for https://github.com/denoland/vscode_deno/issues/908. In a minor version cycle or two we can fix that in vscode_deno, and it won't break for Deno versions post this patch due to the corrected deserialization logic for `enablePaths`.
2023-09-05feat(lsp): provide the deno.cache command server-side (#20111)sigmaSd
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2023-09-02fix(lsp): properly handle disabled configuration requests (#20358)Nayeem Rahman
Fixes #19802. Properly respect when clients do not have the `workspace/configuration` capability, a.k.a. when an editor cannot provide scoped settings on request from the LSP. - Fix one spot where we weren't checking for the capability before sending this request. - For `enablePaths`, fall back to the settings passed in the initialization options in more cases. - Respect the `workspace/configuration` capability in the test harness client. See: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_configuration.
2023-09-01Reland "feat(lsp): enable via config file detection (#20334)" (#20349)Nayeem Rahman
2023-09-01Revert "feat(lsp): enable via config file detection (#20334)" (#20347)Bartek Iwańczuk
This reverts commit c0dcf6a3571ee04b4826c52d1329804e7c2b02c4. CC @nayeemrmn
2023-08-31feat(lsp): enable via config file detection (#20334)Nayeem Rahman
With https://github.com/denoland/vscode_deno/pull/902 for https://github.com/denoland/vscode_deno/issues/880. For multi-folder workspaces, note that this only scans the first one and applies the result to all. That means users would have to still have to specify `"deno.enable": true/false` for their secondary folders if the preference is different for those.
2023-08-29fix(lsp): recreate npm search cache when cache path changes (#20327)David Sherret
2023-08-29feat(lsp): npm specifier completions (#20121)Nayeem Rahman
2023-08-26chore: update to Rust 1.72 (#20258)林炳权
<!-- Before submitting a PR, please read https://deno.com/manual/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> As the title. --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-08-26feat(lsp): update imports on file rename (#20245)Nayeem Rahman
Closes https://github.com/denoland/vscode_deno/issues/410.
2023-08-23fix(ext/web): add stream tests to detect v8slice split bug (#20253)Matt Mastracci
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-08-17fix(lsp): pass fmt options to completion requests (#20184)Nayeem Rahman
Fixes https://github.com/denoland/vscode_deno/issues/856.
2023-08-08refactor(cli): move `snapshot_from_lockfile` function to `deno_npm` (#20024)Yusuke Tanaka
This commit moves `snapshot_from_lockfile` function to [deno_npm crate](https://github.com/denoland/deno_npm). This allows this function to be called outside Deno CLI (in particular, Deno Deploy).
2023-08-08refactor: use deno_cache_dir crate (#20092)David Sherret
Uses https://github.com/denoland/deno_cache/pull/26
2023-08-06feat(unstable): rename `deno_modules` to `vendor` (#20065)David Sherret
Renames the unstable `deno_modules` directory and corresponding settings to `vendor` after feedback. Also causes the vendoring of the `node_modules` directory which can be disabled via `--node-modules-dir=false` or `"nodeModulesDir": false`.
2023-08-02feat(unstable/lsp): support navigating to deno_modules folder (#20030)David Sherret
Closes #20015 Closes https://github.com/denoland/vscode_deno/issues/850 (only for deno_modules, but I don't think this will be possible for the global cache)
2023-08-02fix: make "suggest.autoImports" to switch completions from external modules ↵Kyoh
(#19845)
2023-08-02feat(unstable): optional `deno_modules` directory (#19977)David Sherret
Closes #15633
2023-07-26fix(lsp): handle import mapped `node:` specifier (#19956)David Sherret
Closes https://github.com/denoland/vscode_deno/issues/805
2023-07-21fix(lsp): handle watched files events from symlinked config files (#19898)David Sherret
Related to https://github.com/denoland/vscode_deno/issues/784
2023-07-20fix(lsp): auto-discover deno.json in more cases (#19894)David Sherret
We weren't auto-discovering the deno.json in two cases: 1. A project that didn't have a deno.json and just added one. 2. After a syntax error in the deno.json. This now rediscovers it in both these cases. Closes https://github.com/denoland/vscode_deno/issues/867
2023-07-20perf(lsp): format in a blocking task (#19883)David Sherret
2023-07-10refactor(lsp): move config file related code to config.rs (#19790)David Sherret
Will make #19788 easier.
2023-07-08refactor: abstract away file system to be buried inside HttpCache (#19760)David Sherret
This improves the HttpCache to make it being stored on the file system an implementation detail.
2023-07-03feat(lsp): support import maps in quick fix and auto-imports (#19692)David Sherret
Closes https://github.com/denoland/vscode_deno/issues/849 Closes #15330 Closes #10951 Closes #13623
2023-07-02feat(lsp): basic support of auto-imports for npm specifiers (#19675)David Sherret
Closes #19625 Closes https://github.com/denoland/vscode_deno/issues/857
2023-07-02Reland "fix(cli): don't store blob and data urls in the module cache" (#18581)Nayeem Rahman
Relands #18261 now that https://github.com/lucacasonato/esbuild_deno_loader/pull/54 is landed and used by fresh. Fixes #18260.
2023-06-26chore: fix typos (#19572)Martin Fischer
2023-06-13fix(lsp): update import map config when deno.json changes (#19476)David Sherret
Half of #19468
2023-06-10chore(tests): test_util - Add `PathRef` (#19450)David Sherret
This adds a new `PathRef` struct to test_util for making it easier to work with paths in test code. I'm going to expand on this more in the future.
2023-06-08refactor(compile): store the npm snapshot in the eszip (#19343)David Sherret
2023-06-06perf(cli): conditionally load typescript declaration files (#19392)David Sherret
Closes #18583