massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-go / package.json
index fa6d0b3b90aa8436d381a7713d78b27c5085267b..91cf319e23512b258ed9bfae53cdde22846ec9d0 100644 (file)
@@ -1,6 +1,6 @@
 {
   "name": "coc-go",
-  "version": "0.13.3",
+  "version": "v1.0.0",
   "description": "gopls extension for coc",
   "author": "Josa Gesell <josa@gesell.me>",
   "license": "MIT",
@@ -11,7 +11,7 @@
   },
   "engines": {
     "coc": "^0.0.80",
-    "node": ">=10"
+    "node": ">=12"
   },
   "keywords": [
     "coc.nvim",
                 },
                 "fieldalignment": {
                   "type": "boolean",
-                  "description": "find structs that would take less memory if their fields were sorted\nThis analyzer find structs that can be rearranged to take less memory, and provides\na suggested edit with the optimal order.\n**Disabled by default. Enable it by setting `\"analyses\": {\"fieldalignment\": true}`.**"
+                  "description": "find structs that would use less memory if their fields were sorted\nThis analyzer find structs that can be rearranged to use less memory, and provides\na suggested edit with the optimal order.\nNote that there are two different diagnostics reported. One checks struct size,\nand the other reports \"pointer bytes\" used. Pointer bytes is how many bytes of the\nobject that the garbage collector has to potentially scan for pointers, for example:\n\tstruct { uint32; string }\nhave 16 pointer bytes because the garbage collector has to scan up through the string's\ninner pointer.\n\tstruct { string; *uint32 }\nhas 24 pointer bytes because it has to scan further through the *uint32.\n\tstruct { string; uint32 }\nhas 8 because it can stop immediately after the string pointer.\n**Disabled by default. Enable it by setting `\"analyses\": {\"fieldalignment\": true}`.**"
                 },
                 "httpresponse": {
                   "type": "boolean",
                   "description": "detect impossible interface-to-interface type assertions\nThis checker flags type assertions v.(T) and corresponding type-switch cases\nin which the static type V of v is an interface that cannot possibly implement\nthe target interface T. This occurs when V and T contain methods with the same\nname but different signatures. Example:\n\tvar v interface {\n\t\tRead()\n\t}\n\t_ = v.(io.Reader)\nThe Read method in v has a different signature than the Read method in\nio.Reader, so this assertion cannot succeed.",
                   "default": true
                 },
+                "infertypeargs": {
+                  "type": "boolean",
+                  "description": "check for unnecessary type arguments in call expressions\nExplicit type arguments may be omitted from call expressions if they can be\ninferred from function arguments, or from other type arguments:\nfunc f[T any](T) {}\nfunc _() {\n\tf[string](\"foo\") // string could be inferred\n}",
+                  "default": true
+                },
                 "loopclosure": {
                   "type": "boolean",
                   "description": "check references to loop variables from within nested functions\nThis analyzer checks for references to loop variables from within a\nfunction literal inside the loop body. It checks only instances where\nthe function literal is called in a defer or go statement that is the\nlast statement in the loop body, as otherwise we would need whole\nprogram analysis.\nFor example:\n\tfor i, v := range s {\n\t\tgo func() {\n\t\t\tprintln(i, v) // not what you might expect\n\t\t}()\n\t}\nSee: https://golang.org/doc/go_faq.html#closures_and_goroutines",
                   "description": "check for useless comparisons between functions and nil\nA useless comparison is one like f == nil as opposed to f() == nil.",
                   "default": true
                 },
+                "nilness": {
+                  "type": "boolean",
+                  "description": "check for redundant or impossible nil comparisons\nThe nilness checker inspects the control-flow graph of each function in\na package and reports nil pointer dereferences, degenerate nil\npointers, and panics with nil values. A degenerate comparison is of the form\nx==nil or x!=nil where x is statically known to be nil or non-nil. These are\noften a mistake, especially in control flow related to errors. Panics with nil\nvalues are checked because they are not detectable by\n\tif r := recover(); r != nil {\nThis check reports conditions such as:\n\tif f == nil { // impossible condition (f is a function)\n\t}\nand:\n\tp := &v\n\t...\n\tif p != nil { // tautological condition\n\t}\nand:\n\tif p == nil {\n\t\tprint(*p) // nil dereference\n\t}\nand:\n\tif p == nil {\n\t\tpanic(p)\n\t}\n**Disabled by default. Enable it by setting `\"analyses\": {\"nilness\": true}`.**"
+                },
                 "printf": {
                   "type": "boolean",
                   "description": "check consistency of Printf format strings and arguments\nThe check applies to known functions (for example, those in package fmt)\nas well as any detected wrappers of known functions.\nA function that wants to avail itself of printf checking but is not\nfound by this analyzer's heuristics (for example, due to use of\ndynamic calls) can insert a bogus call:\n\tif false {\n\t\t_ = fmt.Sprintf(format, args...) // enable printf checking\n\t}\nThe -funcs flag specifies a comma-separated list of names of additional\nknown formatting functions or methods. If the name contains a period,\nit must denote a specific function using one of the following forms:\n\tdir/pkg.Function\n\tdir/pkg.Type.Method\n\t(*dir/pkg.Type).Method\nOtherwise the name is interpreted as a case-insensitive unqualified\nidentifier such as \"errorf\". Either way, if a listed name ends in f, the\nfunction is assumed to be Printf-like, taking a format string before the\nargument list. Otherwise it is assumed to be Print-like, taking a list\nof arguments with no format string.",
                   "description": "check for unused results of calls to some functions\nSome functions like fmt.Errorf return a result and have no side effects,\nso it is always a mistake to discard the result. This analyzer reports\ncalls to certain functions in which the result of the call is ignored.\nThe set of functions may be controlled using flags.",
                   "default": true
                 },
+                "unusedwrite": {
+                  "type": "boolean",
+                  "description": "checks for unused writes\nThe analyzer reports instances of writes to struct fields and\narrays that are never read. Specifically, when a struct object\nor an array is copied, its elements are copied implicitly by\nthe compiler, and any element write to this copy does nothing\nwith the original object.\nFor example:\n\ttype T struct { x int }\n\tfunc f(input []T) {\n\t\tfor i, v := range input {  // v is a copy\n\t\t\tv.x = i  // unused write to field x\n\t\t}\n\t}\nAnother example is about non-pointer receiver:\n\ttype T struct { x int }\n\tfunc (t T) f() {  // t is a copy\n\t\tt.x = i  // unused write to field x\n\t}\n**Disabled by default. Enable it by setting `\"analyses\": {\"unusedwrite\": true}`.**"
+                },
+                "useany": {
+                  "type": "boolean",
+                  "description": "check for constraints that could be simplified to \"any\"",
+                  "default": true
+                },
                 "fillreturns": {
                   "type": "boolean",
                   "description": "suggested fixes for \"wrong number of return values (want %d, got %d)\"\nThis checker provides suggested fixes for type errors of the\ntype \"wrong number of return values (want %d, got %d)\". For example:\n\tfunc m() (int, string, *bool, error) {\n\t\treturn\n\t}\nwill turn into\n\tfunc m() (int, string, *bool, error) {\n\t\treturn 0, \"\", nil, nil\n\t}\nThis functionality is similar to https://github.com/sqs/goreturns.",
                 },
                 "undeclaredname": {
                   "type": "boolean",
-                  "description": "suggested fixes for \"undeclared name: <>\"\nThis checker provides suggested fixes for type errors of the\ntype \"undeclared name: <>\". It will insert a new statement:\n\"<> := \".",
+                  "description": "suggested fixes for \"undeclared name: <>\"\nThis checker provides suggested fixes for type errors of the\ntype \"undeclared name: <>\". It will either insert a new statement,\nsuch as:\n\"<> := \"\nor a new function declaration, such as:\nfunc <>(inferred parameters) {\n\tpanic(\"implement me!\")\n}",
                   "default": true
                 },
                 "fillstruct": {
             },
             "codelenses": {
               "type": "object",
-              "description": "codelenses overrides the enabled/disabled state of code lenses. See the\n\"Code Lenses\" section of the\n[Settings page](https://github.com/golang/tools/blob/master/gopls/doc/settings.md)\nfor the list of supported lenses.\n\nExample Usage:\n\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",
+              "description": "codelenses overrides the enabled/disabled state of code lenses. See the\n\"Code Lenses\" section of the\n[Settings page](https://github.com/golang/tools/blob/master/gopls/doc/settings.md)\nfor the list of supported lenses.\n\nExample Usage:\n\n```json5\n\"gopls\": {\n...\n  \"codelenses\": {\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",
               "additionalProperties": false,
               "properties": {
                 "gc_details": {
               "default": "100ms",
               "description": "**This setting is for debugging purposes only.**\n\ncompletionBudget is the soft latency goal for completion requests. Most\nrequests finish in a couple milliseconds, but in some cases deep\ncompletions can take much longer. As we use up our budget we\ndynamically reduce the search scope to ensure we return timely\nresults. Zero means unlimited.\n"
             },
+            "diagnosticsDelay": {
+              "type": "string",
+              "default": "250ms",
+              "description": "**This is an advanced setting and should not be configured by most `gopls` users.**\n\ndiagnosticsDelay 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"
+            },
             "directoryFilters": {
               "type": "array",
               "items": {
                 "type": "string"
               },
-              "description": "directoryFilters can be used to exclude unwanted directories from the\nworkspace. By default, all directories are included. Filters are an\noperator, `+` to include and `-` to exclude, followed by a path prefix\nrelative to the workspace folder. They are evaluated in order, and\nthe last filter that applies to a path controls whether it is included.\nThe path prefix can be empty, so an initial `-` excludes everything.\n\nExamples:\nExclude node_modules: `-node_modules`\nInclude only project_a: `-` (exclude everything), `+project_a`\nInclude only project_a, but not node_modules inside it: `-`, `+project_a`, `-project_a/node_modules`\n"
+              "description": "directoryFilters can be used to exclude unwanted directories from the\nworkspace. By default, all directories are included. Filters are an\noperator, `+` to include and `-` to exclude, followed by a path prefix\nrelative to the workspace folder. They are evaluated in order, and\nthe last filter that applies to a path controls whether it is included.\nThe path prefix can be empty, so an initial `-` excludes everything.\n\nExamples:\n\nExclude node_modules: `-node_modules`\n\nInclude only project_a: `-` (exclude everything), `+project_a`\n\nInclude only project_a, but not node_modules inside it: `-`, `+project_a`, `-project_a/node_modules`\n"
             },
             "env": {
               "type": "object",
               "default": true,
               "description": "**This setting is experimental and may be deleted.**\n\nexpandWorkspaceToModule instructs `gopls` to adjust the scope of the\nworkspace to find the best available module root. `gopls` first looks for\na go.mod file in any parent directory of the workspace folder, expanding\nthe scope to that directory if it exists. If no viable parent directory is\nfound, gopls will check if there is exactly one child directory containing\na go.mod file, narrowing the scope to that directory if it exists.\n"
             },
-            "experimentalDiagnosticsDelay": {
-              "type": "string",
-              "default": "250ms",
-              "description": "**This setting is experimental and may be deleted.**\n\nexperimentalDiagnosticsDelay 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"
-            },
             "experimentalPackageCacheKey": {
               "type": "boolean",
               "default": true,
               "description": "**This setting is experimental and may be deleted.**\n\nexperimentalPackageCacheKey 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"
             },
+            "experimentalPostfixCompletions": {
+              "type": "boolean",
+              "default": true,
+              "description": "**This setting is experimental and may be deleted.**\n\nexperimentalPostfixCompletions enables artifical method snippets\nsuch as \"someSlice.sort!\".\n"
+            },
+            "experimentalTemplateSupport": {
+              "type": "boolean",
+              "default": false,
+              "description": "**This setting is experimental and may be deleted.**\n\nexperimentalTemplateSupport opts into the experimental support\nfor template files.\n"
+            },
+            "experimentalUseInvalidMetadata": {
+              "type": "boolean",
+              "default": false,
+              "description": "**This setting is experimental and may be deleted.**\n\nexperimentalUseInvalidMetadata enables gopls to fall back on outdated\npackage metadata to provide editor features if the go command fails to\nload packages for some reason (like an invalid go.mod file). This will\neventually be the default behavior, and this setting will be removed.\n"
+            },
+            "experimentalWatchedFileDelay": {
+              "type": "string",
+              "default": "0s",
+              "description": "**This setting is experimental and may be deleted.**\n\nexperimentalWatchedFileDelay controls the amount of time that gopls waits\nfor additional workspace/didChangeWatchedFiles notifications to arrive,\nbefore processing all such notifications in a single batch. This is\nintended for use by LSP clients that don't support their own batching of\nfile system notifications.\n\nThis option must be set to a valid duration string, for example `\"100ms\"`.\n"
+            },
             "experimentalWorkspaceModule": {
               "type": "boolean",
               "default": false,
               "default": "Fuzzy",
               "description": "**This is an advanced setting and should not be configured by most `gopls` users.**\n\nmatcher sets the algorithm that is used when calculating completion\ncandidates.\n\nMust be one of:\n\n* `\"CaseInsensitive\"`\n* `\"CaseSensitive\"`\n* `\"Fuzzy\"`\n"
             },
+            "memoryMode": {
+              "type": "string",
+              "enum": [
+                "DegradeClosed",
+                "Normal"
+              ],
+              "default": "Normal",
+              "description": "**This setting is experimental and may be deleted.**\n\nmemoryMode controls the tradeoff `gopls` makes between memory usage and\ncorrectness.\n\nValues other than `Normal` are untested and may break in surprising ways.\n\nMust be one of:\n\n* `\"DegradeClosed\"`: In DegradeClosed mode, `gopls` will collect less information about\npackages without open files. As a result, features like Find\nReferences and Rename will miss results in such packages.\n\n* `\"Normal\"`\n"
+            },
             "semanticTokens": {
               "type": "boolean",
               "default": false,
               "enum": [
                 "CaseInsensitive",
                 "CaseSensitive",
+                "FastFuzzy",
                 "Fuzzy"
               ],
               "default": "Fuzzy",
-              "description": "**This is an advanced setting and should not be configured by most `gopls` users.**\n\nsymbolMatcher sets the algorithm that is used when finding workspace symbols.\n\nMust be one of:\n\n* `\"CaseInsensitive\"`\n* `\"CaseSensitive\"`\n* `\"Fuzzy\"`\n"
+              "description": "**This is an advanced setting and should not be configured by most `gopls` users.**\n\nsymbolMatcher sets the algorithm that is used when finding workspace symbols.\n\nMust be one of:\n\n* `\"CaseInsensitive\"`\n* `\"CaseSensitive\"`\n* `\"FastFuzzy\"`\n* `\"Fuzzy\"`\n"
             },
             "symbolStyle": {
               "type": "string",
                 "Package"
               ],
               "default": "Dynamic",
-              "description": "**This is an advanced setting and should not be configured by most `gopls` users.**\n\nsymbolStyle controls how symbols are qualified in symbol responses.\n\nExample Usage:\n\n```json5\n\"gopls\": {\n...\n  \"symbolStyle\": \"dynamic\",\n...\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"
+              "description": "**This is an advanced setting and should not be configured by most `gopls` users.**\n\nsymbolStyle controls how symbols are qualified in symbol responses.\n\nExample Usage:\n\n```json5\n\"gopls\": {\n...\n  \"symbolStyle\": \"Dynamic\",\n...\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"
             },
             "usePlaceholders": {
               "type": "boolean",
     ]
   },
   "devDependencies": {
-    "@types/mocha": "^8.0.3",
-    "@types/node": "^14.11.1",
-    "@types/node-fetch": "^2.5.7",
-    "@types/tmp": "^0.2.0",
-    "@types/which": "^2.0.0",
-    "@typescript-eslint/eslint-plugin": "^4.1.1",
-    "@typescript-eslint/parser": "^4.1.1",
+    "@types/mocha": "^9.0.0",
+    "@types/node": "^16.11.6",
+    "@types/node-fetch": "^2.5.12",
+    "@types/tmp": "^0.2.2",
+    "@types/which": "^2.0.1",
+    "@typescript-eslint/eslint-plugin": "^5.3.0",
+    "@typescript-eslint/parser": "^5.3.0",
     "coc-dev-tools": "^0.1.0",
     "coc.nvim": "0.0.80",
-    "eslint": "^7.9.0",
+    "eslint": "^8.1.0",
     "eslint-config-josa-typescript": "^0.1.2",
-    "mocha": "^8.1.3",
+    "mocha": "^9.1.3",
     "rimraf": "^3.0.2",
     "tmp": "^0.2.1",
-    "ts-node": "^9.0.0",
-    "typescript": "~4.1.2"
+    "ts-node": "^10.4.0",
+    "typescript": "~4.4.4"
   },
   "dependencies": {
-    "node-fetch": "^2.6.1",
-    "tslib": "^2.0.0",
-    "vscode-languageserver-textdocument": "^1.0.1",
-    "vscode-uri": "^3.0.1",
+    "node-fetch": "^2.6.6",
+    "tslib": "^2.3.1",
+    "vscode-languageserver-textdocument": "^1.0.2",
+    "vscode-uri": "^3.0.2",
     "which": "^2.0.2"
   }
 }