@yaegassy/coc-ty 0.1.0 → 0.1.2
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.
- package/README.md +7 -2
- package/lib/index.js +9 -2
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
**CocInstall**:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```vim
|
|
10
|
+
:CocInstall @yaegassy/coc-ty
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
> scoped packages
|
|
10
14
|
|
|
11
15
|
**e.g. vim-plug**:
|
|
12
16
|
|
|
@@ -17,10 +21,11 @@ Plug 'yaegassy/coc-ty', {'do': 'yarn install --frozen-lockfile'}
|
|
|
17
21
|
## Configuration options
|
|
18
22
|
|
|
19
23
|
- `ty.enable`: Enable coc-ty extension, default: `true`
|
|
24
|
+
- `ty.disableDiagnostics`: Disable diagnostics only, default: `false`
|
|
20
25
|
- `ty.disableHover`: Disable hover only, default: `false`
|
|
21
26
|
- `ty.disableInlayHint`: Disable inlayHint only, default: `false`
|
|
22
27
|
- `ty.disableTypeDefinition`: Disable typeDefinition only, default: `false`
|
|
23
|
-
- `ty.useDetectTyCommand`: Automatically detects the ty command in the execution environment and sets `
|
|
28
|
+
- `ty.useDetectTyCommand`: Automatically detects the ty command in the execution environment and sets `ty.path`, default: `true`
|
|
24
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: `""`
|
|
25
30
|
- `ty.trace.server`: Traces the communication between coc.nvim and the ty language server, default: `"off"`
|
|
26
31
|
|
package/lib/index.js
CHANGED
|
@@ -308,8 +308,12 @@ function getLanguageClientDisabledFeatures() {
|
|
|
308
308
|
r.push("hover");
|
|
309
309
|
if (getConfigDisableInlayHintHover())
|
|
310
310
|
r.push("inlayHint");
|
|
311
|
-
if (
|
|
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
|
|
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.
|
|
3
|
+
"version": "0.1.2",
|
|
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,
|