internal/lsp: update to latest version of LSP protocol

The Typescript source is still at version 3.16, but there are new
requests, more detailed client capabilities, and an attempt to be
more specific about ranges of number in the Typescript code.

Vscode defines types integer and uinteger (32-bit signed and unsigned),
so the Go code now uses int32 and uint32.

They've changed the use of TextDocument, so version information is sometimes
missing. cache/session.go:625 was changed correspondingly.

This CL also make CodeAction.Disabled into a pointer.

New requests or notifications:
DidCreateFiles, DidRenameFiles, DidDeleteFiles (notifications)
ShowDocument, WillCreateFiles,WillRenameFiles, WillDeleteFiles (request)

It's a lot of code; I've probably missed something.

Change-Id: I8449ad8473ac00947d0344c5f6133f9bd73b9e10
Reviewed-on: https://go-review.googlesource.com/c/tools/+/286192
Run-TryBot: Peter Weinberger <pjw@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Trust: Peter Weinberger <pjw@google.com>
diff --git a/gopls/internal/regtest/expectation.go b/gopls/internal/regtest/expectation.go
index 037faa4..e520099 100644
--- a/gopls/internal/regtest/expectation.go
+++ b/gopls/internal/regtest/expectation.go
@@ -442,7 +442,7 @@
 	found := false
 	for _, d := range diags.Diagnostics {
 		if e.pos != nil {
-			if d.Range.Start.Line != float64(e.pos.Line) || d.Range.Start.Character != float64(e.pos.Column) {
+			if d.Range.Start.Line != uint32(e.pos.Line) || d.Range.Start.Character != uint32(e.pos.Column) {
 				continue
 			}
 		}
@@ -519,7 +519,7 @@
 	version := e.Editor.BufferVersion(name)
 	check := func(s State) Verdict {
 		diags, ok := s.diagnostics[name]
-		if ok && diags.Version == float64(version) {
+		if ok && diags.Version == int32(version) {
 			return Met
 		}
 		return Unmet
diff --git a/gopls/internal/regtest/modfile/modfile_test.go b/gopls/internal/regtest/modfile/modfile_test.go
index 86154db..6982bde 100644
--- a/gopls/internal/regtest/modfile/modfile_test.go
+++ b/gopls/internal/regtest/modfile/modfile_test.go
@@ -985,7 +985,7 @@
 `
 			var diagnostics []protocol.Diagnostic
 			for _, d := range d.Diagnostics {
-				if d.Range.Start.Line != float64(pos.Line) {
+				if d.Range.Start.Line != uint32(pos.Line) {
 					continue
 				}
 				diagnostics = append(diagnostics, d)
@@ -1038,7 +1038,7 @@
 		)
 		var diagnostic protocol.Diagnostic
 		for _, d := range params.Diagnostics {
-			if d.Range.Start.Line == float64(pos.Line) {
+			if d.Range.Start.Line == uint32(pos.Line) {
 				diagnostic = d
 				break
 			}
diff --git a/gopls/test/debug/debug_test.go b/gopls/test/debug/debug_test.go
index 1b51073..4d680ee 100644
--- a/gopls/test/debug/debug_test.go
+++ b/gopls/test/debug/debug_test.go
@@ -50,7 +50,7 @@
 // construct a source.Overlay for fileTmpl
 type fakeOverlay struct{}
 
-func (fakeOverlay) Version() float64 {
+func (fakeOverlay) Version() int32 {
 	return 0
 }
 func (fakeOverlay) Session() string {
diff --git a/internal/lsp/cache/session.go b/internal/lsp/cache/session.go
index 1102808..273573a 100644
--- a/internal/lsp/cache/session.go
+++ b/internal/lsp/cache/session.go
@@ -44,7 +44,7 @@
 	uri     span.URI
 	text    []byte
 	hash    string
-	version float64
+	version int32
 	kind    source.FileKind
 
 	// saved is true if a file matches the state on disk,
@@ -80,7 +80,7 @@
 	return o.uri
 }
 
-func (o *overlay) Version() float64 {
+func (o *overlay) Version() int32 {
 	return o.version
 }
 
@@ -113,7 +113,7 @@
 	return ""
 }
 
-func (c *closedFile) Version() float64 {
+func (c *closedFile) Version() int32 {
 	return 0
 }
 
@@ -622,7 +622,7 @@
 		}
 		// On-disk changes don't come with versions.
 		version := c.Version
-		if c.OnDisk {
+		if c.OnDisk || c.Action == source.Save {
 			version = o.version
 		}
 		hash := hashContents(text)
@@ -632,7 +632,7 @@
 			// Do nothing. sameContentOnDisk should be false.
 		case source.Save:
 			// Make sure the version and content (if present) is the same.
-			if o.version != version {
+			if false && o.version != version { // Client no longer sends the version
 				return nil, errors.Errorf("updateOverlays: saving %s at version %v, currently at %v", c.URI, c.Version, o.version)
 			}
 			if c.Text != nil && o.hash != hash {
diff --git a/internal/lsp/cmd/capabilities_test.go b/internal/lsp/cmd/capabilities_test.go
index ea0bfed..acd5450 100644
--- a/internal/lsp/cmd/capabilities_test.go
+++ b/internal/lsp/cmd/capabilities_test.go
@@ -106,11 +106,8 @@
 	}
 
 	if err := c.Server.DidSave(ctx, &protocol.DidSaveTextDocumentParams{
-		TextDocument: protocol.VersionedTextDocumentIdentifier{
-			Version: 2,
-			TextDocumentIdentifier: protocol.TextDocumentIdentifier{
-				URI: uri,
-			},
+		TextDocument: protocol.TextDocumentIdentifier{
+			URI: uri,
 		},
 		// LSP specifies that a file can be saved with optional text, so this field must be nil.
 		Text: nil,
diff --git a/internal/lsp/cmd/semantictokens.go b/internal/lsp/cmd/semantictokens.go
index cf7d431..41e353c 100644
--- a/internal/lsp/cmd/semantictokens.go
+++ b/internal/lsp/cmd/semantictokens.go
@@ -162,7 +162,7 @@
 	lines[m.line-1] = l
 }
 
-func decorate(file string, result []float64) error {
+func decorate(file string, result []uint32) error {
 	buf, err := ioutil.ReadFile(file)
 	if err != nil {
 		return err
@@ -180,14 +180,14 @@
 	return nil
 }
 
-func newMarks(d []float64) []mark {
+func newMarks(d []uint32) []mark {
 	ans := []mark{}
 	// the following two loops could be merged, at the cost
 	// of making the logic slightly more complicated to understand
 	// first, convert from deltas to absolute, in LSP coordinates
-	lspLine := make([]float64, len(d)/5)
-	lspChar := make([]float64, len(d)/5)
-	line, char := 0.0, 0.0
+	lspLine := make([]uint32, len(d)/5)
+	lspChar := make([]uint32, len(d)/5)
+	var line, char uint32
 	for i := 0; 5*i < len(d); i++ {
 		lspLine[i] = line + d[5*i+0]
 		if d[5*i+0] > 0 {
diff --git a/internal/lsp/code_action.go b/internal/lsp/code_action.go
index e5d229b..1f4a1a1 100644
--- a/internal/lsp/code_action.go
+++ b/internal/lsp/code_action.go
@@ -493,7 +493,7 @@
 func documentChanges(fh source.VersionedFileHandle, edits []protocol.TextEdit) []protocol.TextDocumentEdit {
 	return []protocol.TextDocumentEdit{
 		{
-			TextDocument: protocol.VersionedTextDocumentIdentifier{
+			TextDocument: protocol.OptionalVersionedTextDocumentIdentifier{
 				Version: fh.Version(),
 				TextDocumentIdentifier: protocol.TextDocumentIdentifier{
 					URI: protocol.URIFromSpanURI(fh.URI()),
@@ -549,7 +549,7 @@
 					continue
 				}
 				action.Edit.DocumentChanges = append(action.Edit.DocumentChanges, protocol.TextDocumentEdit{
-					TextDocument: protocol.VersionedTextDocumentIdentifier{
+					TextDocument: protocol.OptionalVersionedTextDocumentIdentifier{
 						Version: modFH.Version(),
 						TextDocumentIdentifier: protocol.TextDocumentIdentifier{
 							URI: protocol.URIFromSpanURI(modFH.URI()),
diff --git a/internal/lsp/command.go b/internal/lsp/command.go
index a3bc21d..997a20d 100644
--- a/internal/lsp/command.go
+++ b/internal/lsp/command.go
@@ -283,7 +283,7 @@
 		response, err := s.client.ApplyEdit(ctx, &protocol.ApplyWorkspaceEditParams{
 			Edit: protocol.WorkspaceEdit{
 				DocumentChanges: []protocol.TextDocumentEdit{{
-					TextDocument: protocol.VersionedTextDocumentIdentifier{
+					TextDocument: protocol.OptionalVersionedTextDocumentIdentifier{
 						Version: fh.Version(),
 						TextDocumentIdentifier: protocol.TextDocumentIdentifier{
 							URI: protocol.URIFromSpanURI(fh.URI()),
diff --git a/internal/lsp/completion_test.go b/internal/lsp/completion_test.go
index 53d136f..22a377e 100644
--- a/internal/lsp/completion_test.go
+++ b/internal/lsp/completion_test.go
@@ -142,8 +142,8 @@
 				URI: protocol.URIFromSpanURI(src.URI()),
 			},
 			Position: protocol.Position{
-				Line:      float64(src.Start().Line() - 1),
-				Character: float64(src.Start().Column() - 1),
+				Line:      uint32(src.Start().Line() - 1),
+				Character: uint32(src.Start().Column() - 1),
 			},
 		},
 	})
diff --git a/internal/lsp/diagnostics.go b/internal/lsp/diagnostics.go
index ceee5f0..6f838f0 100644
--- a/internal/lsp/diagnostics.go
+++ b/internal/lsp/diagnostics.go
@@ -477,7 +477,7 @@
 			r.snapshotID = snapshot.ID()
 			continue
 		}
-		version := float64(0)
+		var version int32
 		if fh := snapshot.FindFile(uri); fh != nil { // file may have been deleted
 			version = fh.Version()
 		}
diff --git a/internal/lsp/fake/edit.go b/internal/lsp/fake/edit.go
index e5be4f6..c3f07e2 100644
--- a/internal/lsp/fake/edit.go
+++ b/internal/lsp/fake/edit.go
@@ -27,8 +27,8 @@
 
 func (p Pos) ToProtocolPosition() protocol.Position {
 	return protocol.Position{
-		Line:      float64(p.Line),
-		Character: float64(p.Column),
+		Line:      uint32(p.Line),
+		Character: uint32(p.Column),
 	}
 }
 
diff --git a/internal/lsp/fake/editor.go b/internal/lsp/fake/editor.go
index 3df5b24..9bd2028 100644
--- a/internal/lsp/fake/editor.go
+++ b/internal/lsp/fake/editor.go
@@ -266,7 +266,7 @@
 	// TODO: set client capabilities
 	params.InitializationOptions = e.configuration()
 	if e.Config.SendPID {
-		params.ProcessID = float64(os.Getpid())
+		params.ProcessID = int32(os.Getpid())
 	}
 
 	// This is a bit of a hack, since the fake editor doesn't actually support
@@ -357,7 +357,7 @@
 	return protocol.TextDocumentItem{
 		URI:        uri,
 		LanguageID: languageID,
-		Version:    float64(buf.version),
+		Version:    int32(buf.version),
 		Text:       buf.text(),
 	}
 }
@@ -467,10 +467,7 @@
 
 	if e.Server != nil {
 		params := &protocol.DidSaveTextDocumentParams{
-			TextDocument: protocol.VersionedTextDocumentIdentifier{
-				Version:                float64(buf.version),
-				TextDocumentIdentifier: docID,
-			},
+			TextDocument: docID,
 		}
 		if includeText {
 			params.Text = &content
@@ -667,7 +664,7 @@
 	}
 	params := &protocol.DidChangeTextDocumentParams{
 		TextDocument: protocol.VersionedTextDocumentIdentifier{
-			Version:                float64(buf.version),
+			Version:                int32(buf.version),
 			TextDocumentIdentifier: e.textDocumentIdentifier(buf.path),
 		},
 		ContentChanges: evts,
@@ -790,7 +787,7 @@
 		}
 		for _, change := range action.Edit.DocumentChanges {
 			path := e.sandbox.Workdir.URIToPath(change.TextDocument.URI)
-			if float64(e.buffers[path].version) != change.TextDocument.Version {
+			if int32(e.buffers[path].version) != change.TextDocument.Version {
 				// Skip edits for old versions.
 				continue
 			}
diff --git a/internal/lsp/general.go b/internal/lsp/general.go
index 28c3309..beec225 100644
--- a/internal/lsp/general.go
+++ b/internal/lsp/general.go
@@ -90,40 +90,42 @@
 
 	return &protocol.InitializeResult{
 		Capabilities: protocol.ServerCapabilities{
-			CallHierarchyProvider: true,
-			CodeActionProvider:    codeActionProvider,
-			CompletionProvider: protocol.CompletionOptions{
-				TriggerCharacters: []string{"."},
-			},
-			DefinitionProvider:         true,
-			TypeDefinitionProvider:     true,
-			ImplementationProvider:     true,
-			DocumentFormattingProvider: true,
-			DocumentSymbolProvider:     true,
-			WorkspaceSymbolProvider:    true,
-			ExecuteCommandProvider: protocol.ExecuteCommandOptions{
-				Commands: options.SupportedCommands,
-			},
-			FoldingRangeProvider:      true,
-			HoverProvider:             true,
-			DocumentHighlightProvider: true,
-			DocumentLinkProvider:      protocol.DocumentLinkOptions{},
-			ReferencesProvider:        true,
-			RenameProvider:            renameOpts,
-			SignatureHelpProvider: protocol.SignatureHelpOptions{
-				TriggerCharacters: []string{"(", ","},
-			},
-			TextDocumentSync: &protocol.TextDocumentSyncOptions{
-				Change:    protocol.Incremental,
-				OpenClose: true,
-				Save: protocol.SaveOptions{
-					IncludeText: false,
+			InnerServerCapabilities: protocol.InnerServerCapabilities{
+				CallHierarchyProvider: true,
+				CodeActionProvider:    codeActionProvider,
+				CompletionProvider: protocol.CompletionOptions{
+					TriggerCharacters: []string{"."},
 				},
-			},
-			Workspace: protocol.WorkspaceGn{
-				WorkspaceFolders: protocol.WorkspaceFoldersGn{
-					Supported:           true,
-					ChangeNotifications: "workspace/didChangeWorkspaceFolders",
+				DefinitionProvider:         true,
+				TypeDefinitionProvider:     true,
+				ImplementationProvider:     true,
+				DocumentFormattingProvider: true,
+				DocumentSymbolProvider:     true,
+				WorkspaceSymbolProvider:    true,
+				ExecuteCommandProvider: protocol.ExecuteCommandOptions{
+					Commands: options.SupportedCommands,
+				},
+				FoldingRangeProvider:      true,
+				HoverProvider:             true,
+				DocumentHighlightProvider: true,
+				DocumentLinkProvider:      protocol.DocumentLinkOptions{},
+				ReferencesProvider:        true,
+				RenameProvider:            renameOpts,
+				SignatureHelpProvider: protocol.SignatureHelpOptions{
+					TriggerCharacters: []string{"(", ","},
+				},
+				TextDocumentSync: &protocol.TextDocumentSyncOptions{
+					Change:    protocol.Incremental,
+					OpenClose: true,
+					Save: protocol.SaveOptions{
+						IncludeText: false,
+					},
+				},
+				Workspace: protocol.WorkspaceGn{
+					WorkspaceFolders: protocol.WorkspaceFoldersGn{
+						Supported:           true,
+						ChangeNotifications: "workspace/didChangeWorkspaceFolders",
+					},
 				},
 			},
 		},
@@ -341,7 +343,7 @@
 	for pattern := range patterns {
 		watchers = append(watchers, protocol.FileSystemWatcher{
 			GlobPattern: pattern,
-			Kind:        float64(protocol.WatchChange + protocol.WatchDelete + protocol.WatchCreate),
+			Kind:        uint32(protocol.WatchChange + protocol.WatchDelete + protocol.WatchCreate),
 		})
 	}
 
diff --git a/internal/lsp/progress.go b/internal/lsp/progress.go
index a8894f8..719e9c3 100644
--- a/internal/lsp/progress.go
+++ b/internal/lsp/progress.go
@@ -187,7 +187,7 @@
 			// yet use this feature, the value is kept constant here.
 			Cancellable: wd.cancel != nil,
 			Message:     message,
-			Percentage:  percentage,
+			Percentage:  uint32(percentage),
 		},
 	})
 	if err != nil {
diff --git a/internal/lsp/protocol/span.go b/internal/lsp/protocol/span.go
index 51f6137..d6da886 100644
--- a/internal/lsp/protocol/span.go
+++ b/internal/lsp/protocol/span.go
@@ -64,8 +64,8 @@
 		return Position{}, err
 	}
 	return Position{
-		Line:      float64(p.Line() - 1),
-		Character: float64(chr - 1),
+		Line:      uint32(p.Line() - 1),
+		Character: uint32(chr - 1),
 	}, nil
 }
 
diff --git a/internal/lsp/protocol/tsclient.go b/internal/lsp/protocol/tsclient.go
index 0670e11..2746580 100644
--- a/internal/lsp/protocol/tsclient.go
+++ b/internal/lsp/protocol/tsclient.go
@@ -1,9 +1,13 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
 package protocol
 
 // Package protocol contains data types and code for LSP jsonrpcs
 // generated automatically from vscode-languageserver-node
-// commit: 901fd40345060d159f07d234bbc967966a929a34
-// last fetched Mon Oct 26 2020 09:10:42 GMT-0400 (Eastern Daylight Time)
+// commit: dae62de921d25964e8732411ca09e532dde992f5
+// last fetched Sat Jan 23 2021 16:14:55 GMT-0500 (Eastern Standard Time)
 
 // Code generated (see typescript/README.md) DO NOT EDIT.
 
diff --git a/internal/lsp/protocol/tsprotocol.go b/internal/lsp/protocol/tsprotocol.go
index 340fae6..3650d2f 100644
--- a/internal/lsp/protocol/tsprotocol.go
+++ b/internal/lsp/protocol/tsprotocol.go
@@ -1,7 +1,11 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
 // Package protocol contains data types and code for LSP jsonrpcs
 // generated automatically from vscode-languageserver-node
-// commit: 901fd40345060d159f07d234bbc967966a929a34
-// last fetched Mon Oct 26 2020 09:10:42 GMT-0400 (Eastern Daylight Time)
+// commit: dae62de921d25964e8732411ca09e532dde992f5
+// last fetched Sat Jan 23 2021 16:14:55 GMT-0500 (Eastern Standard Time)
 package protocol
 
 // Code generated (see typescript/README.md) DO NOT EDIT.
@@ -9,6 +13,19 @@
 import "encoding/json"
 
 /**
+ * A special text edit with an additional change annotation.
+ *
+ * @since 3.16.0.
+ */
+type AnnotatedTextEdit struct {
+	/**
+	 * The actual identifier of the change annotation
+	 */
+	AnnotationID ChangeAnnotationIdentifier `json:"annotationId"`
+	TextEdit
+}
+
+/**
  * The parameters passed via a apply workspace edit request.
  */
 type ApplyWorkspaceEditParams struct {
@@ -43,7 +60,7 @@
 	 * contain the index of the change that failed. This property is only available
 	 * if the client signals a `failureHandlingStrategy` in its client capabilities.
 	 */
-	FailedChange float64 `json:"failedChange,omitempty"`
+	FailedChange uint32 `json:"failedChange,omitempty"`
 }
 
 /**
@@ -195,6 +212,34 @@
 	ID interface{} /*number | string*/ `json:"id"`
 }
 
+/**
+ * Additional information that describes document changes.
+ *
+ * @since 3.16.0
+ */
+type ChangeAnnotation struct {
+	/**
+	           * A human-readable string describing the actual change. The string
+	  		 * is rendered prominent in the user interface.
+	*/
+	Label string `json:"label"`
+	/**
+	           * A flag which indicates that user confirmation is needed
+	  		 * before applying the change.
+	*/
+	NeedsConfirmation bool `json:"needsConfirmation,omitempty"`
+	/**
+	           * A human-readable string which is rendered less prominent in
+	  		 * the user interface.
+	*/
+	Description string `json:"description,omitempty"`
+}
+
+/**
+ * An identifier to refer to a change annotation stored with a workspace edit.
+ */
+type ChangeAnnotationIdentifier = string
+
 type ClientCapabilities = struct {
 	Workspace struct {
 		/**
@@ -222,7 +267,7 @@
 		/**
 		 * Window specific client capabilities.
 		 */
-		Window interface{} `json:"window,omitempty"`
+		WindowClientCapabilities
 		/**
 		 * Whether client supports server initiated progress using the
 		 * `window/workDoneProgress/create` request.
@@ -232,6 +277,12 @@
 		WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
 	}
 	/**
+	 * General client capabilities.
+	 *
+	 * @since 3.16.0
+	 */
+	General GeneralClientCapabilities `json:"general,omitempty"`
+	/**
 	 * Experimental client capabilities.
 	 */
 	Experimental interface{} `json:"experimental,omitempty"`
@@ -307,7 +358,7 @@
 	 * A data entry field that is preserved on a code action between
 	 * a `textDocument/codeAction` and a `codeAction/resolve` request.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	Data interface{} `json:"data,omitempty"`
 }
@@ -351,7 +402,7 @@
 	/**
 	 * Whether code action supports the `disabled` property.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	DisabledSupport bool `json:"disabledSupport,omitempty"`
 	/**
@@ -359,14 +410,14 @@
 	 * preserved between a `textDocument/codeAction` and a
 	 * `codeAction/resolve` request.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	DataSupport bool `json:"dataSupport,omitempty"`
 	/**
 	 * Whether the client support resolving additional code action
 	 * properties via a separate `codeAction/resolve` request.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	ResolveSupport struct {
 		/**
@@ -374,6 +425,16 @@
 		 */
 		Properties []string `json:"properties"`
 	} `json:"resolveSupport,omitempty"`
+	/**
+	 * Whether th client honors the change annotations in
+	 * text edits and resource operations returned via the
+	 * `CodeAction#edit` property by for example presenting
+	 * the workspace edit in the user interface and asking
+	 * for confirmation.
+	 *
+	 * @since 3.16.0
+	 */
+	HonorsChangeAnnotations bool `json:"honorsChangeAnnotations,omitempty"`
 }
 
 /**
@@ -383,7 +444,7 @@
 type CodeActionContext struct {
 	/**
 	 * An array of diagnostics known on the client side overlapping the range provided to the
-	 * `textDocument/codeAction` request. They are provied so that the server knows which
+	 * `textDocument/codeAction` request. They are provided so that the server knows which
 	 * errors are currently presented to the user for the given range. There is no guarantee
 	 * that these accurately reflect the error state of the resource. The primary parameter
 	 * to compute code actions is the provided range.
@@ -447,7 +508,7 @@
 /**
  * Structure to capture a description for an error code.
  *
- * @since 3.16.0 - proposed state
+ * @since 3.16.0
  */
 type CodeDescription struct {
 	/**
@@ -514,25 +575,41 @@
 }
 
 /**
+ * @since 3.16.0
+ */
+type CodeLensWorkspaceClientCapabilities struct {
+	/**
+	 * Whether the client implementation supports a refresh request sent from the
+	 * server to the client.
+	 *
+	 * Note that this event is global and will force the client to refresh all
+	 * code lenses currently shown. It should be used with absolute care and is
+	 * useful for situation where a server for example detect a project wide
+	 * change that requires such a calculation.
+	 */
+	RefreshSupport bool `json:"refreshSupport,omitempty"`
+}
+
+/**
  * Represents a color in RGBA space.
  */
 type Color struct {
 	/**
 	 * The red component of this color in the range [0-1].
 	 */
-	Red float64 `json:"red"`
+	Red Decimal `json:"red"`
 	/**
 	 * The green component of this color in the range [0-1].
 	 */
-	Green float64 `json:"green"`
+	Green Decimal `json:"green"`
 	/**
 	 * The blue component of this color in the range [0-1].
 	 */
-	Blue float64 `json:"blue"`
+	Blue Decimal `json:"blue"`
 	/**
 	 * The alpha component of this color in the range [0-1].
 	 */
-	Alpha float64 `json:"alpha"`
+	Alpha Decimal `json:"alpha"`
 }
 
 /**
@@ -540,7 +617,7 @@
  */
 type ColorInformation struct {
 	/**
-	 * The range in the document where this color appers.
+	 * The range in the document where this color appears.
 	 */
 	Range Range `json:"range"`
 	/**
@@ -651,6 +728,10 @@
 		 */
 		PreselectSupport bool `json:"preselectSupport,omitempty"`
 		/**
+		 * Client supports to kee
+		 */
+
+		/**
 		 * Client supports the tag property on a completion item. Clients supporting
 		 * tags have to handle unknown tags gracefully. Clients especially need to
 		 * preserve unknown tags when sending a completion item back to the server in
@@ -668,7 +749,7 @@
 		 * Client support insert replace edit to control different behavior if a
 		 * completion item is inserted in the text or should replace text.
 		 *
-		 * @since 3.16.0 - proposed state
+		 * @since 3.16.0
 		 */
 		InsertReplaceSupport bool `json:"insertReplaceSupport,omitempty"`
 		/**
@@ -676,7 +757,7 @@
 		 * item. Before version 3.16.0 only the predefined properties `documentation`
 		 * and `details` could be resolved lazily.
 		 *
-		 * @since 3.16.0 - proposed state
+		 * @since 3.16.0
 		 */
 		ResolveSupport struct {
 			/**
@@ -684,6 +765,16 @@
 			 */
 			Properties []string `json:"properties"`
 		} `json:"resolveSupport,omitempty"`
+		/**
+		 * The client supports the `insertTextMode` property on
+		 * a completion item to override the whitespace handling mode
+		 * as defined by the client (see `insertTextMode`).
+		 *
+		 * @since 3.16.0
+		 */
+		InsertTextModeSupport struct {
+			ValueSet []InsertTextMode `json:"valueSet"`
+		} `json:"insertTextModeSupport,omitempty"`
 	} `json:"completionItem,omitempty"`
 	CompletionItemKind struct {
 		/**
@@ -699,8 +790,16 @@
 		ValueSet []CompletionItemKind `json:"valueSet,omitempty"`
 	} `json:"completionItemKind,omitempty"`
 	/**
+	 * Defines how the client handles whitespace and indentation
+	 * when accepting a completion item that uses multi line
+	 * text in either `insertText` or `textEdit`.
+	 *
+	 * @since 3.16.0
+	 */
+	InsertTextMode InsertTextMode `json:"insertTextMode,omitempty"`
+	/**
 	 * The client supports to send additional context information for a
-	 * `textDocument/completion` requestion.
+	 * `textDocument/completion` request.
 	 */
 	ContextSupport bool `json:"contextSupport,omitempty"`
 }
@@ -791,18 +890,26 @@
 	InsertText string `json:"insertText,omitempty"`
 	/**
 	 * The format of the insert text. The format applies to both the `insertText` property
-	 * and the `newText` property of a provided `textEdit`. If ommitted defaults to
+	 * and the `newText` property of a provided `textEdit`. If omitted defaults to
 	 * `InsertTextFormat.PlainText`.
 	 */
 	InsertTextFormat InsertTextFormat `json:"insertTextFormat,omitempty"`
 	/**
+	 * How whitespace and indentation is handled during completion
+	 * item insertion. If ignored the clients default value depends on
+	 * the `textDocument.completion.insertTextMode` client capability.
+	 *
+	 * @since 3.16.0
+	 */
+	InsertTextMode InsertTextMode `json:"insertTextMode,omitempty"`
+	/**
 	 * An [edit](#TextEdit) which is applied to a document when selecting
 	 * this completion. When an edit is provided the value of
 	 * [insertText](#CompletionItem.insertText) is ignored.
 	 *
 	 * Most editors support two different operation when accepting a completion item. One is to insert a
-	 * completion text and the other is to replace an existing text with a competion text. Since this can
-	 * usually not predetermend by a server it can report both ranges. Clients need to signal support for
+	 * completion text and the other is to replace an existing text with a completion text. Since this can
+	 * usually not predetermined by a server it can report both ranges. Clients need to signal support for
 	 * `InsertReplaceEdits` via the `textDocument.completion.insertReplaceSupport` client capability
 	 * property.
 	 *
@@ -811,7 +918,7 @@
 	 * *Note 2:* If an `InsertReplaceEdit` is returned the edit's insert range must be a prefix of
 	 * the edit's replace range, that means it must be contained and starting at the same position.
 	 *
-	 * @since 3.16.0 additional type `InsertReplaceEdit` - proposed state
+	 * @since 3.16.0 additional type `InsertReplaceEdit`
 	 */
 	TextEdit *TextEdit/*TextEdit | InsertReplaceEdit*/ `json:"textEdit,omitempty"`
 	/**
@@ -889,7 +996,7 @@
 	TriggerCharacters []string `json:"triggerCharacters,omitempty"`
 	/**
 	 * The list of all possible characters that commit a completion. This field can be used
-	 * if clients don't support individual commmit characters per completion item. See
+	 * if clients don't support individual commit characters per completion item. See
 	 * `ClientCapabilities.textDocument.completion.completionItem.commitCharactersSupport`
 	 *
 	 * If a server provides both `allCommitCharacters` and commit characters on an individual
@@ -984,6 +1091,27 @@
 }
 
 /**
+ * The parameters sent in file create requests/notifications.
+ *
+ * @since 3.16.0
+ */
+type CreateFilesParams struct {
+	/**
+	 * An array of all files/folders created in this operation.
+	 */
+	Files []FileCreate `json:"files"`
+}
+
+/**
+ * Defines a decimal number. Since decimal numbers are very
+ * rare in the language server specification we denote the
+ * exact range with every decimal using the mathematics
+ * interval notations (e.g. [0, 1] denotes all decimals d with
+ * 0 <= d <= 1.
+ */
+type Decimal = float64
+
+/**
  * The declaration of a symbol representation as one or many [locations](#Location).
  */
 type Declaration = []Location /*Location | Location[]*/
@@ -1115,6 +1243,18 @@
 }
 
 /**
+ * The parameters sent in file delete requests/notifications.
+ *
+ * @since 3.16.0
+ */
+type DeleteFilesParams struct {
+	/**
+	 * An array of all files/folders deleted in this operation.
+	 */
+	Files []FileDelete `json:"files"`
+}
+
+/**
  * Represents a diagnostic, such as a compiler error or warning. Diagnostic objects
  * are only valid in the scope of a resource.
  */
@@ -1131,11 +1271,11 @@
 	/**
 	 * The diagnostic's code, which usually appear in the user interface.
 	 */
-	Code interface{}/*number | string*/ `json:"code,omitempty"`
+	Code interface{}/*integer | string*/ `json:"code,omitempty"`
 	/**
 	 * An optional property to describe the error code.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	CodeDescription *CodeDescription `json:"codeDescription,omitempty"`
 	/**
@@ -1163,7 +1303,7 @@
 	 * A data entry field that is preserved between a `textDocument/publishDiagnostics`
 	 * notification and `textDocument/codeAction` request.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	Data interface{} `json:"data,omitempty"`
 }
@@ -1232,7 +1372,7 @@
 	 *
 	 * To mirror the content of a document using change events use the following approach:
 	 * - start with the same initial content
-	 * - apply the 'textDocument/didChange' notifications in the order you recevie them.
+	 * - apply the 'textDocument/didChange' notifications in the order you receive them.
 	 * - apply the `TextDocumentContentChangeEvent`s in a single notification in the order
 	 *   you receive them.
 	 */
@@ -1305,7 +1445,7 @@
 	/**
 	 * The document that was closed.
 	 */
-	TextDocument VersionedTextDocumentIdentifier `json:"textDocument"`
+	TextDocument TextDocumentIdentifier `json:"textDocument"`
 	/**
 	 * Optional the content when saved. Depends on the includeText value
 	 * when the save notification was requested.
@@ -1603,6 +1743,8 @@
  * A document selector is the combination of one or many document filters.
  *
  * @sample `let sel:DocumentSelector = [{ language: 'typescript' }, { language: 'json', pattern: '**∕tsconfig.json' }]`;
+ *
+ * The use of a string as a document filter is deprecated @since 3.16.0.
  */
 type DocumentSelector = []string /*string | DocumentFilter*/
 
@@ -1629,7 +1771,7 @@
 	/**
 	 * Tags for this completion item.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	Tags []SymbolTag `json:"tags,omitempty"`
 	/**
@@ -1688,7 +1830,7 @@
 	 * `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.
 	 * Clients supporting tags have to handle unknown tags gracefully.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	TagSupport struct {
 		/**
@@ -1713,7 +1855,7 @@
 	 * A human-readable string that is shown when multiple outlines trees
 	 * are shown for the same document.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	Label string `json:"label,omitempty"`
 	WorkDoneProgressOptions
@@ -1780,6 +1922,30 @@
 type FileChangeType float64
 
 /**
+ * Represents information on a file/folder create.
+ *
+ * @since 3.16.0
+ */
+type FileCreate struct {
+	/**
+	 * A file:// URI for the location of the file/folder being created.
+	 */
+	URI string `json:"uri"`
+}
+
+/**
+ * Represents information on a file/folder delete.
+ *
+ * @since 3.16.0
+ */
+type FileDelete struct {
+	/**
+	 * A file:// URI for the location of the file/folder being deleted.
+	 */
+	URI string `json:"uri"`
+}
+
+/**
  * An event describing a file change.
  */
 type FileEvent struct {
@@ -1793,6 +1959,171 @@
 	Type FileChangeType `json:"type"`
 }
 
+/**
+ * Capabilities relating to events from file operations by the user in the client.
+ *
+ * These events do not come from the file system, they come from user operations
+ * like renaming a file in the UI.
+ *
+ * @since 3.16.0
+ */
+type FileOperationClientCapabilities struct {
+	/**
+	 * Whether the client supports dynamic registration for file requests/notifications.
+	 */
+	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
+	/**
+	 * The client has support for sending didCreateFiles notifications.
+	 */
+	DidCreate bool `json:"didCreate,omitempty"`
+	/**
+	 * The client has support for willCreateFiles requests.
+	 */
+	WillCreate bool `json:"willCreate,omitempty"`
+	/**
+	 * The client has support for sending didRenameFiles notifications.
+	 */
+	DidRename bool `json:"didRename,omitempty"`
+	/**
+	 * The client has support for willRenameFiles requests.
+	 */
+	WillRename bool `json:"willRename,omitempty"`
+	/**
+	 * The client has support for sending didDeleteFiles notifications.
+	 */
+	DidDelete bool `json:"didDelete,omitempty"`
+	/**
+	 * The client has support for willDeleteFiles requests.
+	 */
+	WillDelete bool `json:"willDelete,omitempty"`
+}
+
+/**
+ * A filter to describe in which file operation requests or notifications
+ * the server is interested in.
+ *
+ * @since 3.16.0
+ */
+type FileOperationFilter struct {
+	/**
+	 * A Uri like `file` or `untitled`.
+	 */
+	Scheme string `json:"scheme,omitempty"`
+	/**
+	 * The actual file operation pattern.
+	 */
+	Pattern FileOperationPattern `json:"pattern"`
+}
+
+/**
+ * Options for notifications/requests for user operations on files.
+ *
+ * @since 3.16.0
+ */
+type FileOperationOptions struct {
+	/**
+	* The server is interested in didCreateFiles notifications.
+	 */
+	DidCreate FileOperationRegistrationOptions `json:"didCreate,omitempty"`
+	/**
+	* The server is interested in willCreateFiles requests.
+	 */
+	WillCreate FileOperationRegistrationOptions `json:"willCreate,omitempty"`
+	/**
+	* The server is interested in didRenameFiles notifications.
+	 */
+	DidRename FileOperationRegistrationOptions `json:"didRename,omitempty"`
+	/**
+	* The server is interested in willRenameFiles requests.
+	 */
+	WillRename FileOperationRegistrationOptions `json:"willRename,omitempty"`
+	/**
+	* The server is interested in didDeleteFiles file notifications.
+	 */
+	DidDelete FileOperationRegistrationOptions `json:"didDelete,omitempty"`
+	/**
+	* The server is interested in willDeleteFiles file requests.
+	 */
+	WillDelete FileOperationRegistrationOptions `json:"willDelete,omitempty"`
+}
+
+/**
+ * A pattern to describe in which file operation requests or notifications
+ * the server is interested in.
+ *
+ * @since 3.16.0
+ */
+type FileOperationPattern struct {
+	/**
+	 * The glob pattern to match. Glob patterns can have the following syntax:
+	 * - `*` to match one or more characters in a path segment
+	 * - `?` to match on one character in a path segment
+	 * - `**` to match any number of path segments, including none
+	 * - `{}` to group conditions (e.g. `**​/*.{ts,js}` matches all TypeScript and JavaScript files)
+	 * - `[]` to declare a range of characters to match in a path segment (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
+	 * - `[!...]` to negate a range of characters to match in a path segment (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
+	 */
+	Glob string `json:"glob"`
+	/**
+	 * Whether to match files or folders with this pattern.
+	 *
+	 * Matches both if undefined.
+	 */
+	Matches FileOperationPatternKind `json:"matches,omitempty"`
+	/**
+	 * Additional options used during matching.
+	 */
+	Options FileOperationPatternOptions `json:"options,omitempty"`
+}
+
+/**
+ * A pattern kind describing if a glob pattern matches a file a folder or
+ * both.
+ *
+ * @since 3.16.0
+ */
+type FileOperationPatternKind string
+
+/**
+ * Matching options for the file operation pattern.
+ *
+ * @since 3.16.0
+ */
+type FileOperationPatternOptions struct {
+	/**
+	 * The pattern should be matched ignoring casing.
+	 */
+	IgnoreCase bool `json:"ignoreCase,omitempty"`
+}
+
+/**
+ * The options to register for file operations.
+ *
+ * @since 3.16.0
+ */
+type FileOperationRegistrationOptions struct {
+	/**
+	 * The actual filters.
+	 */
+	Filters []FileOperationFilter `json:"filters"`
+}
+
+/**
+ * Represents information on a file/folder rename.
+ *
+ * @since 3.16.0
+ */
+type FileRename struct {
+	/**
+	 * A file:// URI for the original location of the file/folder being renamed.
+	 */
+	OldURI string `json:"oldUri"`
+	/**
+	 * A file:// URI for the new location of the file/folder being renamed.
+	 */
+	NewURI string `json:"newUri"`
+}
+
 type FileSystemWatcher struct {
 	/**
 	 * The  glob pattern to watch. Glob patterns can have the following syntax:
@@ -1809,29 +2140,32 @@
 	 * to WatchKind.Create | WatchKind.Change | WatchKind.Delete
 	 * which is 7.
 	 */
-	Kind float64 `json:"kind,omitempty"`
+	Kind uint32 `json:"kind,omitempty"`
 }
 
 /**
- * Represents a folding range.
+ * Represents a folding range. To be valid, start and end line must be bigger than zero and smaller
+ * than the number of lines in the document. Clients are free to ignore invalid ranges.
  */
 type FoldingRange struct {
 	/**
-	 * The zero-based line number from where the folded range starts.
+	 * The zero-based start line of the range to fold. The folded area starts after the line's last character.
+	 * To be valid, the end must be zero or larger and smaller than the number of lines in the document.
 	 */
-	StartLine float64 `json:"startLine"`
+	StartLine uint32 `json:"startLine"`
 	/**
 	 * The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
 	 */
-	StartCharacter float64 `json:"startCharacter,omitempty"`
+	StartCharacter uint32 `json:"startCharacter,omitempty"`
 	/**
-	 * The zero-based line number where the folded range ends.
+	 * The zero-based end line of the range to fold. The folded area ends with the line's last character.
+	 * To be valid, the end must be zero or larger and smaller than the number of lines in the document.
 	 */
-	EndLine float64 `json:"endLine"`
+	EndLine uint32 `json:"endLine"`
 	/**
 	 * The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
 	 */
-	EndCharacter float64 `json:"endCharacter,omitempty"`
+	EndCharacter uint32 `json:"endCharacter,omitempty"`
 	/**
 	 * Describes the kind of the folding range such as `comment' or 'region'. The kind
 	 * is used to categorize folding ranges and used by commands like 'Fold all comments'. See
@@ -1851,7 +2185,7 @@
 	 * The maximum number of folding ranges that the client prefers to receive per document. The value serves as a
 	 * hint, servers are free to follow the limit.
 	 */
-	RangeLimit float64 `json:"rangeLimit,omitempty"`
+	RangeLimit uint32 `json:"rangeLimit,omitempty"`
 	/**
 	 * If set, the client signals that it only supports folding complete lines. If set, client will
 	 * ignore specified `startCharacter` and `endCharacter` properties in a FoldingRange.
@@ -1893,7 +2227,7 @@
 	/**
 	 * Size of a tab in spaces.
 	 */
-	TabSize float64 `json:"tabSize"`
+	TabSize uint32 `json:"tabSize"`
 	/**
 	 * Prefer spaces over tabs.
 	 */
@@ -1919,6 +2253,46 @@
 }
 
 /**
+ * General client capabilities.
+ *
+ * @since 3.16.0
+ */
+type GeneralClientCapabilities struct {
+	/**
+	 * Client capability that signals how the client
+	 * handles stale requests (e.g. a request
+	 * for which the client will not process the response
+	 * anymore since the information is outdated).
+	 *
+	 * @since 3.17.0
+	 */
+	StaleRequestSupport struct {
+		/**
+		 * The client will actively cancel the request.
+		 */
+		Cancel bool `json:"cancel"`
+		/**
+		 * The list of requests for which the client
+		 * will retry the request if it receives a
+		 * response with error code `ContentModified``
+		 */
+		RetryOnContentModified []string `json:"retryOnContentModified"`
+	} `json:"staleRequestSupport,omitempty"`
+	/**
+	 * Client capabilities specific to regular expressions.
+	 *
+	 * @since 3.16.0
+	 */
+	RegularExpressions RegularExpressionsClientCapabilities `json:"regularExpressions,omitempty"`
+	/**
+	 * Client capabilities specific to the client's markdown parser.
+	 *
+	 * @since 3.16.0
+	 */
+	Markdown MarkdownClientCapabilities `json:"markdown,omitempty"`
+}
+
+/**
  * The result of a hover request.
  */
 type Hover struct {
@@ -2022,7 +2396,7 @@
 		 */
 		Name string `json:"name"`
 		/**
-		 * The servers's version as defined by the server.
+		 * The server's version as defined by the server.
 		 */
 		Version string `json:"version,omitempty"`
 	} `json:"serverInfo,omitempty"`
@@ -2046,7 +2420,13 @@
 	/**
 	 * Window specific client capabilities.
 	 */
-	Window interface{} `json:"window,omitempty"`
+	Window WindowClientCapabilities `json:"window,omitempty"`
+	/**
+	 * General client capabilities.
+	 *
+	 * @since 3.16.0
+	 */
+	General GeneralClientCapabilities `json:"general,omitempty"`
 	/**
 	 * Experimental client capabilities.
 	 */
@@ -2061,7 +2441,7 @@
 	 * The process Id of the parent process that started
 	 * the server.
 	 */
-	ProcessID float64/*number | null*/ `json:"processId"`
+	ProcessID int32/*integer | null*/ `json:"processId"`
 	/**
 	 * Information about the client
 	 *
@@ -2078,6 +2458,17 @@
 		Version string `json:"version,omitempty"`
 	} `json:"clientInfo,omitempty"`
 	/**
+	 * The locale the client is currently showing the user interface
+	 * in. This must not necessarily be the locale of the operating
+	 * system.
+	 *
+	 * Uses IETF language tags as the value's syntax
+	 * (See https://en.wikipedia.org/wiki/IETF_language_tag)
+	 *
+	 * @since 3.16.0
+	 */
+	Locale string `json:"locale,omitempty"`
+	/**
 	 * The rootPath of the workspace. Is null
 	 * if no folder is open.
 	 *
@@ -2210,18 +2601,34 @@
 	 */
 	ExecuteCommandProvider ExecuteCommandOptions `json:"executeCommandProvider,omitempty"`
 	/**
-	 * The server provides Call Hierarchy support.
+	 * The server provides call hierarchy support.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	CallHierarchyProvider interface{}/* bool | CallHierarchyOptions | CallHierarchyRegistrationOptions*/ `json:"callHierarchyProvider,omitempty"`
 	/**
+	 * The server provides linked editing range support.
+	 *
+	 * @since 3.16.0
+	 */
+	LinkedEditingRangeProvider interface{}/* bool | LinkedEditingRangeOptions | LinkedEditingRangeRegistrationOptions*/ `json:"linkedEditingRangeProvider,omitempty"`
+	/**
 	 * The server provides semantic tokens support.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	SemanticTokensProvider interface{}/*SemanticTokensOptions | SemanticTokensRegistrationOptions*/ `json:"semanticTokensProvider,omitempty"`
 	/**
+	 * Window specific server capabilities.
+	 */
+	Workspace WorkspaceGn `json:"workspace,omitempty"`
+	/**
+	 * The server provides moniker support.
+	 *
+	 * @since 3.16.0
+	 */
+	MonikerProvider interface{}/* bool | MonikerOptions | MonikerRegistrationOptions*/ `json:"monikerProvider,omitempty"`
+	/**
 	 * Experimental server capabilities.
 	 */
 	Experimental interface{} `json:"experimental,omitempty"`
@@ -2230,7 +2637,7 @@
 /**
  * A special text edit to provide an insert and a replace operation.
  *
- * @since 3.16.0 - proposed state
+ * @since 3.16.0
  */
 type InsertReplaceEdit struct {
 	/**
@@ -2254,6 +2661,64 @@
 type InsertTextFormat float64
 
 /**
+ * How whitespace and indentation is handled during completion
+ * item insertion.
+ *
+ * @since 3.16.0
+ */
+type InsertTextMode float64
+
+type Integer float64
+
+/**
+ * Client capabilities for the linked editing range request.
+ *
+ * @since 3.16.0
+ */
+type LinkedEditingRangeClientCapabilities struct {
+	/**
+	 * Whether implementation supports dynamic registration. If this is set to `true`
+	 * the client supports the new `(TextDocumentRegistrationOptions & StaticRegistrationOptions)`
+	 * return value for the corresponding server capability as well.
+	 */
+	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
+}
+
+type LinkedEditingRangeOptions struct {
+	WorkDoneProgressOptions
+}
+
+type LinkedEditingRangeParams struct {
+	TextDocumentPositionParams
+	WorkDoneProgressParams
+}
+
+type LinkedEditingRangeRegistrationOptions struct {
+	TextDocumentRegistrationOptions
+	LinkedEditingRangeOptions
+	StaticRegistrationOptions
+}
+
+/**
+ * The result of a linked editing range request.
+ *
+ * @since 3.16.0
+ */
+type LinkedEditingRanges struct {
+	/**
+	 * A list of ranges that can be edited together. The ranges must have
+	 * identical length and contain identical text content. The ranges cannot overlap.
+	 */
+	Ranges []Range `json:"ranges"`
+	/**
+	 * An optional word pattern (regular expression) that describes valid contents for
+	 * the given ranges. If no pattern is provided, the client configuration's word
+	 * pattern will be used.
+	 */
+	WordPattern string `json:"wordPattern,omitempty"`
+}
+
+/**
  * Represents a location inside a resource, such as a line
  * inside a text file.
  */
@@ -2311,6 +2776,22 @@
 }
 
 /**
+ * Client capabilities specific to the used markdown parser.
+ *
+ * @since 3.16.0
+ */
+type MarkdownClientCapabilities struct {
+	/**
+	 * The name of the parser.
+	 */
+	Parser string `json:"parser"`
+	/**
+	 * The version of the parser.
+	 */
+	Version string `json:"version,omitempty"`
+}
+
+/**
  * MarkedString can be used to render human readable text. It is either a markdown string
  * or a code-block that provides a language and a code snippet. The language identifier
  * is semantically equal to the optional language identifier in fenced code blocks in GitHub
@@ -2408,18 +2889,56 @@
 }
 
 /**
+ * Client capabilities specific to the moniker request.
+ *
+ * @since 3.16.0
+ */
+type MonikerClientCapabilities struct {
+	/**
+	 * Whether moniker supports dynamic registration. If this is set to `true`
+	 * the client supports the new `MonikerRegistrationOptions` return value
+	 * for the corresponding server capability as well.
+	 */
+	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
+}
+
+/**
  * The moniker kind.
  *
  * @since 3.16.0
  */
 type MonikerKind string
 
+type MonikerOptions struct {
+	WorkDoneProgressOptions
+}
+
 type MonikerParams struct {
 	TextDocumentPositionParams
 	WorkDoneProgressParams
 	PartialResultParams
 }
 
+type MonikerRegistrationOptions struct {
+	TextDocumentRegistrationOptions
+	MonikerOptions
+}
+
+/**
+ * A text document identifier to optionally denote a specific version of a text document.
+ */
+type OptionalVersionedTextDocumentIdentifier struct {
+	/**
+	 * The version number of this document. If a versioned text document identifier
+	 * is sent from the server to the client and the file is not open in the editor
+	 * (the server has not received an open notification before) the server can send
+	 * `null` to indicate that the version is unknown and the content on disk is the
+	 * truth (as specified with document content ownership).
+	 */
+	Version int32/*integer | null*/ `json:"version"`
+	TextDocumentIdentifier
+}
+
 /**
  * Represents a parameter of a callable-signature. A parameter can
  * have a label and a doc-comment.
@@ -2435,7 +2954,7 @@
 	 * *Note*: a label of type string should be a substring of its containing signature label.
 	 * Its intended use case is to highlight the parameter label part in the `SignatureInformation.label`.
 	 */
-	Label string/*string | [number, number]*/ `json:"label"`
+	Label string/*string | [uinteger, uinteger]*/ `json:"label"`
 	/**
 	 * The human-readable doc-comment of this signature. Will be shown
 	 * in the UI but can be omitted.
@@ -2464,10 +2983,8 @@
 type Position struct {
 	/**
 	 * Line position in a document (zero-based).
-	 * If a line number is greater than the number of lines in a document, it defaults back to the number of lines in the document.
-	 * If a line number is negative, it defaults to 0.
 	 */
-	Line float64 `json:"line"`
+	Line uint32 `json:"line"`
 	/**
 	 * Character offset on a line in a document (zero-based). Assuming that the line is
 	 * represented as a string, the `character` value represents the gap between the
@@ -2475,9 +2992,8 @@
 	 *
 	 * If the character value is greater than the line length it defaults back to the
 	 * line length.
-	 * If a line number is negative, it defaults to 0.
 	 */
-	Character float64 `json:"character"`
+	Character uint32 `json:"character"`
 }
 
 type PrepareRenameParams struct {
@@ -2485,6 +3001,8 @@
 	WorkDoneProgressParams
 }
 
+type PrepareSupportDefaultBehavior = interface{}
+
 type ProgressParams struct {
 	/**
 	 * The progress token provided by the client or server.
@@ -2528,7 +3046,7 @@
 	/**
 	 * Client supports a codeDescription property
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	CodeDescriptionSupport bool `json:"codeDescriptionSupport,omitempty"`
 	/**
@@ -2536,7 +3054,7 @@
 	 * preserved between a `textDocument/publishDiagnostics` and
 	 * `textDocument/codeAction` request.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	DataSupport bool `json:"dataSupport,omitempty"`
 }
@@ -2554,7 +3072,7 @@
 	 *
 	 * @since 3.15.0
 	 */
-	Version float64 `json:"version,omitempty"`
+	Version int32 `json:"version,omitempty"`
 	/**
 	 * An array of diagnostic information items.
 	 */
@@ -2646,6 +3164,22 @@
 	Registrations []Registration `json:"registrations"`
 }
 
+/**
+ * Client capabilities specific to regular expressions.
+ *
+ * @since 3.16.0
+ */
+type RegularExpressionsClientCapabilities struct {
+	/**
+	 * The engine's name.
+	 */
+	Engine string `json:"engine"`
+	/**
+	 * The engine's version.
+	 */
+	Version string `json:"version,omitempty"`
+}
+
 type RenameClientCapabilities struct {
 	/**
 	 * Whether rename supports dynamic registration.
@@ -2655,15 +3189,28 @@
 	 * Client supports testing for validity of rename operations
 	 * before execution.
 	 *
-	 * @since version 3.12.0
+	 * @since 3.12.0
 	 */
 	PrepareSupport bool `json:"prepareSupport,omitempty"`
 	/**
 	 * Client supports the default behavior result.
 	 *
-	 * @since version 3.16.0
+	 * The value indicates the default behavior used by the
+	 * client.
+	 *
+	 * @since 3.16.0
 	 */
-	PrepareSupportDefaultBehavior bool `json:"prepareSupportDefaultBehavior,omitempty"`
+	PrepareSupportDefaultBehavior PrepareSupportDefaultBehavior `json:"prepareSupportDefaultBehavior,omitempty"`
+	/**
+	 * Whether th client honors the change annotations in
+	 * text edits and resource operations returned via the
+	 * rename request's workspace edit by for example presenting
+	 * the workspace edit in the user interface and asking
+	 * for confirmation.
+	 *
+	 * @since 3.16.0
+	 */
+	HonorsChangeAnnotations bool `json:"honorsChangeAnnotations,omitempty"`
 }
 
 /**
@@ -2704,6 +3251,19 @@
 }
 
 /**
+ * The parameters sent in file rename requests/notifications.
+ *
+ * @since 3.16.0
+ */
+type RenameFilesParams struct {
+	/**
+	 * An array of all files/folders renamed in this operation. When a folder is renamed, only
+	 * the folder will be included, and not its children.
+	 */
+	Files []FileRename `json:"files"`
+}
+
+/**
  * Provider options for a [RenameRequest](#RenameRequest).
  */
 type RenameOptions struct {
@@ -2737,8 +3297,20 @@
 	WorkDoneProgressParams
 }
 
+/**
+ * A generic resource operation.
+ */
 type ResourceOperation struct {
+	/**
+	 * The resource operation kind.
+	 */
 	Kind string `json:"kind"`
+	/**
+	 * An optional annotation identifier describing the operation.
+	 *
+	 * @since 3.16.0
+	 */
+	AnnotationID ChangeAnnotationIdentifier `json:"annotationId,omitempty"`
 }
 
 type ResourceOperationKind string
@@ -2804,7 +3376,7 @@
 }
 
 /**
- * @since 3.16.0 - Proposed state
+ * @since 3.16.0
  */
 type SemanticTokens struct {
 	/**
@@ -2817,11 +3389,11 @@
 	/**
 	 * The actual tokens.
 	 */
-	Data []float64 `json:"data"`
+	Data []uint32 `json:"data"`
 }
 
 /**
- * @since 3.16.0 - Proposed state
+ * @since 3.16.0
  */
 type SemanticTokensClientCapabilities struct {
 	/**
@@ -2832,6 +3404,13 @@
 	DynamicRegistration bool `json:"dynamicRegistration,omitempty"`
 	/**
 	 * Which requests the client supports and might send to the server
+	 * depending on the server's capability. Please note that clients might not
+	 * show semantic tokens or degrade some of the user experience if a range
+	 * or full request is advertised by the client but not provided by the
+	 * server. If for example the client capability `requests.full` and
+	 * `request.range` are both set to true but the server only provides a
+	 * range provider the client might not render a minimap correctly or might
+	 * even decide to not show any semantic tokens at all.
 	 */
 	Requests struct {
 		/**
@@ -2854,13 +3433,21 @@
 	 */
 	TokenModifiers []string `json:"tokenModifiers"`
 	/**
-	 * The formats the clients supports.
+	 * The token formats the clients supports.
 	 */
 	Formats []TokenFormat `json:"formats"`
+	/**
+	 * Whether the client supports tokens that can overlap each other.
+	 */
+	OverlappingTokenSupport bool `json:"overlappingTokenSupport,omitempty"`
+	/**
+	 * Whether the client supports tokens that can span multiple lines.
+	 */
+	MultilineTokenSupport bool `json:"multilineTokenSupport,omitempty"`
 }
 
 /**
- * @since 3.16.0 - Proposed state
+ * @since 3.16.0
  */
 type SemanticTokensDelta struct {
 	ResultID string `json:"resultId,omitempty"`
@@ -2871,7 +3458,7 @@
 }
 
 /**
- * @since 3.16.0 - Proposed state
+ * @since 3.16.0
  */
 type SemanticTokensDeltaParams struct {
 	/**
@@ -2880,7 +3467,7 @@
 	TextDocument TextDocumentIdentifier `json:"textDocument"`
 	/**
 	 * The result id of a previous response. The result Id can either point to a full response
-	 * or a delta response depending on what was recevied last.
+	 * or a delta response depending on what was received last.
 	 */
 	PreviousResultID string `json:"previousResultId"`
 	WorkDoneProgressParams
@@ -2888,25 +3475,25 @@
 }
 
 /**
- * @since 3.16.0 - Proposed state
+ * @since 3.16.0
  */
 type SemanticTokensEdit struct {
 	/**
 	 * The start offset of the edit.
 	 */
-	Start float64 `json:"start"`
+	Start uint32 `json:"start"`
 	/**
 	 * The count of elements to remove.
 	 */
-	DeleteCount float64 `json:"deleteCount"`
+	DeleteCount uint32 `json:"deleteCount"`
 	/**
 	 * The elements to insert.
 	 */
-	Data []float64 `json:"data,omitempty"`
+	Data []uint32 `json:"data,omitempty"`
 }
 
 /**
- * @since 3.16.0 - Proposed state
+ * @since 3.16.0
  */
 type SemanticTokensLegend struct {
 	/**
@@ -2920,7 +3507,7 @@
 }
 
 /**
- * @since 3.16.0 - Proposed state
+ * @since 3.16.0
  */
 type SemanticTokensOptions struct {
 	/**
@@ -2928,7 +3515,7 @@
 	 */
 	Legend SemanticTokensLegend `json:"legend"`
 	/**
-	 * Server supports providing semantic tokens for a sepcific range
+	 * Server supports providing semantic tokens for a specific range
 	 * of a document.
 	 */
 	Range bool/*boolean | {	}*/ `json:"range,omitempty"`
@@ -2940,7 +3527,7 @@
 }
 
 /**
- * @since 3.16.0 - Proposed state
+ * @since 3.16.0
  */
 type SemanticTokensParams struct {
 	/**
@@ -2952,7 +3539,7 @@
 }
 
 /**
- * @since 3.16.0 - Proposed state
+ * @since 3.16.0
  */
 type SemanticTokensRangeParams struct {
 	/**
@@ -2968,7 +3555,7 @@
 }
 
 /**
- * @since 3.16.0 - Proposed state
+ * @since 3.16.0
  */
 type SemanticTokensRegistrationOptions struct {
 	TextDocumentRegistrationOptions
@@ -2978,132 +3565,20 @@
 
 type SemanticTokensWorkspaceClientCapabilities struct {
 	/**
-	 * Whether the client implementation supports a refresh request send from the server
-	 * to the client. This is useful if a server detects a project wide configuration change
-	 * which requires a re-calculation of all semantic tokens provided by the server issuing
-	 * the request.
+	 * Whether the client implementation supports a refresh request sent from
+	 * the server to the client.
+	 *
+	 * Note that this event is global and will force the client to refresh all
+	 * semantic tokens currently shown. It should be used with absolute care
+	 * and is useful for situation where a server for example detect a project
+	 * wide change that requires such a calculation.
 	 */
 	RefreshSupport bool `json:"refreshSupport,omitempty"`
 }
 
 type ServerCapabilities = struct {
-	/**
-	 * Defines how text documents are synced. Is either a detailed structure defining each notification or
-	 * for backwards compatibility the TextDocumentSyncKind number.
-	 */
-	TextDocumentSync interface{}/*TextDocumentSyncOptions | TextDocumentSyncKind*/ `json:"textDocumentSync,omitempty"`
-	/**
-	 * The server provides completion support.
-	 */
-	CompletionProvider CompletionOptions `json:"completionProvider,omitempty"`
-	/**
-	 * The server provides hover support.
-	 */
-	HoverProvider bool/*boolean | HoverOptions*/ `json:"hoverProvider,omitempty"`
-	/**
-	 * The server provides signature help support.
-	 */
-	SignatureHelpProvider SignatureHelpOptions `json:"signatureHelpProvider,omitempty"`
-	/**
-	 * The server provides Goto Declaration support.
-	 */
-	DeclarationProvider interface{}/* bool | DeclarationOptions | DeclarationRegistrationOptions*/ `json:"declarationProvider,omitempty"`
-	/**
-	 * The server provides goto definition support.
-	 */
-	DefinitionProvider bool/*boolean | DefinitionOptions*/ `json:"definitionProvider,omitempty"`
-	/**
-	 * The server provides Goto Type Definition support.
-	 */
-	TypeDefinitionProvider interface{}/* bool | TypeDefinitionOptions | TypeDefinitionRegistrationOptions*/ `json:"typeDefinitionProvider,omitempty"`
-	/**
-	 * The server provides Goto Implementation support.
-	 */
-	ImplementationProvider interface{}/* bool | ImplementationOptions | ImplementationRegistrationOptions*/ `json:"implementationProvider,omitempty"`
-	/**
-	 * The server provides find references support.
-	 */
-	ReferencesProvider bool/*boolean | ReferenceOptions*/ `json:"referencesProvider,omitempty"`
-	/**
-	 * The server provides document highlight support.
-	 */
-	DocumentHighlightProvider bool/*boolean | DocumentHighlightOptions*/ `json:"documentHighlightProvider,omitempty"`
-	/**
-	 * The server provides document symbol support.
-	 */
-	DocumentSymbolProvider bool/*boolean | DocumentSymbolOptions*/ `json:"documentSymbolProvider,omitempty"`
-	/**
-	 * The server provides code actions. CodeActionOptions may only be
-	 * specified if the client states that it supports
-	 * `codeActionLiteralSupport` in its initial `initialize` request.
-	 */
-	CodeActionProvider interface{}/*boolean | CodeActionOptions*/ `json:"codeActionProvider,omitempty"`
-	/**
-	 * The server provides code lens.
-	 */
-	CodeLensProvider CodeLensOptions `json:"codeLensProvider,omitempty"`
-	/**
-	 * The server provides document link support.
-	 */
-	DocumentLinkProvider DocumentLinkOptions `json:"documentLinkProvider,omitempty"`
-	/**
-	 * The server provides color provider support.
-	 */
-	ColorProvider interface{}/* bool | DocumentColorOptions | DocumentColorRegistrationOptions*/ `json:"colorProvider,omitempty"`
-	/**
-	 * The server provides workspace symbol support.
-	 */
-	WorkspaceSymbolProvider bool/*boolean | WorkspaceSymbolOptions*/ `json:"workspaceSymbolProvider,omitempty"`
-	/**
-	 * The server provides document formatting.
-	 */
-	DocumentFormattingProvider bool/*boolean | DocumentFormattingOptions*/ `json:"documentFormattingProvider,omitempty"`
-	/**
-	 * The server provides document range formatting.
-	 */
-	DocumentRangeFormattingProvider bool/*boolean | DocumentRangeFormattingOptions*/ `json:"documentRangeFormattingProvider,omitempty"`
-	/**
-	 * The server provides document formatting on typing.
-	 */
-	DocumentOnTypeFormattingProvider DocumentOnTypeFormattingOptions `json:"documentOnTypeFormattingProvider,omitempty"`
-	/**
-	 * The server provides rename support. RenameOptions may only be
-	 * specified if the client states that it supports
-	 * `prepareSupport` in its initial `initialize` request.
-	 */
-	RenameProvider interface{}/*boolean | RenameOptions*/ `json:"renameProvider,omitempty"`
-	/**
-	 * The server provides folding provider support.
-	 */
-	FoldingRangeProvider interface{}/* bool | FoldingRangeOptions | FoldingRangeRegistrationOptions*/ `json:"foldingRangeProvider,omitempty"`
-	/**
-	 * The server provides selection range support.
-	 */
-	SelectionRangeProvider interface{}/* bool | SelectionRangeOptions | SelectionRangeRegistrationOptions*/ `json:"selectionRangeProvider,omitempty"`
-	/**
-	 * The server provides execute command support.
-	 */
-	ExecuteCommandProvider ExecuteCommandOptions `json:"executeCommandProvider,omitempty"`
-	/**
-	 * The server provides Call Hierarchy support.
-	 *
-	 * @since 3.16.0 - proposed state
-	 */
-	CallHierarchyProvider interface{}/* bool | CallHierarchyOptions | CallHierarchyRegistrationOptions*/ `json:"callHierarchyProvider,omitempty"`
-	/**
-	 * The server provides semantic tokens support.
-	 *
-	 * @since 3.16.0 - proposed state
-	 */
-	SemanticTokensProvider interface{}/*SemanticTokensOptions | SemanticTokensRegistrationOptions*/ `json:"semanticTokensProvider,omitempty"`
-	/**
-	 * Experimental server capabilities.
-	 */
-	Experimental interface{} `json:"experimental,omitempty"`
-	/**
-	 * The workspace server capabilities
-	 */
-	Workspace WorkspaceGn `json:"workspace,omitempty"`
+	InnerServerCapabilities
+	WorkspaceFoldersServerCapabilities
 }
 
 type SetTraceParams struct {
@@ -3111,6 +3586,63 @@
 }
 
 /**
+ * Client capabilities for the show document request.
+ *
+ * @since 3.16.0
+ */
+type ShowDocumentClientCapabilities struct {
+	/**
+	 * The client has support for the show document
+	 * request.
+	 */
+	Support bool `json:"support"`
+}
+
+/**
+ * Params to show a document.
+ *
+ * @since 3.16.0
+ */
+type ShowDocumentParams struct {
+	/**
+	 * The document uri to show.
+	 */
+	URI URI `json:"uri"`
+	/**
+	 * Indicates to show the resource in an external program.
+	 * To show for example `https://code.visualstudio.com/`
+	 * in the default WEB browser set `external` to `true`.
+	 */
+	External bool `json:"external,omitempty"`
+	/**
+	 * An optional property to indicate whether the editor
+	 * showing the document should take focus or not.
+	 * Clients might ignore this property if an external
+	 * program in started.
+	 */
+	TakeFocus bool `json:"takeFocus,omitempty"`
+	/**
+	 * An optional selection range if the document is a text
+	 * document. Clients might ignore the property if an
+	 * external program is started or the file is not a text
+	 * file.
+	 */
+	Selection Range `json:"selection,omitempty"`
+}
+
+/**
+ * The result of an show document request.
+ *
+ * @since 3.16.0
+ */
+type ShowDocumentResult struct {
+	/**
+	 * A boolean indicating if the show was successful.
+	 */
+	Success bool `json:"success"`
+}
+
+/**
  * The parameters of a notification message.
  */
 type ShowMessageParams struct {
@@ -3124,6 +3656,23 @@
 	Message string `json:"message"`
 }
 
+/**
+ * Show message request client capabilities
+ */
+type ShowMessageRequestClientCapabilities struct {
+	/**
+	 * Capabilities specific to the `MessageActionItem` type.
+	 */
+	MessageActionItem struct {
+		/**
+		 * Whether the client supports additional attributes which
+		 * are preserved and send back to the server in the
+		 * request's response.
+		 */
+		AdditionalPropertiesSupport bool `json:"additionalPropertiesSupport,omitempty"`
+	} `json:"messageActionItem,omitempty"`
+}
+
 type ShowMessageRequestParams struct {
 	/**
 	 * The message type. See {@link MessageType}
@@ -3153,12 +3702,12 @@
 	 * The active signature. Set to `null` if no
 	 * signatures exist.
 	 */
-	ActiveSignature float64/*number | null*/ `json:"activeSignature"`
+	ActiveSignature uint32/*uinteger | null*/ `json:"activeSignature"`
 	/**
 	 * The active parameter of the active signature. Set to `null`
 	 * if the active signature has no parameters.
 	 */
-	ActiveParameter float64/*number | null*/ `json:"activeParameter"`
+	ActiveParameter uint32/*uinteger | null*/ `json:"activeParameter"`
 }
 
 /**
@@ -3195,7 +3744,7 @@
 		 * The client support the `activeParameter` property on `SignatureInformation`
 		 * literal.
 		 *
-		 * @since 3.16.0 - proposed state
+		 * @since 3.16.0
 		 */
 		ActiveParameterSupport bool `json:"activeParameterSupport,omitempty"`
 	} `json:"signatureInformation,omitempty"`
@@ -3229,7 +3778,7 @@
 	/**
 	 * `true` if signature help was already showing when it was triggered.
 	 *
-	 * Retriggers occur when the signature help is already active and can be caused by actions such as
+	 * Retrigger occurs when the signature help is already active and can be caused by actions such as
 	 * typing a trigger character, a cursor move, or document content changes.
 	 */
 	IsRetrigger bool `json:"isRetrigger"`
@@ -3309,9 +3858,9 @@
 	 *
 	 * If provided, this is used in place of `SignatureHelp.activeParameter`.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
-	ActiveParameter float64 `json:"activeParameter,omitempty"`
+	ActiveParameter uint32 `json:"activeParameter,omitempty"`
 }
 
 /**
@@ -3342,7 +3891,7 @@
 	/**
 	 * Tags for this completion item.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	Tags []SymbolTag `json:"tags,omitempty"`
 	/**
@@ -3470,13 +4019,13 @@
 	 */
 	Rename RenameClientCapabilities `json:"rename,omitempty"`
 	/**
-	 * Capabilities specific to `textDocument/foldingRange` requests.
+	 * Capabilities specific to `textDocument/foldingRange` request.
 	 *
 	 * @since 3.10.0
 	 */
 	FoldingRange FoldingRangeClientCapabilities `json:"foldingRange,omitempty"`
 	/**
-	 * Capabilities specific to `textDocument/selectionRange` requests
+	 * Capabilities specific to `textDocument/selectionRange` request.
 	 *
 	 * @since 3.15.0
 	 */
@@ -3486,17 +4035,29 @@
 	 */
 	PublishDiagnostics PublishDiagnosticsClientCapabilities `json:"publishDiagnostics,omitempty"`
 	/**
-	 * Capabilities specific to the various call hierarchy requests.
+	 * Capabilities specific to the various call hierarchy request.
 	 *
 	 * @since 3.16.0
 	 */
 	CallHierarchy CallHierarchyClientCapabilities `json:"callHierarchy,omitempty"`
 	/**
-	 * Capabilities specific to the various semantic token requsts.
+	 * Capabilities specific to the various semantic token request.
 	 *
-	 * @since 3.16.0 - Proposed state
+	 * @since 3.16.0
 	 */
 	SemanticTokens SemanticTokensClientCapabilities `json:"semanticTokens,omitempty"`
+	/**
+	 * Capabilities specific to the linked editing range request.
+	 *
+	 * @since 3.16.0
+	 */
+	LinkedEditingRange LinkedEditingRangeClientCapabilities `json:"linkedEditingRange,omitempty"`
+	/**
+	 * Client capabilities specific to the moniker request.
+	 *
+	 * @since 3.16.0
+	 */
+	Moniker MonikerClientCapabilities `json:"moniker,omitempty"`
 }
 
 /**
@@ -3515,7 +4076,7 @@
 	 *
 	 * @deprecated use range instead.
 	 */
-	RangeLength float64 `json:"rangeLength,omitempty"`
+	RangeLength uint32 `json:"rangeLength,omitempty"`
 	/**
 	 * The new text for the provided range.
 	 */
@@ -3532,11 +4093,14 @@
 	/**
 	 * The text document to change.
 	 */
-	TextDocument VersionedTextDocumentIdentifier `json:"textDocument"`
+	TextDocument OptionalVersionedTextDocumentIdentifier `json:"textDocument"`
 	/**
 	 * The edits to be applied.
+	 *
+	 * @since 3.16.0 - support for AnnotatedTextEdit. This is guarded using a
+	 * client capability.
 	 */
-	Edits []TextEdit `json:"edits"`
+	Edits []TextEdit/*TextEdit | AnnotatedTextEdit*/ `json:"edits"`
 }
 
 /**
@@ -3566,7 +4130,7 @@
 	 * The version number of this document (it will increase after each
 	 * change, including undo/redo).
 	 */
-	Version float64 `json:"version"`
+	Version int32 `json:"version"`
 	/**
 	 * The content of the opened text document.
 	 */
@@ -3716,10 +4280,12 @@
 /**
  * A tagging type for string properties that are actually URIs
  *
- * @since 3.16.0 - proposed state
+ * @since 3.16.0
  */
 type URI = string
 
+type Uinteger float64
+
 /**
  * Moniker uniqueness level to define scope of the moniker.
  *
@@ -3747,17 +4313,13 @@
 }
 
 /**
- * An identifier to denote a specific version of a text document.
+ * A text document identifier to denote a specific version of a text document.
  */
 type VersionedTextDocumentIdentifier struct {
 	/**
-	 * The version number of this document. If a versioned text document identifier
-	 * is sent from the server to the client and the file is not open in the editor
-	 * (the server has not received an open notification before) the server can send
-	 * `null` to indicate that the version is unknown and the content on disk is the
-	 * truth (as speced with document content ownership).
+	 * The version number of this document.
 	 */
-	Version float64/*number | null*/ `json:"version"`
+	Version int32 `json:"version"`
 	TextDocumentIdentifier
 }
 
@@ -3777,6 +4339,29 @@
 	Reason TextDocumentSaveReason `json:"reason"`
 }
 
+type WindowClientCapabilities struct {
+	/**
+	 * Whether client supports handling progress notifications. If set
+	 * servers are allowed to report in `workDoneProgress` property in the
+	 * request specific server capabilities.
+	 *
+	 * @since 3.15.0
+	 */
+	WorkDoneProgress bool `json:"workDoneProgress,omitempty"`
+	/**
+	 * Capabilities specific to the showMessage request.
+	 *
+	 * @since 3.16.0
+	 */
+	ShowMessage ShowMessageRequestClientCapabilities `json:"showMessage,omitempty"`
+	/**
+	 * Capabilities specific to the showDocument request.
+	 *
+	 * @since 3.16.0
+	 */
+	ShowDocument ShowDocumentClientCapabilities `json:"showDocument,omitempty"`
+}
+
 type WorkDoneProgressBegin struct {
 	Kind string `json:"kind"`
 	/**
@@ -3806,9 +4391,9 @@
 	 * to ignore the `percentage` value in subsequent in report notifications.
 	 *
 	 * The value should be steadily rising. Clients are free to ignore values
-	 * that are not following this rule.
+	 * that are not following this rule. The value range is [0, 100].
 	 */
-	Percentage float64 `json:"percentage,omitempty"`
+	Percentage uint32 `json:"percentage,omitempty"`
 }
 
 type WorkDoneProgressCancelParams struct {
@@ -3883,9 +4468,9 @@
 	 * to ignore the `percentage` value in subsequent in report notifications.
 	 *
 	 * The value should be steadily rising. Clients are free to ignore values
-	 * that are not following this rule.
+	 * that are not following this rule. The value range is [0, 100]
 	 */
-	Percentage float64 `json:"percentage,omitempty"`
+	Percentage uint32 `json:"percentage,omitempty"`
 }
 
 /**
@@ -3919,12 +4504,25 @@
 	 */
 	ExecuteCommand ExecuteCommandClientCapabilities `json:"executeCommand,omitempty"`
 	/**
-	 * Capabilities specific to the semantic token requsts scoped to the
+	 * Capabilities specific to the semantic token requests scoped to the
 	 * workspace.
 	 *
-	 * @since 3.16.0 - proposed state.
+	 * @since 3.16.0.
 	 */
 	SemanticTokens SemanticTokensWorkspaceClientCapabilities `json:"semanticTokens,omitempty"`
+	/**
+	 * Capabilities specific to the code lens requests scoped to the
+	 * workspace.
+	 *
+	 * @since 3.16.0.
+	 */
+	CodeLens CodeLensWorkspaceClientCapabilities `json:"codeLens,omitempty"`
+	/**
+	 * The client has support for file notifications/requests for user operations on files.
+	 *
+	 * Since 3.16.0
+	 */
+	FileOperations FileOperationClientCapabilities `json:"fileOperations,omitempty"`
 }
 
 /**
@@ -3950,6 +4548,15 @@
 	 * only plain `TextEdit`s using the `changes` property are supported.
 	 */
 	DocumentChanges []TextDocumentEdit/*TextDocumentEdit | CreateFile | RenameFile | DeleteFile*/ `json:"documentChanges,omitempty"`
+	/**
+	 * A map of change annotations that can be referenced in `AnnotatedTextEdit`s or create, rename and
+	 * delete file / folder operations.
+	 *
+	 * Whether clients honor this property depends on the client capability `workspace.changeAnnotationSupport`.
+	 *
+	 * @since 3.16.0
+	 */
+	ChangeAnnotations map[string]ChangeAnnotationIdentifier `json:"changeAnnotations,omitempty"`
 }
 
 type WorkspaceEditClientCapabilities struct {
@@ -3971,6 +4578,30 @@
 	 * @since 3.13.0
 	 */
 	FailureHandling FailureHandlingKind `json:"failureHandling,omitempty"`
+	/**
+	 * Whether the client normalizes line endings to the client specific
+	 * setting.
+	 * If set to `true` the client will normalize line ending characters
+	 * in a workspace edit containing to the client specific new line
+	 * character.
+	 *
+	 * @since 3.16.0
+	 */
+	NormalizesLineEndings bool `json:"normalizesLineEndings,omitempty"`
+	/**
+	 * Whether the client in general supports change annotations on text edits,
+	 * create file, rename file and delete file changes.
+	 *
+	 * @since 3.16.0
+	 */
+	ChangeAnnotationSupport struct {
+		/**
+		 * Whether the client groups edits with equal labels into tree nodes,
+		 * for instance all edits labelled with "Changes in Strings" would
+		 * be a tree node.
+		 */
+		GroupsOnLabel bool `json:"groupsOnLabel,omitempty"`
+	} `json:"changeAnnotationSupport,omitempty"`
 }
 
 type WorkspaceFolder struct {
@@ -4048,7 +4679,7 @@
 	 * The client supports tags on `SymbolInformation`.
 	 * Clients supporting tags have to handle unknown tags gracefully.
 	 *
-	 * @since 3.16.0 - proposed state
+	 * @since 3.16.0
 	 */
 	TagSupport struct {
 		/**
@@ -4267,7 +4898,7 @@
 	/**
 	 * If the workspace edit contains only textual file changes they are executed transactional.
 	 * If resource changes (create, rename or delete file) are part of the change the failure
-	 * handling startegy is abort.
+	 * handling strategy is abort.
 	 */
 
 	TextOnlyTransactional FailureHandlingKind = "textOnlyTransactional"
@@ -4293,6 +4924,16 @@
 
 	Deleted FileChangeType = 3
 	/**
+	 * The pattern matches a file only.
+	 */
+
+	FileOp FileOperationPatternKind = "file"
+	/**
+	 * The pattern matches a folder only.
+	 */
+
+	FolderOp FileOperationPatternKind = "folder"
+	/**
 	 * Folding range for a comment
 	 */
 	Comment FoldingRangeKind = "comment"
@@ -4329,6 +4970,28 @@
 
 	SnippetTextFormat InsertTextFormat = 2
 	/**
+	 * The insertion or replace strings is taken as it is. If the
+	 * value is multi line the lines below the cursor will be
+	 * inserted using the indentation defined in the string value.
+	 * The client will not apply any kind of adjustments to the
+	 * string.
+	 */
+
+	AsIs InsertTextMode = 1
+	/**
+	 * The editor adjusts leading whitespace of new lines so that
+	 * they match the indentation up to the cursor of the line for
+	 * which the item is accepted.
+	 *
+	 * Consider a line like this: <2tabs><cursor><3tabs>foo. Accepting a
+	 * multi line completion item is indented using 2 tabs and all
+	 * following lines inserted will be indented using 2 tabs as well.
+	 */
+
+	AdjustIndentation InsertTextMode = 2
+	INT_MIN_VALUE     Integer        = -2147483648
+	INT_MAX_VALUE     Integer        = 2147483647
+	/**
 	 * Plain text is supported as a content format
 	 */
 
@@ -4465,7 +5128,9 @@
 	 * send.
 	 */
 
-	Incremental TextDocumentSyncKind = 2
+	Incremental    TextDocumentSyncKind = 2
+	UINT_MIN_VALUE Uinteger             = 0
+	UINT_MAX_VALUE Uinteger             = 2147483647
 	/**
 	 * The moniker is only unique inside a document
 	 */
@@ -4526,7 +5191,7 @@
 	 * change notifications.
 	 *
 	 * If a strings is provided the string is treated as a ID
-	 * under which the notification is registed on the client
+	 * under which the notification is registered on the client
 	 * side. The ID can be used to unregister for these events
 	 * using the `client/unregisterCapability` request.
 	 */
diff --git a/internal/lsp/protocol/tsserver.go b/internal/lsp/protocol/tsserver.go
index c6db497..e021772 100644
--- a/internal/lsp/protocol/tsserver.go
+++ b/internal/lsp/protocol/tsserver.go
@@ -1,9 +1,13 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
 package protocol
 
 // Package protocol contains data types and code for LSP jsonrpcs
 // generated automatically from vscode-languageserver-node
-// commit: 901fd40345060d159f07d234bbc967966a929a34
-// last fetched Mon Oct 26 2020 09:10:42 GMT-0400 (Eastern Daylight Time)
+// commit: dae62de921d25964e8732411ca09e532dde992f5
+// last fetched Sat Jan 23 2021 16:14:55 GMT-0500 (Eastern Standard Time)
 
 // Code generated (see typescript/README.md) DO NOT EDIT.
 
@@ -18,6 +22,9 @@
 type Server interface {
 	DidChangeWorkspaceFolders(context.Context, *DidChangeWorkspaceFoldersParams) error
 	WorkDoneProgressCancel(context.Context, *WorkDoneProgressCancelParams) error
+	DidCreateFiles(context.Context, *CreateFilesParams) error
+	DidRenameFiles(context.Context, *RenameFilesParams) error
+	DidDeleteFiles(context.Context, *DeleteFilesParams) error
 	Initialized(context.Context, *InitializedParams) error
 	Exit(context.Context) error
 	DidChangeConfiguration(context.Context, *DidChangeConfigurationParams) error
@@ -43,6 +50,12 @@
 	SemanticTokensFullDelta(context.Context, *SemanticTokensDeltaParams) (interface{} /* SemanticTokens | SemanticTokensDelta | nil*/, error)
 	SemanticTokensRange(context.Context, *SemanticTokensRangeParams) (*SemanticTokens /*SemanticTokens | null*/, error)
 	SemanticTokensRefresh(context.Context) error
+	ShowDocument(context.Context, *ShowDocumentParams) (*ShowDocumentResult, error)
+	LinkedEditingRange(context.Context, *LinkedEditingRangeParams) (*LinkedEditingRanges /*LinkedEditingRanges | null*/, error)
+	WillCreateFiles(context.Context, *CreateFilesParams) (*WorkspaceEdit /*WorkspaceEdit | null*/, error)
+	WillRenameFiles(context.Context, *RenameFilesParams) (*WorkspaceEdit /*WorkspaceEdit | null*/, error)
+	WillDeleteFiles(context.Context, *DeleteFilesParams) (*WorkspaceEdit /*WorkspaceEdit | null*/, error)
+	Moniker(context.Context, *MonikerParams) ([]Moniker /*Moniker[] | null*/, error)
 	Initialize(context.Context, *ParamInitialize) (*InitializeResult, error)
 	Shutdown(context.Context) error
 	WillSaveWaitUntil(context.Context, *WillSaveTextDocumentParams) ([]TextEdit /*TextEdit[] | null*/, error)
@@ -59,6 +72,7 @@
 	Symbol(context.Context, *WorkspaceSymbolParams) ([]SymbolInformation /*SymbolInformation[] | null*/, error)
 	CodeLens(context.Context, *CodeLensParams) ([]CodeLens /*CodeLens[] | null*/, error)
 	ResolveCodeLens(context.Context, *CodeLens) (*CodeLens, error)
+	CodeLensRefresh(context.Context) error
 	DocumentLink(context.Context, *DocumentLinkParams) ([]DocumentLink /*DocumentLink[] | null*/, error)
 	ResolveDocumentLink(context.Context, *DocumentLink) (*DocumentLink, error)
 	Formatting(context.Context, *DocumentFormattingParams) ([]TextEdit /*TextEdit[] | null*/, error)
@@ -67,7 +81,6 @@
 	Rename(context.Context, *RenameParams) (*WorkspaceEdit /*WorkspaceEdit | null*/, error)
 	PrepareRename(context.Context, *PrepareRenameParams) (*Range /*Range | { range: Range, placeholder: string } | { defaultBehavior: boolean } | null*/, error)
 	ExecuteCommand(context.Context, *ExecuteCommandParams) (interface{} /*any | null*/, error)
-	Moniker(context.Context, *MonikerParams) ([]Moniker /*Moniker[] | null*/, error)
 	NonstandardRequest(ctx context.Context, method string, params interface{}) (interface{}, error)
 }
 
@@ -87,6 +100,27 @@
 		}
 		err := server.WorkDoneProgressCancel(ctx, &params)
 		return true, reply(ctx, nil, err)
+	case "workspace/didCreateFiles": // notif
+		var params CreateFilesParams
+		if err := json.Unmarshal(r.Params(), &params); err != nil {
+			return true, sendParseError(ctx, reply, err)
+		}
+		err := server.DidCreateFiles(ctx, &params)
+		return true, reply(ctx, nil, err)
+	case "workspace/didRenameFiles": // notif
+		var params RenameFilesParams
+		if err := json.Unmarshal(r.Params(), &params); err != nil {
+			return true, sendParseError(ctx, reply, err)
+		}
+		err := server.DidRenameFiles(ctx, &params)
+		return true, reply(ctx, nil, err)
+	case "workspace/didDeleteFiles": // notif
+		var params DeleteFilesParams
+		if err := json.Unmarshal(r.Params(), &params); err != nil {
+			return true, sendParseError(ctx, reply, err)
+		}
+		err := server.DidDeleteFiles(ctx, &params)
+		return true, reply(ctx, nil, err)
 	case "initialized": // notif
 		var params InitializedParams
 		if err := json.Unmarshal(r.Params(), &params); err != nil {
@@ -257,6 +291,48 @@
 		}
 		err := server.SemanticTokensRefresh(ctx)
 		return true, reply(ctx, nil, err)
+	case "window/showDocument": // req
+		var params ShowDocumentParams
+		if err := json.Unmarshal(r.Params(), &params); err != nil {
+			return true, sendParseError(ctx, reply, err)
+		}
+		resp, err := server.ShowDocument(ctx, &params)
+		return true, reply(ctx, resp, err)
+	case "textDocument/linkedEditingRange": // req
+		var params LinkedEditingRangeParams
+		if err := json.Unmarshal(r.Params(), &params); err != nil {
+			return true, sendParseError(ctx, reply, err)
+		}
+		resp, err := server.LinkedEditingRange(ctx, &params)
+		return true, reply(ctx, resp, err)
+	case "workspace/willCreateFiles": // req
+		var params CreateFilesParams
+		if err := json.Unmarshal(r.Params(), &params); err != nil {
+			return true, sendParseError(ctx, reply, err)
+		}
+		resp, err := server.WillCreateFiles(ctx, &params)
+		return true, reply(ctx, resp, err)
+	case "workspace/willRenameFiles": // req
+		var params RenameFilesParams
+		if err := json.Unmarshal(r.Params(), &params); err != nil {
+			return true, sendParseError(ctx, reply, err)
+		}
+		resp, err := server.WillRenameFiles(ctx, &params)
+		return true, reply(ctx, resp, err)
+	case "workspace/willDeleteFiles": // req
+		var params DeleteFilesParams
+		if err := json.Unmarshal(r.Params(), &params); err != nil {
+			return true, sendParseError(ctx, reply, err)
+		}
+		resp, err := server.WillDeleteFiles(ctx, &params)
+		return true, reply(ctx, resp, err)
+	case "textDocument/moniker": // req
+		var params MonikerParams
+		if err := json.Unmarshal(r.Params(), &params); err != nil {
+			return true, sendParseError(ctx, reply, err)
+		}
+		resp, err := server.Moniker(ctx, &params)
+		return true, reply(ctx, resp, err)
 	case "initialize": // req
 		var params ParamInitialize
 		if err := json.Unmarshal(r.Params(), &params); err != nil {
@@ -368,6 +444,12 @@
 		}
 		resp, err := server.ResolveCodeLens(ctx, &params)
 		return true, reply(ctx, resp, err)
+	case "workspace/codeLens/refresh": // req
+		if len(r.Params()) > 0 {
+			return true, reply(ctx, nil, errors.Errorf("%w: expected no params", jsonrpc2.ErrInvalidParams))
+		}
+		err := server.CodeLensRefresh(ctx)
+		return true, reply(ctx, nil, err)
 	case "textDocument/documentLink": // req
 		var params DocumentLinkParams
 		if err := json.Unmarshal(r.Params(), &params); err != nil {
@@ -424,13 +506,6 @@
 		}
 		resp, err := server.ExecuteCommand(ctx, &params)
 		return true, reply(ctx, resp, err)
-	case "textDocument/moniker": // req
-		var params MonikerParams
-		if err := json.Unmarshal(r.Params(), &params); err != nil {
-			return true, sendParseError(ctx, reply, err)
-		}
-		resp, err := server.Moniker(ctx, &params)
-		return true, reply(ctx, resp, err)
 
 	default:
 		return false, nil
@@ -445,6 +520,18 @@
 	return s.Conn.Notify(ctx, "window/workDoneProgress/cancel", params)
 }
 
+func (s *serverDispatcher) DidCreateFiles(ctx context.Context, params *CreateFilesParams) error {
+	return s.Conn.Notify(ctx, "workspace/didCreateFiles", params)
+}
+
+func (s *serverDispatcher) DidRenameFiles(ctx context.Context, params *RenameFilesParams) error {
+	return s.Conn.Notify(ctx, "workspace/didRenameFiles", params)
+}
+
+func (s *serverDispatcher) DidDeleteFiles(ctx context.Context, params *DeleteFilesParams) error {
+	return s.Conn.Notify(ctx, "workspace/didDeleteFiles", params)
+}
+
 func (s *serverDispatcher) Initialized(ctx context.Context, params *InitializedParams) error {
 	return s.Conn.Notify(ctx, "initialized", params)
 }
@@ -596,6 +683,54 @@
 	return Call(ctx, s.Conn, "workspace/semanticTokens/refresh", nil, nil)
 }
 
+func (s *serverDispatcher) ShowDocument(ctx context.Context, params *ShowDocumentParams) (*ShowDocumentResult, error) {
+	var result *ShowDocumentResult
+	if err := Call(ctx, s.Conn, "window/showDocument", params, &result); err != nil {
+		return nil, err
+	}
+	return result, nil
+}
+
+func (s *serverDispatcher) LinkedEditingRange(ctx context.Context, params *LinkedEditingRangeParams) (*LinkedEditingRanges /*LinkedEditingRanges | null*/, error) {
+	var result *LinkedEditingRanges /*LinkedEditingRanges | null*/
+	if err := Call(ctx, s.Conn, "textDocument/linkedEditingRange", params, &result); err != nil {
+		return nil, err
+	}
+	return result, nil
+}
+
+func (s *serverDispatcher) WillCreateFiles(ctx context.Context, params *CreateFilesParams) (*WorkspaceEdit /*WorkspaceEdit | null*/, error) {
+	var result *WorkspaceEdit /*WorkspaceEdit | null*/
+	if err := Call(ctx, s.Conn, "workspace/willCreateFiles", params, &result); err != nil {
+		return nil, err
+	}
+	return result, nil
+}
+
+func (s *serverDispatcher) WillRenameFiles(ctx context.Context, params *RenameFilesParams) (*WorkspaceEdit /*WorkspaceEdit | null*/, error) {
+	var result *WorkspaceEdit /*WorkspaceEdit | null*/
+	if err := Call(ctx, s.Conn, "workspace/willRenameFiles", params, &result); err != nil {
+		return nil, err
+	}
+	return result, nil
+}
+
+func (s *serverDispatcher) WillDeleteFiles(ctx context.Context, params *DeleteFilesParams) (*WorkspaceEdit /*WorkspaceEdit | null*/, error) {
+	var result *WorkspaceEdit /*WorkspaceEdit | null*/
+	if err := Call(ctx, s.Conn, "workspace/willDeleteFiles", params, &result); err != nil {
+		return nil, err
+	}
+	return result, nil
+}
+
+func (s *serverDispatcher) Moniker(ctx context.Context, params *MonikerParams) ([]Moniker /*Moniker[] | null*/, error) {
+	var result []Moniker /*Moniker[] | null*/
+	if err := Call(ctx, s.Conn, "textDocument/moniker", params, &result); err != nil {
+		return nil, err
+	}
+	return result, nil
+}
+
 func (s *serverDispatcher) Initialize(ctx context.Context, params *ParamInitialize) (*InitializeResult, error) {
 	var result *InitializeResult
 	if err := Call(ctx, s.Conn, "initialize", params, &result); err != nil {
@@ -720,6 +855,10 @@
 	return result, nil
 }
 
+func (s *serverDispatcher) CodeLensRefresh(ctx context.Context) error {
+	return Call(ctx, s.Conn, "workspace/codeLens/refresh", nil, nil)
+}
+
 func (s *serverDispatcher) DocumentLink(ctx context.Context, params *DocumentLinkParams) ([]DocumentLink /*DocumentLink[] | null*/, error) {
 	var result []DocumentLink /*DocumentLink[] | null*/
 	if err := Call(ctx, s.Conn, "textDocument/documentLink", params, &result); err != nil {
@@ -784,14 +923,6 @@
 	return result, nil
 }
 
-func (s *serverDispatcher) Moniker(ctx context.Context, params *MonikerParams) ([]Moniker /*Moniker[] | null*/, error) {
-	var result []Moniker /*Moniker[] | null*/
-	if err := Call(ctx, s.Conn, "textDocument/moniker", params, &result); err != nil {
-		return nil, err
-	}
-	return result, nil
-}
-
 func (s *serverDispatcher) NonstandardRequest(ctx context.Context, method string, params interface{}) (interface{}, error) {
 	var result interface{}
 	if err := Call(ctx, s.Conn, method, params, &result); err != nil {
diff --git a/internal/lsp/semantic.go b/internal/lsp/semantic.go
index 2123f2f..7f168bc 100644
--- a/internal/lsp/semantic.go
+++ b/internal/lsp/semantic.go
@@ -43,7 +43,7 @@
 
 func (s *Server) computeSemanticTokens(ctx context.Context, td protocol.TextDocumentIdentifier, rng *protocol.Range) (*protocol.SemanticTokens, error) {
 	ans := protocol.SemanticTokens{
-		Data: []float64{},
+		Data: []uint32{},
 	}
 	snapshot, _, ok, release, err := s.beginFileRequest(ctx, td.URI, source.Go)
 	defer release()
@@ -157,15 +157,15 @@
 	e.add(lspRange.Start.Line, lspRange.Start.Character, length, typ, mods)
 }
 
-func (e *encoded) add(line, start float64, len float64, tok tokenType, mod []string) {
+func (e *encoded) add(line, start uint32, len uint32, tok tokenType, mod []string) {
 	x := semItem{line, start, len, tok, mod}
 	e.items = append(e.items, x)
 }
 
 // semItem represents a token found walking the parse tree
 type semItem struct {
-	line, start float64
-	len         float64
+	line, start uint32
+	len         uint32
 	typeStr     tokenType
 	mods        []string
 }
@@ -485,7 +485,7 @@
 	return nil
 }
 
-func (e *encoded) Data() ([]float64, error) {
+func (e *encoded) Data() ([]uint32, error) {
 	// binary operators, at least, will be out of order
 	sort.Slice(e.items, func(i, j int) bool {
 		if e.items[i].line != e.items[j].line {
@@ -496,7 +496,7 @@
 	typeMap, modMap := e.maps()
 	// each semantic token needs five values
 	// (see Integer Encoding for Tokens in the LSP spec)
-	x := make([]float64, 5*len(e.items))
+	x := make([]uint32, 5*len(e.items))
 	for i := 0; i < len(e.items); i++ {
 		j := 5 * i
 		if i == 0 {
@@ -509,12 +509,12 @@
 			x[j+1] = e.items[i].start - e.items[i-1].start
 		}
 		x[j+2] = e.items[i].len
-		x[j+3] = float64(typeMap[e.items[i].typeStr])
+		x[j+3] = uint32(typeMap[e.items[i].typeStr])
 		mask := 0
 		for _, s := range e.items[i].mods {
 			mask |= modMap[s]
 		}
-		x[j+4] = float64(mask)
+		x[j+4] = uint32(mask)
 	}
 	return x, nil
 }
diff --git a/internal/lsp/server_gen.go b/internal/lsp/server_gen.go
index 275c7c8..59ba823 100644
--- a/internal/lsp/server_gen.go
+++ b/internal/lsp/server_gen.go
@@ -20,6 +20,10 @@
 	return s.codeLens(ctx, params)
 }
 
+func (s *Server) CodeLensRefresh(context.Context) error {
+	return notImplemented("CodeLensRefresh")
+}
+
 func (s *Server) ColorPresentation(context.Context, *protocol.ColorPresentationParams) ([]protocol.ColorPresentation, error) {
 	return nil, notImplemented("ColorPresentation")
 }
@@ -56,10 +60,22 @@
 	return s.didClose(ctx, params)
 }
 
+func (s *Server) DidCreateFiles(context.Context, *protocol.CreateFilesParams) error {
+	return notImplemented("DidCreateFiles")
+}
+
+func (s *Server) DidDeleteFiles(context.Context, *protocol.DeleteFilesParams) error {
+	return notImplemented("DidDeleteFiles")
+}
+
 func (s *Server) DidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams) error {
 	return s.didOpen(ctx, params)
 }
 
+func (s *Server) DidRenameFiles(context.Context, *protocol.RenameFilesParams) error {
+	return notImplemented("DidRenameFiles")
+}
+
 func (s *Server) DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) error {
 	return s.didSave(ctx, params)
 }
@@ -116,6 +132,10 @@
 	return s.initialized(ctx, params)
 }
 
+func (s *Server) LinkedEditingRange(context.Context, *protocol.LinkedEditingRangeParams) (*protocol.LinkedEditingRanges, error) {
+	return nil, notImplemented("LinkedEditingRange")
+}
+
 func (s *Server) LogTrace(context.Context, *protocol.LogTraceParams) error {
 	return notImplemented("LogTrace")
 }
@@ -196,6 +216,10 @@
 	return notImplemented("SetTrace")
 }
 
+func (s *Server) ShowDocument(context.Context, *protocol.ShowDocumentParams) (*protocol.ShowDocumentResult, error) {
+	return nil, notImplemented("ShowDocument")
+}
+
 func (s *Server) Shutdown(ctx context.Context) error {
 	return s.shutdown(ctx)
 }
@@ -212,6 +236,18 @@
 	return s.typeDefinition(ctx, params)
 }
 
+func (s *Server) WillCreateFiles(context.Context, *protocol.CreateFilesParams) (*protocol.WorkspaceEdit, error) {
+	return nil, notImplemented("WillCreateFiles")
+}
+
+func (s *Server) WillDeleteFiles(context.Context, *protocol.DeleteFilesParams) (*protocol.WorkspaceEdit, error) {
+	return nil, notImplemented("WillDeleteFiles")
+}
+
+func (s *Server) WillRenameFiles(context.Context, *protocol.RenameFilesParams) (*protocol.WorkspaceEdit, error) {
+	return nil, notImplemented("WillRenameFiles")
+}
+
 func (s *Server) WillSave(context.Context, *protocol.WillSaveTextDocumentParams) error {
 	return notImplemented("WillSave")
 }
diff --git a/internal/lsp/signature_help.go b/internal/lsp/signature_help.go
index 0e38b45..24dee1b 100644
--- a/internal/lsp/signature_help.go
+++ b/internal/lsp/signature_help.go
@@ -26,6 +26,6 @@
 	}
 	return &protocol.SignatureHelp{
 		Signatures:      []protocol.SignatureInformation{*info},
-		ActiveParameter: float64(activeParameter),
+		ActiveParameter: uint32(activeParameter),
 	}, nil
 }
diff --git a/internal/lsp/source/command.go b/internal/lsp/source/command.go
index f014e13..4a364b7 100644
--- a/internal/lsp/source/command.go
+++ b/internal/lsp/source/command.go
@@ -246,7 +246,7 @@
 			return nil, err
 		}
 		edits = append(edits, protocol.TextDocumentEdit{
-			TextDocument: protocol.VersionedTextDocumentIdentifier{
+			TextDocument: protocol.OptionalVersionedTextDocumentIdentifier{
 				Version: fh.Version(),
 				TextDocumentIdentifier: protocol.TextDocumentIdentifier{
 					URI: protocol.URIFromSpanURI(fh.URI()),
diff --git a/internal/lsp/source/source_test.go b/internal/lsp/source/source_test.go
index 5ad2ebc..deb6f6e 100644
--- a/internal/lsp/source/source_test.go
+++ b/internal/lsp/source/source_test.go
@@ -302,8 +302,8 @@
 	defer r.view.SetOptions(r.ctx, original)
 
 	list, surrounding, err := completion.Completion(r.ctx, r.snapshot, fh, protocol.Position{
-		Line:      float64(src.Start().Line() - 1),
-		Character: float64(src.Start().Column() - 1),
+		Line:      uint32(src.Start().Line() - 1),
+		Character: uint32(src.Start().Column() - 1),
 	}, protocol.CompletionContext{})
 	if err != nil && !errors.As(err, &completion.ErrIsDefinition{}) {
 		t.Fatalf("failed for %v: %v", src, err)
@@ -918,7 +918,7 @@
 	}
 	got := &protocol.SignatureHelp{
 		Signatures:      []protocol.SignatureInformation{*gotSignature},
-		ActiveParameter: float64(gotActiveParameter),
+		ActiveParameter: uint32(gotActiveParameter),
 	}
 	diff, err := tests.DiffSignatures(spn, want, got)
 	if err != nil {
diff --git a/internal/lsp/source/view.go b/internal/lsp/source/view.go
index 2e0b851..4eb3a59 100644
--- a/internal/lsp/source/view.go
+++ b/internal/lsp/source/view.go
@@ -344,7 +344,7 @@
 
 	// Version will be -1 and Text will be nil when they are not supplied,
 	// specifically on textDocument/didClose and for on-disk changes.
-	Version float64
+	Version int32
 	Text    []byte
 
 	// LanguageID is only sent from the language client on textDocument/didOpen.
@@ -431,7 +431,7 @@
 
 type VersionedFileHandle interface {
 	FileHandle
-	Version() float64
+	Version() int32
 	Session() string
 
 	// LSPIdentity returns the version identity of a file.
@@ -446,7 +446,7 @@
 
 	// Version is the version of the file, as specified by the client. It should
 	// only be set in combination with SessionID.
-	Version float64
+	Version int32
 }
 
 // FileHandle represents a handle to a specific version of a single file.
diff --git a/internal/lsp/tests/tests.go b/internal/lsp/tests/tests.go
index bc44f36..1680814 100644
--- a/internal/lsp/tests/tests.go
+++ b/internal/lsp/tests/tests.go
@@ -1258,7 +1258,7 @@
 				Label: signature,
 			},
 		},
-		ActiveParameter: float64(activeParam),
+		ActiveParameter: uint32(activeParam),
 	}
 	// Hardcode special case to test the lack of a signature.
 	if signature == "" && activeParam == 0 {
diff --git a/internal/lsp/text_synchronization.go b/internal/lsp/text_synchronization.go
index be77fec..27b53b8 100644
--- a/internal/lsp/text_synchronization.go
+++ b/internal/lsp/text_synchronization.go
@@ -178,9 +178,8 @@
 		return nil
 	}
 	c := source.FileModification{
-		URI:     uri,
-		Action:  source.Save,
-		Version: params.TextDocument.Version,
+		URI:    uri,
+		Action: source.Save,
 	}
 	if params.Text != nil {
 		c.Text = []byte(*params.Text)