summaryrefslogtreecommitdiff
path: root/cli/lsp/language_server.rs
AgeCommit message (Collapse)Author
2024-11-19feat(fmt): support SQL (#26750)João Baptista
This commit adds support for .sql files in "deno fmt" subcommand. Closes: https://github.com/denoland/deno/issues/25024 --------- Signed-off-by: m4rc3l05 <15786310+M4RC3L05@users.noreply.github.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-11-18fix(lsp): ignore editor indent settings if deno.json is present (#26912)Nayeem Rahman
2024-11-16feat(task): support object notation, remove support for JSDocs (#26886)Bartek Iwańczuk
This commit changes three aspects of `deno task`: 1. Tasks can now be written using object notation like so: ```jsonc { "tasks": { "foo": "deno run foo.js", "bar": { "command": "deno run bar.js" } } ``` 2. Support for comments for tasks is now removed. Comments above tasks will no longer be printed when running `deno task`. 3. Tasks written using object notation can have "description" field that replaces support for comments above tasks: ```jsonc { "tasks": { "bar": { "description": "This is a bar task" "command": "deno run bar.js" } } ``` ``` $ deno task Available tasks: - bar // This is a bar task deno run bar.js ``` Pulled most of the changes from https://github.com/denoland/deno/pull/26467 to support "dependencies" in tasks. Additionally some cleanup was performed to make code easier to read. --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2024-11-15feat(lsp): auto-imports with @deno-types directives (#26821)Nayeem Rahman
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-11-13feat(node): stabilize detecting if CJS via `"type": "commonjs"` in a ↵David Sherret
package.json (#26439) This will respect `"type": "commonjs"` in a package.json to determine if `.js`/`.jsx`/`.ts`/.tsx` files are CJS or ESM. If the file is found to be ESM it will be loaded as ESM though.
2024-11-06feat(lsp): auto-import completions from byonm dependencies (#26680)Nayeem Rahman
2024-11-04perf(lsp): don't walk coverage directory (#26715)Nayeem Rahman
2024-11-01fix: improved support for cjs and cts modules (#26558)David Sherret
* cts support * better cjs/cts type checking * deno compile cjs/cts support * More efficient detect cjs (going towards stabilization) * Determination of whether .js, .ts, .jsx, or .tsx is cjs or esm is only done after loading * Support `import x = require(...);` Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-31fix(lsp): include unstable features from editor settings (#26655)Nayeem Rahman
2024-10-21feat(lsp): interactive inlay hints (#26382)Nayeem Rahman
2024-10-16Reland feat(lsp): deno/didRefreshDenoConfigurationTree notifications (#26325)Nayeem Rahman
2024-10-16Revert "feat(lsp): "deno/didRefreshDenoConfigurationTree" notificatio… ↵Bartek Iwańczuk
(#26320) …ns (#26215)" This reverts commit 06778e4e9b0a856ac39cc01f0813e6076eb150d6 because benchmarks are failing on `main`.
2024-10-16feat(lsp): "deno/didRefreshDenoConfigurationTree" notifications (#26215)Nayeem Rahman
2024-10-07fix(lsp): exclude missing import quick fixes with bad resolutions (#26025)Nayeem Rahman
2024-10-02feat(byonm): support `deno run npm:<package>` when package is not in ↵David Sherret
package.json (#25981) Closes https://github.com/denoland/deno/issues/25905
2024-10-01feat(lsp): quick fix for @deno-types="npm:@types/*" (#25954)Nayeem Rahman
2024-09-28refactor: use deno_path_util (#25918)David Sherret
2024-09-26fix(doc): surface graph errors as warnings (#25888)David Sherret
2024-09-26feat: add `--allow-import` flag (#25469)Bartek Iwańczuk
This replaces `--allow-net` for import permissions and makes the security sandbox stricter by also checking permissions for statically analyzable imports. By default, this has a value of `--allow-import=deno.land:443,jsr.io:443,esm.sh:443,raw.githubusercontent.com:443,gist.githubusercontent.com:443`, but that can be overridden by providing a different set of hosts. Additionally, when no value is provided, import permissions are inferred from the CLI arguments so the following works because `fresh.deno.dev:443` will be added to the list of allowed imports: ```ts deno run -A -r https://fresh.deno.dev ``` --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2024-09-25fix(check): properly surface dependency errors in types file of js file (#25860)David Sherret
We weren't surfacing dependency errors in types files of js files.
2024-09-23feat(fmt): stabilize CSS, HTML and YAML formatters (#25753)Bartek Iwańczuk
This commits stabilizes CSS, HTML and YAML formatters in `deno fmt`. It is no longer required to use either of these flags: - `--unstable-css` - `--unstable-html` - `--unstable-yaml` Or these `unstable` options in the config file: - `fmt-css` - `fmt-html` - `html-yaml`
2024-09-18feat: suggest `deno install --entrypoint` instead of `deno cache` (#25228)Asher Gomez
Hides `deno cache` from `--help` output. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-18feat: default to TS for file extension and support ext flag in more ↵Leo Kettmeir
scenarios (#25472) Closes #11220 Currently does lint, fmt, and repl
2024-09-18fix: do not panic running invalid file specifier (#25530)Yazan AbdAl-Rahman
Co-authored-by: Bedis Nbiba <bedisnbiba@gmail.com>
2024-09-17fix(lsp): properly resolve jsxImportSource for caching (#25688)Nayeem Rahman
2024-09-11feat(lsp): unstable setting as list (#25552)Nayeem Rahman
2024-09-04BREAKING(config): make supported compilerOptions an allow list (#25432)David Sherret
Deno has been using a deny list, which doesn't make sense because a lot of these options don't even work. Closes #25363
2024-08-30BREAKING: `DENO_FUTURE=1` by default, or welcome to Deno 2.0 (#25213)Bartek Iwańczuk
This commit effectively turns Deno into Deno 2.0. This is done by forcing `DENO_FUTURE=1` env var, that was available in the past few months to try Deno 2 changes. This commit contains several breaking changes scheduled for Deno 2: - all deprecated JavaScript APIs are not available any more, mostly `Deno.*` APIs - `window` global is removed - FFI, WebGPU and FS APIs are now stable and don't require `--unstable-*` flags - import assertions are no longer supported - "bring your own node modules" is enabled by default This is the first commit in a series that are scheduled before the Deno 2 release. Follow up work is tracked in https://github.com/denoland/deno/issues/25241. --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com> Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-08-28fix(lsp): panic on url_to_uri() (#25238)Nayeem Rahman
2024-08-24refactor(lsp): changes for lsp_types 0.97.0 (#25169)Nayeem Rahman
2024-08-21fix(lsp): resolve jsx import source with types mode (#25064)Nayeem Rahman
2024-08-21chore(lsp): use 'install' terminology for jsr and npm packages (#25119)Nayeem Rahman
2024-08-15refactor: `version` module exports a single const struct (#25014)Bartek Iwańczuk
This commit rewrites the internal `version` module that exported various information about the current executable. Instead of exporting several consts, we are now exporting a single const structure that contains all the necessary information. This is the first step towards cleaning up how we use this information and should allow us to use SUI to be able to patch this information in already produced binary making it easier to cut new releases. --------- Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-08-14feat(fmt): support HTML, Svelte, Vue, Astro and Angular (#25019)Pig Fang
This commit adds capability to format HTML, Svelte, Vue, Astro and Angular files. "--unstable-html" is required to format HTML files, and "--unstable-component" flag is needed to format other formats. These can also be specified in the config file. Close #25015
2024-08-12fix(lsp): directly use file referrer when loading document (#24997)Nayeem Rahman
2024-08-09feat(fmt): support CSS, SCSS, Sass and Less (#24870)Pig Fang
This PR integrates [Malva](https://github.com/g-plane/malva) into `deno fmt`, which introduces the ability to format CSS, SCSS, Sass and Less files. On Linux x64 6.10, this PR increases about 800KiB: ``` ❯ wc -c target/release/deno 125168728 target/release/deno ❯ wc -c target/release/deno 124349456 target/release/deno ```
2024-08-02feat(unstable/fmt): move yaml formatting behind unstable flag (#24848)David Sherret
This moves YAML formatting behind an unstable flag for Deno 1.46. This will make it opt-in to start and then we can remove the flag to make it on by default in version of Deno after that. This can be specified by doing `deno fmt --unstable-yaml` or by specifying the following in a deno.json file: ```json { "unstable": ["fmt-yaml"] } ```
2024-07-23fix(upgrade): do not error if config in cwd invalid (#24689)David Sherret
``` > deno upgrade error: Unsupported lockfile version 'invalid'. Try upgrading Deno or recreating the lockfile. V:\scratch > V:\deno\target\debug\deno upgrade Looking up latest version Local deno version 1.45.3 is the most recent release ``` Closes #24517 Closes #20729
2024-07-23refactor: update to use deno_package_json (#24688)David Sherret
This is in preparation for extracting out node resolution code from ext/node (which is something I'm going to do gradually over time). Uses https://github.com/denoland/deno_package_json
2024-07-23fix(lsp): rewrite import for 'infer return type' action (#24685)Nayeem Rahman
2024-07-19fix(lsp): hang when caching failed (#24651)David Sherret
Closes #24600
2024-07-19refactor: update to deno_config 0.25 (#24645)David Sherret
- Gets rid of WorkspaceMemberContext. It's now `Workspace` and `WorkspaceDirectory` - Uses the workspace cache in the lsp * https://github.com/denoland/deno_config/pull/95 * https://github.com/denoland/deno_config/pull/96
2024-07-18fix(lsp): support npm workspaces and fix some resolution issues (#24627)David Sherret
Makes the lsp use the same code as the rest of the cli.
2024-07-08fix(workspace): better cli file argument handling (#24447)David Sherret
Closes https://github.com/denoland/deno/issues/24422
2024-07-05refactor: move `FileCollector` to deno_config (#24433)David Sherret
2024-07-04feat: npm workspace and better Deno workspace support (#24334)David Sherret
Adds much better support for the unstable Deno workspaces as well as support for npm workspaces. npm workspaces is still lacking in that we only install packages into the root node_modules folder. We'll make it smarter over time in order for it to figure out when to add node_modules folders within packages. This includes a breaking change in config file resolution where we stop searching for config files on the first found package.json unless it's in a workspace. For the previous behaviour, the root deno.json needs to be updated to be a workspace by adding `"workspace": ["./path-to-pkg-json-folder-goes-here"]`. See details in https://github.com/denoland/deno_config/pull/66 Closes #24340 Closes #24159 Closes #24161 Closes #22020 Closes #18546 Closes #16106 Closes #24160
2024-07-03fix(lsp): correct scope attribution for injected @types/node (#24404)Nayeem Rahman
2024-06-28refactor(cli): Create wrapper around `deno_lockfile::Lockfile` (#24366)Nathan Whitaker
As suggested in https://github.com/denoland/deno/pull/24355#discussion_r1657875422. I wasn't able to hide the mutex stuff as much as I'd like (ended up just adding an escape hatch `inner()` method that locks the inner mutex), because you can't return references to the inner fields through a mutex. This is mostly motivated by the frozen lockfile changes
2024-06-28fix(lsp): don't use global cache paths for scope allocation (#24353)Nayeem Rahman
2024-06-26feat(lsp): ts language service scopes (#24345)Nayeem Rahman