@yaegassy/coc-ty 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +2 -1
  2. package/lib/index.js +12 -5
  3. package/package.json +19 -6
package/README.md CHANGED
@@ -21,10 +21,11 @@ Plug 'yaegassy/coc-ty', {'do': 'yarn install --frozen-lockfile'}
21
21
  ## Configuration options
22
22
 
23
23
  - `ty.enable`: Enable coc-ty extension, default: `true`
24
+ - `ty.disableDiagnostics`: Disable diagnostics only, default: `false`
24
25
  - `ty.disableHover`: Disable hover only, default: `false`
25
26
  - `ty.disableInlayHint`: Disable inlayHint only, default: `false`
26
27
  - `ty.disableTypeDefinition`: Disable typeDefinition only, default: `false`
27
- - `ty.useDetectTyCommand`: Automatically detects the ty command in the execution environment and sets `tf.path`, default: `true`
28
+ - `ty.useDetectTyCommand`: Automatically detects the ty command in the execution environment and sets `ty.path`, default: `true`
28
29
  - `ty.binaryPath`: Custom path for the `ty` binary. If no value is set, the `ty` command will be detected from the runtime environment, , default: `""`
29
30
  - `ty.trace.server`: Traces the communication between coc.nvim and the ty language server, default: `"off"`
30
31
 
package/lib/index.js CHANGED
@@ -284,10 +284,10 @@ function convertFromWorkspaceConfigToInitializationOptions() {
284
284
  settings: {
285
285
  path: settings.get("path"),
286
286
  interpreter: settings.get("interpreter"),
287
- importStrategy: settings.get(`importStrategy`) ?? "fromEnvironment",
287
+ importStrategy: settings.get("importStrategy") ?? "fromEnvironment",
288
+ diagnosticMode: settings.get("diagnosticMode") ?? "openFilesOnly",
288
289
  logLevel: settings.get("logLevel"),
289
- logFile: settings.get("logFile"),
290
- experimental: settings.get("experimental")
290
+ logFile: settings.get("logFile")
291
291
  }
292
292
  };
293
293
  return initializationOptions;
@@ -308,8 +308,12 @@ function getLanguageClientDisabledFeatures() {
308
308
  r.push("hover");
309
309
  if (getConfigDisableInlayHintHover())
310
310
  r.push("inlayHint");
311
- if (getConfigDisableTypeDefinitionHover())
311
+ if (getConfigDisableTypeDefinition())
312
312
  r.push("typeDefinition");
313
+ if (getConfigDisableDiagnostics()) {
314
+ r.push("diagnostics");
315
+ r.push("pullDiagnostic");
316
+ }
313
317
  return r;
314
318
  }
315
319
  function getConfigDisableHover() {
@@ -318,9 +322,12 @@ function getConfigDisableHover() {
318
322
  function getConfigDisableInlayHintHover() {
319
323
  return import_coc.workspace.getConfiguration("ty").get("disableInlayHint", false);
320
324
  }
321
- function getConfigDisableTypeDefinitionHover() {
325
+ function getConfigDisableTypeDefinition() {
322
326
  return import_coc.workspace.getConfiguration("ty").get("disableTypeDefinition", false);
323
327
  }
328
+ function getConfigDisableDiagnostics() {
329
+ return import_coc.workspace.getConfiguration("ty").get("disableDiagnostics", false);
330
+ }
324
331
 
325
332
  // src/commands/restart.ts
326
333
  var import_coc2 = require("coc.nvim");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaegassy/coc-ty",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "coc.nvim extension with support for the ty type checker and language server.",
5
5
  "author": "yaegassy <yosstools@gmail.com>",
6
6
  "license": "MIT",
@@ -80,6 +80,11 @@
80
80
  "default": true,
81
81
  "description": "Enable coc-ty extension"
82
82
  },
83
+ "ty.disableDiagnostics": {
84
+ "type": "boolean",
85
+ "default": false,
86
+ "description": "Disable diagnostics only."
87
+ },
83
88
  "ty.disableHover": {
84
89
  "type": "boolean",
85
90
  "default": false,
@@ -114,11 +119,19 @@
114
119
  },
115
120
  "type": "array"
116
121
  },
117
- "ty.experimental.completions.enable": {
118
- "default": false,
119
- "markdownDescription": "Whether to enable completions.",
120
- "scope": "window",
121
- "type": "boolean"
122
+ "ty.diagnosticMode": {
123
+ "default": "openFilesOnly",
124
+ "markdownDescription": "Analysis scope for showing diagnostics.",
125
+ "enum": [
126
+ "openFilesOnly",
127
+ "workspace"
128
+ ],
129
+ "enumDescriptions": [
130
+ "Analyzes and reports errors on only open files.",
131
+ "Analyzes and reports errors on all files in the workspace."
132
+ ],
133
+ "scope": "resource",
134
+ "type": "string"
122
135
  },
123
136
  "ty.importStrategy": {
124
137
  "default": "fromEnvironment",