Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-go / package.json
1 {
2   "name": "coc-go",
3   "version": "0.12.1",
4   "description": "gopls extension for coc",
5   "author": "Josa Gesell <josa@gesell.me>",
6   "license": "MIT",
7   "main": "lib/extension.js",
8   "repository": {
9     "type": "git",
10     "url": "https://github.com/josa42/coc-go.git"
11   },
12   "engines": {
13     "coc": "^0.0.73",
14     "node": ">=10"
15   },
16   "keywords": [
17     "coc.nvim",
18     "languageserver",
19     "gopls",
20     "go",
21     "golang",
22     "vim",
23     "neovim"
24   ],
25   "scripts": {
26     "test": "true || mocha --require ts-node/register '**/*.test.ts'",
27     "test:watch": "mocha --watch --watch-files '**/*.ts' --require ts-node/register '**/*.test.ts'",
28     "clean": "rimraf lib",
29     "build": "tsc -p tsconfig.json",
30     "build:watch": "tsc --watch -p tsconfig.json",
31     "prepare": "yarn clean && yarn build",
32     "link:add": "node ./scripts/link.js add",
33     "link:remove": "node ./scripts/link.js remove",
34     "update": "yarn run update:snippets && yarn run update:options && yarn run update:readme && yarn run update:readme",
35     "update:snippets": "./scripts/update-snippets.js",
36     "update:options": "./scripts/update-options.sh && node ./scripts/update-options-interface.js",
37     "update:commands": "./scripts/update-commands.js",
38     "update:readme": "./scripts/update-tables.sh",
39     "lint": "eslint . --ext .ts,.js",
40     "link": "coc-dev link",
41     "unlink": "coc-dev unlink"
42   },
43   "activationEvents": [
44     "onLanguage:go",
45     "onLanguage:gomod",
46     "onCommand:go.install.gomodifytags",
47     "onCommand:go.install.goplay",
48     "onCommand:go.install.gopls",
49     "onCommand:go.install.gotests",
50     "onCommand:go.install.impl",
51     "onCommand:go.install.tools",
52     "onCommand:go.version"
53   ],
54   "contributes": {
55     "rootPatterns": [
56       {
57         "filetype": "go",
58         "patterns": [
59           "go.mod"
60         ]
61       },
62       {
63         "filetype": "gomod",
64         "patterns": [
65           "go.mod"
66         ]
67       }
68     ],
69     "configuration": {
70       "type": "object",
71       "title": "gols",
72       "properties": {
73         "go.enable": {
74           "type": "boolean",
75           "default": true,
76           "description": "Enable Go extension"
77         },
78         "go.trace.server": {
79           "type": "string",
80           "default": "off",
81           "enum": [
82             "off",
83             "messages",
84             "verbose"
85           ],
86           "description": "Trace level of gopls"
87         },
88         "go.goplsPath": {
89           "type": "string",
90           "description": "Path to `gopls` bin (Change requires `:CocRestart`)"
91         },
92         "go.goplsArgs": {
93           "type": "array",
94           "items": {
95             "type": "string"
96           },
97           "description": "Arguments passed to `gopls` (Change requires `:CocRestart`)"
98         },
99         "go.goplsEnv": {
100           "type": "object",
101           "patternProperties": {
102             "^.+$": {
103               "type": "string"
104             }
105           },
106           "description": "ENV passed to `gopls` (Change requires `:CocRestart`)"
107         },
108         "go.goplsUseDaemon": {
109           "type": "boolean",
110           "default": true,
111           "description": "Run gopls as daemon"
112         },
113         "go.disable": {
114           "type": "object",
115           "description": "Disable gopls features",
116           "default": {},
117           "properties": {
118             "workspaceFolders": {
119               "type": "boolean",
120               "default": false,
121               "description": "Disable workspaceFolders feature (Change requires `:CocRestart`)"
122             },
123             "diagnostics": {
124               "type": "boolean",
125               "default": false,
126               "description": "Disable handle diagnostics (Change requires `:CocRestart`)"
127             },
128             "completion": {
129               "type": "boolean",
130               "default": false,
131               "description": "Disable completion feature (Change requires `:CocRestart`)"
132             }
133           }
134         },
135         "go.goplsOptions": {
136           "type": "object",
137           "description": "See `gopls` documentation: https://github.com/golang/tools/blob/master/gopls/doc/settings.md",
138           "properties": {
139             "buildFlags": {
140               "type": "array",
141               "items": {
142                 "type": "string"
143               },
144               "description": "buildFlags is the set of flags passed on to the build system when invoked.\nIt is applied to queries like `go list`, which is used when discovering files.\nThe most common use is to set `-tags`.\n"
145             },
146             "env": {
147               "type": "object",
148               "patternProperties": {
149                 ".+": {
150                   "type": "string"
151                 }
152               },
153               "description": "env adds environment variables to external commands run by `gopls`, most notably `go list`.\n"
154             },
155             "gofumpt": {
156               "type": "boolean",
157               "default": false,
158               "description": "gofumpt indicates if we should run gofumpt formatting.\n"
159             },
160             "hoverKind": {
161               "type": "string",
162               "enum": [
163                 "FullDocumentation",
164                 "NoDocumentation",
165                 "SingleLine",
166                 "Structured",
167                 "SynopsisDocumentation"
168               ],
169               "default": "FullDocumentation",
170               "description": "hoverKind controls the information that appears in the hover text.\nSingleLine and Structured are intended for use only by authors of editor plugins.\nMust be one of:\n\n * `\"FullDocumentation\"`\n * `\"NoDocumentation\"`\n * `\"SingleLine\"`\n * `\"Structured\"` is an experimental setting that returns a structured hover format.\nThis format separates the signature from the documentation, so that the client\ncan do more manipulation of these fields.\\\nThis should only be used by clients that support this behavior.\n\n * `\"SynopsisDocumentation\"`\n"
171             },
172             "linkTarget": {
173               "type": "string",
174               "default": "pkg.go.dev",
175               "description": "linkTarget controls where documentation links go.\nIt might be one of:\n\n* `\"godoc.org\"`\n* `\"pkg.go.dev\"`\n\nIf company chooses to use its own `godoc.org`, its address can be used as well.\n"
176             },
177             "local": {
178               "type": "string",
179               "default": "",
180               "description": "local is the equivalent of the `goimports -local` flag, which puts imports beginning with this string after 3rd-party packages.\nIt should be the prefix of the import path whose imports should be grouped separately.\n"
181             },
182             "usePlaceholders": {
183               "type": "boolean",
184               "default": false,
185               "description": "placeholders enables placeholders for function parameters or struct fields in completion responses.\n"
186             },
187             "analyses": {
188               "type": "object",
189               "description": "[EXPERIMENTAL] analyses specify analyses that the user would like to enable or disable.\nA map of the names of analysis passes that should be enabled/disabled.\nA full list of analyzers that gopls uses can be found [here](analyzers.md)\n\nExample Usage:\n```json5\n...\n\"analyses\": {\n  \"unreachable\": false, // Disable the unreachable analyzer.\n  \"unusedparams\": true  // Enable the unusedparams analyzer.\n}\n...\n```\n",
190               "additionalProperties": false,
191               "properties": {
192                 "asmdecl": {
193                   "type": "boolean",
194                   "default": true
195                 },
196                 "assign": {
197                   "type": "boolean",
198                   "default": true
199                 },
200                 "atomic": {
201                   "type": "boolean",
202                   "default": true
203                 },
204                 "atomicalign": {
205                   "type": "boolean",
206                   "default": true
207                 },
208                 "bools": {
209                   "type": "boolean",
210                   "default": true
211                 },
212                 "buildtag": {
213                   "type": "boolean",
214                   "default": true
215                 },
216                 "cgocall": {
217                   "type": "boolean",
218                   "default": true
219                 },
220                 "composites": {
221                   "type": "boolean",
222                   "default": true
223                 },
224                 "copylock": {
225                   "type": "boolean",
226                   "default": true
227                 },
228                 "errorsas": {
229                   "type": "boolean",
230                   "default": true
231                 },
232                 "httpresponse": {
233                   "type": "boolean",
234                   "default": true
235                 },
236                 "loopclosure": {
237                   "type": "boolean",
238                   "default": true
239                 },
240                 "lostcancel": {
241                   "type": "boolean",
242                   "default": true
243                 },
244                 "nilfunc": {
245                   "type": "boolean",
246                   "default": true
247                 },
248                 "printf": {
249                   "type": "boolean",
250                   "default": true
251                 },
252                 "shift": {
253                   "type": "boolean",
254                   "default": true
255                 },
256                 "stdmethods": {
257                   "type": "boolean",
258                   "default": true
259                 },
260                 "structtag": {
261                   "type": "boolean",
262                   "default": true
263                 },
264                 "tests": {
265                   "type": "boolean",
266                   "default": true
267                 },
268                 "unmarshal": {
269                   "type": "boolean",
270                   "default": true
271                 },
272                 "unreachable": {
273                   "type": "boolean",
274                   "default": true
275                 },
276                 "unsafeptr": {
277                   "type": "boolean",
278                   "default": true
279                 },
280                 "unusedresult": {
281                   "type": "boolean",
282                   "default": true
283                 },
284                 "deepequalerrors": {
285                   "type": "boolean",
286                   "default": true
287                 },
288                 "fillreturns": {
289                   "type": "boolean",
290                   "default": false
291                 },
292                 "nonewvars": {
293                   "type": "boolean",
294                   "default": false
295                 },
296                 "noresultvalues": {
297                   "type": "boolean",
298                   "default": true
299                 },
300                 "simplifycompositelit": {
301                   "type": "boolean",
302                   "default": true
303                 },
304                 "simplifyrange": {
305                   "type": "boolean",
306                   "default": true
307                 },
308                 "simplifyslice": {
309                   "type": "boolean",
310                   "default": true
311                 },
312                 "sortslice": {
313                   "type": "boolean",
314                   "default": true
315                 },
316                 "testinggoroutine": {
317                   "type": "boolean",
318                   "default": true
319                 },
320                 "undeclaredname": {
321                   "type": "boolean",
322                   "default": false
323                 },
324                 "unusedparams": {
325                   "type": "boolean",
326                   "default": false
327                 }
328               }
329             },
330             "annotations": {
331               "type": "object",
332               "patternProperties": {
333                 ".+": {
334                   "type": "boolean"
335                 }
336               },
337               "description": "[EXPERIMENTAL] annotations suppress various kinds of optimization diagnostics\nthat would be reported by the gc_details command.\n * noNilcheck suppresses display of nilchecks.\n * noEscape suppresses escape choices.\n * noInline suppresses inlining choices.\n * noBounds suppresses bounds checking diagnostics.\n"
338             },
339             "codelens": {
340               "type": "object",
341               "description": "[EXPERIMENTAL] codelens overrides the enabled/disabled state of code lenses. See the \"Code Lenses\"\nsection of settings.md for the list of supported lenses.\n\nExample Usage:\n```json5\n\"gopls\": {\n...\n  \"codelens\": {\n    \"generate\": false,  // Don't show the `go generate` lens.\n    \"gc_details\": true  // Show a code lens toggling the display of gc's choices.\n  }\n...\n}\n```\n",
342               "additionalProperties": false,
343               "properties": {
344                 "gc_details": {
345                   "type": "boolean",
346                   "default": false
347                 },
348                 "generate": {
349                   "type": "boolean",
350                   "default": true
351                 },
352                 "regenerate_cgo": {
353                   "type": "boolean",
354                   "default": true
355                 },
356                 "tidy": {
357                   "type": "boolean",
358                   "default": true
359                 },
360                 "upgrade_dependency": {
361                   "type": "boolean",
362                   "default": true
363                 },
364                 "vendor": {
365                   "type": "boolean",
366                   "default": true
367                 }
368               }
369             },
370             "completeUnimported": {
371               "type": "boolean",
372               "default": true,
373               "description": "[EXPERIMENTAL] completeUnimported enables completion for packages that you do not currently import.\n"
374             },
375             "completionDocumentation": {
376               "type": "boolean",
377               "default": true,
378               "description": "[EXPERIMENTAL] completionDocumentation enables documentation with completion results.\n"
379             },
380             "deepCompletion": {
381               "type": "boolean",
382               "default": true,
383               "description": "[EXPERIMENTAL] deepCompletion enables the ability to return completions from deep inside relevant entities, rather than just the locally accessible ones.\n\nConsider this example:\n\n```go\npackage main\n\nimport \"fmt\"\n\ntype wrapString struct {\n    str string\n}\n\nfunc main() {\n    x := wrapString{\"hello world\"}\n    fmt.Printf(<>)\n}\n```\n\nAt the location of the `<>` in this program, deep completion would suggest the result `x.str`.\n"
384             },
385             "expandWorkspaceToModule": {
386               "type": "boolean",
387               "default": true,
388               "description": "[EXPERIMENTAL] expandWorkspaceToModule instructs `gopls` to expand the scope of the workspace to include the\nmodules containing the workspace folders. Set this to false to avoid loading\nyour entire module. This is particularly useful for those working in a monorepo.\n"
389             },
390             "experimentalDiagnosticsDelay": {
391               "type": "string",
392               "default": "0s",
393               "description": "[EXPERIMENTAL] experimentalDiagnosticsDelay controls the amount of time that gopls waits\nafter the most recent file modification before computing deep diagnostics.\nSimple diagnostics (parsing and type-checking) are always run immediately\non recently modified packages.\n\nThis option must be set to a valid duration string, for example `\"250ms\"`.\n"
394             },
395             "experimentalPackageCacheKey": {
396               "type": "boolean",
397               "default": true,
398               "description": "[EXPERIMENTAL] experimentalPackageCacheKey controls whether to use a coarser cache key\nfor package type information to increase cache hits. This setting removes\nthe user's environment, build flags, and working directory from the cache\nkey, which should be a safe change as all relevant inputs into the type\nchecking pass are already hashed into the key. This is temporarily guarded\nby an experiment because caching behavior is subtle and difficult to\ncomprehensively test.\n"
399             },
400             "experimentalWorkspaceModule": {
401               "type": "boolean",
402               "default": false,
403               "description": "[EXPERIMENTAL] experimentalWorkspaceModule opts a user into the experimental support\nfor multi-module workspaces.\n"
404             },
405             "importShortcut": {
406               "type": "string",
407               "enum": [
408                 "Both",
409                 "Definition",
410                 "Link"
411               ],
412               "default": "Both",
413               "description": "[EXPERIMENTAL] importShortcut specifies whether import statements should link to\ndocumentation or go to definitions.\nMust be one of:\n\n * `\"Both\"`\n * `\"Definition\"`\n * `\"Link\"`\n"
414             },
415             "linksInHover": {
416               "type": "boolean",
417               "default": true,
418               "description": "[EXPERIMENTAL] linksInHover toggles the presence of links to documentation in hover.\n"
419             },
420             "matcher": {
421               "type": "string",
422               "enum": [
423                 "CaseInsensitive",
424                 "CaseSensitive",
425                 "Fuzzy"
426               ],
427               "default": "Fuzzy",
428               "description": "[EXPERIMENTAL] matcher sets the algorithm that is used when calculating completion candidates.\nMust be one of:\n\n * `\"CaseInsensitive\"`\n * `\"CaseSensitive\"`\n * `\"Fuzzy\"`\n"
429             },
430             "semanticTokens": {
431               "type": "boolean",
432               "default": false,
433               "description": "[EXPERIMENTAL] semanticTokens controls whether the LSP server will send\nsemantic tokens to the client.\n"
434             },
435             "staticcheck": {
436               "type": "boolean",
437               "default": false,
438               "description": "[EXPERIMENTAL] staticcheck enables additional analyses from staticcheck.io.\n"
439             },
440             "symbolMatcher": {
441               "type": "string",
442               "enum": [
443                 "CaseInsensitive",
444                 "CaseSensitive",
445                 "Fuzzy"
446               ],
447               "default": "Fuzzy",
448               "description": "[EXPERIMENTAL] symbolMatcher sets the algorithm that is used when finding workspace symbols.\nMust be one of:\n\n * `\"CaseInsensitive\"`\n * `\"CaseSensitive\"`\n * `\"Fuzzy\"`\n"
449             },
450             "symbolStyle": {
451               "type": "string",
452               "enum": [
453                 "Dynamic",
454                 "Full",
455                 "Package"
456               ],
457               "default": "Package",
458               "description": "[EXPERIMENTAL] symbolStyle controls how symbols are qualified in symbol responses.\n\nExample Usage:\n```json5\n\"gopls\": {\n...\n  \"symbolStyle\": \"dynamic\",\n...\n}\n```\nMust be one of:\n\n * `\"Dynamic\"` uses whichever qualifier results in the highest scoring\nmatch for the given symbol query. Here a \"qualifier\" is any \"/\" or \".\"\ndelimited suffix of the fully qualified symbol. i.e. \"to/pkg.Foo.Field\" or\njust \"Foo.Field\".\n\n * `\"Full\"` is fully qualified symbols, i.e.\n\"path/to/pkg.Foo.Field\".\n\n * `\"Package\"` is package qualified symbols i.e.\n\"pkg.Foo.Field\".\n"
459             },
460             "tempModfile": {
461               "type": "boolean",
462               "default": true,
463               "description": "[EXPERIMENTAL] tempModfile controls the use of the -modfile flag in Go 1.14.\n"
464             },
465             "verboseWorkDoneProgress": {
466               "type": "boolean",
467               "default": false,
468               "description": "[EXPERIMENTAL] verboseWorkDoneProgress controls whether the LSP server should send\nprogress reports for all work done outside the scope of an RPC.\n"
469             }
470           }
471         },
472         "go.tags": {
473           "type": "object",
474           "properties": {
475             "tags": {
476               "type": "string",
477               "default": "json",
478               "description": "Comma separated tags to be used by `go.tags.add` command"
479             },
480             "options": {
481               "type": "string",
482               "default": "json=omitempty",
483               "description": "Comma separated tag=options pairs to be used by `go.tags.add` command"
484             },
485             "transform": {
486               "type": "string",
487               "enum": [
488                 "snakecase",
489                 "camelcase"
490               ],
491               "default": "snakecase",
492               "description": "Transformation rule used by `go.tags.add` command to add tags"
493             },
494             "skipUnexported": {
495               "type": "boolean",
496               "default": false,
497               "description": "If true, skip unexported fields"
498             }
499           }
500         },
501         "go.tests": {
502           "type": "object",
503           "properties": {
504             "generateFlags": {
505               "type": "array",
506               "items": {
507                 "type": "string"
508               },
509               "default": [],
510               "description": "Additional command line flags to pass to `gotests` for generating tests."
511             }
512           }
513         },
514         "go.checkForUpdates": {
515           "description": "[EXPERIMENTAL] Check for gopls updates on start.",
516           "type": "string",
517           "default": "disabled",
518           "enum": [
519             "disabled",
520             "inform",
521             "ask",
522             "install"
523           ]
524         }
525       }
526     },
527     "commands": [
528       {
529         "title": "Generate interface stubs",
530         "category": "Go",
531         "command": "go.impl.cursor"
532       },
533       {
534         "title": "Install / update gomodifytags",
535         "category": "Go",
536         "command": "go.install.gomodifytags"
537       },
538       {
539         "title": "Install / update goplay",
540         "category": "Go",
541         "command": "go.install.goplay"
542       },
543       {
544         "title": "Install / update gopls",
545         "category": "Go",
546         "command": "go.install.gopls"
547       },
548       {
549         "title": "Install / update gotests",
550         "category": "Go",
551         "command": "go.install.gotests"
552       },
553       {
554         "title": "Install / update impl",
555         "category": "Go",
556         "command": "go.install.impl"
557       },
558       {
559         "title": "Install / update all tools",
560         "category": "Go",
561         "command": "go.install.tools"
562       },
563       {
564         "title": "Run on go playground",
565         "category": "Go",
566         "command": "go.playground"
567       },
568       {
569         "title": "Add tags to struct fields",
570         "category": "Go",
571         "command": "go.tags.add"
572       },
573       {
574         "title": "Add tags to struct field in current line",
575         "category": "Go",
576         "command": "go.tags.add.line"
577       },
578       {
579         "title": "Add tags to struct fields (prompt)",
580         "category": "Go",
581         "command": "go.tags.add.prompt"
582       },
583       {
584         "title": "Remove all tags from struct fields",
585         "category": "Go",
586         "command": "go.tags.clear"
587       },
588       {
589         "title": "Remove all tags from struct fields in current line",
590         "category": "Go",
591         "command": "go.tags.clear.line"
592       },
593       {
594         "title": "Remove tags from struct fields",
595         "category": "Go",
596         "command": "go.tags.remove"
597       },
598       {
599         "title": "Remove tags from struct field in current line",
600         "category": "Go",
601         "command": "go.tags.remove.line"
602       },
603       {
604         "title": "Remove tags from struct fields (prompt)",
605         "category": "Go",
606         "command": "go.tags.remove.prompt"
607       },
608       {
609         "title": "Generate unit tests for exported functions in file",
610         "category": "Go",
611         "command": "go.test.generate.exported"
612       },
613       {
614         "title": "Generate unit tests for file",
615         "category": "Go",
616         "command": "go.test.generate.file"
617       },
618       {
619         "title": "Generate unit tests for current function",
620         "category": "Go",
621         "command": "go.test.generate.function"
622       },
623       {
624         "title": "Toggle test file",
625         "category": "Go",
626         "command": "go.test.toggle"
627       },
628       {
629         "title": "Print extension version",
630         "category": "Go",
631         "command": "go.version"
632       }
633     ],
634     "snippets": [
635       {
636         "language": "go",
637         "path": "./snippets/go.json"
638       },
639       {
640         "language": "gomod",
641         "path": "./snippets/gomod.json"
642       }
643     ]
644   },
645   "devDependencies": {
646     "@types/mocha": "^8.0.3",
647     "@types/node": "^14.11.1",
648     "@types/node-fetch": "^2.5.7",
649     "@types/tmp": "^0.2.0",
650     "@types/which": "^1.3.2",
651     "@typescript-eslint/eslint-plugin": "^4.1.1",
652     "@typescript-eslint/parser": "^4.1.1",
653     "coc-dev-tools": "^0.1.0",
654     "coc.nvim": "0.0.79",
655     "eslint": "^7.9.0",
656     "eslint-config-josa-typescript": "^0.1.2",
657     "mocha": "^8.1.3",
658     "rimraf": "^3.0.2",
659     "tmp": "^0.2.1",
660     "ts-node": "^9.0.0",
661     "typescript": "~4.1.2"
662   },
663   "dependencies": {
664     "node-fetch": "^2.6.1",
665     "tslib": "^2.0.0",
666     "vscode-uri": "^2.1.2",
667     "which": "^2.0.2"
668   }
669 }