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

[ST4] gopls: LSP not showing all completions provided by language server #1228

Open
TerminalFi opened this issue Aug 3, 2020 · 33 comments
Open
Labels
sublime issue Issues related to shortcomings or bugs in the ST API

Comments

@TerminalFi
Copy link
Contributor

TerminalFi commented Aug 3, 2020

LSP is failing to provide a full completion list even though gopls provides the full list from the initial communication.

  • macOS 11.0 (20A5323l) | gopls@master and gopls@latest
  • Git | Latest st4000-exploration
  1. Create a new project with a file that contains the following
import (
	"net/http"
)

func main() {
}
  1. Inside of main() type the following http. and you'll receive with only 1-2 items.
  2. If you then delete the . and retype it, you'll receive the entire list of items.

Behavior

image

Expected

2020-08-03_15-16-19 (1)

Log

Log contents
::  -> gopls textDocument/didChange: {
   "contentChanges": [
      {
         "text": ".",
         "range": {
            "start": {
               "line": 50,
               "character": 5
            },
            "end": {
               "line": 50,
               "character": 5
            }
         },
         "rangeLength": 0
      }
   ],
   "textDocument": {
      "version": 15,
      "uri": "file:///.projects/LiveSession-Server/server/serve.go"
   }
}
:: --> gopls textDocument/completion(15): {
   "position": {
      "line": 50,
      "character": 6
   },
   "textDocument": {
      "uri": "file:///.projects/LiveSession-Server/server/serve.go"
   }
}
:: <-  gopls textDocument/publishDiagnostics: {
   "version": 15,
   "uri": "file:///.projects/LiveSession-Server/server/serve.go",
   "diagnostics": [
      {
         "source": "syntax",
         "range": {
            "start": {
               "line": 50,
               "character": 1
            },
            "end": {
               "line": 50,
               "character": 1
            }
         },
         "severity": 1,
         "message": "expected identifier on left side of :="
      }
   ]
}

:: <<< gopls 15: {
   "items": [
      {
         "filterText": "Client",
         "textEdit": {
            "newText": "Client",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "preselect": true,
         "insertTextFormat": 2,
         "sortText": "00000",
         "documentation": "A Client is an HTTP client. Its zero value (DefaultClient) is a\nusable client that uses DefaultTransport.\n\nThe Client's Transport typically has internal state (cached TCP\nconnections), so Clients should be reused instead of created as\nneeded. Clients are safe for concurrent use by multiple goroutines.\n\nA Client is higher-level than a RoundTripper (such as Transport)\nand additionally handles HTTP details such as cookies and\nredirects.\n\nWhen following redirects, the Client will forward all headers set on the\ninitial Request except:\n\n• when forwarding sensitive headers like \"Authorization\",\n\"WWW-Authenticate\", and \"Cookie\" to untrusted targets.\nThese headers will be ignored when following a redirect to a domain\nthat is not a subdomain match or exact match of the initial domain.\nFor example, a redirect from \"foo.com\" to either \"foo.com\" or \"sub.foo.com\"\nwill forward the sensitive headers, but a redirect to \"bar.com\" will not.\n\n• when forwarding the \"Cookie\" header with a non-nil cookie Jar.\nSince each redirect may mutate the state of the cookie jar,\na redirect may possibly alter a cookie set in the initial request.\nWhen forwarding the \"Cookie\" header, any mutated cookies will be omitted,\nwith the expectation that the Jar will insert those mutated cookies\nwith the updated values (assuming the origin matches).\nIf Jar is nil, the initial cookies are forwarded without change.\n",
         "kind": 22,
         "detail": "struct{...}",
         "label": "Client"
      },
      {
         "filterText": "CloseNotifier",
         "textEdit": {
            "newText": "CloseNotifier",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00001",
         "documentation": "The CloseNotifier interface is implemented by ResponseWriters which\nallow detecting when the underlying connection has gone away.\n\nThis mechanism can be used to cancel long operations on the server\nif the client has disconnected before the response is ready.\n\nDeprecated: the CloseNotifier interface predates Go's context package.\nNew code should use Request.Context instead.\n",
         "kind": 8,
         "detail": "interface{...}",
         "label": "CloseNotifier"
      },
      {
         "filterText": "ConnState",
         "textEdit": {
            "newText": "ConnState",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00002",
         "documentation": "A ConnState represents the state of a client connection to a server.\nIt's used by the optional Server.ConnState hook.\n",
         "kind": 7,
         "detail": "int",
         "label": "ConnState"
      },
      {
         "filterText": "Cookie",
         "textEdit": {
            "newText": "Cookie",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00003",
         "documentation": "A Cookie represents an HTTP cookie as sent in the Set-Cookie header of an\nHTTP response or the Cookie header of an HTTP request.\n\nSee https://tools.ietf.org/html/rfc6265 for details.\n",
         "kind": 22,
         "detail": "struct{...}",
         "label": "Cookie"
      },
      {
         "filterText": "CookieJar",
         "textEdit": {
            "newText": "CookieJar",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00004",
         "documentation": "A CookieJar manages storage and use of cookies in HTTP requests.\n\nImplementations of CookieJar must be safe for concurrent use by multiple\ngoroutines.\n\nThe net/http/cookiejar package provides a CookieJar implementation.\n",
         "kind": 8,
         "detail": "interface{...}",
         "label": "CookieJar"
      },
      {
         "filterText": "DefaultClient",
         "textEdit": {
            "newText": "DefaultClient",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00005",
         "documentation": "DefaultClient is the default Client and is used by Get, Head, and Post.\n",
         "kind": 6,
         "detail": "*http.Client",
         "label": "DefaultClient"
      },
      {
         "filterText": "DefaultMaxHeaderBytes",
         "textEdit": {
            "newText": "DefaultMaxHeaderBytes",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00006",
         "documentation": "DefaultMaxHeaderBytes is the maximum permitted size of the headers\nin an HTTP request.\nThis can be overridden by setting Server.MaxHeaderBytes.\n",
         "kind": 21,
         "detail": "int",
         "label": "DefaultMaxHeaderBytes"
      },
      {
         "filterText": "DefaultMaxIdleConnsPerHost",
         "textEdit": {
            "newText": "DefaultMaxIdleConnsPerHost",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00007",
         "documentation": "DefaultMaxIdleConnsPerHost is the default value of Transport's\nMaxIdleConnsPerHost.\n",
         "kind": 21,
         "detail": "int",
         "label": "DefaultMaxIdleConnsPerHost"
      },
      {
         "filterText": "DefaultServeMux",
         "textEdit": {
            "newText": "DefaultServeMux",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00008",
         "documentation": "DefaultServeMux is the default ServeMux used by Serve.\n",
         "kind": 6,
         "detail": "*http.ServeMux",
         "label": "DefaultServeMux"
      },
      {
         "filterText": "DefaultTransport",
         "textEdit": {
            "newText": "DefaultTransport",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00009",
         "documentation": "DefaultTransport is the default implementation of Transport and is\nused by DefaultClient. It establishes network connections as needed\nand caches them for reuse by subsequent calls. It uses HTTP proxies\nas directed by the $HTTP_PROXY and $NO_PROXY (or $http_proxy and\n$no_proxy) environment variables.\n",
         "kind": 6,
         "detail": "http.RoundTripper",
         "label": "DefaultTransport"
      },
      {
         "filterText": "Dir",
         "textEdit": {
            "newText": "Dir",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00010",
         "documentation": "A Dir implements FileSystem using the native file system restricted to a\nspecific directory tree.\n\nWhile the FileSystem.Open method takes '/'-separated paths, a Dir's string\nvalue is a filename on the native file system, not a URL, so it is separated\nby filepath.Separator, which isn't necessarily '/'.\n\nNote that Dir will allow access to files and directories starting with a\nperiod, which could expose sensitive directories like a .git directory or\nsensitive files like .htpasswd. To exclude files with a leading period,\nremove the files/directories from the server or create a custom FileSystem\nimplementation.\n\nAn empty Dir is treated as \".\".\n",
         "kind": 7,
         "detail": "string",
         "label": "Dir"
      },
      {
         "filterText": "ErrAbortHandler",
         "textEdit": {
            "newText": "ErrAbortHandler",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00011",
         "documentation": "ErrAbortHandler is a sentinel panic value to abort a handler.\nWhile any panic from ServeHTTP aborts the response to the client,\npanicking with ErrAbortHandler also suppresses logging of a stack\ntrace to the server's error log.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrAbortHandler"
      },
      {
         "filterText": "ErrBodyNotAllowed",
         "textEdit": {
            "newText": "ErrBodyNotAllowed",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00012",
         "documentation": "ErrBodyNotAllowed is returned by ResponseWriter.Write calls\nwhen the HTTP method or response code does not permit a\nbody.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrBodyNotAllowed"
      },
      {
         "filterText": "ErrBodyReadAfterClose",
         "textEdit": {
            "newText": "ErrBodyReadAfterClose",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00013",
         "documentation": "ErrBodyReadAfterClose is returned when reading a Request or Response\nBody after the body has been closed. This typically happens when the body is\nread after an HTTP Handler calls WriteHeader or Write on its\nResponseWriter.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrBodyReadAfterClose"
      },
      {
         "filterText": "ErrContentLength",
         "textEdit": {
            "newText": "ErrContentLength",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00014",
         "documentation": "ErrContentLength is returned by ResponseWriter.Write calls\nwhen a Handler set a Content-Length response header with a\ndeclared size and then attempted to write more bytes than\ndeclared.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrContentLength"
      },
      {
         "filterText": "ErrHandlerTimeout",
         "textEdit": {
            "newText": "ErrHandlerTimeout",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00015",
         "documentation": "ErrHandlerTimeout is returned on ResponseWriter Write calls\nin handlers which have timed out.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrHandlerTimeout"
      },
      {
         "filterText": "ErrHeaderTooLong",
         "textEdit": {
            "newText": "ErrHeaderTooLong",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00016",
         "documentation": "Deprecated: ErrHeaderTooLong is no longer returned by\nanything in the net/http package. Callers should not\ncompare errors against this variable.\n",
         "kind": 6,
         "detail": "*http.ProtocolError",
         "label": "ErrHeaderTooLong"
      },
      {
         "filterText": "ErrHijacked",
         "textEdit": {
            "newText": "ErrHijacked",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00017",
         "documentation": "ErrHijacked is returned by ResponseWriter.Write calls when\nthe underlying connection has been hijacked using the\nHijacker interface. A zero-byte write on a hijacked\nconnection will return ErrHijacked without any other side\neffects.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrHijacked"
      },
      {
         "filterText": "ErrLineTooLong",
         "textEdit": {
            "newText": "ErrLineTooLong",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00018",
         "documentation": "ErrLineTooLong is returned when reading request or response bodies\nwith malformed chunked encoding.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrLineTooLong"
      },
      {
         "filterText": "ErrMissingBoundary",
         "textEdit": {
            "newText": "ErrMissingBoundary",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00019",
         "documentation": "ErrMissingBoundary is returned by Request.MultipartReader when the\nrequest's Content-Type does not include a \"boundary\" parameter.\n",
         "kind": 6,
         "detail": "*http.ProtocolError",
         "label": "ErrMissingBoundary"
      },
      {
         "filterText": "ErrMissingContentLength",
         "textEdit": {
            "newText": "ErrMissingContentLength",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00020",
         "documentation": "Deprecated: ErrMissingContentLength is no longer returned by\nanything in the net/http package. Callers should not\ncompare errors against this variable.\n",
         "kind": 6,
         "detail": "*http.ProtocolError",
         "label": "ErrMissingContentLength"
      },
      {
         "filterText": "ErrMissingFile",
         "textEdit": {
            "newText": "ErrMissingFile",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00021",
         "documentation": "ErrMissingFile is returned by FormFile when the provided file field name\nis either not present in the request or not a file field.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrMissingFile"
      },
      {
         "filterText": "ErrNoCookie",
         "textEdit": {
            "newText": "ErrNoCookie",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00022",
         "documentation": "ErrNoCookie is returned by Request's Cookie method when a cookie is not found.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrNoCookie"
      },
      {
         "filterText": "ErrNoLocation",
         "textEdit": {
            "newText": "ErrNoLocation",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00023",
         "documentation": "ErrNoLocation is returned by Response's Location method\nwhen no Location header is present.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrNoLocation"
      },
      {
         "filterText": "ErrNotMultipart",
         "textEdit": {
            "newText": "ErrNotMultipart",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00024",
         "documentation": "ErrNotMultipart is returned by Request.MultipartReader when the\nrequest's Content-Type is not multipart/form-data.\n",
         "kind": 6,
         "detail": "*http.ProtocolError",
         "label": "ErrNotMultipart"
      },
      {
         "filterText": "ErrNotSupported",
         "textEdit": {
            "newText": "ErrNotSupported",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00025",
         "documentation": "ErrNotSupported is returned by the Push method of Pusher\nimplementations to indicate that HTTP/2 Push support is not\navailable.\n",
         "kind": 6,
         "detail": "*http.ProtocolError",
         "label": "ErrNotSupported"
      },
      {
         "filterText": "ErrServerClosed",
         "textEdit": {
            "newText": "ErrServerClosed",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00026",
         "documentation": "ErrServerClosed is returned by the Server's Serve, ServeTLS, ListenAndServe,\nand ListenAndServeTLS methods after a call to Shutdown or Close.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrServerClosed"
      },
      {
         "filterText": "ErrShortBody",
         "textEdit": {
            "newText": "ErrShortBody",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00027",
         "documentation": "Deprecated: ErrShortBody is no longer returned by\nanything in the net/http package. Callers should not\ncompare errors against this variable.\n",
         "kind": 6,
         "detail": "*http.ProtocolError",
         "label": "ErrShortBody"
      },
      {
         "filterText": "ErrSkipAltProtocol",
         "textEdit": {
            "newText": "ErrSkipAltProtocol",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00028",
         "documentation": "ErrSkipAltProtocol is a sentinel error value defined by Transport.RegisterProtocol.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrSkipAltProtocol"
      },
      {
         "filterText": "ErrUnexpectedTrailer",
         "textEdit": {
            "newText": "ErrUnexpectedTrailer",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00029",
         "documentation": "Deprecated: ErrUnexpectedTrailer is no longer returned by\nanything in the net/http package. Callers should not\ncompare errors against this variable.\n",
         "kind": 6,
         "detail": "*http.ProtocolError",
         "label": "ErrUnexpectedTrailer"
      },
      {
         "filterText": "ErrUseLastResponse",
         "textEdit": {
            "newText": "ErrUseLastResponse",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00030",
         "documentation": "ErrUseLastResponse can be returned by Client.CheckRedirect hooks to\ncontrol how redirects are processed. If returned, the next request\nis not sent and the most recent response is returned with its body\nunclosed.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrUseLastResponse"
      },
      {
         "filterText": "ErrWriteAfterFlush",
         "textEdit": {
            "newText": "ErrWriteAfterFlush",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00031",
         "documentation": "Deprecated: ErrWriteAfterFlush is no longer returned by\nanything in the net/http package. Callers should not\ncompare errors against this variable.\n",
         "kind": 6,
         "detail": "error",
         "label": "ErrWriteAfterFlush"
      },
      {
         "filterText": "File",
         "textEdit": {
            "newText": "File",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00032",
         "documentation": "A File is returned by a FileSystem's Open method and can be\nserved by the FileServer implementation.\n\nThe methods should behave the same as those on an *os.File.\n",
         "kind": 8,
         "detail": "interface{...}",
         "label": "File"
      },
      {
         "filterText": "FileSystem",
         "textEdit": {
            "newText": "FileSystem",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00033",
         "documentation": "A FileSystem implements access to a collection of named files.\nThe elements in a file path are separated by slash ('/', U+002F)\ncharacters, regardless of host operating system convention.\n",
         "kind": 8,
         "detail": "interface{...}",
         "label": "FileSystem"
      },
      {
         "filterText": "Flusher",
         "textEdit": {
            "newText": "Flusher",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00034",
         "documentation": "The Flusher interface is implemented by ResponseWriters that allow\nan HTTP handler to flush buffered data to the client.\n\nThe default HTTP/1.x and HTTP/2 ResponseWriter implementations\nsupport Flusher, but ResponseWriter wrappers may not. Handlers\nshould always test for this ability at runtime.\n\nNote that even for ResponseWriters that support Flush,\nif the client is connected through an HTTP proxy,\nthe buffered data may not reach the client until the response\ncompletes.\n",
         "kind": 8,
         "detail": "interface{...}",
         "label": "Flusher"
      },
      {
         "filterText": "Handler",
         "textEdit": {
            "newText": "Handler",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00035",
         "documentation": "A Handler responds to an HTTP request.\n\nServeHTTP should write reply headers and data to the ResponseWriter\nand then return. Returning signals that the request is finished; it\nis not valid to use the ResponseWriter or read from the\nRequest.Body after or concurrently with the completion of the\nServeHTTP call.\n\nDepending on the HTTP client software, HTTP protocol version, and\nany intermediaries between the client and the Go server, it may not\nbe possible to read from the Request.Body after writing to the\nResponseWriter. Cautious handlers should read the Request.Body\nfirst, and then reply.\n\nExcept for reading the body, handlers should not modify the\nprovided Request.\n\nIf ServeHTTP panics, the server (the caller of ServeHTTP) assumes\nthat the effect of the panic was isolated to the active request.\nIt recovers the panic, logs a stack trace to the server error log,\nand either closes the network connection or sends an HTTP/2\nRST_STREAM, depending on the HTTP protocol. To abort a handler so\nthe client sees an interrupted response but the server doesn't log\nan error, panic with the value ErrAbortHandler.\n",
         "kind": 8,
         "detail": "interface{...}",
         "label": "Handler"
      },
      {
         "filterText": "HandlerFunc",
         "textEdit": {
            "newText": "HandlerFunc",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00036",
         "documentation": "The HandlerFunc type is an adapter to allow the use of\nordinary functions as HTTP handlers. If f is a function\nwith the appropriate signature, HandlerFunc(f) is a\nHandler that calls f.\n",
         "kind": 7,
         "detail": "func(http.ResponseWriter, *http.Request)",
         "label": "HandlerFunc"
      },
      {
         "filterText": "Header",
         "textEdit": {
            "newText": "Header",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00037",
         "documentation": "A Header represents the key-value pairs in an HTTP header.\n\nThe keys should be in canonical form, as returned by\nCanonicalHeaderKey.\n",
         "kind": 7,
         "detail": "map[string][]string",
         "label": "Header"
      },
      {
         "filterText": "Hijacker",
         "textEdit": {
            "newText": "Hijacker",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00038",
         "documentation": "The Hijacker interface is implemented by ResponseWriters that allow\nan HTTP handler to take over the connection.\n\nThe default ResponseWriter for HTTP/1.x connections supports\nHijacker, but HTTP/2 connections intentionally do not.\nResponseWriter wrappers may also not support Hijacker. Handlers\nshould always test for this ability at runtime.\n",
         "kind": 8,
         "detail": "interface{...}",
         "label": "Hijacker"
      },
      {
         "filterText": "LocalAddrContextKey",
         "textEdit": {
            "newText": "LocalAddrContextKey",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00039",
         "documentation": "LocalAddrContextKey is a context key. It can be used in\nHTTP handlers with Context.Value to access the local\naddress the connection arrived on.\nThe associated value will be of type net.Addr.\n",
         "kind": 6,
         "detail": "*http.contextKey",
         "label": "LocalAddrContextKey"
      },
      {
         "filterText": "MethodConnect",
         "textEdit": {
            "newText": "MethodConnect",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00040",
         "documentation": "Common HTTP methods.\n\nUnless otherwise noted, these are defined in RFC 7231 section 4.3.\n",
         "kind": 21,
         "detail": "string",
         "label": "MethodConnect"
      },
      {
         "filterText": "MethodDelete",
         "textEdit": {
            "newText": "MethodDelete",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00041",
         "documentation": "Common HTTP methods.\n\nUnless otherwise noted, these are defined in RFC 7231 section 4.3.\n",
         "kind": 21,
         "detail": "string",
         "label": "MethodDelete"
      },
      {
         "filterText": "MethodGet",
         "textEdit": {
            "newText": "MethodGet",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00042",
         "documentation": "Common HTTP methods.\n\nUnless otherwise noted, these are defined in RFC 7231 section 4.3.\n",
         "kind": 21,
         "detail": "string",
         "label": "MethodGet"
      },
      {
         "filterText": "MethodHead",
         "textEdit": {
            "newText": "MethodHead",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00043",
         "documentation": "Common HTTP methods.\n\nUnless otherwise noted, these are defined in RFC 7231 section 4.3.\n",
         "kind": 21,
         "detail": "string",
         "label": "MethodHead"
      },
      {
         "filterText": "MethodOptions",
         "textEdit": {
            "newText": "MethodOptions",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00044",
         "documentation": "Common HTTP methods.\n\nUnless otherwise noted, these are defined in RFC 7231 section 4.3.\n",
         "kind": 21,
         "detail": "string",
         "label": "MethodOptions"
      },
      {
         "filterText": "MethodPatch",
         "textEdit": {
            "newText": "MethodPatch",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00045",
         "documentation": "Common HTTP methods.\n\nUnless otherwise noted, these are defined in RFC 7231 section 4.3.\n",
         "kind": 21,
         "detail": "string",
         "label": "MethodPatch"
      },
      {
         "filterText": "MethodPost",
         "textEdit": {
            "newText": "MethodPost",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00046",
         "documentation": "Common HTTP methods.\n\nUnless otherwise noted, these are defined in RFC 7231 section 4.3.\n",
         "kind": 21,
         "detail": "string",
         "label": "MethodPost"
      },
      {
         "filterText": "MethodPut",
         "textEdit": {
            "newText": "MethodPut",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00047",
         "documentation": "Common HTTP methods.\n\nUnless otherwise noted, these are defined in RFC 7231 section 4.3.\n",
         "kind": 21,
         "detail": "string",
         "label": "MethodPut"
      },
      {
         "filterText": "MethodTrace",
         "textEdit": {
            "newText": "MethodTrace",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00048",
         "documentation": "Common HTTP methods.\n\nUnless otherwise noted, these are defined in RFC 7231 section 4.3.\n",
         "kind": 21,
         "detail": "string",
         "label": "MethodTrace"
      },
      {
         "filterText": "NoBody",
         "textEdit": {
            "newText": "NoBody",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00049",
         "documentation": "NoBody is an io.ReadCloser with no bytes. Read always returns EOF\nand Close always returns nil. It can be used in an outgoing client\nrequest to explicitly signal that a request has zero bytes.\nAn alternative, however, is to simply set Request.Body to nil.\n",
         "kind": 6,
         "detail": "http.noBody",
         "label": "NoBody"
      },
      {
         "filterText": "ProtocolError",
         "textEdit": {
            "newText": "ProtocolError",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00050",
         "documentation": "ProtocolError represents an HTTP protocol error.\n\nDeprecated: Not all errors in the http package related to protocol errors\nare of type ProtocolError.\n",
         "kind": 22,
         "detail": "struct{...}",
         "label": "ProtocolError"
      },
      {
         "filterText": "PushOptions",
         "textEdit": {
            "newText": "PushOptions",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00051",
         "documentation": "PushOptions describes options for Pusher.Push.\n",
         "kind": 22,
         "detail": "struct{...}",
         "label": "PushOptions"
      },
      {
         "filterText": "Pusher",
         "textEdit": {
            "newText": "Pusher",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00052",
         "documentation": "Pusher is the interface implemented by ResponseWriters that support\nHTTP/2 server push. For more background, see\nhttps://tools.ietf.org/html/rfc7540#section-8.2.\n",
         "kind": 8,
         "detail": "interface{...}",
         "label": "Pusher"
      },
      {
         "filterText": "Request",
         "textEdit": {
            "newText": "Request",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00053",
         "documentation": "A Request represents an HTTP request received by a server\nor to be sent by a client.\n\nThe field semantics differ slightly between client and server\nusage. In addition to the notes on the fields below, see the\ndocumentation for Request.Write and RoundTripper.\n",
         "kind": 22,
         "detail": "struct{...}",
         "label": "Request"
      },
      {
         "filterText": "Response",
         "textEdit": {
            "newText": "Response",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00054",
         "documentation": "Response represents the response from an HTTP request.\n\nThe Client and Transport return Responses from servers once\nthe response headers have been received. The response body\nis streamed on demand as the Body field is read.\n",
         "kind": 22,
         "detail": "struct{...}",
         "label": "Response"
      },
      {
         "filterText": "ResponseWriter",
         "textEdit": {
            "newText": "ResponseWriter",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00055",
         "documentation": "A ResponseWriter interface is used by an HTTP handler to\nconstruct an HTTP response.\n\nA ResponseWriter may not be used after the Handler.ServeHTTP method\nhas returned.\n",
         "kind": 8,
         "detail": "interface{...}",
         "label": "ResponseWriter"
      },
      {
         "filterText": "RoundTripper",
         "textEdit": {
            "newText": "RoundTripper",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00056",
         "documentation": "RoundTripper is an interface representing the ability to execute a\nsingle HTTP transaction, obtaining the Response for a given Request.\n\nA RoundTripper must be safe for concurrent use by multiple\ngoroutines.\n",
         "kind": 8,
         "detail": "interface{...}",
         "label": "RoundTripper"
      },
      {
         "filterText": "SameSite",
         "textEdit": {
            "newText": "SameSite",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00057",
         "documentation": "SameSite allows a server to define a cookie attribute making it impossible for\nthe browser to send this cookie along with cross-site requests. The main\ngoal is to mitigate the risk of cross-origin information leakage, and provide\nsome protection against cross-site request forgery attacks.\n\nSee https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00 for details.\n",
         "kind": 7,
         "detail": "int",
         "label": "SameSite"
      },
      {
         "filterText": "SameSiteDefaultMode",
         "textEdit": {
            "newText": "SameSiteDefaultMode",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00058",
         "kind": 21,
         "detail": "http.SameSite",
         "label": "SameSiteDefaultMode"
      },
      {
         "filterText": "SameSiteLaxMode",
         "textEdit": {
            "newText": "SameSiteLaxMode",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00059",
         "kind": 21,
         "detail": "http.SameSite",
         "label": "SameSiteLaxMode"
      },
      {
         "filterText": "SameSiteNoneMode",
         "textEdit": {
            "newText": "SameSiteNoneMode",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00060",
         "kind": 21,
         "detail": "http.SameSite",
         "label": "SameSiteNoneMode"
      },
      {
         "filterText": "SameSiteStrictMode",
         "textEdit": {
            "newText": "SameSiteStrictMode",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00061",
         "kind": 21,
         "detail": "http.SameSite",
         "label": "SameSiteStrictMode"
      },
      {
         "filterText": "ServeMux",
         "textEdit": {
            "newText": "ServeMux",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00062",
         "documentation": "ServeMux is an HTTP request multiplexer.\nIt matches the URL of each incoming request against a list of registered\npatterns and calls the handler for the pattern that\nmost closely matches the URL.\n\nPatterns name fixed, rooted paths, like \"/favicon.ico\",\nor rooted subtrees, like \"/images/\" (note the trailing slash).\nLonger patterns take precedence over shorter ones, so that\nif there are handlers registered for both \"/images/\"\nand \"/images/thumbnails/\", the latter handler will be\ncalled for paths beginning \"/images/thumbnails/\" and the\nformer will receive requests for any other paths in the\n\"/images/\" subtree.\n\nNote that since a pattern ending in a slash names a rooted subtree,\nthe pattern \"/\" matches all paths not matched by other registered\npatterns, not just the URL with Path == \"/\".\n\nIf a subtree has been registered and a request is received naming the\nsubtree root without its trailing slash, ServeMux redirects that\nrequest to the subtree root (adding the trailing slash). This behavior can\nbe overridden with a separate registration for the path without\nthe trailing slash. For example, registering \"/images/\" causes ServeMux\nto redirect a request for \"/images\" to \"/images/\", unless \"/images\" has\nbeen registered separately.\n\nPatterns may optionally begin with a host name, restricting matches to\nURLs on that host only. Host-specific patterns take precedence over\ngeneral patterns, so that a handler might register for the two patterns\n\"/codesearch\" and \"codesearch.google.com/\" without also taking over\nrequests for \"http://www.google.com/\".\n\nServeMux also takes care of sanitizing the URL request path and the Host\nheader, stripping the port number and redirecting any request containing . or\n.. elements or repeated slashes to an equivalent, cleaner URL.\n",
         "kind": 22,
         "detail": "struct{...}",
         "label": "ServeMux"
      },
      {
         "filterText": "Server",
         "textEdit": {
            "newText": "Server",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00063",
         "documentation": "A Server defines parameters for running an HTTP server.\nThe zero value for Server is a valid configuration.\n",
         "kind": 22,
         "detail": "struct{...}",
         "label": "Server"
      },
      {
         "filterText": "ServerContextKey",
         "textEdit": {
            "newText": "ServerContextKey",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00064",
         "documentation": "ServerContextKey is a context key. It can be used in HTTP\nhandlers with Context.Value to access the server that\nstarted the handler. The associated value will be of\ntype *Server.\n",
         "kind": 6,
         "detail": "*http.contextKey",
         "label": "ServerContextKey"
      },
      {
         "filterText": "StateActive",
         "textEdit": {
            "newText": "StateActive",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00065",
         "documentation": "StateActive represents a connection that has read 1 or more\nbytes of a request. The Server.ConnState hook for\nStateActive fires before the request has entered a handler\nand doesn't fire again until the request has been\nhandled. After the request is handled, the state\ntransitions to StateClosed, StateHijacked, or StateIdle.\nFor HTTP/2, StateActive fires on the transition from zero\nto one active request, and only transitions away once all\nactive requests are complete. That means that ConnState\ncannot be used to do per-request work; ConnState only notes\nthe overall state of the connection.\n",
         "kind": 21,
         "detail": "http.ConnState",
         "label": "StateActive"
      },
      {
         "filterText": "StateClosed",
         "textEdit": {
            "newText": "StateClosed",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00066",
         "documentation": "StateClosed represents a closed connection.\nThis is a terminal state. Hijacked connections do not\ntransition to StateClosed.\n",
         "kind": 21,
         "detail": "http.ConnState",
         "label": "StateClosed"
      },
      {
         "filterText": "StateHijacked",
         "textEdit": {
            "newText": "StateHijacked",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00067",
         "documentation": "StateHijacked represents a hijacked connection.\nThis is a terminal state. It does not transition to StateClosed.\n",
         "kind": 21,
         "detail": "http.ConnState",
         "label": "StateHijacked"
      },
      {
         "filterText": "StateIdle",
         "textEdit": {
            "newText": "StateIdle",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00068",
         "documentation": "StateIdle represents a connection that has finished\nhandling a request and is in the keep-alive state, waiting\nfor a new request. Connections transition from StateIdle\nto either StateActive or StateClosed.\n",
         "kind": 21,
         "detail": "http.ConnState",
         "label": "StateIdle"
      },
      {
         "filterText": "StateNew",
         "textEdit": {
            "newText": "StateNew",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00069",
         "documentation": "StateNew represents a new connection that is expected to\nsend a request immediately. Connections begin at this\nstate and then transition to either StateActive or\nStateClosed.\n",
         "kind": 21,
         "detail": "http.ConnState",
         "label": "StateNew"
      },
      {
         "filterText": "StatusAccepted",
         "textEdit": {
            "newText": "StatusAccepted",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00070",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusAccepted"
      },
      {
         "filterText": "StatusAlreadyReported",
         "textEdit": {
            "newText": "StatusAlreadyReported",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00071",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusAlreadyReported"
      },
      {
         "filterText": "StatusBadGateway",
         "textEdit": {
            "newText": "StatusBadGateway",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00072",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusBadGateway"
      },
      {
         "filterText": "StatusBadRequest",
         "textEdit": {
            "newText": "StatusBadRequest",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00073",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusBadRequest"
      },
      {
         "filterText": "StatusConflict",
         "textEdit": {
            "newText": "StatusConflict",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00074",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusConflict"
      },
      {
         "filterText": "StatusContinue",
         "textEdit": {
            "newText": "StatusContinue",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00075",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusContinue"
      },
      {
         "filterText": "StatusCreated",
         "textEdit": {
            "newText": "StatusCreated",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00076",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusCreated"
      },
      {
         "filterText": "StatusEarlyHints",
         "textEdit": {
            "newText": "StatusEarlyHints",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00077",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusEarlyHints"
      },
      {
         "filterText": "StatusExpectationFailed",
         "textEdit": {
            "newText": "StatusExpectationFailed",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00078",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusExpectationFailed"
      },
      {
         "filterText": "StatusFailedDependency",
         "textEdit": {
            "newText": "StatusFailedDependency",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00079",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusFailedDependency"
      },
      {
         "filterText": "StatusForbidden",
         "textEdit": {
            "newText": "StatusForbidden",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00080",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusForbidden"
      },
      {
         "filterText": "StatusFound",
         "textEdit": {
            "newText": "StatusFound",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00081",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusFound"
      },
      {
         "filterText": "StatusGatewayTimeout",
         "textEdit": {
            "newText": "StatusGatewayTimeout",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00082",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusGatewayTimeout"
      },
      {
         "filterText": "StatusGone",
         "textEdit": {
            "newText": "StatusGone",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00083",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusGone"
      },
      {
         "filterText": "StatusHTTPVersionNotSupported",
         "textEdit": {
            "newText": "StatusHTTPVersionNotSupported",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00084",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusHTTPVersionNotSupported"
      },
      {
         "filterText": "StatusIMUsed",
         "textEdit": {
            "newText": "StatusIMUsed",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00085",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusIMUsed"
      },
      {
         "filterText": "StatusInsufficientStorage",
         "textEdit": {
            "newText": "StatusInsufficientStorage",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00086",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusInsufficientStorage"
      },
      {
         "filterText": "StatusInternalServerError",
         "textEdit": {
            "newText": "StatusInternalServerError",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00087",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusInternalServerError"
      },
      {
         "filterText": "StatusLengthRequired",
         "textEdit": {
            "newText": "StatusLengthRequired",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00088",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusLengthRequired"
      },
      {
         "filterText": "StatusLocked",
         "textEdit": {
            "newText": "StatusLocked",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00089",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusLocked"
      },
      {
         "filterText": "StatusLoopDetected",
         "textEdit": {
            "newText": "StatusLoopDetected",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00090",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusLoopDetected"
      },
      {
         "filterText": "StatusMethodNotAllowed",
         "textEdit": {
            "newText": "StatusMethodNotAllowed",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00091",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusMethodNotAllowed"
      },
      {
         "filterText": "StatusMisdirectedRequest",
         "textEdit": {
            "newText": "StatusMisdirectedRequest",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00092",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusMisdirectedRequest"
      },
      {
         "filterText": "StatusMovedPermanently",
         "textEdit": {
            "newText": "StatusMovedPermanently",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00093",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusMovedPermanently"
      },
      {
         "filterText": "StatusMultiStatus",
         "textEdit": {
            "newText": "StatusMultiStatus",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00094",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusMultiStatus"
      },
      {
         "filterText": "StatusMultipleChoices",
         "textEdit": {
            "newText": "StatusMultipleChoices",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00095",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusMultipleChoices"
      },
      {
         "filterText": "StatusNetworkAuthenticationRequired",
         "textEdit": {
            "newText": "StatusNetworkAuthenticationRequired",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00096",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusNetworkAuthenticationRequired"
      },
      {
         "filterText": "StatusNoContent",
         "textEdit": {
            "newText": "StatusNoContent",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00097",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusNoContent"
      },
      {
         "filterText": "StatusNonAuthoritativeInfo",
         "textEdit": {
            "newText": "StatusNonAuthoritativeInfo",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00098",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusNonAuthoritativeInfo"
      },
      {
         "filterText": "StatusNotAcceptable",
         "textEdit": {
            "newText": "StatusNotAcceptable",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00099",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusNotAcceptable"
      },
      {
         "filterText": "StatusNotExtended",
         "textEdit": {
            "newText": "StatusNotExtended",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00100",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusNotExtended"
      },
      {
         "filterText": "StatusNotFound",
         "textEdit": {
            "newText": "StatusNotFound",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00101",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusNotFound"
      },
      {
         "filterText": "StatusNotImplemented",
         "textEdit": {
            "newText": "StatusNotImplemented",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00102",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusNotImplemented"
      },
      {
         "filterText": "StatusNotModified",
         "textEdit": {
            "newText": "StatusNotModified",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00103",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusNotModified"
      },
      {
         "filterText": "StatusOK",
         "textEdit": {
            "newText": "StatusOK",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00104",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusOK"
      },
      {
         "filterText": "StatusPartialContent",
         "textEdit": {
            "newText": "StatusPartialContent",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00105",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusPartialContent"
      },
      {
         "filterText": "StatusPaymentRequired",
         "textEdit": {
            "newText": "StatusPaymentRequired",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00106",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusPaymentRequired"
      },
      {
         "filterText": "StatusPermanentRedirect",
         "textEdit": {
            "newText": "StatusPermanentRedirect",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00107",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusPermanentRedirect"
      },
      {
         "filterText": "StatusPreconditionFailed",
         "textEdit": {
            "newText": "StatusPreconditionFailed",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00108",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusPreconditionFailed"
      },
      {
         "filterText": "StatusPreconditionRequired",
         "textEdit": {
            "newText": "StatusPreconditionRequired",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00109",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusPreconditionRequired"
      },
      {
         "filterText": "StatusProcessing",
         "textEdit": {
            "newText": "StatusProcessing",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00110",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusProcessing"
      },
      {
         "filterText": "StatusProxyAuthRequired",
         "textEdit": {
            "newText": "StatusProxyAuthRequired",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00111",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusProxyAuthRequired"
      },
      {
         "filterText": "StatusRequestEntityTooLarge",
         "textEdit": {
            "newText": "StatusRequestEntityTooLarge",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00112",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusRequestEntityTooLarge"
      },
      {
         "filterText": "StatusRequestHeaderFieldsTooLarge",
         "textEdit": {
            "newText": "StatusRequestHeaderFieldsTooLarge",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00113",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusRequestHeaderFieldsTooLarge"
      },
      {
         "filterText": "StatusRequestTimeout",
         "textEdit": {
            "newText": "StatusRequestTimeout",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00114",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusRequestTimeout"
      },
      {
         "filterText": "StatusRequestURITooLong",
         "textEdit": {
            "newText": "StatusRequestURITooLong",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00115",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusRequestURITooLong"
      },
      {
         "filterText": "StatusRequestedRangeNotSatisfiable",
         "textEdit": {
            "newText": "StatusRequestedRangeNotSatisfiable",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00116",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusRequestedRangeNotSatisfiable"
      },
      {
         "filterText": "StatusResetContent",
         "textEdit": {
            "newText": "StatusResetContent",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00117",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusResetContent"
      },
      {
         "filterText": "StatusSeeOther",
         "textEdit": {
            "newText": "StatusSeeOther",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00118",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusSeeOther"
      },
      {
         "filterText": "StatusServiceUnavailable",
         "textEdit": {
            "newText": "StatusServiceUnavailable",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00119",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusServiceUnavailable"
      },
      {
         "filterText": "StatusSwitchingProtocols",
         "textEdit": {
            "newText": "StatusSwitchingProtocols",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00120",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusSwitchingProtocols"
      },
      {
         "filterText": "StatusTeapot",
         "textEdit": {
            "newText": "StatusTeapot",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00121",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusTeapot"
      },
      {
         "filterText": "StatusTemporaryRedirect",
         "textEdit": {
            "newText": "StatusTemporaryRedirect",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00122",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusTemporaryRedirect"
      },
      {
         "filterText": "StatusTooEarly",
         "textEdit": {
            "newText": "StatusTooEarly",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00123",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusTooEarly"
      },
      {
         "filterText": "StatusTooManyRequests",
         "textEdit": {
            "newText": "StatusTooManyRequests",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00124",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusTooManyRequests"
      },
      {
         "filterText": "StatusUnauthorized",
         "textEdit": {
            "newText": "StatusUnauthorized",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00125",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusUnauthorized"
      },
      {
         "filterText": "StatusUnavailableForLegalReasons",
         "textEdit": {
            "newText": "StatusUnavailableForLegalReasons",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00126",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusUnavailableForLegalReasons"
      },
      {
         "filterText": "StatusUnprocessableEntity",
         "textEdit": {
            "newText": "StatusUnprocessableEntity",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00127",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusUnprocessableEntity"
      },
      {
         "filterText": "StatusUnsupportedMediaType",
         "textEdit": {
            "newText": "StatusUnsupportedMediaType",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00128",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusUnsupportedMediaType"
      },
      {
         "filterText": "StatusUpgradeRequired",
         "textEdit": {
            "newText": "StatusUpgradeRequired",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00129",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusUpgradeRequired"
      },
      {
         "filterText": "StatusUseProxy",
         "textEdit": {
            "newText": "StatusUseProxy",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00130",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusUseProxy"
      },
      {
         "filterText": "StatusVariantAlsoNegotiates",
         "textEdit": {
            "newText": "StatusVariantAlsoNegotiates",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00131",
         "documentation": "HTTP status codes as registered with IANA.\nSee: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml\n",
         "kind": 21,
         "detail": "int",
         "label": "StatusVariantAlsoNegotiates"
      },
      {
         "filterText": "TimeFormat",
         "textEdit": {
            "newText": "TimeFormat",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00132",
         "documentation": "TimeFormat is the time format to use when generating times in HTTP\nheaders. It is like time.RFC1123 but hard-codes GMT as the time\nzone. The time being formatted must be in UTC for Format to\ngenerate the correct format.\n\nFor parsing this time format, see ParseTime.\n",
         "kind": 21,
         "detail": "string",
         "label": "TimeFormat"
      },
      {
         "filterText": "TrailerPrefix",
         "textEdit": {
            "newText": "TrailerPrefix",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00133",
         "documentation": "TrailerPrefix is a magic prefix for ResponseWriter.Header map keys\nthat, if present, signals that the map entry is actually for\nthe response trailers, and not the response headers. The prefix\nis stripped after the ServeHTTP call finishes and the values are\nsent in the trailers.\n\nThis mechanism is intended only for trailers that are not known\nprior to the headers being written. If the set of trailers is fixed\nor known before the header is written, the normal Go trailers mechanism\nis preferred:\n   https://golang.org/pkg/net/http/#ResponseWriter\n   https://golang.org/pkg/net/http/#example_ResponseWriter_trailers\n",
         "kind": 21,
         "detail": "string",
         "label": "TrailerPrefix"
      },
      {
         "filterText": "Transport",
         "textEdit": {
            "newText": "Transport",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00134",
         "documentation": "Transport is an implementation of RoundTripper that supports HTTP,\nHTTPS, and HTTP proxies (for either HTTP or HTTPS with CONNECT).\n\nBy default, Transport caches connections for future re-use.\nThis may leave many open connections when accessing many hosts.\nThis behavior can be managed using Transport's CloseIdleConnections method\nand the MaxIdleConnsPerHost and DisableKeepAlives fields.\n\nTransports should be reused instead of created as needed.\nTransports are safe for concurrent use by multiple goroutines.\n\nA Transport is a low-level primitive for making HTTP and HTTPS requests.\nFor high-level functionality, such as cookies and redirects, see Client.\n\nTransport uses HTTP/1.1 for HTTP URLs and either HTTP/1.1 or HTTP/2\nfor HTTPS URLs, depending on whether the server supports HTTP/2,\nand how the Transport is configured. The DefaultTransport supports HTTP/2.\nTo explicitly enable HTTP/2 on a transport, use golang.org/x/net/http2\nand call ConfigureTransport. See the package docs for more about HTTP/2.\n\nResponses with status codes in the 1xx range are either handled\nautomatically (100 expect-continue) or ignored. The one\nexception is HTTP status code 101 (Switching Protocols), which is\nconsidered a terminal status and returned by RoundTrip. To see the\nignored 1xx responses, use the httptrace trace package's\nClientTrace.Got1xxResponse.\n\nTransport only retries a request upon encountering a network error\nif the request is idempotent and either has no body or has its\nRequest.GetBody defined. HTTP requests are considered idempotent if\nthey have HTTP methods GET, HEAD, OPTIONS, or TRACE; or if their\nHeader map contains an \"Idempotency-Key\" or \"X-Idempotency-Key\"\nentry. If the idempotency key value is a zero-length slice, the\nrequest is treated as idempotent but the header is not sent on the\nwire.\n",
         "kind": 22,
         "detail": "struct{...}",
         "label": "Transport"
      },
      {
         "filterText": "CanonicalHeaderKey",
         "textEdit": {
            "newText": "CanonicalHeaderKey(${1:s string})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00135",
         "documentation": "CanonicalHeaderKey returns the canonical format of the\nheader key s. The canonicalization converts the first\nletter and any letter following a hyphen to upper case;\nthe rest are converted to lowercase. For example, the\ncanonical key for \"accept-encoding\" is \"Accept-Encoding\".\nIf s contains a space or invalid header field bytes, it is\nreturned without modifications.\n",
         "kind": 3,
         "detail": "func(s string) string",
         "label": "CanonicalHeaderKey"
      },
      {
         "filterText": "DetectContentType",
         "textEdit": {
            "newText": "DetectContentType(${1:data []byte})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00136",
         "documentation": "DetectContentType implements the algorithm described\nat https://mimesniff.spec.whatwg.org/ to determine the\nContent-Type of the given data. It considers at most the\nfirst 512 bytes of data. DetectContentType always returns\na valid MIME type: if it cannot determine a more specific one, it\nreturns \"application/octet-stream\".\n",
         "kind": 3,
         "detail": "func(data []byte) string",
         "label": "DetectContentType"
      },
      {
         "filterText": "Error",
         "textEdit": {
            "newText": "Error(${1:w http.ResponseWriter}, ${2:error string}, ${3:code int})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00137",
         "documentation": "Error replies to the request with the specified error message and HTTP code.\nIt does not otherwise end the request; the caller should ensure no further\nwrites are done to w.\nThe error message should be plain text.\n",
         "kind": 3,
         "detail": "func(w http.ResponseWriter, error string, code int)",
         "label": "Error"
      },
      {
         "filterText": "FileServer",
         "textEdit": {
            "newText": "FileServer(${1:root http.FileSystem})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00138",
         "documentation": "FileServer returns a handler that serves HTTP requests\nwith the contents of the file system rooted at root.\n\nTo use the operating system's file system implementation,\nuse http.Dir:\n\n    http.Handle(\"/\", http.FileServer(http.Dir(\"/tmp\")))\n\nAs a special case, the returned file server redirects any request\nending in \"/index.html\" to the same path, without the final\n\"index.html\".\n",
         "kind": 3,
         "detail": "func(root http.FileSystem) http.Handler",
         "label": "FileServer"
      },
      {
         "filterText": "Get",
         "textEdit": {
            "newText": "Get(${1:url string})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00139",
         "documentation": "Get issues a GET to the specified URL. If the response is one of\nthe following redirect codes, Get follows the redirect, up to a\nmaximum of 10 redirects:\n\n   301 (Moved Permanently)\n   302 (Found)\n   303 (See Other)\n   307 (Temporary Redirect)\n   308 (Permanent Redirect)\n\nAn error is returned if there were too many redirects or if there\nwas an HTTP protocol error. A non-2xx response doesn't cause an\nerror. Any returned error will be of type *url.Error. The url.Error\nvalue's Timeout method will report true if request timed out or was\ncanceled.\n\nWhen err is nil, resp always contains a non-nil resp.Body.\nCaller should close resp.Body when done reading from it.\n\nGet is a wrapper around DefaultClient.Get.\n\nTo make a request with custom headers, use NewRequest and\nDefaultClient.Do.\n",
         "kind": 3,
         "detail": "func(url string) (resp *http.Response, err error)",
         "label": "Get"
      },
      {
         "filterText": "Handle",
         "textEdit": {
            "newText": "Handle(${1:pattern string}, ${2:handler http.Handler})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00140",
         "documentation": "Handle registers the handler for the given pattern\nin the DefaultServeMux.\nThe documentation for ServeMux explains how patterns are matched.\n",
         "kind": 3,
         "detail": "func(pattern string, handler http.Handler)",
         "label": "Handle"
      },
      {
         "filterText": "HandleFunc",
         "textEdit": {
            "newText": "HandleFunc(${1:pattern string}, ${2:handler func(ResponseWriter, *Request)})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00141",
         "documentation": "HandleFunc registers the handler function for the given pattern\nin the DefaultServeMux.\nThe documentation for ServeMux explains how patterns are matched.\n",
         "kind": 3,
         "detail": "func(pattern string, handler func(ResponseWriter, *Request))",
         "label": "HandleFunc"
      },
      {
         "filterText": "Head",
         "textEdit": {
            "newText": "Head(${1:url string})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00142",
         "documentation": "Head issues a HEAD to the specified URL. If the response is one of\nthe following redirect codes, Head follows the redirect, up to a\nmaximum of 10 redirects:\n\n   301 (Moved Permanently)\n   302 (Found)\n   303 (See Other)\n   307 (Temporary Redirect)\n   308 (Permanent Redirect)\n\nHead is a wrapper around DefaultClient.Head\n",
         "kind": 3,
         "detail": "func(url string) (resp *http.Response, err error)",
         "label": "Head"
      },
      {
         "filterText": "ListenAndServe",
         "textEdit": {
            "newText": "ListenAndServe(${1:addr string}, ${2:handler http.Handler})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00143",
         "documentation": "ListenAndServe listens on the TCP network address addr and then calls\nServe with handler to handle requests on incoming connections.\nAccepted connections are configured to enable TCP keep-alives.\n\nThe handler is typically nil, in which case the DefaultServeMux is used.\n\nListenAndServe always returns a non-nil error.\n",
         "kind": 3,
         "detail": "func(addr string, handler http.Handler) error",
         "label": "ListenAndServe"
      },
      {
         "filterText": "ListenAndServeTLS",
         "textEdit": {
            "newText": "ListenAndServeTLS(${1:addr string}, ${2:certFile string}, ${3:keyFile string}, ${4:handler http.Handler})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00144",
         "documentation": "ListenAndServeTLS acts identically to ListenAndServe, except that it\nexpects HTTPS connections. Additionally, files containing a certificate and\nmatching private key for the server must be provided. If the certificate\nis signed by a certificate authority, the certFile should be the concatenation\nof the server's certificate, any intermediates, and the CA's certificate.\n",
         "kind": 3,
         "detail": "func(addr string, certFile string, keyFile string, handler http.Handler) error",
         "label": "ListenAndServeTLS"
      },
      {
         "filterText": "MaxBytesReader",
         "textEdit": {
            "newText": "MaxBytesReader(${1:w http.ResponseWriter}, ${2:r io.ReadCloser}, ${3:n int64})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00145",
         "documentation": "MaxBytesReader is similar to io.LimitReader but is intended for\nlimiting the size of incoming request bodies. In contrast to\nio.LimitReader, MaxBytesReader's result is a ReadCloser, returns a\nnon-EOF error for a Read beyond the limit, and closes the\nunderlying reader when its Close method is called.\n\nMaxBytesReader prevents clients from accidentally or maliciously\nsending a large request and wasting server resources.\n",
         "kind": 3,
         "detail": "func(w http.ResponseWriter, r io.ReadCloser, n int64) io.ReadCloser",
         "label": "MaxBytesReader"
      },
      {
         "filterText": "NewFileTransport",
         "textEdit": {
            "newText": "NewFileTransport(${1:fs http.FileSystem})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00146",
         "documentation": "NewFileTransport returns a new RoundTripper, serving the provided\nFileSystem. The returned RoundTripper ignores the URL host in its\nincoming requests, as well as most other properties of the\nrequest.\n\nThe typical use case for NewFileTransport is to register the \"file\"\nprotocol with a Transport, as in:\n\n  t := &http.Transport{}\n  t.RegisterProtocol(\"file\", http.NewFileTransport(http.Dir(\"/\")))\n  c := &http.Client{Transport: t}\n  res, err := c.Get(\"file:///etc/passwd\")\n  ...\n",
         "kind": 3,
         "detail": "func(fs http.FileSystem) http.RoundTripper",
         "label": "NewFileTransport"
      },
      {
         "filterText": "NewRequest",
         "textEdit": {
            "newText": "NewRequest(${1:method string}, ${2:url string}, ${3:body io.Reader})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00147",
         "documentation": "NewRequest wraps NewRequestWithContext using the background context.\n",
         "kind": 3,
         "detail": "func(method string, url string, body io.Reader) (*http.Request, error)",
         "label": "NewRequest"
      },
      {
         "filterText": "NewRequestWithContext",
         "textEdit": {
            "newText": "NewRequestWithContext(${1:ctx context.Context}, ${2:method string}, ${3:url string}, ${4:body io.Reader})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00148",
         "documentation": "NewRequestWithContext returns a new Request given a method, URL, and\noptional body.\n\nIf the provided body is also an io.Closer, the returned\nRequest.Body is set to body and will be closed by the Client\nmethods Do, Post, and PostForm, and Transport.RoundTrip.\n\nNewRequestWithContext returns a Request suitable for use with\nClient.Do or Transport.RoundTrip. To create a request for use with\ntesting a Server Handler, either use the NewRequest function in the\nnet/http/httptest package, use ReadRequest, or manually update the\nRequest fields. For an outgoing client request, the context\ncontrols the entire lifetime of a request and its response:\nobtaining a connection, sending the request, and reading the\nresponse headers and body. See the Request type's documentation for\nthe difference between inbound and outbound request fields.\n\nIf body is of type *bytes.Buffer, *bytes.Reader, or\n*strings.Reader, the returned request's ContentLength is set to its\nexact value (instead of -1), GetBody is populated (so 307 and 308\nredirects can replay the body), and Body is set to NoBody if the\nContentLength is 0.\n",
         "kind": 3,
         "detail": "func(ctx context.Context, method string, url string, body io.Reader) (*http.Request, error)",
         "label": "NewRequestWithContext"
      },
      {
         "filterText": "NewServeMux",
         "textEdit": {
            "newText": "NewServeMux()",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00149",
         "documentation": "NewServeMux allocates and returns a new ServeMux.\n",
         "kind": 3,
         "detail": "func() *http.ServeMux",
         "label": "NewServeMux"
      },
      {
         "filterText": "NotFound",
         "textEdit": {
            "newText": "NotFound(${1:w http.ResponseWriter}, ${2:r *http.Request})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00150",
         "documentation": "NotFound replies to the request with an HTTP 404 not found error.\n",
         "kind": 3,
         "detail": "func(w http.ResponseWriter, r *http.Request)",
         "label": "NotFound"
      },
      {
         "filterText": "NotFoundHandler",
         "textEdit": {
            "newText": "NotFoundHandler()",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00151",
         "documentation": "NotFoundHandler returns a simple request handler\nthat replies to each request with a ``404 page not found'' reply.\n",
         "kind": 3,
         "detail": "func() http.Handler",
         "label": "NotFoundHandler"
      },
      {
         "filterText": "ParseHTTPVersion",
         "textEdit": {
            "newText": "ParseHTTPVersion(${1:vers string})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00152",
         "documentation": "ParseHTTPVersion parses an HTTP version string.\n\"HTTP/1.0\" returns (1, 0, true).\n",
         "kind": 3,
         "detail": "func(vers string) (major int, minor int, ok bool)",
         "label": "ParseHTTPVersion"
      },
      {
         "filterText": "ParseTime",
         "textEdit": {
            "newText": "ParseTime(${1:text string})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00153",
         "documentation": "ParseTime parses a time header (such as the Date: header),\ntrying each of the three formats allowed by HTTP/1.1:\nTimeFormat, time.RFC850, and time.ANSIC.\n",
         "kind": 3,
         "detail": "func(text string) (t time.Time, err error)",
         "label": "ParseTime"
      },
      {
         "filterText": "Post",
         "textEdit": {
            "newText": "Post(${1:url string}, ${2:contentType string}, ${3:body io.Reader})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00154",
         "documentation": "Post issues a POST to the specified URL.\n\nCaller should close resp.Body when done reading from it.\n\nIf the provided body is an io.Closer, it is closed after the\nrequest.\n\nPost is a wrapper around DefaultClient.Post.\n\nTo set custom headers, use NewRequest and DefaultClient.Do.\n\nSee the Client.Do method documentation for details on how redirects\nare handled.\n",
         "kind": 3,
         "detail": "func(url string, contentType string, body io.Reader) (resp *http.Response, err error)",
         "label": "Post"
      },
      {
         "filterText": "PostForm",
         "textEdit": {
            "newText": "PostForm(${1:url string}, ${2:data url.Values})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00155",
         "documentation": "PostForm issues a POST to the specified URL, with data's keys and\nvalues URL-encoded as the request body.\n\nThe Content-Type header is set to application/x-www-form-urlencoded.\nTo set other headers, use NewRequest and DefaultClient.Do.\n\nWhen err is nil, resp always contains a non-nil resp.Body.\nCaller should close resp.Body when done reading from it.\n\nPostForm is a wrapper around DefaultClient.PostForm.\n\nSee the Client.Do method documentation for details on how redirects\nare handled.\n",
         "kind": 3,
         "detail": "func(url string, data url.Values) (resp *http.Response, err error)",
         "label": "PostForm"
      },
      {
         "filterText": "ProxyFromEnvironment",
         "textEdit": {
            "newText": "ProxyFromEnvironment(${1:req *http.Request})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00156",
         "documentation": "ProxyFromEnvironment returns the URL of the proxy to use for a\ngiven request, as indicated by the environment variables\nHTTP_PROXY, HTTPS_PROXY and NO_PROXY (or the lowercase versions\nthereof). HTTPS_PROXY takes precedence over HTTP_PROXY for https\nrequests.\n\nThe environment values may be either a complete URL or a\n\"host[:port]\", in which case the \"http\" scheme is assumed.\nAn error is returned if the value is a different form.\n\nA nil URL and nil error are returned if no proxy is defined in the\nenvironment, or a proxy should not be used for the given request,\nas defined by NO_PROXY.\n\nAs a special case, if req.URL.Host is \"localhost\" (with or without\na port number), then a nil URL and nil error will be returned.\n",
         "kind": 3,
         "detail": "func(req *http.Request) (*url.URL, error)",
         "label": "ProxyFromEnvironment"
      },
      {
         "filterText": "ProxyURL",
         "textEdit": {
            "newText": "ProxyURL(${1:fixedURL *url.URL})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00157",
         "documentation": "ProxyURL returns a proxy function (for use in a Transport)\nthat always returns the same URL.\n",
         "kind": 3,
         "detail": "func(fixedURL *url.URL) func(*Request) (*url.URL, error)",
         "label": "ProxyURL"
      },
      {
         "filterText": "ReadRequest",
         "textEdit": {
            "newText": "ReadRequest(${1:b *bufio.Reader})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00158",
         "documentation": "ReadRequest reads and parses an incoming request from b.\n\nReadRequest is a low-level function and should only be used for\nspecialized applications; most code should use the Server to read\nrequests and handle them via the Handler interface. ReadRequest\nonly supports HTTP/1.x requests. For HTTP/2, use golang.org/x/net/http2.\n",
         "kind": 3,
         "detail": "func(b *bufio.Reader) (*http.Request, error)",
         "label": "ReadRequest"
      },
      {
         "filterText": "ReadResponse",
         "textEdit": {
            "newText": "ReadResponse(${1:r *bufio.Reader}, ${2:req *http.Request})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00159",
         "documentation": "ReadResponse reads and returns an HTTP response from r.\nThe req parameter optionally specifies the Request that corresponds\nto this Response. If nil, a GET request is assumed.\nClients must call resp.Body.Close when finished reading resp.Body.\nAfter that call, clients can inspect resp.Trailer to find key/value\npairs included in the response trailer.\n",
         "kind": 3,
         "detail": "func(r *bufio.Reader, req *http.Request) (*http.Response, error)",
         "label": "ReadResponse"
      },
      {
         "filterText": "Redirect",
         "textEdit": {
            "newText": "Redirect(${1:w http.ResponseWriter}, ${2:r *http.Request}, ${3:url string}, ${4:code int})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00160",
         "documentation": "Redirect replies to the request with a redirect to url,\nwhich may be a path relative to the request path.\n\nThe provided code should be in the 3xx range and is usually\nStatusMovedPermanently, StatusFound or StatusSeeOther.\n\nIf the Content-Type header has not been set, Redirect sets it\nto \"text/html; charset=utf-8\" and writes a small HTML body.\nSetting the Content-Type header to any value, including nil,\ndisables that behavior.\n",
         "kind": 3,
         "detail": "func(w http.ResponseWriter, r *http.Request, url string, code int)",
         "label": "Redirect"
      },
      {
         "filterText": "RedirectHandler",
         "textEdit": {
            "newText": "RedirectHandler(${1:url string}, ${2:code int})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00161",
         "documentation": "RedirectHandler returns a request handler that redirects\neach request it receives to the given url using the given\nstatus code.\n\nThe provided code should be in the 3xx range and is usually\nStatusMovedPermanently, StatusFound or StatusSeeOther.\n",
         "kind": 3,
         "detail": "func(url string, code int) http.Handler",
         "label": "RedirectHandler"
      },
      {
         "filterText": "Serve",
         "textEdit": {
            "newText": "Serve(${1:l net.Listener}, ${2:handler http.Handler})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00162",
         "documentation": "Serve accepts incoming HTTP connections on the listener l,\ncreating a new service goroutine for each. The service goroutines\nread requests and then call handler to reply to them.\n\nThe handler is typically nil, in which case the DefaultServeMux is used.\n\nHTTP/2 support is only enabled if the Listener returns *tls.Conn\nconnections and they were configured with \"h2\" in the TLS\nConfig.NextProtos.\n\nServe always returns a non-nil error.\n",
         "kind": 3,
         "detail": "func(l net.Listener, handler http.Handler) error",
         "label": "Serve"
      },
      {
         "filterText": "ServeContent",
         "textEdit": {
            "newText": "ServeContent(${1:w http.ResponseWriter}, ${2:req *http.Request}, ${3:name string}, ${4:modtime time.Time}, ${5:content io.ReadSeeker})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00163",
         "documentation": "ServeContent replies to the request using the content in the\nprovided ReadSeeker. The main benefit of ServeContent over io.Copy\nis that it handles Range requests properly, sets the MIME type, and\nhandles If-Match, If-Unmodified-Since, If-None-Match, If-Modified-Since,\nand If-Range requests.\n\nIf the response's Content-Type header is not set, ServeContent\nfirst tries to deduce the type from name's file extension and,\nif that fails, falls back to reading the first block of the content\nand passing it to DetectContentType.\nThe name is otherwise unused; in particular it can be empty and is\nnever sent in the response.\n\nIf modtime is not the zero time or Unix epoch, ServeContent\nincludes it in a Last-Modified header in the response. If the\nrequest includes an If-Modified-Since header, ServeContent uses\nmodtime to decide whether the content needs to be sent at all.\n\nThe content's Seek method must work: ServeContent uses\na seek to the end of the content to determine its size.\n\nIf the caller has set w's ETag header formatted per RFC 7232, section 2.3,\nServeContent uses it to handle requests using If-Match, If-None-Match, or If-Range.\n\nNote that *os.File implements the io.ReadSeeker interface.\n",
         "kind": 3,
         "detail": "func(w http.ResponseWriter, req *http.Request, name string, modtime time.Time, content io.ReadSeeker)",
         "label": "ServeContent"
      },
      {
         "filterText": "ServeFile",
         "textEdit": {
            "newText": "ServeFile(${1:w http.ResponseWriter}, ${2:r *http.Request}, ${3:name string})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00164",
         "documentation": "ServeFile replies to the request with the contents of the named\nfile or directory.\n\nIf the provided file or directory name is a relative path, it is\ninterpreted relative to the current directory and may ascend to\nparent directories. If the provided name is constructed from user\ninput, it should be sanitized before calling ServeFile.\n\nAs a precaution, ServeFile will reject requests where r.URL.Path\ncontains a \"..\" path element; this protects against callers who\nmight unsafely use filepath.Join on r.URL.Path without sanitizing\nit and then use that filepath.Join result as the name argument.\n\nAs another special case, ServeFile redirects any request where r.URL.Path\nends in \"/index.html\" to the same path, without the final\n\"index.html\". To avoid such redirects either modify the path or\nuse ServeContent.\n\nOutside of those two special cases, ServeFile does not use\nr.URL.Path for selecting the file or directory to serve; only the\nfile or directory provided in the name argument is used.\n",
         "kind": 3,
         "detail": "func(w http.ResponseWriter, r *http.Request, name string)",
         "label": "ServeFile"
      },
      {
         "filterText": "ServeTLS",
         "textEdit": {
            "newText": "ServeTLS(${1:l net.Listener}, ${2:handler http.Handler}, ${3:certFile string}, ${4:keyFile string})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00165",
         "documentation": "ServeTLS accepts incoming HTTPS connections on the listener l,\ncreating a new service goroutine for each. The service goroutines\nread requests and then call handler to reply to them.\n\nThe handler is typically nil, in which case the DefaultServeMux is used.\n\nAdditionally, files containing a certificate and matching private key\nfor the server must be provided. If the certificate is signed by a\ncertificate authority, the certFile should be the concatenation\nof the server's certificate, any intermediates, and the CA's certificate.\n\nServeTLS always returns a non-nil error.\n",
         "kind": 3,
         "detail": "func(l net.Listener, handler http.Handler, certFile string, keyFile string) error",
         "label": "ServeTLS"
      },
      {
         "filterText": "SetCookie",
         "textEdit": {
            "newText": "SetCookie(${1:w http.ResponseWriter}, ${2:cookie *http.Cookie})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00166",
         "documentation": "SetCookie adds a Set-Cookie header to the provided ResponseWriter's headers.\nThe provided cookie must have a valid Name. Invalid cookies may be\nsilently dropped.\n",
         "kind": 3,
         "detail": "func(w http.ResponseWriter, cookie *http.Cookie)",
         "label": "SetCookie"
      },
      {
         "filterText": "StatusText",
         "textEdit": {
            "newText": "StatusText(${1:code int})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00167",
         "documentation": "StatusText returns a text for the HTTP status code. It returns the empty\nstring if the code is unknown.\n",
         "kind": 3,
         "detail": "func(code int) string",
         "label": "StatusText"
      },
      {
         "filterText": "StripPrefix",
         "textEdit": {
            "newText": "StripPrefix(${1:prefix string}, ${2:h http.Handler})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00168",
         "documentation": "StripPrefix returns a handler that serves HTTP requests\nby removing the given prefix from the request URL's Path\nand invoking the handler h. StripPrefix handles a\nrequest for a path that doesn't begin with prefix by\nreplying with an HTTP 404 not found error.\n",
         "kind": 3,
         "detail": "func(prefix string, h http.Handler) http.Handler",
         "label": "StripPrefix"
      },
      {
         "filterText": "TimeoutHandler",
         "textEdit": {
            "newText": "TimeoutHandler(${1:h http.Handler}, ${2:dt time.Duration}, ${3:msg string})",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00169",
         "documentation": "TimeoutHandler returns a Handler that runs h with the given time limit.\n\nThe new Handler calls h.ServeHTTP to handle each request, but if a\ncall runs for longer than its time limit, the handler responds with\na 503 Service Unavailable error and the given message in its body.\n(If msg is empty, a suitable default message will be sent.)\nAfter such a timeout, writes by h to its ResponseWriter will return\nErrHandlerTimeout.\n\nTimeoutHandler supports the Pusher interface but does not support\nthe Hijacker or Flusher interfaces.\n",
         "kind": 3,
         "detail": "func(h http.Handler, dt time.Duration, msg string) http.Handler",
         "label": "TimeoutHandler"
      },
      {
         "filterText": "DefaultClient.CheckRedirect",
         "textEdit": {
            "newText": "DefaultClient.CheckRedirect",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00170",
         "documentation": "CheckRedirect specifies the policy for handling redirects.\nIf CheckRedirect is not nil, the client calls it before\nfollowing an HTTP redirect. The arguments req and via are\nthe upcoming request and the requests made already, oldest\nfirst. If CheckRedirect returns an error, the Client's Get\nmethod returns both the previous Response (with its Body\nclosed) and CheckRedirect's error (wrapped in a url.Error)\ninstead of issuing the Request req.\nAs a special case, if CheckRedirect returns ErrUseLastResponse,\nthen the most recent response is returned with its body\nunclosed, along with a nil error.\n\nIf CheckRedirect is nil, the Client uses its default policy,\nwhich is to stop after 10 consecutive requests.\n",
         "kind": 5,
         "detail": "func(req *Request, via []*Request) error",
         "label": "DefaultClient.CheckRedirect"
      },
      {
         "filterText": "DefaultClient.Jar",
         "textEdit": {
            "newText": "DefaultClient.Jar",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00171",
         "documentation": "Jar specifies the cookie jar.\n\nThe Jar is used to insert relevant cookies into every\noutbound Request and is updated with the cookie values\nof every inbound Response. The Jar is consulted for every\nredirect that the Client follows.\n\nIf Jar is nil, cookies are only sent if they are explicitly\nset on the Request.\n",
         "kind": 5,
         "detail": "http.CookieJar",
         "label": "DefaultClient.Jar"
      },
      {
         "filterText": "DefaultClient.Transport",
         "textEdit": {
            "newText": "DefaultClient.Transport",
            "range": {
               "start": {
                  "line": 50,
                  "character": 6
               },
               "end": {
                  "line": 50,
                  "character": 6
               }
            }
         },
         "insertTextFormat": 2,
         "sortText": "00172",
         "documentation": "Transport specifies the mechanism by which individual\nHTTP requests are made.\nIf nil, DefaultTransport is used.\n",
         "kind": 5,
         "detail": "http.RoundTripper",
         "label": "DefaultClient.Transport"
      }
   ],
   "isIncomplete": true
}
@willrowe
Copy link
Contributor

willrowe commented Aug 4, 2020

I'm seeing this same issue with intelephense.

@rwols
Copy link
Member

rwols commented Aug 4, 2020

With respect to gopls: this seems to be due to gopls. I can reproduce it with any module from the standard library. I seem to have found one instance where this happens, but it is not exactly your set up. With this config:

        "gopls": {
            "command": [
                "$home/go/bin/gopls"
            ],
            "enabled": true,
            "settings": {
                "gopls.completeUnimported": true,
            },
        },

And this file:

package main

func main() {
	
}

Type x and choose xml from the completion list. This adds an import statement at the top of the file. Then quickly type a . (dot). This makes gopls return nothing.

We seem to do everything correctly here:

::  -> gopls textDocument/didChange: {'textDocument': {'uri': 'file:///home/raoul/Documents/Programming/temp/goproject/main.go', 'version': 5}, 'contentChanges': [{'text': '', 'rangeLength': 1, 'range': {'end': {'character': 2, 'line': 3}, 'start': {'character': 1, 'line': 3}}}, {'text': 'xml', 'rangeLength': 0, 'range': {'end': {'character': 1, 'line': 3}, 'start': {'character': 1, 'line': 3}}}, {'text': '\nimport "encoding/xml"\n', 'rangeLength': 0, 'range': {'end': {'character': 0, 'line': 1}, 'start': {'character': 0, 'line': 1}}}, {'text': '.', 'rangeLength': 0, 'range': {'end': {'character': 4, 'line': 5}, 'start': {'character': 4, 'line': 5}}}]}
:: --> gopls textDocument/completion(3): {'position': {'character': 5, 'line': 5}, 'textDocument': {'uri': 'file:///home/raoul/Documents/Programming/temp/goproject/main.go'}}
gopls: 2020/08/04 19:20:21 go/packages.Load
	snapshot=3
	directory=/home/raoul/Documents/Programming/temp/goproject
	query=[file=/home/raoul/Documents/Programming/temp/goproject/main.go]
	packages=1

:: <-  gopls window/logMessage: {'message': '2020/08/04 19:20:21 go/packages.Load\n\tsnapshot=3\n\tdirectory=/home/raoul/Documents/Programming/temp/goproject\n\tquery=[file=/home/raoul/Documents/Programming/temp/goproject/main.go]\n\tpackages=1\n', 'type': 3}
gopls: 2020/08/04 19:20:21 go/packages.Load
	snapshot=3
	package_path="command-line-arguments"
	files=[/home/raoul/Documents/Programming/temp/goproject/main.go]

:: <-  gopls window/logMessage: {'message': '2020/08/04 19:20:21 go/packages.Load\n\tsnapshot=3\n\tpackage_path="command-line-arguments"\n\tfiles=[/home/raoul/Documents/Programming/temp/goproject/main.go]\n', 'type': 3}
:: <<< gopls 3: {'items': [], 'isIncomplete': False}
gopls: 2020/08/04 19:20:21 go/packages.Load
	snapshot=3
	directory=/home/raoul/Documents/Programming/temp/goproject
	query=[./]
	packages=1

:: <-  gopls window/logMessage: {'message': '2020/08/04 19:20:21 go/packages.Load\n\tsnapshot=3\n\tdirectory=/home/raoul/Documents/Programming/temp/goproject\n\tquery=[./]\n\tpackages=1\n', 'type': 3}
:: <-  gopls textDocument/publishDiagnostics: {'uri': 'file:///home/raoul/Documents/Programming/temp/goproject/main.go', 'version': 5, 'diagnostics': [{'severity': 1, 'message': "expected selector or type assertion, found '}'", 'source': 'syntax', 'range': {'end': {'character': 6, 'line': 5}, 'start': {'character': 6, 'line': 5}}}]}
gopls: 2020/08/04 19:20:50 background imports cache refresh starting

:: <-  gopls window/logMessage: {'message': '2020/08/04 19:20:50 background imports cache refresh starting\n', 'type': 3}
gopls: 2020/08/04 19:20:50 background refresh finished after 2.153425ms

Notice these two log lines:

gopls: 2020/08/04 19:20:50 background imports cache refresh starting
gopls: 2020/08/04 19:20:50 background refresh finished after 2.153425ms

This is after the completion response. After these log lines gopls works correctly. It seems to me gopls should await the background imports cache refresh before computing completions. Also, typing the dot very slowly after the initial xml completion makes gopls function correctly straight away.

EDIT: go info:

gopls: 2020/08/04 19:20:16 Build info
----------
golang.org/x/tools/gopls master
    golang.org/x/tools/[email protected] h1:H1qDkZtLu7z/KnZ3KiRkKjzGME9h1MgdyeIjQQNQizw=
    github.com/BurntSushi/[email protected] h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
    github.com/google/[email protected] h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
    github.com/sergi/[email protected] h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/[email protected] h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
    golang.org/x/[email protected] h1:qwRHBd0NqMbJxfbotnDhm2ByMI1Shq4Y6oRJo21SGJA=
    golang.org/x/[email protected] h1:szSOL78iTCl0LF1AMjhSWJj8tIM0KixlUUnBtYXsmd8=
    golang.org/x/[email protected] h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
    honnef.co/go/[email protected] h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
    mvdan.cc/[email protected] h1:gi7cb8HTDZ6q8VqsUpkdoFi3vxwHMneQ6+Q5Ap5hjPE=
    mvdan.cc/xurls/[email protected] h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=

Go info
-------
go version go1.13.8 linux/amd64

@rwols
Copy link
Member

rwols commented Aug 4, 2020

That said, with this file:

package main

import (
	"net/http"
)

func main() {
	
}

I cannot seem to reproduce the set up of typing http followed by a . and then seeing no completions.

@TerminalFi
Copy link
Contributor Author

@rwols Interesting, I will look into it more and try from a clean project. I'll see about looking into gopls code as well

@predragnikolic
Copy link
Member

Ubuntu 19.10,
Pulled the latest LSP st-4000, st 4081.
I installed gopls through https://snapcraft.io/install/gopls/ubuntu (don't know what is the version of gopls)
but I am getting an empty AC popup when i type a ..
Here is the response I got. Is it just me?

:: --> gopls textDocument/completion(167): {'position': {'character': 9, 'line': 7}, 'textDocument': {'uri': 'file:///home/predrag/.config/sublime-text/Packages/LSP/main.go'}}
:: <<< gopls 167: {'isIncomplete': False, 'items': []}

output

@willrowe
Copy link
Contributor

Was this found to be specific to gopls? I'm wondering if I should open a separate issue for intelephense.

@rchl
Copy link
Member

rchl commented Aug 12, 2020

@predragnikolic you are getting a message there from gopls saying that the code has failed to compile. I don't know why it's that, I don't code in go. (Note that it could still be an LSP bug if we'd, for example, fail to synchronize document properly but it's probably unlikely in such a small example)

@wsw0108
Copy link

wsw0108 commented Sep 1, 2020

I have same problem with ST/4084 and LSP/1.0.10.

My reproduce steps:

  1. input 'http'
  2. input '.'
  3. only show completion list with two items.

If above steps can not reproduce(show correct completion list), then

  1. delete '.'
  2. delete 'p', remain 'htt'
  3. input 'p', show completion list like ['http', 'httputil', ...]
  4. input '.'
  5. only show completion list with two items.

But, if press TAB/Enter after 3, then input '.', then ST show correct completion list.

@rwols rwols added the language server issue Issues related to language servers communicating with this plugin label Nov 4, 2020
@alecthomas
Copy link

I'm having the same issue (as described in #1680).

@alecthomas
Copy link

I'm unable to replicate this failure in VSCode FWIW, though from memory I have found gopls to be flaky with VSCode in other situations, so the success may just be luck.

@alecthomas
Copy link

I just did a bunch more testing with VSCode and while this exact issue replicates less frequently than with Sublime, it and other issues do also occur, so it seems to me it's likely (still) a bug in gopls.

@pelemarse
Copy link

pelemarse commented Aug 4, 2021

same 💩. How can this be fixed to work normally? I also use Vim, Nova with the same gopls, but there is no such problem.

After you enter the dot, autocomplete is empty, but autocomplete returns a list when:

  1. Delete the dot, and enter dot again.
  2. Select from autocomplete row, press enter and then press the dot.
  3. Press the dot then TAB.
  4. After the dot, enter a character.
  5. Close autocomplete with ESCAPE, then press the dot.

https://user-images.githubusercontent.com/29234307/128247383-8912c385-2693-45d8-8edd-d70479caf6d9.mov
https://user-images.githubusercontent.com/29234307/128248403-6e27da63-29da-47c6-9fca-f6985b1bb313.mov
https://user-images.githubusercontent.com/29234307/128248558-982b737c-30d8-43ca-a279-28d291ecac0a.mov
https://user-images.githubusercontent.com/29234307/128248632-32d94a09-4231-4d05-9036-f6501d30166d.mov
https://user-images.githubusercontent.com/29234307/128248696-71787086-26b2-491f-a44e-31403094467f.mov

@rchl
Copy link
Member

rchl commented Aug 5, 2021

Logging the server communication would tell clearly whether it's a bug in the server - https://lsp.sublimetext.io/troubleshooting/#self-help-instructions

@pelemarse
Copy link

Screen.Recording.2021-08-05.at.20.42.27.mp4

Versions

Sublime Text: Build 4112
MacOS: 11.5.1

LSP Settings

"inhibit_snippet_completions": true
"inhibit_word_completions": true

Sublime Text Settings

"auto_complete_delay": 2000

Test Source

// main.go

package main

type TestAutocomplete struct {

}

func (tm *TestAutocomplete) MethodA() {

}

func (tm *TestAutocomplete) MethodB() {

}

func (tm *TestAutocomplete) MethodC() {

}

func main() {
	tm := new(TestAutocomplete)
	
	// for simplicity golang one structure with three methods.
	// After entering 'tm.' must display an autocomplete list with these methods.
	//
	//---------------------
	// MethodA      func()
	// MethodB      func()
	// MethodC      fucn()
	// ...
	//---------------------

	// tm.
}

LSP Server Logs

type tm characters on the keyboard, and we get a list that is visible and correct.

::  -> gopls textDocument/didChange: {'contentChanges': [{'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 1}}, 'rangeLength': 0, 'text': 't'}, {'range': {'start': {'line': 21, 'character': 2}, 'end': {'line': 21, 'character': 2}}, 'rangeLength': 0, 'text': 'm'}], 'textDocument': {'version': 277, 'uri': 'file:///Users/pelemarse/code/bug/main.go'}}
:: --> gopls textDocument/documentHighlight(55): {'textDocument': {'uri': 'file:///Users/pelemarse/code/bug/main.go'}, 'position': {'line': 21, 'character': 3}}
:: <<< gopls 55: [{'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 3}}, 'kind': 1}, {'range': {'start': {'line': 19, 'character': 1}, 'end': {'line': 19, 'character': 3}}, 'kind': 1}]
:: <-  gopls textDocument/publishDiagnostics: {'version': 277, 'diagnostics': [{'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 3}}, 'code': 'UnusedExpr', 'source': 'compiler', 'message': 'tm (variable of type *TestAutocomplete) is not used', 'severity': 1, 'codeDescription': {'href': 'https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#UnusedExpr'}}], 'uri': 'file:///Users/pelemarse/code/bug/main.go'}
:: --> gopls textDocument/codeAction(56): {'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 3}}, 'context': {'diagnostics': [{'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 3}}, 'code': 'UnusedExpr', 'source': 'compiler', 'message': 'tm (variable of type *TestAutocomplete) is not used', 'severity': 1, 'codeDescription': {'href': 'https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#UnusedExpr'}}]}, 'textDocument': {'uri': 'file:///Users/pelemarse/code/bug/main.go'}}
:: <<< gopls 56: None
:: --> gopls textDocument/completion(57): {'textDocument': {'uri': 'file:///Users/pelemarse/code/bug/main.go'}, 'position': {'line': 21, 'character': 3}}
:: <<< gopls 57: {'isIncomplete': True, 'items': [{'preselect': True, 'filterText': 'tm', 'insertTextFormat': 2, 'labelDetails': {}, 'detail': '*TestAutocomplete', 'kind': 6, 'textEdit': {'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 3}}, 'newText': 'tm'}, 'sortText': '00000', 'label': 'tm'}, {'filterText': 'tm.MethodA', 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'func()', 'kind': 2, 'textEdit': {'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 3}}, 'newText': 'tm.MethodA()'}, 'sortText': '00001', 'label': 'tm.MethodA'}, {'filterText': 'tm.MethodB', 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'func()', 'kind': 2, 'textEdit': {'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 3}}, 'newText': 'tm.MethodB()'}, 'sortText': '00002', 'label': 'tm.MethodB'}, {'filterText': 'tm.MethodC', 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'func()', 'kind': 2, 'textEdit': {'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 3}}, 'newText': 'tm.MethodC()'}, 'sortText': '00003', 'label': 'tm.MethodC'}, {'filterText': 'TestAutocomplete', 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'struct{...}', 'kind': 22, 'textEdit': {'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 3}}, 'newText': 'TestAutocomplete'}, 'sortText': '00004', 'label': 'TestAutocomplete'}]}

then type . characters on the keyboard, and we get a list that is visible and correct.

::  -> gopls textDocument/didChange: {'contentChanges': [{'range': {'start': {'line': 21, 'character': 3}, 'end': {'line': 21, 'character': 3}}, 'rangeLength': 0, 'text': '.'}], 'textDocument': {'version': 278, 'uri': 'file:///Users/pelemarse/code/bug/main.go'}}
:: --> gopls textDocument/completion(58): {'textDocument': {'uri': 'file:///Users/pelemarse/code/bug/main.go'}, 'position': {'line': 21, 'character': 4}}

but very quickly the autocomplete list remains empty

:: <-  gopls textDocument/publishDiagnostics: {'version': 278, 'diagnostics': [{'range': {'start': {'line': 21, 'character': 5}, 'end': {'line': 21, 'character': 5}}, 'source': 'syntax', 'message': "expected selector or type assertion, found '}'", 'severity': 1}], 'uri': 'file:///Users/pelemarse/code/bug/main.go'}
:: --> gopls textDocument/codeAction(59): {'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'context': {'diagnostics': [{'range': {'start': {'line': 21, 'character': 5}, 'end': {'line': 21, 'character': 5}}, 'source': 'syntax', 'message': "expected selector or type assertion, found '}'", 'severity': 1}]}, 'textDocument': {'uri': 'file:///Users/pelemarse/code/bug/main.go'}}
:: <<< gopls 58: {'isIncomplete': True, 'items': [{'preselect': True, 'filterText': 'MethodA', 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'func()', 'kind': 2, 'textEdit': {'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'newText': 'MethodA()'}, 'sortText': '00000', 'label': 'MethodA'}, {'filterText': 'MethodB', 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'func()', 'kind': 2, 'textEdit': {'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'newText': 'MethodB()'}, 'sortText': '00001', 'label': 'MethodB'}, {'filterText': 'MethodC', 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'func()', 'kind': 2, 'textEdit': {'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'newText': 'MethodC()'}, 'sortText': '00002', 'label': 'MethodC'}, {'additionalTextEdits': [{'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 4}}, 'newText': ''}, {'range': {'start': {'line': 1, 'character': 0}, 'end': {'line': 1, 'character': 0}}, 'newText': '\nimport "fmt"\n'}], 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'print to stdout', 'kind': 15, 'textEdit': {'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'newText': 'fmt.Printf("tm: %v\\n", tm)'}, 'sortText': '00003', 'label': 'print!'}, {'additionalTextEdits': [{'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 4}}, 'newText': ''}], 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'assign to variable', 'kind': 15, 'textEdit': {'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'newText': 'ta := tm'}, 'sortText': '00004', 'label': 'var!'}]}
:: <<< gopls 59: None
:: --> gopls textDocument/documentHighlight(60): {'textDocument': {'uri': 'file:///Users/pelemarse/code/bug/main.go'}, 'position': {'line': 21, 'character': 4}}
:: <<< gopls 60: [{'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 5}}, 'kind': 1}]

after I enter . symbol, then delete .. symbols

::  -> gopls textDocument/didChange: {'contentChanges': [{'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'rangeLength': 0, 'text': '.'}], 'textDocument': {'version': 279, 'uri': 'file:///Users/pelemarse/code/bug/main.go'}}
:: --> gopls textDocument/documentHighlight(61): {'textDocument': {'uri': 'file:///Users/pelemarse/code/bug/main.go'}, 'position': {'line': 21, 'character': 5}}
:: <<< gopls 61: [{'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 5}}, 'kind': 1}, {'range': {'start': {'line': 21, 'character': 6}, 'end': {'line': 21, 'character': 7}}, 'kind': 1}]
:: <-  gopls textDocument/publishDiagnostics: {'version': 279, 'diagnostics': [{'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'source': 'syntax', 'message': "expected selector or type assertion, found '.'", 'severity': 1}], 'uri': 'file:///Users/pelemarse/code/bug/main.go'}
:: --> gopls textDocument/codeAction(62): {'range': {'start': {'line': 21, 'character': 5}, 'end': {'line': 21, 'character': 5}}, 'context': {'diagnostics': []}, 'textDocument': {'uri': 'file:///Users/pelemarse/code/bug/main.go'}}
:: <<< gopls 62: None
::  -> gopls textDocument/didChange: {'contentChanges': [{'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 5}}, 'rangeLength': 1, 'text': ''}, {'range': {'start': {'line': 21, 'character': 3}, 'end': {'line': 21, 'character': 4}}, 'rangeLength': 1, 'text': ''}], 'textDocument': {'version': 281, 'uri': 'file:///Users/pelemarse/code/bug/main.go'}}
:: --> gopls textDocument/documentHighlight(63): {'textDocument': {'uri': 'file:///Users/pelemarse/code/bug/main.go'}, 'position': {'line': 21, 'character': 3}}
:: <<< gopls 63: [{'range': {'start': {'line': 19, 'character': 1}, 'end': {'line': 19, 'character': 3}}, 'kind': 1}, {'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 3}}, 'kind': 1}]
:: <-  gopls textDocument/publishDiagnostics: {'version': 281, 'diagnostics': [{'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 3}}, 'code': 'UnusedExpr', 'source': 'compiler', 'message': 'tm (variable of type *TestAutocomplete) is not used', 'severity': 1, 'codeDescription': {'href': 'https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#UnusedExpr'}}], 'uri': 'file:///Users/pelemarse/code/bug/main.go'}
:: --> gopls textDocument/codeAction(64): {'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 3}}, 'context': {'diagnostics': [{'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 3}}, 'code': 'UnusedExpr', 'source': 'compiler', 'message': 'tm (variable of type *TestAutocomplete) is not used', 'severity': 1, 'codeDescription': {'href': 'https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#UnusedExpr'}}]}, 'textDocument': {'uri': 'file:///Users/pelemarse/code/bug/main.go'}}
:: <<< gopls 64: None

and and re-enter . symbol, the list is visible again

::  -> gopls textDocument/didChange: {'contentChanges': [{'range': {'start': {'line': 21, 'character': 3}, 'end': {'line': 21, 'character': 3}}, 'rangeLength': 0, 'text': '.'}], 'textDocument': {'version': 282, 'uri': 'file:///Users/pelemarse/code/bug/main.go'}}
:: --> gopls textDocument/documentHighlight(65): {'textDocument': {'uri': 'file:///Users/pelemarse/code/bug/main.go'}, 'position': {'line': 21, 'character': 4}}
:: <<< gopls 65: [{'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 5}}, 'kind': 1}]
:: <-  gopls textDocument/publishDiagnostics: {'version': 282, 'diagnostics': [{'range': {'start': {'line': 21, 'character': 5}, 'end': {'line': 21, 'character': 5}}, 'source': 'syntax', 'message': "expected selector or type assertion, found '}'", 'severity': 1}], 'uri': 'file:///Users/pelemarse/code/bug/main.go'}
:: --> gopls textDocument/codeAction(66): {'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'context': {'diagnostics': [{'range': {'start': {'line': 21, 'character': 5}, 'end': {'line': 21, 'character': 5}}, 'source': 'syntax', 'message': "expected selector or type assertion, found '}'", 'severity': 1}]}, 'textDocument': {'uri': 'file:///Users/pelemarse/code/bug/main.go'}}
:: <<< gopls 66: None
:: --> gopls textDocument/completion(67): {'textDocument': {'uri': 'file:///Users/pelemarse/code/bug/main.go'}, 'position': {'line': 21, 'character': 4}}
:: <<< gopls 67: {'isIncomplete': True, 'items': [{'preselect': True, 'filterText': 'MethodA', 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'func()', 'kind': 2, 'textEdit': {'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'newText': 'MethodA()'}, 'sortText': '00000', 'label': 'MethodA'}, {'filterText': 'MethodB', 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'func()', 'kind': 2, 'textEdit': {'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'newText': 'MethodB()'}, 'sortText': '00001', 'label': 'MethodB'}, {'filterText': 'MethodC', 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'func()', 'kind': 2, 'textEdit': {'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'newText': 'MethodC()'}, 'sortText': '00002', 'label': 'MethodC'}, {'additionalTextEdits': [{'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 4}}, 'newText': ''}, {'range': {'start': {'line': 1, 'character': 0}, 'end': {'line': 1, 'character': 0}}, 'newText': '\nimport "fmt"\n'}], 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'print to stdout', 'kind': 15, 'textEdit': {'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'newText': 'fmt.Printf("tm: %v\\n", tm)'}, 'sortText': '00003', 'label': 'print!'}, {'additionalTextEdits': [{'range': {'start': {'line': 21, 'character': 1}, 'end': {'line': 21, 'character': 4}}, 'newText': ''}], 'insertTextFormat': 2, 'labelDetails': {}, 'detail': 'assign to variable', 'kind': 15, 'textEdit': {'range': {'start': {'line': 21, 'character': 4}, 'end': {'line': 21, 'character': 4}}, 'newText': 'ta := tm'}, 'sortText': '00004', 'label': 'var!'}]}

@rchl
Copy link
Member

rchl commented Aug 5, 2021

Thanks for a detailed report. I've reproduced, minimized and created a core issue for it: sublimehq/sublime_text#4727.

@rchl
Copy link
Member

rchl commented Aug 5, 2021

BTW. I'm not sure if that's the same issue as the initial one since the results are quite different.

@quapo
Copy link

quapo commented Nov 16, 2021

@rchl that's not the intial issue. The initial one was that not all completions were shown. I encountered the same problem as the intial one. I originally opened a issue sublimelsp/LSP-gopls#13 but @rwols mentioned this issue. So the initial issue isn't fixed.

LSP gopls troubleshoot

Troubleshooting: gopls

Version

  • LSP: 1.13.0
  • Sublime Text: 4121

Server Test Run

  • exit code: 0
  • output

Server Configuration

  • command
[
  "${storage_path}/LSP-gopls/bin/gopls"
]
  • shell command
"C:\Users\Max\AppData\Local\Sublime Text\Package Storage/LSP-gopls/bin/gopls"
  • selector
source.go | source.gomod
  • priority_selector
source.go | source.gomod
  • init_options
{}
  • settings
{
  "gopls": {
    "allowImplicitNetworkAccess": false, 
    "allowModfileModifications": false, 
    "analyses": {}, 
    "annotations": {}, 
    "buildFlags": [], 
    "codelenses": {}, 
    "completionBudget": "100ms", 
    "diagnosticsDelay": "250ms", 
    "directoryFilters": [], 
    "env": {}, 
    "expandWorkspaceToModule": true, 
    "experimentalPackageCacheKey": true, 
    "experimentalPostfixCompletions": true, 
    "experimentalTemplateSupport": false, 
    "experimentalWorkspaceModule": false, 
    "gofumpt": false, 
    "hoverKind": "FullDocumentation", 
    "importShortcut": "Both", 
    "linkTarget": "pkg.go.dev", 
    "linksInHover": true, 
    "local": "", 
    "matcher": "Fuzzy", 
    "memoryMode": "Normal", 
    "semanticTokens": false, 
    "staticcheck": false, 
    "symbolMatcher": "Fuzzy", 
    "symbolStyle": "Dynamic", 
    "usePlaceholders": false, 
    "verboseOutput": false
  }
}
  • env
{}

Active view

  • File name
C:\Users\Max\Desktop\hello\hello.go
  • Settings
{
  "auto_complete_selector": "meta.tag, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc", 
  "lsp_active": true, 
  "syntax": "Packages/Go/Go.sublime-syntax"
}
  • base scope
source.go

Project / Workspace

  • folders
[]
  • is project: False

LSP configuration

{
  "clients": {
    "clangd": {
      "enabled": true
    }
  }, 
  "log_debug": true, 
  "log_server": [
    "panel"
  ], 
  "show_code_actions": "", 
  "show_code_lens": "phantom", 
  "show_diagnostics_count_in_view_status": true
}

System PATH

  • C:\Program Files\Common Files\Oracle\Java\javapath
  • C:\Program Files (x86)\Common Files\Oracle\Java\javapath
  • C:\WINDOWS\system32
  • C:\WINDOWS
  • C:\WINDOWS\System32\Wbem
  • C:\WINDOWS\System32\WindowsPowerShell\v1.0\
  • C:\WINDOWS\System32\OpenSSH\
  • C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR
  • C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common
  • C:\Program Files\nodejs\
  • C:\ProgramData\chocolatey\bin
  • C:\Program Files\Docker\Docker\resources\bin
  • C:\ProgramData\DockerDesktop\version-bin
  • C:\Program Files\Go\bin
  • C:\Program Files\PuTTY\
  • C:\Program Files\LLVM\bin
  • C:\Users\Max\AppData\Local\Programs\Python\Python310\Scripts\
  • C:\Users\Max\AppData\Local\Programs\Python\Python310\
  • C:\Users\Max\AppData\Local\Microsoft\WindowsApps
  • C:\Users\Max\AppData\Roaming\npm
  • C:\Users\Max\go\bin

I did some testing and with the following LSP setting the problem wont occur.

"auto_complete_delay": 2000

Example

In my case i used the code

package main

import "fmt"

func main() {
    fmt.Println("Hello World")
}

When entering fmt (without pressing TAB) and entering a dot after it this autocomplete is shown:
image
Entering "fmt" outputs the logs

::  -> gopls textDocument/didChange: {'textDocument': {'version': 195, 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'contentChanges': [{'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 4}}, 'text': 'f', 'rangeLength': 0}]}
:: --> gopls textDocument/completion(53): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'position': {'line': 6, 'character': 5}}
:: <-  gopls textDocument/publishDiagnostics: {'version': 195, 'diagnostics': [{'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'severity': 1, 'message': 'undeclared name: f', 'code': 'UndeclaredName', 'source': 'compiler', 'tags': [1], 'codeDescription': {'href': 'https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#UndeclaredName'}}], 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}
:: <<< gopls 53: {'items': [{'kind': 9, 'sortText': '00000', 'label': 'fmt', 'detail': '"fmt"', 'preselect': True, 'filterText': 'fmt', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'fmt'}}, {'kind': 14, 'sortText': '00001', 'label': 'for', 'filterText': 'for', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'for'}}, {'kind': 21, 'sortText': '00002', 'label': 'false', 'filterText': 'false', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'false'}}, {'kind': 7, 'sortText': '00003', 'label': 'float32', 'filterText': 'float32', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'float32'}}, {'kind': 7, 'sortText': '00004', 'label': 'float64', 'filterText': 'float64', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'float64'}}, {'kind': 9, 'sortText': '00005', 'label': 'flag', 'detail': '"flag"', 'additionalTextEdits': [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 7}}, 'newText': '(\n\t"flag"\n\t'}, {'range': {'start': {'line': 3, 'character': 0}, 'end': {'line': 3, 'character': 0}}, 'newText': ')\n'}], 'filterText': 'flag', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'flag'}}, {'kind': 9, 'sortText': '00006', 'label': 'flate', 'detail': '"compress/flate"', 'additionalTextEdits': [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 7}}, 'newText': '(\n\t"compress/flate"\n\t'}, {'range': {'start': {'line': 3, 'character': 0}, 'end': {'line': 3, 'character': 0}}, 'newText': ')\n'}], 'filterText': 'flate', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'flate'}}, {'kind': 9, 'sortText': '00007', 'label': 'format', 'detail': '"go/format"', 'additionalTextEdits': [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 7}}, 'newText': '(\n\t'}, {'range': {'start': {'line': 3, 'character': 0}, 'end': {'line': 3, 'character': 0}}, 'newText': '\t"go/format"\n)\n'}], 'filterText': 'format', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'format'}}, {'kind': 9, 'sortText': '00008', 'label': 'fs', 'detail': '"io/fs"', 'additionalTextEdits': [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 7}}, 'newText': '(\n\t'}, {'range': {'start': {'line': 3, 'character': 0}, 'end': {'line': 3, 'character': 0}}, 'newText': '\t"io/fs"\n)\n'}], 'filterText': 'fs', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'fs'}}, {'kind': 9, 'sortText': '00009', 'label': 'fmtsort', 'detail': '"internal/fmtsort"', 'additionalTextEdits': [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 7}}, 'newText': '(\n\t'}, {'range': {'start': {'line': 3, 'character': 0}, 'end': {'line': 3, 'character': 0}}, 'newText': '\t"internal/fmtsort"\n)\n'}], 'filterText': 'fmtsort', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'fmtsort'}}, {'documentation': 'Errorf formats according to a format specifier and returns the string as a\nvalue that satisfies error.\n\nIf the format specifier includes a %w verb with an error operand,\nthe returned error will implement an Unwrap method returning the operand. It is\ninvalid to include more than one %w verb or to supply it with an operand\nthat does not implement the error interface. The %w verb is otherwise\na synonym for %v.\n', 'kind': 3, 'sortText': '00010', 'label': 'fmt.Errorf', 'detail': 'func(format string, a ...interface{}) error', 'filterText': 'fmt.Errorf', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'fmt.Errorf(${1:})'}}, {'documentation': 'Formatter is implemented by any value that has a Format method.\nThe implementation controls how State and rune are interpreted,\nand may call Sprint(f) or Fprint(f) etc. to generate its output.\n', 'kind': 8, 'sortText': '00011', 'label': 'fmt.Formatter', 'detail': 'interface{...}', 'filterText': 'fmt.Formatter', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'fmt.Formatter'}}, {'documentation': 'Fprint formats using the default formats for its operands and writes to w.\nSpaces are added between operands when neither is a string.\nIt returns the number of bytes written and any write error encountered.\n', 'kind': 3, 'sortText': '00012', 'label': 'fmt.Fprint', 'detail': 'func(w io.Writer, a ...interface{}) (n int, err error)', 'filterText': 'fmt.Fprint', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'fmt.Fprint(${1:})'}}], 'isIncomplete': True}
::  -> gopls textDocument/didChange: {'textDocument': {'version': 196, 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'contentChanges': [{'range': {'start': {'line': 6, 'character': 5}, 'end': {'line': 6, 'character': 5}}, 'text': 'm', 'rangeLength': 0}]}
:: --> gopls textDocument/completion(54): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'position': {'line': 6, 'character': 6}}
:: <-  gopls textDocument/publishDiagnostics: {'version': 196, 'diagnostics': [{'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 6}}, 'severity': 1, 'message': 'undeclared name: fm', 'code': 'UndeclaredName', 'source': 'compiler', 'tags': [1], 'codeDescription': {'href': 'https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#UndeclaredName'}}], 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}
:: <<< gopls 54: {'items': [{'kind': 9, 'sortText': '00000', 'label': 'fmt', 'detail': '"fmt"', 'preselect': True, 'filterText': 'fmt', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 6}}, 'newText': 'fmt'}}, {'kind': 9, 'sortText': '00001', 'label': 'fmtsort', 'detail': '"internal/fmtsort"', 'additionalTextEdits': [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 7}}, 'newText': '(\n\t'}, {'range': {'start': {'line': 3, 'character': 0}, 'end': {'line': 3, 'character': 0}}, 'newText': '\t"internal/fmtsort"\n)\n'}], 'filterText': 'fmtsort', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 6}}, 'newText': 'fmtsort'}}, {'documentation': 'Errorf formats according to a format specifier and returns the string as a\nvalue that satisfies error.\n\nIf the format specifier includes a %w verb with an error operand,\nthe returned error will implement an Unwrap method returning the operand. It is\ninvalid to include more than one %w verb or to supply it with an operand\nthat does not implement the error interface. The %w verb is otherwise\na synonym for %v.\n', 'kind': 3, 'sortText': '00002', 'label': 'fmt.Errorf', 'detail': 'func(format string, a ...interface{}) error', 'filterText': 'fmt.Errorf', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 6}}, 'newText': 'fmt.Errorf(${1:})'}}, {'documentation': 'Formatter is implemented by any value that has a Format method.\nThe implementation controls how State and rune are interpreted,\nand may call Sprint(f) or Fprint(f) etc. to generate its output.\n', 'kind': 8, 'sortText': '00003', 'label': 'fmt.Formatter', 'detail': 'interface{...}', 'filterText': 'fmt.Formatter', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 6}}, 'newText': 'fmt.Formatter'}}, {'documentation': 'Fprint formats using the default formats for its operands and writes to w.\nSpaces are added between operands when neither is a string.\nIt returns the number of bytes written and any write error encountered.\n', 'kind': 3, 'sortText': '00004', 'label': 'fmt.Fprint', 'detail': 'func(w io.Writer, a ...interface{}) (n int, err error)', 'filterText': 'fmt.Fprint', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 6}}, 'newText': 'fmt.Fprint(${1:})'}}], 'isIncomplete': True}
::  -> gopls textDocument/didChange: {'textDocument': {'version': 197, 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'contentChanges': [{'range': {'start': {'line': 6, 'character': 6}, 'end': {'line': 6, 'character': 6}}, 'text': 't', 'rangeLength': 0}]}
:: --> gopls textDocument/completion(55): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'position': {'line': 6, 'character': 7}}
:: <-  gopls textDocument/publishDiagnostics: {'version': 197, 'diagnostics': [{'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'severity': 1, 'message': 'use of package fmt not in selector', 'code': 'InvalidPkgUse', 'source': 'compiler', 'codeDescription': {'href': 'https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#InvalidPkgUse'}}], 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}
:: <<< gopls 55: {'items': [{'kind': 9, 'sortText': '00000', 'label': 'fmt', 'detail': '"fmt"', 'preselect': True, 'filterText': 'fmt', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'newText': 'fmt'}}, {'kind': 9, 'sortText': '00001', 'label': 'fmtsort', 'detail': '"internal/fmtsort"', 'additionalTextEdits': [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 7}}, 'newText': '(\n\t'}, {'range': {'start': {'line': 3, 'character': 0}, 'end': {'line': 3, 'character': 0}}, 'newText': '\t"internal/fmtsort"\n)\n'}], 'filterText': 'fmtsort', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'newText': 'fmtsort'}}, {'documentation': 'Errorf formats according to a format specifier and returns the string as a\nvalue that satisfies error.\n\nIf the format specifier includes a %w verb with an error operand,\nthe returned error will implement an Unwrap method returning the operand. It is\ninvalid to include more than one %w verb or to supply it with an operand\nthat does not implement the error interface. The %w verb is otherwise\na synonym for %v.\n', 'kind': 3, 'sortText': '00002', 'label': 'fmt.Errorf', 'detail': 'func(format string, a ...interface{}) error', 'filterText': 'fmt.Errorf', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'newText': 'fmt.Errorf(${1:})'}}, {'documentation': 'Formatter is implemented by any value that has a Format method.\nThe implementation controls how State and rune are interpreted,\nand may call Sprint(f) or Fprint(f) etc. to generate its output.\n', 'kind': 8, 'sortText': '00003', 'label': 'fmt.Formatter', 'detail': 'interface{...}', 'filterText': 'fmt.Formatter', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'newText': 'fmt.Formatter'}}, {'documentation': 'Fprint formats using the default formats for its operands and writes to w.\nSpaces are added between operands when neither is a string.\nIt returns the number of bytes written and any write error encountered.\n', 'kind': 3, 'sortText': '00004', 'label': 'fmt.Fprint', 'detail': 'func(w io.Writer, a ...interface{}) (n int, err error)', 'filterText': 'fmt.Fprint', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'newText': 'fmt.Fprint(${1:})'}}], 'isIncomplete': True}
:: --> gopls textDocument/documentHighlight(56): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'position': {'line': 6, 'character': 7}}
:: --> gopls textDocument/codeLens(57): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}}
:: <<< gopls 56: [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 12}}, 'kind': 1}, {'range': {'start': {'line': 5, 'character': 4}, 'end': {'line': 5, 'character': 7}}, 'kind': 1}, {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'kind': 1}]
:: <<< gopls 57: None

Entering a dot after this lead to

::  -> gopls textDocument/didChange: {'textDocument': {'version': 198, 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'contentChanges': [{'range': {'start': {'line': 6, 'character': 7}, 'end': {'line': 6, 'character': 7}}, 'text': '.', 'rangeLength': 0}]}
:: --> gopls textDocument/completion(58): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'position': {'line': 6, 'character': 8}}
:: <-  gopls textDocument/publishDiagnostics: {'version': 198, 'diagnostics': [{'range': {'start': {'line': 6, 'character': 9}, 'end': {'line': 6, 'character': 9}}, 'source': 'syntax', 'severity': 1, 'message': "expected selector or type assertion, found '}'"}], 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}
:: <<< gopls 58: <params with 13491 characters>
:: --> gopls textDocument/documentHighlight(59): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'position': {'line': 6, 'character': 8}}
:: --> gopls textDocument/codeLens(60): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}}
:: <<< gopls 59: [{'range': {'start': {'line': 6, 'character': 8}, 'end': {'line': 6, 'character': 9}}, 'kind': 1}]
:: <<< gopls 60: None

When entering fmt (with pressing TAB) and entering a dot after it this autocomplete is shown:
image
Entering "fmt" gives us these logs

:: <-  gopls window/logMessage: {'message': '2021/11/16 15:14:24 discovered missing identifiers: map[memRecordCycle:true pageBits:true]\n\tpackage="runtime"\n', 'type': 3}
:: <-  gopls textDocument/publishDiagnostics: {'diagnostics': [{'range': {'start': {'line': 4, 'character': 0}, 'end': {'line': 4, 'character': 27}}, 'source': 'go mod tidy', 'severity': 2, 'message': 'rsc.io/quote is not used in this module'}, {'range': {'start': {'line': 7, 'character': 1}, 'end': {'line': 7, 'character': 25}}, 'source': 'go mod tidy', 'severity': 2, 'message': 'golang.org/x/text is not used in this module'}, {'range': {'start': {'line': 8, 'character': 1}, 'end': {'line': 8, 'character': 22}}, 'source': 'go mod tidy', 'severity': 2, 'message': 'rsc.io/sampler is not used in this module'}], 'uri': 'file:///C:/Users/Max/Desktop/hello/go.mod'}
::  -> gopls textDocument/didChange: {'textDocument': {'version': 237, 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'contentChanges': [{'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 4}}, 'text': 'f', 'rangeLength': 0}]}
:: --> gopls textDocument/completion(3): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'position': {'line': 6, 'character': 5}}
:: <-  gopls textDocument/publishDiagnostics: {'version': 237, 'diagnostics': [{'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'severity': 1, 'message': 'undeclared name: f', 'code': 'UndeclaredName', 'source': 'compiler', 'tags': [1], 'codeDescription': {'href': 'https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#UndeclaredName'}}], 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}
:: <<< gopls 3: {'items': [{'kind': 9, 'sortText': '00000', 'label': 'fmt', 'detail': '"fmt"', 'preselect': True, 'filterText': 'fmt', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'fmt'}}, {'kind': 14, 'sortText': '00001', 'label': 'for', 'filterText': 'for', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'for'}}, {'kind': 21, 'sortText': '00002', 'label': 'false', 'filterText': 'false', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'false'}}, {'kind': 7, 'sortText': '00003', 'label': 'float32', 'filterText': 'float32', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'float32'}}, {'kind': 7, 'sortText': '00004', 'label': 'float64', 'filterText': 'float64', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'float64'}}, {'kind': 9, 'sortText': '00005', 'label': 'flag', 'detail': '"flag"', 'additionalTextEdits': [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 7}}, 'newText': '(\n\t"flag"\n\t'}, {'range': {'start': {'line': 3, 'character': 0}, 'end': {'line': 3, 'character': 0}}, 'newText': ')\n'}], 'filterText': 'flag', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'flag'}}, {'kind': 9, 'sortText': '00006', 'label': 'flate', 'detail': '"compress/flate"', 'additionalTextEdits': [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 7}}, 'newText': '(\n\t"compress/flate"\n\t'}, {'range': {'start': {'line': 3, 'character': 0}, 'end': {'line': 3, 'character': 0}}, 'newText': ')\n'}], 'filterText': 'flate', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'flate'}}, {'kind': 9, 'sortText': '00007', 'label': 'format', 'detail': '"go/format"', 'additionalTextEdits': [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 7}}, 'newText': '(\n\t'}, {'range': {'start': {'line': 3, 'character': 0}, 'end': {'line': 3, 'character': 0}}, 'newText': '\t"go/format"\n)\n'}], 'filterText': 'format', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'format'}}, {'kind': 9, 'sortText': '00008', 'label': 'fs', 'detail': '"io/fs"', 'additionalTextEdits': [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 7}}, 'newText': '(\n\t'}, {'range': {'start': {'line': 3, 'character': 0}, 'end': {'line': 3, 'character': 0}}, 'newText': '\t"io/fs"\n)\n'}], 'filterText': 'fs', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'fs'}}, {'kind': 9, 'sortText': '00009', 'label': 'fmtsort', 'detail': '"internal/fmtsort"', 'additionalTextEdits': [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 7}}, 'newText': '(\n\t'}, {'range': {'start': {'line': 3, 'character': 0}, 'end': {'line': 3, 'character': 0}}, 'newText': '\t"internal/fmtsort"\n)\n'}], 'filterText': 'fmtsort', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'fmtsort'}}, {'documentation': 'Errorf formats according to a format specifier and returns the string as a\nvalue that satisfies error.\n\nIf the format specifier includes a %w verb with an error operand,\nthe returned error will implement an Unwrap method returning the operand. It is\ninvalid to include more than one %w verb or to supply it with an operand\nthat does not implement the error interface. The %w verb is otherwise\na synonym for %v.\n', 'kind': 3, 'sortText': '00010', 'label': 'fmt.Errorf', 'detail': 'func(format string, a ...interface{}) error', 'filterText': 'fmt.Errorf', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'fmt.Errorf(${1:})'}}, {'documentation': 'Formatter is implemented by any value that has a Format method.\nThe implementation controls how State and rune are interpreted,\nand may call Sprint(f) or Fprint(f) etc. to generate its output.\n', 'kind': 8, 'sortText': '00011', 'label': 'fmt.Formatter', 'detail': 'interface{...}', 'filterText': 'fmt.Formatter', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'fmt.Formatter'}}, {'documentation': 'Fprint formats using the default formats for its operands and writes to w.\nSpaces are added between operands when neither is a string.\nIt returns the number of bytes written and any write error encountered.\n', 'kind': 3, 'sortText': '00012', 'label': 'fmt.Fprint', 'detail': 'func(w io.Writer, a ...interface{}) (n int, err error)', 'filterText': 'fmt.Fprint', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 5}}, 'newText': 'fmt.Fprint(${1:})'}}], 'isIncomplete': True}
::  -> gopls textDocument/didChange: {'textDocument': {'version': 239, 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'contentChanges': [{'range': {'start': {'line': 6, 'character': 5}, 'end': {'line': 6, 'character': 5}}, 'text': 'm', 'rangeLength': 0}, {'range': {'start': {'line': 6, 'character': 6}, 'end': {'line': 6, 'character': 6}}, 'text': 't', 'rangeLength': 0}]}
:: --> gopls textDocument/completion(4): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'position': {'line': 6, 'character': 7}}
:: <-  gopls textDocument/publishDiagnostics: {'version': 239, 'diagnostics': [{'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'severity': 1, 'message': 'use of package fmt not in selector', 'code': 'InvalidPkgUse', 'source': 'compiler', 'codeDescription': {'href': 'https://pkg.go.dev/golang.org/x/tools/internal/typesinternal?utm_source=gopls#InvalidPkgUse'}}], 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}
:: <<< gopls 4: {'items': [{'kind': 9, 'sortText': '00000', 'label': 'fmt', 'detail': '"fmt"', 'preselect': True, 'filterText': 'fmt', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'newText': 'fmt'}}, {'kind': 9, 'sortText': '00001', 'label': 'fmtsort', 'detail': '"internal/fmtsort"', 'additionalTextEdits': [{'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 7}}, 'newText': '(\n\t'}, {'range': {'start': {'line': 3, 'character': 0}, 'end': {'line': 3, 'character': 0}}, 'newText': '\t"internal/fmtsort"\n)\n'}], 'filterText': 'fmtsort', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'newText': 'fmtsort'}}, {'documentation': 'Errorf formats according to a format specifier and returns the string as a\nvalue that satisfies error.\n\nIf the format specifier includes a %w verb with an error operand,\nthe returned error will implement an Unwrap method returning the operand. It is\ninvalid to include more than one %w verb or to supply it with an operand\nthat does not implement the error interface. The %w verb is otherwise\na synonym for %v.\n', 'kind': 3, 'sortText': '00002', 'label': 'fmt.Errorf', 'detail': 'func(format string, a ...interface{}) error', 'filterText': 'fmt.Errorf', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'newText': 'fmt.Errorf(${1:})'}}, {'documentation': 'Formatter is implemented by any value that has a Format method.\nThe implementation controls how State and rune are interpreted,\nand may call Sprint(f) or Fprint(f) etc. to generate its output.\n', 'kind': 8, 'sortText': '00003', 'label': 'fmt.Formatter', 'detail': 'interface{...}', 'filterText': 'fmt.Formatter', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'newText': 'fmt.Formatter'}}, {'documentation': 'Fprint formats using the default formats for its operands and writes to w.\nSpaces are added between operands when neither is a string.\nIt returns the number of bytes written and any write error encountered.\n', 'kind': 3, 'sortText': '00004', 'label': 'fmt.Fprint', 'detail': 'func(w io.Writer, a ...interface{}) (n int, err error)', 'filterText': 'fmt.Fprint', 'labelDetails': {}, 'insertTextFormat': 2, 'textEdit': {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'newText': 'fmt.Fprint(${1:})'}}], 'isIncomplete': True}
:: --> gopls textDocument/documentHighlight(5): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'position': {'line': 6, 'character': 7}}
:: --> gopls textDocument/codeLens(6): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}}
:: <<< gopls 5: [{'range': {'start': {'line': 5, 'character': 4}, 'end': {'line': 5, 'character': 7}}, 'kind': 1}, {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'kind': 1}, {'range': {'start': {'line': 2, 'character': 7}, 'end': {'line': 2, 'character': 12}}, 'kind': 1}]
:: <<< gopls 6: None

Then entering TAB

::  -> gopls textDocument/didChange: {'textDocument': {'version': 241, 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'contentChanges': [{'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 7}}, 'text': '', 'rangeLength': 3}, {'range': {'start': {'line': 6, 'character': 4}, 'end': {'line': 6, 'character': 4}}, 'text': 'fmt', 'rangeLength': 0}]}

And then entering a dot

::  -> gopls textDocument/didChange: {'textDocument': {'version': 242, 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'contentChanges': [{'range': {'start': {'line': 6, 'character': 7}, 'end': {'line': 6, 'character': 7}}, 'text': '.', 'rangeLength': 0}]}
:: --> gopls textDocument/completion(7): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'position': {'line': 6, 'character': 8}}
:: <-  gopls textDocument/publishDiagnostics: {'version': 242, 'diagnostics': [{'range': {'start': {'line': 6, 'character': 9}, 'end': {'line': 6, 'character': 9}}, 'source': 'syntax', 'severity': 1, 'message': "expected selector or type assertion, found '}'"}], 'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}
:: <<< gopls 7: <params with 13491 characters>
:: --> gopls textDocument/documentHighlight(8): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}, 'position': {'line': 6, 'character': 8}}
:: --> gopls textDocument/codeLens(9): {'textDocument': {'uri': 'file:///C:/Users/Max/Desktop/hello/hello.go'}}
:: <<< gopls 8: [{'range': {'start': {'line': 6, 'character': 8}, 'end': {'line': 6, 'character': 9}}, 'kind': 1}]
:: <<< gopls 9: None

@rchl
Copy link
Member

rchl commented Nov 16, 2021

Thanks for the logs. Very useful. Apart from the the fact that LSP trimmed the completions responses done after the . since those were too big. But I think I see the issue and will likely create a core issue for it.

@rchl
Copy link
Member

rchl commented Nov 16, 2021

This is an issue that I've already reported - sublimehq/sublime_text#4855

@rchl rchl added sublime issue Issues related to shortcomings or bugs in the ST API and removed language server issue Issues related to language servers communicating with this plugin labels Nov 16, 2021
@alecthomas
Copy link

Any progress on this? It's now been 1.5 years.

@TerminalFi
Copy link
Contributor Author

Any progress on this? It's now been 1.5 years.

This appears to be an issue in core Sublime. Which is why it hasn’t move. Let me check if updating gopls helps

@predragnikolic
Copy link
Member

Is this still valid?

@rchl
Copy link
Member

rchl commented Aug 9, 2022

It looks like both related ST issues (sublimehq/sublime_text#4727 and sublimehq/sublime_text#4855) are fixed so this should not be an issue anymore.

(I'll also remove it from #2007)

@alecthomas
Copy link

I just came back to Sublime after a couple of years to give it another shot and this is still an issue. Sublime-LSP still only shows a subset of completions, or doesn't show completions at all.

Typing "pkg.":

first

Hitting backspace and "." again:

after

@pelemarse
Copy link

Yes. Same. I'm tired of this nonsense.

@TerminalFi
Copy link
Contributor Author

I just came back to Sublime after a couple of years to give it another shot and this is still an issue. Sublime-LSP still only shows a subset of completions, or doesn't show completions at all.

Typing "pkg.":

first

Hitting backspace and "." again:

after

I'll look at this shortly. If needed I'll open an issue on sublimes repo

@LDAP
Copy link
Contributor

LDAP commented Mar 17, 2023

@TerminalFi A while back, I saw the same behavior with LSP-jdtls too, if that helps.

@rwols
Copy link
Member

rwols commented Mar 18, 2023

My educated guess is that the didChange notification for gopls and jdtls is written against VSCode internal behavior and these two language servers actually have a race condition.

@TerminalFi
Copy link
Contributor Author

My educated guess is that the didChange notification for gopls and jdtls is written against VSCode internal behavior and these two language servers actually have a race condition.

Not sure how you came to that conclusion when the LSP logs show the completions are available just not being displayed.

Am I missing something ?

@rchl
Copy link
Member

rchl commented Mar 19, 2023

I think it's this issue:

Completions: Filtering with custom completion prefix

@alecthomas
Copy link

If that's the case, and given that issue has been open for two years, a resolution is not looking exactly promising...

@rwols
Copy link
Member

rwols commented Mar 21, 2023

My educated guess is that the didChange notification for gopls and jdtls is written against VSCode internal behavior and these two language servers actually have a race condition.

Not sure how you came to that conclusion when the LSP logs show the completions are available just not being displayed.

Am I missing something ?

No, I made a premature statement and you're right to point out the missing context.

@predragnikolic
Copy link
Member

OK, looks like a regression happened in ST 4138.
For more info subscribe to sublimehq/sublime_text#4855

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sublime issue Issues related to shortcomings or bugs in the ST API
Projects
None yet
Development

No branches or pull requests

10 participants