patch

package
v1.10.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2026 License: MIT Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package patch provides compatibility shims for cases where the LSP metamodel does not accurately reflect real-world language server behavior.

These shims document known discrepancies and provide helper functions to work around them. The generated types in protocol/gen/ are produced directly from metaModel.json; this package layers behavioral fixes on top.

Package patch contains fixups for LSP metamodel quirks.

The metamodel marks RenameParams.newName as optional, but in practice it is always required by language servers. This patch documents the discrepancy; the generated types use the metamodel as-is, and callers should always provide newName when constructing RenameParams.

Index

Constants

View Source
const RenameParamsNote = "RenameParams.newName is effectively required despite metamodel marking it optional"

RenameParamsNote documents the metamodel quirk: The "newName" field in RenameParams is marked optional in the metamodel but is actually required for all known language server implementations.

Variables

View Source
var CompatibilityNotes = []string{
	"RenameParams.newName: optional in metamodel, required in practice",
	"ServerCapabilities: some fields differ between LS implementations",
}

CompatibilityNotes lists known metamodel-to-reality discrepancies.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL