Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support deno.json(c) files #521

Merged
merged 1 commit into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,11 @@ extension has the following configuration options:
- `deno.codeLens.testArgs`: Provides additional arguments that should be set
when invoking the Deno CLI test from a code lens. _array of strings, default
`[ "--allow-all" ]`_.
- `deno.config`: The file path to a `tsconfig.json` file. This is the equivalent
- `deno.config`: The file path to a configuration file. This is the equivalent
to using `--config` on the command line. The path can be either be relative to
the workspace, or an absolute path. _string, default `null`, examples:
`./tsconfig.json`, `/path/to/tsconfig.json`, `C:\path\to\tsconfig.json`_
the workspace, or an absolute path. It is recommended you name this file
either `deno.json` or `deno.jsonc`. _string, default `null`, examples:
`./deno.jsonc`, `/path/to/deno.jsonc`, `C:\path\to\deno.jsonc`_
- `deno.importMap`: The file path to an import map. This is the equivalent to
using `--import-map` on the command line.
[Import maps](https://deno.land/manual/linking_to_external_code/import_maps)
Expand Down
8 changes: 4 additions & 4 deletions client/src/shared_types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { ConfigurationScope } from "vscode";
*/
export interface Settings {
/** Specify an explicit path to the `deno` cache instead of using DENO_DIR
* or the OS default. */
* or the OS default. */
cache: string | null;
/** Settings related to code lens. */
codeLens: {
Expand All @@ -20,14 +20,14 @@ export interface Settings {
test: boolean;
testArgs: string[];
} | null;
/** A path to a `tsconfig.json` that should be applied. */
/** A path to a configuration file that should be applied. */
config: string | null;
/** Is the extension enabled or not. */
enable: boolean;
/** A path to an import map that should be applied. */
importMap: string | null;
/** A flag that enables additional internal debug information to be printed
* to the _Deno Language Server_ output. */
* to the _Deno Language Server_ output. */
internalDebug: boolean;
/** Determine if the extension should be providing linting diagnostics. */
lint: boolean;
Expand All @@ -44,7 +44,7 @@ export interface Settings {
} | null;
} | null;
/** Determine if the extension should be type checking against the unstable
* APIs. */
* APIs. */
unstable: boolean;
}

Expand Down
15 changes: 11 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@
"deno.config": {
"type": "string",
"default": null,
"markdownDescription": "The file path to a `tsconfig.json` file. This is the equivalent to using `--config` on the command line. The path can be either be relative to the workspace, or an absolute path.\n\n**Not recommended to be set globally.**",
"markdownDescription": "The file path to a configuration file. This is the equivalent to using `--config` on the command line. The path can be either be relative to the workspace, or an absolute path.\n\nIt is recommend you name it `deno.json` or `deno.jsonc`.\n\n**Not recommended to be set globally.**",
"scope": "window",
"examples": [
"./tsconfig.json",
"/path/to/tsconfig.json",
"C:\\path\\to\\tsconfig.json"
"./deno.jsonc",
"/path/to/deno.jsonc",
"C:\\path\\to\\deno.jsonc"
]
},
"deno.importMap": {
Expand Down Expand Up @@ -293,6 +293,13 @@
],
"url": "./schemas/import_map.schema.json"
},
{
"fileMatch": [
"deno.json",
"deno.jsonc"
],
"url": "https://raw.githubusercontent.com/denoland/deno/main/cli/schemas/config-file.v1.json"
},
{
"fileMatch": "deno-import-intellisense.json",
"url": "./schemas/deno-import-intellisense.schema.json"
Expand Down