protocol

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: BSD-3-Clause Imports: 22 Imported by: 165

README

protocol

test pkg.go.dev Go module codecov.io

A fast, spec-faithful implementation of the Language Server Protocol 3.18 for Go — types generated from the official LSP meta-model, a union-aware JSON codec that skips reflection on the hot path, and a ready-to-wire client/server RPC layer.

import "go.lsp.dev/protocol"

Highlights

  • Generated from metaModel.json. Every request, notification, and structure is generated from the official LSP meta-model, so the type surface tracks the specification rather than a hand-maintained subset. The generator lives in internal/genlsp.
  • Sealed-interface unions. Protocol "or" types are modeled as sealed Go interfaces — each arm is a distinct concrete type implementing a private marker method. Callers discriminate arms with an ordinary type switch, and the compiler keeps the arm set closed.
  • Reflection-free codec. Marshal and Unmarshal dispatch through generated byte-level encoders and decoders; struct values, named slice wrappers, and union values all (de)serialize without entering reflect. AppendMarshal lets callers amortize the output allocation across messages.
  • Batteries-included RPC. NewServer and NewClient wire the union-aware codec onto a go.lsp.dev/jsonrpc2 connection and return typed Server / Client dispatchers.

Install

go get go.lsp.dev/protocol@latest

Requires Go 1.26+.

Quick start

Implement the methods you care about by embedding UnimplementedServer, then let NewServer serve it over any jsonrpc2.Stream (here, an in-memory pipe):

package main

import (
	"context"

	"go.lsp.dev/jsonrpc2"
	"go.lsp.dev/protocol"
)

// langServer overrides only the methods it implements; UnimplementedServer
// supplies a "method not found" default for the rest of the LSP surface.
type langServer struct {
	protocol.UnimplementedServer
}

func (langServer) Hover(ctx context.Context, params *protocol.HoverParams) (*protocol.Hover, error) {
	return &protocol.Hover{
		Contents: protocol.String("hello from the server"),
	}, nil
}

func serve(ctx context.Context, stream jsonrpc2.Stream) (jsonrpc2.Conn, protocol.Client) {
	// NewServer serves langServer and returns the connection plus a typed
	// Client dispatcher for server -> client requests.
	ctx, conn, client := protocol.NewServer(ctx, langServer{}, stream)
	_ = ctx
	return conn, client
}

The mirror-image helper NewClient serves a Client and hands back a typed Server dispatcher, so the same model drives both ends of the connection.

Working with union types

Where the LSP says a value is A | B, this package exposes a sealed interface. Construct a value with the concrete arm and read it back with a type switch:

// Hover.Contents (HoverContents) is one of:
//   String | *MarkupContent | *MarkedStringWithLanguage | MarkedStringSlice
hover := &protocol.Hover{Contents: protocol.String("plain text")}

switch c := hover.Contents.(type) {
case protocol.String:
	// a bare string arm
case *protocol.MarkupContent:
	// structured markup
default:
	_ = c
}

Because the arm set is closed by an unexported marker method, no value outside the package can satisfy the interface — the type switch is exhaustive by construction.

Decode ownership and zero-copy strings

Generated byte-walkers make one GC-managed copy of the input before decoding it. To avoid per-field allocations on hot paths, unescaped decoded strings and raw JSON value fields may alias that single owned copy. Two consequences:

  • After Unmarshal (or the LSP codec) returns, you may freely reuse or mutate the original []byte — the decoded value no longer references it.
  • Retaining a small decoded string or raw value can keep the entire owned message copy alive. When a decoded value must outlive a much larger input message, detach it first with Clone.

URI types

Generated URI fields use go.lsp.dev/uri.URI directly. Construct new values with uri.Parse, uri.File, or uri.From.

protocol.URI remains as a package-local named type for compatibility and for the sealed union arms (such as RelativePatternBaseURI) that require a local marker-method receiver. Prefer go.lsp.dev/uri.URI in ordinary code; convert explicitly with protocol.URI(u) only when assigning a URI string to such an arm.

Performance

The codec is the project's hot path, and it is benchmarked and gated in CI. A relative-regression gate (.github/workflows/bench.yaml) benchmarks the base ref and the PR head on the same runner and fails on a >5% sec/op geomean regression. The figures below are from the Phase-3 authoritative re-baseline (Intel Xeon 8481C, linux/amd64), comparing the optimized codec against the reflection-based baseline:

Benchmark sec/op change
Encode/initialize_request −77.93%
Encode/publish_diagnostics −15.98%
Decode/semantic_tokens −27.92%
Decode/completion_array −23.80%
Decode/completion_list −13.24%

Run them yourself:

go test -run='^$' -bench='^(BenchmarkDecode|BenchmarkEncode)$' -benchmem -count=6 .

Development

make test       # run the test suite with race detection
make coverage   # run tests and emit coverage
make lint       # goimports-rereviser + gofumpt + golangci-lint
make generate   # regenerate the package from metaModel.json, then format
make help       # list all targets

Generated files carry a .gen.go suffix; edit the generator under internal/genlsp and run make generate rather than hand-editing them.

Dependencies

Module Role
go.lsp.dev/jsonrpc2 JSON-RPC 2.0 transport for the RPC layer
go.lsp.dev/uri RFC 3986 / file:// URI handling
go-json-experiment/json JSON engine (the github.com/go-json-experiment/json prototype)

License

BSD 3-Clause. See LICENSE.

Documentation

Overview

Package protocol contains Go types and the client/server RPC layer for the Language Server Protocol (LSP) version 3.18, with the types generated from the official LSP meta-model (metaModel.json).

Union ("or") types in the protocol are represented as sealed Go interfaces: each arm is a distinct concrete type implementing a private marker method, so callers discriminate arms with a type switch. Decoding is performed by Unmarshal, which dispatches each union to a discriminating decoder; encode with Marshal. The LSPAny type is a raw JSON value (jsontext.Value).

The RPC layer (NewServer, NewClient, the Server and Client interfaces, and their dispatchers) runs over go.lsp.dev/jsonrpc2, with union-aware payload marshaling supplied through a jsonrpc2.Codec.

Generated URI and URI fields use go.lsp.dev/uri.URI directly. The local URI type remains as a package-local compatibility and sealed-union bridge for arms such as RelativePatternBaseURI, where Go requires a local receiver type for the generated marker method. Prefer go.lsp.dev/uri.URI for ordinary fields; convert explicitly to protocol.URI only at those union boundaries.

The generator lives in go.lsp.dev/protocol/internal/genlsp.

Index

Constants

View Source
const (
	// LSPReservedErrorRangeStart is the start range of LSP reserved error codes.
	//
	// It doesn't denote a real error code.
	LSPReservedErrorRangeStart jsonrpc2.Code = -32899

	// CodeContentModified is the state change that invalidates the result of a request in execution.
	//
	// Defined by the protocol.
	CodeContentModified jsonrpc2.Code = -32801

	// CodeRequestCancelled is the cancellation error.
	//
	// Defined by the protocol.
	CodeRequestCancelled jsonrpc2.Code = -32800

	// LSPReservedErrorRangeEnd is the end range of LSP reserved error codes.
	//
	// It doesn't denote a real error code.
	LSPReservedErrorRangeEnd jsonrpc2.Code = -32800
)
View Source
const (
	// MethodInitialize is the "initialize" request method.
	MethodInitialize = "initialize"
	// MethodInitialized is the "initialized" notification method.
	MethodInitialized = "initialized"
	// MethodClientRegisterCapability is the "client/registerCapability" request method.
	MethodClientRegisterCapability = "client/registerCapability"
	// MethodClientUnregisterCapability is the "client/unregisterCapability" request method.
	MethodClientUnregisterCapability = "client/unregisterCapability"
	MethodSetTrace                   = "$/setTrace"
	MethodLogTrace                   = "$/logTrace"
	// MethodShutdown is the "shutdown" request method.
	MethodShutdown = "shutdown"
	// MethodExit is the "exit" notification method.
	MethodExit = "exit"
	// MethodTextDocumentDidOpen is the "textDocument/didOpen" notification method.
	MethodTextDocumentDidOpen = "textDocument/didOpen"
	// MethodTextDocumentDidChange is the "textDocument/didChange" notification method.
	MethodTextDocumentDidChange = "textDocument/didChange"
	// MethodTextDocumentWillSave is the "textDocument/willSave" notification method.
	MethodTextDocumentWillSave = "textDocument/willSave"
	// MethodTextDocumentWillSaveWaitUntil is the "textDocument/willSaveWaitUntil" request method.
	MethodTextDocumentWillSaveWaitUntil = "textDocument/willSaveWaitUntil"
	// MethodTextDocumentDidSave is the "textDocument/didSave" notification method.
	MethodTextDocumentDidSave = "textDocument/didSave"
	// MethodTextDocumentDidClose is the "textDocument/didClose" notification method.
	MethodTextDocumentDidClose = "textDocument/didClose"
	// MethodNotebookDocumentDidOpen is the "notebookDocument/didOpen" notification method.
	MethodNotebookDocumentDidOpen   = "notebookDocument/didOpen"
	MethodNotebookDocumentDidChange = "notebookDocument/didChange"
	// MethodNotebookDocumentDidSave is the "notebookDocument/didSave" notification method.
	MethodNotebookDocumentDidSave = "notebookDocument/didSave"
	// MethodNotebookDocumentDidClose is the "notebookDocument/didClose" notification method.
	MethodNotebookDocumentDidClose = "notebookDocument/didClose"
	// MethodTextDocumentDeclaration is the "textDocument/declaration" request method.
	MethodTextDocumentDeclaration = "textDocument/declaration"
	// MethodTextDocumentDefinition is the "textDocument/definition" request method.
	MethodTextDocumentDefinition = "textDocument/definition"
	// MethodTextDocumentTypeDefinition is the "textDocument/typeDefinition" request method.
	MethodTextDocumentTypeDefinition = "textDocument/typeDefinition"
	// MethodTextDocumentImplementation is the "textDocument/implementation" request method.
	MethodTextDocumentImplementation = "textDocument/implementation"
	// MethodTextDocumentReferences is the "textDocument/references" request method.
	MethodTextDocumentReferences = "textDocument/references"
	// MethodTextDocumentPrepareCallHierarchy is the "textDocument/prepareCallHierarchy" request method.
	MethodTextDocumentPrepareCallHierarchy = "textDocument/prepareCallHierarchy"
	// MethodCallHierarchyIncomingCalls is the "callHierarchy/incomingCalls" request method.
	MethodCallHierarchyIncomingCalls = "callHierarchy/incomingCalls"
	// MethodCallHierarchyOutgoingCalls is the "callHierarchy/outgoingCalls" request method.
	MethodCallHierarchyOutgoingCalls = "callHierarchy/outgoingCalls"
	// MethodTextDocumentPrepareTypeHierarchy is the "textDocument/prepareTypeHierarchy" request method.
	MethodTextDocumentPrepareTypeHierarchy = "textDocument/prepareTypeHierarchy"
	// MethodTypeHierarchySupertypes is the "typeHierarchy/supertypes" request method.
	MethodTypeHierarchySupertypes = "typeHierarchy/supertypes"
	// MethodTypeHierarchySubtypes is the "typeHierarchy/subtypes" request method.
	MethodTypeHierarchySubtypes = "typeHierarchy/subtypes"
	// MethodTextDocumentDocumentHighlight is the "textDocument/documentHighlight" request method.
	MethodTextDocumentDocumentHighlight = "textDocument/documentHighlight"
	// MethodTextDocumentDocumentLink is the "textDocument/documentLink" request method.
	MethodTextDocumentDocumentLink = "textDocument/documentLink"
	// MethodDocumentLinkResolve is the "documentLink/resolve" request method.
	MethodDocumentLinkResolve = "documentLink/resolve"
	// MethodTextDocumentHover is the "textDocument/hover" request method.
	MethodTextDocumentHover = "textDocument/hover"
	// MethodTextDocumentCodeLens is the "textDocument/codeLens" request method.
	MethodTextDocumentCodeLens = "textDocument/codeLens"
	// MethodCodeLensResolve is the "codeLens/resolve" request method.
	MethodCodeLensResolve = "codeLens/resolve"
	// MethodWorkspaceCodeLensRefresh is the "workspace/codeLens/refresh" request method.
	MethodWorkspaceCodeLensRefresh = "workspace/codeLens/refresh"
	// MethodTextDocumentFoldingRange is the "textDocument/foldingRange" request method.
	MethodTextDocumentFoldingRange = "textDocument/foldingRange"
	// MethodWorkspaceFoldingRangeRefresh is the "workspace/foldingRange/refresh" request method.
	MethodWorkspaceFoldingRangeRefresh = "workspace/foldingRange/refresh"
	// MethodTextDocumentSelectionRange is the "textDocument/selectionRange" request method.
	MethodTextDocumentSelectionRange = "textDocument/selectionRange"
	// MethodTextDocumentDocumentSymbol is the "textDocument/documentSymbol" request method.
	MethodTextDocumentDocumentSymbol = "textDocument/documentSymbol"
	// MethodTextDocumentSemanticTokensFull is the "textDocument/semanticTokens/full" request method.
	MethodTextDocumentSemanticTokensFull = "textDocument/semanticTokens/full"
	// MethodTextDocumentSemanticTokensFullDelta is the "textDocument/semanticTokens/full/delta" request method.
	MethodTextDocumentSemanticTokensFullDelta = "textDocument/semanticTokens/full/delta"
	// MethodTextDocumentSemanticTokensRange is the "textDocument/semanticTokens/range" request method.
	MethodTextDocumentSemanticTokensRange = "textDocument/semanticTokens/range"
	// MethodWorkspaceSemanticTokensRefresh is the "workspace/semanticTokens/refresh" request method.
	MethodWorkspaceSemanticTokensRefresh = "workspace/semanticTokens/refresh"
	// MethodTextDocumentInlineValue is the "textDocument/inlineValue" request method.
	MethodTextDocumentInlineValue = "textDocument/inlineValue"
	// MethodWorkspaceInlineValueRefresh is the "workspace/inlineValue/refresh" request method.
	MethodWorkspaceInlineValueRefresh = "workspace/inlineValue/refresh"
	// MethodTextDocumentInlayHint is the "textDocument/inlayHint" request method.
	MethodTextDocumentInlayHint = "textDocument/inlayHint"
	// MethodInlayHintResolve is the "inlayHint/resolve" request method.
	MethodInlayHintResolve = "inlayHint/resolve"
	// MethodWorkspaceInlayHintRefresh is the "workspace/inlayHint/refresh" request method.
	MethodWorkspaceInlayHintRefresh = "workspace/inlayHint/refresh"
	// MethodTextDocumentMoniker is the "textDocument/moniker" request method.
	MethodTextDocumentMoniker = "textDocument/moniker"
	// MethodTextDocumentCompletion is the "textDocument/completion" request method.
	MethodTextDocumentCompletion = "textDocument/completion"
	// MethodCompletionItemResolve is the "completionItem/resolve" request method.
	MethodCompletionItemResolve = "completionItem/resolve"
	// MethodTextDocumentDiagnostic is the "textDocument/diagnostic" request method.
	MethodTextDocumentDiagnostic = "textDocument/diagnostic"
	// MethodWorkspaceDiagnostic is the "workspace/diagnostic" request method.
	MethodWorkspaceDiagnostic = "workspace/diagnostic"
	// MethodWorkspaceDiagnosticRefresh is the "workspace/diagnostic/refresh" request method.
	MethodWorkspaceDiagnosticRefresh = "workspace/diagnostic/refresh"
	// MethodTextDocumentPublishDiagnostics is the "textDocument/publishDiagnostics" notification method.
	MethodTextDocumentPublishDiagnostics = "textDocument/publishDiagnostics"
	MethodTextDocumentSignatureHelp      = "textDocument/signatureHelp"
	// MethodTextDocumentCodeAction is the "textDocument/codeAction" request method.
	MethodTextDocumentCodeAction = "textDocument/codeAction"
	// MethodCodeActionResolve is the "codeAction/resolve" request method.
	MethodCodeActionResolve = "codeAction/resolve"
	// MethodTextDocumentDocumentColor is the "textDocument/documentColor" request method.
	MethodTextDocumentDocumentColor = "textDocument/documentColor"
	// MethodTextDocumentColorPresentation is the "textDocument/colorPresentation" request method.
	MethodTextDocumentColorPresentation = "textDocument/colorPresentation"
	// MethodTextDocumentFormatting is the "textDocument/formatting" request method.
	MethodTextDocumentFormatting = "textDocument/formatting"
	// MethodTextDocumentRangeFormatting is the "textDocument/rangeFormatting" request method.
	MethodTextDocumentRangeFormatting = "textDocument/rangeFormatting"
	// MethodTextDocumentRangesFormatting is the "textDocument/rangesFormatting" request method.
	MethodTextDocumentRangesFormatting = "textDocument/rangesFormatting"
	// MethodTextDocumentOnTypeFormatting is the "textDocument/onTypeFormatting" request method.
	MethodTextDocumentOnTypeFormatting = "textDocument/onTypeFormatting"
	// MethodTextDocumentRename is the "textDocument/rename" request method.
	MethodTextDocumentRename = "textDocument/rename"
	// MethodTextDocumentPrepareRename is the "textDocument/prepareRename" request method.
	MethodTextDocumentPrepareRename = "textDocument/prepareRename"
	// MethodTextDocumentLinkedEditingRange is the "textDocument/linkedEditingRange" request method.
	MethodTextDocumentLinkedEditingRange = "textDocument/linkedEditingRange"
	// MethodTextDocumentInlineCompletion is the "textDocument/inlineCompletion" request method.
	MethodTextDocumentInlineCompletion = "textDocument/inlineCompletion"
	// MethodWorkspaceSymbol is the "workspace/symbol" request method.
	MethodWorkspaceSymbol = "workspace/symbol"
	// MethodWorkspaceSymbolResolve is the "workspaceSymbol/resolve" request method.
	MethodWorkspaceSymbolResolve = "workspaceSymbol/resolve"
	// MethodWorkspaceConfiguration is the "workspace/configuration" request method.
	MethodWorkspaceConfiguration = "workspace/configuration"
	// MethodWorkspaceDidChangeConfiguration is the "workspace/didChangeConfiguration" notification method.
	MethodWorkspaceDidChangeConfiguration = "workspace/didChangeConfiguration"
	// MethodWorkspaceWorkspaceFolders is the "workspace/workspaceFolders" request method.
	MethodWorkspaceWorkspaceFolders = "workspace/workspaceFolders"
	// MethodWorkspaceDidChangeWorkspaceFolders is the "workspace/didChangeWorkspaceFolders" notification method.
	MethodWorkspaceDidChangeWorkspaceFolders = "workspace/didChangeWorkspaceFolders"
	// MethodWorkspaceWillCreateFiles is the "workspace/willCreateFiles" request method.
	MethodWorkspaceWillCreateFiles = "workspace/willCreateFiles"
	// MethodWorkspaceWillRenameFiles is the "workspace/willRenameFiles" request method.
	MethodWorkspaceWillRenameFiles = "workspace/willRenameFiles"
	// MethodWorkspaceWillDeleteFiles is the "workspace/willDeleteFiles" request method.
	MethodWorkspaceWillDeleteFiles = "workspace/willDeleteFiles"
	// MethodWorkspaceDidCreateFiles is the "workspace/didCreateFiles" notification method.
	MethodWorkspaceDidCreateFiles = "workspace/didCreateFiles"
	// MethodWorkspaceDidRenameFiles is the "workspace/didRenameFiles" notification method.
	MethodWorkspaceDidRenameFiles = "workspace/didRenameFiles"
	// MethodWorkspaceDidDeleteFiles is the "workspace/didDeleteFiles" notification method.
	MethodWorkspaceDidDeleteFiles = "workspace/didDeleteFiles"
	// MethodWorkspaceDidChangeWatchedFiles is the "workspace/didChangeWatchedFiles" notification method.
	MethodWorkspaceDidChangeWatchedFiles = "workspace/didChangeWatchedFiles"
	// MethodWorkspaceExecuteCommand is the "workspace/executeCommand" request method.
	MethodWorkspaceExecuteCommand = "workspace/executeCommand"
	// MethodWorkspaceApplyEdit is the "workspace/applyEdit" request method.
	MethodWorkspaceApplyEdit = "workspace/applyEdit"
	// MethodWorkspaceTextDocumentContent is the "workspace/textDocumentContent" request method.
	MethodWorkspaceTextDocumentContent = "workspace/textDocumentContent"
	// MethodWorkspaceTextDocumentContentRefresh is the "workspace/textDocumentContent/refresh" request method.
	MethodWorkspaceTextDocumentContentRefresh = "workspace/textDocumentContent/refresh"
	// MethodWindowShowMessage is the "window/showMessage" notification method.
	MethodWindowShowMessage = "window/showMessage"
	// MethodWindowShowMessageRequest is the "window/showMessageRequest" request method.
	MethodWindowShowMessageRequest = "window/showMessageRequest"
	// MethodWindowLogMessage is the "window/logMessage" notification method.
	MethodWindowLogMessage = "window/logMessage"
	// MethodWindowShowDocument is the "window/showDocument" request method.
	MethodWindowShowDocument = "window/showDocument"
	// MethodWindowWorkDoneProgressCreate is the "window/workDoneProgress/create" request method.
	MethodWindowWorkDoneProgressCreate = "window/workDoneProgress/create"
	// MethodWindowWorkDoneProgressCancel is the "window/workDoneProgress/cancel" notification method.
	MethodWindowWorkDoneProgressCancel = "window/workDoneProgress/cancel"
	// MethodTelemetryEvent is the "telemetry/event" notification method.
	MethodTelemetryEvent = "telemetry/event"
	MethodProgress       = "$/progress"
	MethodCancelRequest  = "$/cancelRequest"
)

LSP method names.

View Source
const Version = "3.18.0"

Version is the version of the language-server-protocol specification being implemented.

Variables

View Source
var (
	// ErrContentModified should be used when a request's result is invalidated by
	// a change to the document or workspace before the request completes.
	ErrContentModified = jsonrpc2.NewError(CodeContentModified, "content modified")

	// ErrRequestCancelled should be used when a request is canceled early.
	ErrRequestCancelled = jsonrpc2.NewError(CodeRequestCancelled, "cancelled JSON-RPC")
)
View Source
var Methods = []MethodInfo{
	{Method: MethodInitialize, Direction: "clientToServer", Kind: "request", ParamsType: "InitializeParams", ResultType: "InitializeResult"},
	{Method: MethodInitialized, Direction: "clientToServer", Kind: "notification", ParamsType: "InitializedParams", ResultType: ""},
	{Method: MethodClientRegisterCapability, Direction: "serverToClient", Kind: "request", ParamsType: "RegistrationParams", ResultType: "LSPAny"},
	{Method: MethodClientUnregisterCapability, Direction: "serverToClient", Kind: "request", ParamsType: "UnregistrationParams", ResultType: "LSPAny"},
	{Method: MethodSetTrace, Direction: "clientToServer", Kind: "notification", ParamsType: "SetTraceParams", ResultType: ""},
	{Method: MethodLogTrace, Direction: "serverToClient", Kind: "notification", ParamsType: "LogTraceParams", ResultType: ""},
	{Method: MethodShutdown, Direction: "clientToServer", Kind: "request", ParamsType: "", ResultType: "LSPAny"},
	{Method: MethodExit, Direction: "clientToServer", Kind: "notification", ParamsType: "", ResultType: ""},
	{Method: MethodTextDocumentDidOpen, Direction: "clientToServer", Kind: "notification", ParamsType: "DidOpenTextDocumentParams", ResultType: ""},
	{Method: MethodTextDocumentDidChange, Direction: "clientToServer", Kind: "notification", ParamsType: "DidChangeTextDocumentParams", ResultType: ""},
	{Method: MethodTextDocumentWillSave, Direction: "clientToServer", Kind: "notification", ParamsType: "WillSaveTextDocumentParams", ResultType: ""},
	{Method: MethodTextDocumentWillSaveWaitUntil, Direction: "clientToServer", Kind: "request", ParamsType: "WillSaveTextDocumentParams", ResultType: "[]TextEdit"},
	{Method: MethodTextDocumentDidSave, Direction: "clientToServer", Kind: "notification", ParamsType: "DidSaveTextDocumentParams", ResultType: ""},
	{Method: MethodTextDocumentDidClose, Direction: "clientToServer", Kind: "notification", ParamsType: "DidCloseTextDocumentParams", ResultType: ""},
	{Method: MethodNotebookDocumentDidOpen, Direction: "clientToServer", Kind: "notification", ParamsType: "DidOpenNotebookDocumentParams", ResultType: ""},
	{Method: MethodNotebookDocumentDidChange, Direction: "clientToServer", Kind: "notification", ParamsType: "DidChangeNotebookDocumentParams", ResultType: ""},
	{Method: MethodNotebookDocumentDidSave, Direction: "clientToServer", Kind: "notification", ParamsType: "DidSaveNotebookDocumentParams", ResultType: ""},
	{Method: MethodNotebookDocumentDidClose, Direction: "clientToServer", Kind: "notification", ParamsType: "DidCloseNotebookDocumentParams", ResultType: ""},
	{Method: MethodTextDocumentDeclaration, Direction: "clientToServer", Kind: "request", ParamsType: "DeclarationParams", ResultType: "DeclarationResult"},
	{Method: MethodTextDocumentDefinition, Direction: "clientToServer", Kind: "request", ParamsType: "DefinitionParams", ResultType: "DefinitionResult"},
	{Method: MethodTextDocumentTypeDefinition, Direction: "clientToServer", Kind: "request", ParamsType: "TypeDefinitionParams", ResultType: "DefinitionResult"},
	{Method: MethodTextDocumentImplementation, Direction: "clientToServer", Kind: "request", ParamsType: "ImplementationParams", ResultType: "DefinitionResult"},
	{Method: MethodTextDocumentReferences, Direction: "clientToServer", Kind: "request", ParamsType: "ReferenceParams", ResultType: "[]Location"},
	{Method: MethodTextDocumentPrepareCallHierarchy, Direction: "clientToServer", Kind: "request", ParamsType: "CallHierarchyPrepareParams", ResultType: "[]CallHierarchyItem"},
	{Method: MethodCallHierarchyIncomingCalls, Direction: "clientToServer", Kind: "request", ParamsType: "CallHierarchyIncomingCallsParams", ResultType: "[]CallHierarchyIncomingCall"},
	{Method: MethodCallHierarchyOutgoingCalls, Direction: "clientToServer", Kind: "request", ParamsType: "CallHierarchyOutgoingCallsParams", ResultType: "[]CallHierarchyOutgoingCall"},
	{Method: MethodTextDocumentPrepareTypeHierarchy, Direction: "clientToServer", Kind: "request", ParamsType: "TypeHierarchyPrepareParams", ResultType: "[]TypeHierarchyItem"},
	{Method: MethodTypeHierarchySupertypes, Direction: "clientToServer", Kind: "request", ParamsType: "TypeHierarchySupertypesParams", ResultType: "[]TypeHierarchyItem"},
	{Method: MethodTypeHierarchySubtypes, Direction: "clientToServer", Kind: "request", ParamsType: "TypeHierarchySubtypesParams", ResultType: "[]TypeHierarchyItem"},
	{Method: MethodTextDocumentDocumentHighlight, Direction: "clientToServer", Kind: "request", ParamsType: "DocumentHighlightParams", ResultType: "[]DocumentHighlight"},
	{Method: MethodTextDocumentDocumentLink, Direction: "clientToServer", Kind: "request", ParamsType: "DocumentLinkParams", ResultType: "[]DocumentLink"},
	{Method: MethodDocumentLinkResolve, Direction: "clientToServer", Kind: "request", ParamsType: "DocumentLink", ResultType: "DocumentLink"},
	{Method: MethodTextDocumentHover, Direction: "clientToServer", Kind: "request", ParamsType: "HoverParams", ResultType: "Hover"},
	{Method: MethodTextDocumentCodeLens, Direction: "clientToServer", Kind: "request", ParamsType: "CodeLensParams", ResultType: "[]CodeLens"},
	{Method: MethodCodeLensResolve, Direction: "clientToServer", Kind: "request", ParamsType: "CodeLens", ResultType: "CodeLens"},
	{Method: MethodWorkspaceCodeLensRefresh, Direction: "serverToClient", Kind: "request", ParamsType: "", ResultType: "LSPAny"},
	{Method: MethodTextDocumentFoldingRange, Direction: "clientToServer", Kind: "request", ParamsType: "FoldingRangeParams", ResultType: "[]FoldingRange"},
	{Method: MethodWorkspaceFoldingRangeRefresh, Direction: "serverToClient", Kind: "request", ParamsType: "", ResultType: "LSPAny"},
	{Method: MethodTextDocumentSelectionRange, Direction: "clientToServer", Kind: "request", ParamsType: "SelectionRangeParams", ResultType: "[]SelectionRange"},
	{Method: MethodTextDocumentDocumentSymbol, Direction: "clientToServer", Kind: "request", ParamsType: "DocumentSymbolParams", ResultType: "DocumentSymbolResult"},
	{Method: MethodTextDocumentSemanticTokensFull, Direction: "clientToServer", Kind: "request", ParamsType: "SemanticTokensParams", ResultType: "SemanticTokens"},
	{Method: MethodTextDocumentSemanticTokensFullDelta, Direction: "clientToServer", Kind: "request", ParamsType: "SemanticTokensDeltaParams", ResultType: "SemanticTokensDeltaResult"},
	{Method: MethodTextDocumentSemanticTokensRange, Direction: "clientToServer", Kind: "request", ParamsType: "SemanticTokensRangeParams", ResultType: "SemanticTokens"},
	{Method: MethodWorkspaceSemanticTokensRefresh, Direction: "serverToClient", Kind: "request", ParamsType: "", ResultType: "LSPAny"},
	{Method: MethodTextDocumentInlineValue, Direction: "clientToServer", Kind: "request", ParamsType: "InlineValueParams", ResultType: "[]InlineValue"},
	{Method: MethodWorkspaceInlineValueRefresh, Direction: "serverToClient", Kind: "request", ParamsType: "", ResultType: "LSPAny"},
	{Method: MethodTextDocumentInlayHint, Direction: "clientToServer", Kind: "request", ParamsType: "InlayHintParams", ResultType: "[]InlayHint"},
	{Method: MethodInlayHintResolve, Direction: "clientToServer", Kind: "request", ParamsType: "InlayHint", ResultType: "InlayHint"},
	{Method: MethodWorkspaceInlayHintRefresh, Direction: "serverToClient", Kind: "request", ParamsType: "", ResultType: "LSPAny"},
	{Method: MethodTextDocumentMoniker, Direction: "clientToServer", Kind: "request", ParamsType: "MonikerParams", ResultType: "[]Moniker"},
	{Method: MethodTextDocumentCompletion, Direction: "clientToServer", Kind: "request", ParamsType: "CompletionParams", ResultType: "CompletionResult"},
	{Method: MethodCompletionItemResolve, Direction: "clientToServer", Kind: "request", ParamsType: "CompletionItem", ResultType: "CompletionItem"},
	{Method: MethodTextDocumentDiagnostic, Direction: "clientToServer", Kind: "request", ParamsType: "DocumentDiagnosticParams", ResultType: "DocumentDiagnosticReport"},
	{Method: MethodWorkspaceDiagnostic, Direction: "clientToServer", Kind: "request", ParamsType: "WorkspaceDiagnosticParams", ResultType: "WorkspaceDiagnosticReport"},
	{Method: MethodWorkspaceDiagnosticRefresh, Direction: "serverToClient", Kind: "request", ParamsType: "", ResultType: "LSPAny"},
	{Method: MethodTextDocumentPublishDiagnostics, Direction: "serverToClient", Kind: "notification", ParamsType: "PublishDiagnosticsParams", ResultType: ""},
	{Method: MethodTextDocumentSignatureHelp, Direction: "clientToServer", Kind: "request", ParamsType: "SignatureHelpParams", ResultType: "SignatureHelp"},
	{Method: MethodTextDocumentCodeAction, Direction: "clientToServer", Kind: "request", ParamsType: "CodeActionParams", ResultType: "[]CommandOrCodeAction"},
	{Method: MethodCodeActionResolve, Direction: "clientToServer", Kind: "request", ParamsType: "CodeAction", ResultType: "CodeAction"},
	{Method: MethodTextDocumentDocumentColor, Direction: "clientToServer", Kind: "request", ParamsType: "DocumentColorParams", ResultType: "[]ColorInformation"},
	{Method: MethodTextDocumentColorPresentation, Direction: "clientToServer", Kind: "request", ParamsType: "ColorPresentationParams", ResultType: "[]ColorPresentation"},
	{Method: MethodTextDocumentFormatting, Direction: "clientToServer", Kind: "request", ParamsType: "DocumentFormattingParams", ResultType: "[]TextEdit"},
	{Method: MethodTextDocumentRangeFormatting, Direction: "clientToServer", Kind: "request", ParamsType: "DocumentRangeFormattingParams", ResultType: "[]TextEdit"},
	{Method: MethodTextDocumentRangesFormatting, Direction: "clientToServer", Kind: "request", ParamsType: "DocumentRangesFormattingParams", ResultType: "[]TextEdit"},
	{Method: MethodTextDocumentOnTypeFormatting, Direction: "clientToServer", Kind: "request", ParamsType: "DocumentOnTypeFormattingParams", ResultType: "[]TextEdit"},
	{Method: MethodTextDocumentRename, Direction: "clientToServer", Kind: "request", ParamsType: "RenameParams", ResultType: "WorkspaceEdit"},
	{Method: MethodTextDocumentPrepareRename, Direction: "clientToServer", Kind: "request", ParamsType: "PrepareRenameParams", ResultType: "PrepareRenameResult"},
	{Method: MethodTextDocumentLinkedEditingRange, Direction: "clientToServer", Kind: "request", ParamsType: "LinkedEditingRangeParams", ResultType: "LinkedEditingRanges"},
	{Method: MethodTextDocumentInlineCompletion, Direction: "clientToServer", Kind: "request", ParamsType: "InlineCompletionParams", ResultType: "InlineCompletionResult"},
	{Method: MethodWorkspaceSymbol, Direction: "clientToServer", Kind: "request", ParamsType: "WorkspaceSymbolParams", ResultType: "WorkspaceSymbolResult"},
	{Method: MethodWorkspaceSymbolResolve, Direction: "clientToServer", Kind: "request", ParamsType: "WorkspaceSymbol", ResultType: "WorkspaceSymbol"},
	{Method: MethodWorkspaceConfiguration, Direction: "serverToClient", Kind: "request", ParamsType: "ConfigurationParams", ResultType: "[]LSPAny"},
	{Method: MethodWorkspaceDidChangeConfiguration, Direction: "clientToServer", Kind: "notification", ParamsType: "DidChangeConfigurationParams", ResultType: ""},
	{Method: MethodWorkspaceWorkspaceFolders, Direction: "serverToClient", Kind: "request", ParamsType: "", ResultType: "[]WorkspaceFolder"},
	{Method: MethodWorkspaceDidChangeWorkspaceFolders, Direction: "clientToServer", Kind: "notification", ParamsType: "DidChangeWorkspaceFoldersParams", ResultType: ""},
	{Method: MethodWorkspaceWillCreateFiles, Direction: "clientToServer", Kind: "request", ParamsType: "CreateFilesParams", ResultType: "WorkspaceEdit"},
	{Method: MethodWorkspaceWillRenameFiles, Direction: "clientToServer", Kind: "request", ParamsType: "RenameFilesParams", ResultType: "WorkspaceEdit"},
	{Method: MethodWorkspaceWillDeleteFiles, Direction: "clientToServer", Kind: "request", ParamsType: "DeleteFilesParams", ResultType: "WorkspaceEdit"},
	{Method: MethodWorkspaceDidCreateFiles, Direction: "clientToServer", Kind: "notification", ParamsType: "CreateFilesParams", ResultType: ""},
	{Method: MethodWorkspaceDidRenameFiles, Direction: "clientToServer", Kind: "notification", ParamsType: "RenameFilesParams", ResultType: ""},
	{Method: MethodWorkspaceDidDeleteFiles, Direction: "clientToServer", Kind: "notification", ParamsType: "DeleteFilesParams", ResultType: ""},
	{Method: MethodWorkspaceDidChangeWatchedFiles, Direction: "clientToServer", Kind: "notification", ParamsType: "DidChangeWatchedFilesParams", ResultType: ""},
	{Method: MethodWorkspaceExecuteCommand, Direction: "clientToServer", Kind: "request", ParamsType: "ExecuteCommandParams", ResultType: "LSPAny"},
	{Method: MethodWorkspaceApplyEdit, Direction: "serverToClient", Kind: "request", ParamsType: "ApplyWorkspaceEditParams", ResultType: "ApplyWorkspaceEditResult"},
	{Method: MethodWorkspaceTextDocumentContent, Direction: "clientToServer", Kind: "request", ParamsType: "TextDocumentContentParams", ResultType: "TextDocumentContentResult"},
	{Method: MethodWorkspaceTextDocumentContentRefresh, Direction: "serverToClient", Kind: "request", ParamsType: "TextDocumentContentRefreshParams", ResultType: "LSPAny"},
	{Method: MethodWindowShowMessage, Direction: "serverToClient", Kind: "notification", ParamsType: "ShowMessageParams", ResultType: ""},
	{Method: MethodWindowShowMessageRequest, Direction: "serverToClient", Kind: "request", ParamsType: "ShowMessageRequestParams", ResultType: "MessageActionItem"},
	{Method: MethodWindowLogMessage, Direction: "serverToClient", Kind: "notification", ParamsType: "LogMessageParams", ResultType: ""},
	{Method: MethodWindowShowDocument, Direction: "serverToClient", Kind: "request", ParamsType: "ShowDocumentParams", ResultType: "ShowDocumentResult"},
	{Method: MethodWindowWorkDoneProgressCreate, Direction: "serverToClient", Kind: "request", ParamsType: "WorkDoneProgressCreateParams", ResultType: "LSPAny"},
	{Method: MethodWindowWorkDoneProgressCancel, Direction: "clientToServer", Kind: "notification", ParamsType: "WorkDoneProgressCancelParams", ResultType: ""},
	{Method: MethodTelemetryEvent, Direction: "serverToClient", Kind: "notification", ParamsType: "LSPAny", ResultType: ""},
	{Method: MethodProgress, Direction: "both", Kind: "notification", ParamsType: "ProgressParams", ResultType: ""},
	{Method: MethodCancelRequest, Direction: "both", Kind: "notification", ParamsType: "CancelParams", ResultType: ""},
}

Methods is the registry of every request and notification in the model.

Functions

func AppendMarshal added in v1.0.0

func AppendMarshal(dst []byte, v any) ([]byte, error)

AppendMarshal appends the LSP-conformant JSON encoding of v to dst and returns the extended buffer, letting callers amortize the output allocation across messages. dst may be nil.

func Call added in v0.9.0

func Call(ctx context.Context, conn jsonrpc2.Conn, method string, params, result any) error

Call invokes method on conn with params, decoding the response into result. If ctx is canceled while the call is outstanding, a "$/cancelRequest" notification is sent for the call's id.

func CancelHandler added in v0.9.0

func CancelHandler(handler jsonrpc2.Handler) jsonrpc2.Handler

CancelHandler returns a jsonrpc2.Handler that observes "$/cancelRequest" notifications and cancels the in-flight request they name.

func ClientHandler added in v0.9.0

func ClientHandler(client Client, handler jsonrpc2.Handler) jsonrpc2.Handler

ClientHandler returns a jsonrpc2.Handler that routes incoming requests to client, falling back to handler for unhandled methods.

The fallback handler receives the original borrowed jsonrpc2.Request. Like any jsonrpc2 handler, it must copy the method/params or call jsonrpc2.Request.Clone before retaining request data past its return.

func Clone added in v1.0.0

func Clone[T any](v T) (T, error)

Clone returns a JSON-round-trip copy of a protocol value.

Clone is primarily useful after decoding a small value from a much larger message: generated byte decoders may alias unescaped strings into an owned per-message copy, so retaining those strings can keep the full message copy live. A Clone result is detached from the original decode buffer because it marshals the value to fresh JSON and decodes that JSON into a new value.

func Handlers added in v0.9.0

func Handlers(handler jsonrpc2.Handler) jsonrpc2.Handler

Handlers wraps handler with the standard LSP middleware chain: cancellation and asynchronous dispatch.

func LoggerFromContext

func LoggerFromContext(ctx context.Context) *slog.Logger

LoggerFromContext extracts the *slog.Logger stored by WithLogger. When the context carries none it returns a process-wide nop logger that discards every record.

func LoggingStream added in v0.9.0

func LoggingStream(stream jsonrpc2.Stream, w io.Writer) jsonrpc2.Stream

LoggingStream returns a stream that does LSP protocol logging.

func Marshal added in v1.0.0

func Marshal(v any) ([]byte, error)

Marshal encodes v as LSP-conformant JSON.

Every generated type carries a byte-append writer, so struct values, named slice wrappers, and sealed-interface union values (which marshal as their dynamic concrete arm) all encode without entering the reflection machinery. It is equivalent to AppendMarshal(nil, v).

func ServerHandler added in v0.9.0

func ServerHandler(server Server, handler jsonrpc2.Handler) jsonrpc2.Handler

ServerHandler returns a jsonrpc2.Handler that routes incoming requests to server, falling back to Server.Request for non-standard methods.

func Unmarshal added in v1.0.0

func Unmarshal(data []byte, v any) error

Unmarshal decodes LSP JSON into v, dispatching every generated union type to its discriminating decoder. Duplicate object keys decode as last-wins and invalid UTF-8 is replaced with U+FFFD (see wireOptions). Destinations covered by the generated byte walkers decode without reflection.

Byte-walker destinations make one GC-managed copy of data before decoding. Unescaped strings and raw JSON value fields may alias that owned per-message copy, so callers may mutate or reuse data after Unmarshal returns. Retaining such fields can keep the whole owned message copy live; use Clone to detach a protocol value when it must outlive a much larger input message.

func WithClient

func WithClient(ctx context.Context, client Client) context.Context

WithClient returns a copy of ctx carrying the Client dispatcher.

func WithLogger

func WithLogger(ctx context.Context, logger *slog.Logger) context.Context

WithLogger returns a copy of ctx carrying logger.

Types

type AnnotatedTextEdit added in v0.11.0

type AnnotatedTextEdit struct {
	TextEdit

	// AnnotationID The actual identifier of the change annotation
	AnnotationID ChangeAnnotationIdentifier `json:"annotationId"`
}

AnnotatedTextEdit A special text edit with an additional change annotation.

Since: 3.16.0.

func (AnnotatedTextEdit) MarshalJSONTo added in v1.0.0

func (x AnnotatedTextEdit) MarshalJSONTo(enc *jsontext.Encoder) error

func (*AnnotatedTextEdit) UnmarshalJSONFrom added in v1.0.0

func (x *AnnotatedTextEdit) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ApplyKind added in v1.0.0

type ApplyKind uint32

ApplyKind Defines how values from a set of defaults and an individual item will be merged.

Since: 3.18.0

const (
	// ApplyKindReplace The value from the individual item (if provided and not `null`) will be
	// used instead of the default.
	ApplyKindReplace ApplyKind = 1
	// ApplyKindMerge The value from the item will be merged with the default.
	//
	// The specific rules for mergeing values are defined against each field
	// that supports merging.
	ApplyKindMerge ApplyKind = 2
)

ApplyKind enumeration values.

type ApplyWorkspaceEditParams

type ApplyWorkspaceEditParams struct {
	// Label An optional label of the workspace edit. This label is
	// presented in the user interface for example on an undo
	// stack to undo the workspace edit.
	Label *string `json:"label,omitzero"`

	// Edit The edits to apply.
	Edit WorkspaceEdit `json:"edit"`

	// Metadata Additional data about the edit.
	//
	// Since: 3.18.0
	Metadata *WorkspaceEditMetadata `json:"metadata,omitzero"`
}

ApplyWorkspaceEditParams The parameters passed via an apply workspace edit request.

func (ApplyWorkspaceEditParams) MarshalJSONTo added in v1.0.0

func (x ApplyWorkspaceEditParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ApplyWorkspaceEditParams) UnmarshalJSONFrom added in v1.0.0

func (x *ApplyWorkspaceEditParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ApplyWorkspaceEditResult added in v1.0.0

type ApplyWorkspaceEditResult struct {
	// Applied Indicates whether the edit was applied or not.
	Applied bool `json:"applied"`

	// FailureReason An optional textual description for why the edit was not applied.
	// This may be used by the server for diagnostic logging or to provide
	// a suitable error for a request that triggered the edit.
	FailureReason *string `json:"failureReason,omitzero"`

	// FailedChange Depending on the client's failure handling strategy `failedChange` might
	// contain the index of the change that failed. This property is only available
	// if the client signals a `failureHandlingStrategy` in its client capabilities.
	FailedChange *uint32 `json:"failedChange,omitzero"`
}

ApplyWorkspaceEditResult The result returned from the apply workspace edit request.

renamed from ApplyWorkspaceEditResponse

Since: 3.17 renamed from ApplyWorkspaceEditResponse

func (ApplyWorkspaceEditResult) MarshalJSONTo added in v1.0.0

func (x ApplyWorkspaceEditResult) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ApplyWorkspaceEditResult) UnmarshalJSONFrom added in v1.0.0

func (x *ApplyWorkspaceEditResult) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type BaseSymbolInformation added in v1.0.0

type BaseSymbolInformation struct {
	// Name The name of this symbol.
	Name string `json:"name"`

	// Kind The kind of this symbol.
	Kind SymbolKind `json:"kind"`

	// Tags Tags for this symbol.
	//
	// Since: 3.16.0
	Tags []SymbolTag `json:"tags,omitzero"`

	// ContainerName The name of the symbol containing this symbol. This information is for
	// user interface purposes (e.g. to render a qualifier in the user interface
	// if necessary). It can't be used to re-infer a hierarchy for the document
	// symbols.
	ContainerName *string `json:"containerName,omitzero"`
}

BaseSymbolInformation A base for all symbol information.

func (BaseSymbolInformation) MarshalJSONTo added in v1.0.0

func (x BaseSymbolInformation) MarshalJSONTo(enc *jsontext.Encoder) error

func (*BaseSymbolInformation) UnmarshalJSONFrom added in v1.0.0

func (x *BaseSymbolInformation) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type Boolean added in v1.0.0

type Boolean bool

Boolean is a boolean union arm.

type CallHierarchyClientCapabilities added in v0.11.1

type CallHierarchyClientCapabilities struct {
	// DynamicRegistration 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,omitzero"`
}

CallHierarchyClientCapabilities is defined by the LSP specification.

Since: 3.16.0

func (CallHierarchyClientCapabilities) MarshalJSONTo added in v1.0.0

func (x CallHierarchyClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CallHierarchyClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *CallHierarchyClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CallHierarchyIncomingCall added in v0.11.0

type CallHierarchyIncomingCall struct {
	// From The item that makes the call.
	From CallHierarchyItem `json:"from"`

	// FromRanges The ranges at which the calls appear. This is relative to the caller
	// denoted by [CallHierarchyIncomingCall.from].
	FromRanges []Range `json:"fromRanges"`
}

CallHierarchyIncomingCall Represents an incoming call, e.g. a caller of a method or constructor.

Since: 3.16.0

func (CallHierarchyIncomingCall) MarshalJSONTo added in v1.0.0

func (x CallHierarchyIncomingCall) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CallHierarchyIncomingCall) UnmarshalJSONFrom added in v1.0.0

func (x *CallHierarchyIncomingCall) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CallHierarchyIncomingCallsParams added in v0.11.0

type CallHierarchyIncomingCallsParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// Item is defined by the LSP specification.
	Item CallHierarchyItem `json:"item"`
}

CallHierarchyIncomingCallsParams The parameter of a `callHierarchy/incomingCalls` request.

Since: 3.16.0

func (CallHierarchyIncomingCallsParams) MarshalJSONTo added in v1.0.0

func (*CallHierarchyIncomingCallsParams) UnmarshalJSONFrom added in v1.0.0

func (x *CallHierarchyIncomingCallsParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CallHierarchyItem added in v0.11.0

type CallHierarchyItem struct {
	// Name The name of this item.
	Name string `json:"name"`

	// Kind The kind of this item.
	Kind SymbolKind `json:"kind"`

	// Tags Tags for this item.
	Tags []SymbolTag `json:"tags,omitzero"`

	// Detail More detail for this item, e.g. the signature of a function.
	Detail *string `json:"detail,omitzero"`

	// URI The resource identifier of this item.
	URI uri.URI `json:"uri"`

	// Range The range enclosing this symbol not including leading/trailing whitespace but everything else, e.g. comments and code.
	Range Range `json:"range"`

	// SelectionRange The range that should be selected and revealed when this symbol is being picked, e.g. the name of a function.
	// Must be contained by the [CallHierarchyItem.range].
	SelectionRange Range `json:"selectionRange"`

	// Data A data entry field that is preserved between a call hierarchy prepare and
	// incoming calls or outgoing calls requests.
	Data LSPAny `json:"data,omitzero"`
}

CallHierarchyItem Represents programming constructs like functions or constructors in the context of call hierarchy.

Since: 3.16.0

func (CallHierarchyItem) MarshalJSONTo added in v1.0.0

func (x CallHierarchyItem) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CallHierarchyItem) UnmarshalJSONFrom added in v1.0.0

func (x *CallHierarchyItem) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CallHierarchyOptions added in v0.11.0

type CallHierarchyOptions struct {
	WorkDoneProgressOptions
}

CallHierarchyOptions Call hierarchy options used during static registration.

Since: 3.16.0

func (CallHierarchyOptions) MarshalJSONTo added in v1.0.0

func (x CallHierarchyOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CallHierarchyOptions) UnmarshalJSONFrom added in v1.0.0

func (x *CallHierarchyOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CallHierarchyOutgoingCall added in v0.11.0

type CallHierarchyOutgoingCall struct {
	// To The item that is called.
	To CallHierarchyItem `json:"to"`

	// FromRanges The range at which this item is called. This is the range relative to the caller, e.g the item
	// passed to [CallHierarchyItemProvider.provideCallHierarchyOutgoingCalls]
	// and not [CallHierarchyOutgoingCall.to].
	FromRanges []Range `json:"fromRanges"`
}

CallHierarchyOutgoingCall Represents an outgoing call, e.g. calling a getter from a method or a method from a constructor etc.

Since: 3.16.0

func (CallHierarchyOutgoingCall) MarshalJSONTo added in v1.0.0

func (x CallHierarchyOutgoingCall) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CallHierarchyOutgoingCall) UnmarshalJSONFrom added in v1.0.0

func (x *CallHierarchyOutgoingCall) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CallHierarchyOutgoingCallsParams added in v0.11.0

type CallHierarchyOutgoingCallsParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// Item is defined by the LSP specification.
	Item CallHierarchyItem `json:"item"`
}

CallHierarchyOutgoingCallsParams The parameter of a `callHierarchy/outgoingCalls` request.

Since: 3.16.0

func (CallHierarchyOutgoingCallsParams) MarshalJSONTo added in v1.0.0

func (*CallHierarchyOutgoingCallsParams) UnmarshalJSONFrom added in v1.0.0

func (x *CallHierarchyOutgoingCallsParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CallHierarchyPrepareParams added in v0.11.0

type CallHierarchyPrepareParams struct {
	TextDocumentPositionParams
	WorkDoneProgressParams
}

CallHierarchyPrepareParams The parameter of a `textDocument/prepareCallHierarchy` request.

Since: 3.16.0

func (CallHierarchyPrepareParams) MarshalJSONTo added in v1.0.0

func (x CallHierarchyPrepareParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CallHierarchyPrepareParams) UnmarshalJSONFrom added in v1.0.0

func (x *CallHierarchyPrepareParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CallHierarchyProvider added in v1.0.0

type CallHierarchyProvider interface {
	// contains filtered or unexported methods
}

CallHierarchyProvider is one of: Boolean, *CallHierarchyOptions, *CallHierarchyRegistrationOptions.

type CallHierarchyRegistrationOptions added in v0.11.0

type CallHierarchyRegistrationOptions struct {
	TextDocumentRegistrationOptions
	CallHierarchyOptions
	StaticRegistrationOptions
}

CallHierarchyRegistrationOptions Call hierarchy options used during static or dynamic registration.

Since: 3.16.0

func (CallHierarchyRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*CallHierarchyRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *CallHierarchyRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CancelParams

type CancelParams struct {
	// ID The request id to cancel.
	ID ProgressToken `json:"id"`
}

CancelParams is defined by the LSP specification.

func (CancelParams) MarshalJSONTo added in v1.0.0

func (x CancelParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CancelParams) UnmarshalJSONFrom added in v1.0.0

func (x *CancelParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ChangeAnnotation added in v0.11.0

type ChangeAnnotation struct {
	// Label A human-readable string describing the actual change. The string
	// is rendered prominent in the user interface.
	Label string `json:"label"`

	// NeedsConfirmation A flag which indicates that user confirmation is needed
	// before applying the change.
	NeedsConfirmation *bool `json:"needsConfirmation,omitzero"`

	// Description A human-readable string which is rendered less prominent in
	// the user interface.
	Description *string `json:"description,omitzero"`
}

ChangeAnnotation Additional information that describes document changes.

Since: 3.16.0

func (ChangeAnnotation) MarshalJSONTo added in v1.0.0

func (x ChangeAnnotation) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ChangeAnnotation) UnmarshalJSONFrom added in v1.0.0

func (x *ChangeAnnotation) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ChangeAnnotationIdentifier added in v0.11.0

type ChangeAnnotationIdentifier string

ChangeAnnotationIdentifier An identifier to refer to a change annotation stored with a workspace edit.

type ChangeAnnotationsSupportOptions added in v1.0.0

type ChangeAnnotationsSupportOptions struct {
	// GroupsOnLabel 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,omitzero"`
}

ChangeAnnotationsSupportOptions is defined by the LSP specification.

Since: 3.18.0

func (ChangeAnnotationsSupportOptions) MarshalJSONTo added in v1.0.0

func (x ChangeAnnotationsSupportOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ChangeAnnotationsSupportOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ChangeAnnotationsSupportOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ChangeNotifications added in v1.0.0

type ChangeNotifications interface {
	// contains filtered or unexported methods
}

ChangeNotifications is one of: String, Boolean.

type Client added in v0.9.0

type Client interface {
	Progress(ctx context.Context, params *ProgressParams) error
	LogTrace(ctx context.Context, params *LogTraceParams) error
	RegisterCapability(ctx context.Context, params *RegistrationParams) error
	UnregisterCapability(ctx context.Context, params *UnregistrationParams) error
	ShowMessage(ctx context.Context, params *ShowMessageParams) error
	ShowMessageRequest(ctx context.Context, params *ShowMessageRequestParams) (*MessageActionItem, error)
	LogMessage(ctx context.Context, params *LogMessageParams) error
	ShowDocument(ctx context.Context, params *ShowDocumentParams) (*ShowDocumentResult, error)
	WorkDoneProgressCreate(ctx context.Context, params *WorkDoneProgressCreateParams) error
	Telemetry(ctx context.Context, params LSPAny) error
	PublishDiagnostics(ctx context.Context, params *PublishDiagnosticsParams) error
	Configuration(ctx context.Context, params *ConfigurationParams) ([]LSPAny, error)
	WorkspaceFolders(ctx context.Context) ([]WorkspaceFolder, error)
	ApplyEdit(ctx context.Context, params *ApplyWorkspaceEditParams) (*ApplyWorkspaceEditResult, error)
	CodeLensRefresh(ctx context.Context) error
	FoldingRangeRefresh(ctx context.Context) error
	SemanticTokensRefresh(ctx context.Context) error
	InlineValueRefresh(ctx context.Context) error
	InlayHintRefresh(ctx context.Context) error
	DiagnosticRefresh(ctx context.Context) error
	TextDocumentContentRefresh(ctx context.Context, params *TextDocumentContentRefreshParams) error
}

Client is the LSP client interface: the set of requests and notifications a language client handles. Its method set is the authoritative shape implemented by UnimplementedClient.

func ClientDispatcher added in v0.9.0

func ClientDispatcher(conn jsonrpc2.Conn) Client

ClientDispatcher returns a Client that dispatches LSP requests across conn.

func ClientFromContext added in v1.0.0

func ClientFromContext(ctx context.Context) (Client, bool)

ClientFromContext extracts the Client dispatcher stored by WithClient. The boolean reports whether a client was present.

func NewServer

func NewServer(ctx context.Context, server Server, stream jsonrpc2.Stream) (context.Context, jsonrpc2.Conn, Client)

NewServer returns the context in which the Client dispatcher is embedded, the jsonrpc2 connection, and that Client. The connection serves the supplied Server and is wired with the union-aware [lspCodec].

type ClientCapabilities

type ClientCapabilities struct {
	// Workspace Workspace specific client capabilities.
	Workspace *WorkspaceClientCapabilities `json:"workspace,omitzero"`

	// TextDocument Text document specific client capabilities.
	TextDocument *TextDocumentClientCapabilities `json:"textDocument,omitzero"`

	// NotebookDocument Capabilities specific to the notebook document support.
	//
	// Since: 3.17.0
	NotebookDocument *NotebookDocumentClientCapabilities `json:"notebookDocument,omitzero"`

	// Window Window specific client capabilities.
	Window *WindowClientCapabilities `json:"window,omitzero"`

	// General General client capabilities.
	//
	// Since: 3.16.0
	General *GeneralClientCapabilities `json:"general,omitzero"`

	// Experimental Experimental client capabilities.
	Experimental LSPAny `json:"experimental,omitzero"`
}

ClientCapabilities Defines the capabilities provided by the client.

func (ClientCapabilities) MarshalJSONTo added in v1.0.0

func (x ClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *ClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientCodeActionKindOptions added in v1.0.0

type ClientCodeActionKindOptions struct {
	// ValueSet The code action kind values the client supports. When this
	// property exists the client also guarantees that it will
	// handle values outside its set gracefully and falls back
	// to a default value when unknown.
	ValueSet []CodeActionKind `json:"valueSet"`
}

ClientCodeActionKindOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientCodeActionKindOptions) MarshalJSONTo added in v1.0.0

func (x ClientCodeActionKindOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientCodeActionKindOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientCodeActionKindOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientCodeActionLiteralOptions added in v1.0.0

type ClientCodeActionLiteralOptions struct {
	// CodeActionKind The code action kind is support with the following value
	// set.
	CodeActionKind ClientCodeActionKindOptions `json:"codeActionKind"`
}

ClientCodeActionLiteralOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientCodeActionLiteralOptions) MarshalJSONTo added in v1.0.0

func (x ClientCodeActionLiteralOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientCodeActionLiteralOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientCodeActionLiteralOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientCodeActionResolveOptions added in v1.0.0

type ClientCodeActionResolveOptions struct {
	// Properties The properties that a client can resolve lazily.
	Properties []string `json:"properties"`
}

ClientCodeActionResolveOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientCodeActionResolveOptions) MarshalJSONTo added in v1.0.0

func (x ClientCodeActionResolveOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientCodeActionResolveOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientCodeActionResolveOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientCodeLensResolveOptions added in v1.0.0

type ClientCodeLensResolveOptions struct {
	// Properties The properties that a client can resolve lazily.
	Properties []string `json:"properties"`
}

ClientCodeLensResolveOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientCodeLensResolveOptions) MarshalJSONTo added in v1.0.0

func (x ClientCodeLensResolveOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientCodeLensResolveOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientCodeLensResolveOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientCompletionItemInsertTextModeOptions added in v1.0.0

type ClientCompletionItemInsertTextModeOptions struct {
	// ValueSet is defined by the LSP specification.
	ValueSet []InsertTextMode `json:"valueSet"`
}

ClientCompletionItemInsertTextModeOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientCompletionItemInsertTextModeOptions) MarshalJSONTo added in v1.0.0

func (*ClientCompletionItemInsertTextModeOptions) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientCompletionItemOptions added in v1.0.0

type ClientCompletionItemOptions struct {
	// SnippetSupport Client supports snippets as insert text.
	//
	// A snippet can define tab stops and placeholders with `$1`, `$2`
	// and `${3:foo}`. `$0` defines the final tab stop, it defaults to
	// the end of the snippet. Placeholders with equal identifiers are linked,
	// that is typing in one will update others too.
	SnippetSupport *bool `json:"snippetSupport,omitzero"`

	// CommitCharactersSupport Client supports commit characters on a completion item.
	CommitCharactersSupport *bool `json:"commitCharactersSupport,omitzero"`

	// DocumentationFormat Client supports the following content formats for the documentation
	// property. The order describes the preferred format of the client.
	DocumentationFormat []MarkupKind `json:"documentationFormat,omitzero"`

	// DeprecatedSupport Client supports the deprecated property on a completion item.
	DeprecatedSupport *bool `json:"deprecatedSupport,omitzero"`

	// PreselectSupport Client supports the preselect property on a completion item.
	PreselectSupport *bool `json:"preselectSupport,omitzero"`

	// TagSupport 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
	// a resolve call.
	//
	// Since: 3.15.0
	TagSupport CompletionItemTagOptions `json:"tagSupport,omitzero"`

	// InsertReplaceSupport 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
	InsertReplaceSupport *bool `json:"insertReplaceSupport,omitzero"`

	// ResolveSupport Indicates which properties a client can resolve lazily on a completion
	// item. Before version 3.16.0 only the predefined properties `documentation`
	// and `details` could be resolved lazily.
	//
	// Since: 3.16.0
	ResolveSupport ClientCompletionItemResolveOptions `json:"resolveSupport,omitzero"`

	// InsertTextModeSupport 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 ClientCompletionItemInsertTextModeOptions `json:"insertTextModeSupport,omitzero"`

	// LabelDetailsSupport The client has support for completion item label
	// details (see also `CompletionItemLabelDetails`).
	//
	// Since: 3.17.0
	LabelDetailsSupport *bool `json:"labelDetailsSupport,omitzero"`
}

ClientCompletionItemOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientCompletionItemOptions) MarshalJSONTo added in v1.0.0

func (x ClientCompletionItemOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientCompletionItemOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientCompletionItemOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientCompletionItemOptionsKind added in v1.0.0

type ClientCompletionItemOptionsKind struct {
	// ValueSet The completion item kind values the client supports. When this
	// property exists the client also guarantees that it will
	// handle values outside its set gracefully and falls back
	// to a default value when unknown.
	//
	// If this property is not present the client only supports
	// the completion items kinds from `Text` to `Reference` as defined in
	// the initial version of the protocol.
	ValueSet []CompletionItemKind `json:"valueSet,omitzero"`
}

ClientCompletionItemOptionsKind is defined by the LSP specification.

Since: 3.18.0

func (ClientCompletionItemOptionsKind) MarshalJSONTo added in v1.0.0

func (x ClientCompletionItemOptionsKind) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientCompletionItemOptionsKind) UnmarshalJSONFrom added in v1.0.0

func (x *ClientCompletionItemOptionsKind) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientCompletionItemResolveOptions added in v1.0.0

type ClientCompletionItemResolveOptions struct {
	// Properties The properties that a client can resolve lazily.
	Properties []string `json:"properties"`
}

ClientCompletionItemResolveOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientCompletionItemResolveOptions) MarshalJSONTo added in v1.0.0

func (*ClientCompletionItemResolveOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientCompletionItemResolveOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientDiagnosticsTagOptions added in v1.0.0

type ClientDiagnosticsTagOptions struct {
	// ValueSet The tags supported by the client.
	ValueSet []DiagnosticTag `json:"valueSet"`
}

ClientDiagnosticsTagOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientDiagnosticsTagOptions) MarshalJSONTo added in v1.0.0

func (x ClientDiagnosticsTagOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientDiagnosticsTagOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientDiagnosticsTagOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientFoldingRangeKindOptions added in v1.0.0

type ClientFoldingRangeKindOptions struct {
	// ValueSet The folding range kind values the client supports. When this
	// property exists the client also guarantees that it will
	// handle values outside its set gracefully and falls back
	// to a default value when unknown.
	ValueSet []FoldingRangeKind `json:"valueSet,omitzero"`
}

ClientFoldingRangeKindOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientFoldingRangeKindOptions) MarshalJSONTo added in v1.0.0

func (x ClientFoldingRangeKindOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientFoldingRangeKindOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientFoldingRangeKindOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientFoldingRangeOptions added in v1.0.0

type ClientFoldingRangeOptions struct {
	// CollapsedText If set, the client signals that it supports setting collapsedText on
	// folding ranges to display custom labels instead of the default text.
	//
	// Since: 3.17.0
	CollapsedText *bool `json:"collapsedText,omitzero"`
}

ClientFoldingRangeOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientFoldingRangeOptions) MarshalJSONTo added in v1.0.0

func (x ClientFoldingRangeOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientFoldingRangeOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientFoldingRangeOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientInfo added in v0.10.0

type ClientInfo struct {
	// Name The name of the client as defined by the client.
	Name string `json:"name"`

	// Version The client's version as defined by the client.
	Version Optional[string] `json:"version,omitzero"`
}

ClientInfo Information about the client

ClientInfo type name added.

Since: 3.18.0 ClientInfo type name added.

func (ClientInfo) MarshalJSONTo added in v1.0.0

func (x ClientInfo) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientInfo) UnmarshalJSONFrom added in v1.0.0

func (x *ClientInfo) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientInlayHintResolveOptions added in v1.0.0

type ClientInlayHintResolveOptions struct {
	// Properties The properties that a client can resolve lazily.
	Properties []string `json:"properties"`
}

ClientInlayHintResolveOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientInlayHintResolveOptions) MarshalJSONTo added in v1.0.0

func (x ClientInlayHintResolveOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientInlayHintResolveOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientInlayHintResolveOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientSemanticTokensRequestFullDelta added in v1.0.0

type ClientSemanticTokensRequestFullDelta struct {
	// Delta The client will send the `textDocument/semanticTokens/full/delta` request if
	// the server provides a corresponding handler.
	Delta *bool `json:"delta,omitzero"`
}

ClientSemanticTokensRequestFullDelta is defined by the LSP specification.

Since: 3.18.0

func (ClientSemanticTokensRequestFullDelta) MarshalJSONTo added in v1.0.0

func (*ClientSemanticTokensRequestFullDelta) UnmarshalJSONFrom added in v1.0.0

func (x *ClientSemanticTokensRequestFullDelta) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientSemanticTokensRequestOptions added in v1.0.0

type ClientSemanticTokensRequestOptions struct {
	// Range The client will send the `textDocument/semanticTokens/range` request if
	// the server provides a corresponding handler.
	Range ClientSemanticTokensRequestOptionsRange `json:"range,omitzero"`

	// Full The client will send the `textDocument/semanticTokens/full` request if
	// the server provides a corresponding handler.
	Full ClientSemanticTokensRequestOptionsFull `json:"full,omitzero"`
}

ClientSemanticTokensRequestOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientSemanticTokensRequestOptions) MarshalJSONTo added in v1.0.0

func (*ClientSemanticTokensRequestOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientSemanticTokensRequestOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientSemanticTokensRequestOptionsFull added in v1.0.0

type ClientSemanticTokensRequestOptionsFull interface {
	// contains filtered or unexported methods
}

ClientSemanticTokensRequestOptionsFull is one of: Boolean, *ClientSemanticTokensRequestFullDelta.

type ClientSemanticTokensRequestOptionsRange added in v1.0.0

type ClientSemanticTokensRequestOptionsRange interface {
	// contains filtered or unexported methods
}

ClientSemanticTokensRequestOptionsRange is one of: Boolean, *SemanticTokensOptionsRange.

type ClientShowMessageActionItemOptions added in v1.0.0

type ClientShowMessageActionItemOptions struct {
	// AdditionalPropertiesSupport Whether the client supports additional attributes which
	// are preserved and send back to the server in the
	// request's response.
	AdditionalPropertiesSupport *bool `json:"additionalPropertiesSupport,omitzero"`
}

ClientShowMessageActionItemOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientShowMessageActionItemOptions) MarshalJSONTo added in v1.0.0

func (*ClientShowMessageActionItemOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientShowMessageActionItemOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientSignatureInformationOptions added in v1.0.0

type ClientSignatureInformationOptions struct {
	// DocumentationFormat Client supports the following content formats for the documentation
	// property. The order describes the preferred format of the client.
	DocumentationFormat []MarkupKind `json:"documentationFormat,omitzero"`

	// ParameterInformation Client capabilities specific to parameter information.
	ParameterInformation *ClientSignatureParameterInformationOptions `json:"parameterInformation,omitzero"`

	// ActiveParameterSupport The client supports the `activeParameter` property on `SignatureInformation`
	// literal.
	//
	// Since: 3.16.0
	ActiveParameterSupport *bool `json:"activeParameterSupport,omitzero"`

	// NoActiveParameterSupport The client supports the `activeParameter` property on
	// `SignatureHelp`/`SignatureInformation` being set to `null` to
	// indicate that no parameter should be active.
	//
	// Since: 3.18.0
	NoActiveParameterSupport *bool `json:"noActiveParameterSupport,omitzero"`
}

ClientSignatureInformationOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientSignatureInformationOptions) MarshalJSONTo added in v1.0.0

func (*ClientSignatureInformationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientSignatureInformationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientSignatureParameterInformationOptions added in v1.0.0

type ClientSignatureParameterInformationOptions struct {
	// LabelOffsetSupport The client supports processing label offsets instead of a
	// simple label string.
	//
	// Since: 3.14.0
	LabelOffsetSupport *bool `json:"labelOffsetSupport,omitzero"`
}

ClientSignatureParameterInformationOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientSignatureParameterInformationOptions) MarshalJSONTo added in v1.0.0

func (*ClientSignatureParameterInformationOptions) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientSymbolKindOptions added in v1.0.0

type ClientSymbolKindOptions struct {
	// ValueSet The symbol kind values the client supports. When this
	// property exists the client also guarantees that it will
	// handle values outside its set gracefully and falls back
	// to a default value when unknown.
	//
	// If this property is not present the client only supports
	// the symbol kinds from `File` to `Array` as defined in
	// the initial version of the protocol.
	ValueSet []SymbolKind `json:"valueSet,omitzero"`
}

ClientSymbolKindOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientSymbolKindOptions) MarshalJSONTo added in v1.0.0

func (x ClientSymbolKindOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientSymbolKindOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientSymbolKindOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientSymbolResolveOptions added in v1.0.0

type ClientSymbolResolveOptions struct {
	// Properties The properties that a client can resolve lazily. Usually
	// `location.range`
	Properties []string `json:"properties"`
}

ClientSymbolResolveOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientSymbolResolveOptions) MarshalJSONTo added in v1.0.0

func (x ClientSymbolResolveOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientSymbolResolveOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientSymbolResolveOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ClientSymbolTagOptions added in v1.0.0

type ClientSymbolTagOptions struct {
	// ValueSet The tags supported by the client.
	ValueSet []SymbolTag `json:"valueSet"`
}

ClientSymbolTagOptions is defined by the LSP specification.

Since: 3.18.0

func (ClientSymbolTagOptions) MarshalJSONTo added in v1.0.0

func (x ClientSymbolTagOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ClientSymbolTagOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ClientSymbolTagOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeAction

type CodeAction struct {
	// Title A short, human-readable, title for this code action.
	Title string `json:"title"`

	// Kind The kind of the code action.
	//
	// Used to filter code actions.
	Kind *CodeActionKind `json:"kind,omitzero"`

	// Diagnostics The diagnostics that this code action resolves.
	Diagnostics []Diagnostic `json:"diagnostics,omitzero"`

	// IsPreferred Marks this as a preferred action. Preferred actions are used by the `auto fix` command and can be targeted
	// by keybindings.
	//
	// A quick fix should be marked preferred if it properly addresses the underlying error.
	// A refactoring should be marked preferred if it is the most reasonable choice of actions to take.
	//
	// Since: 3.15.0
	IsPreferred *bool `json:"isPreferred,omitzero"`

	// Disabled Marks that the code action cannot currently be applied.
	//
	// Clients should follow the following guidelines regarding disabled code actions:
	//
	//   - Disabled code actions are not shown in automatic [lightbulbs](https://code.visualstudio.com/docs/editor/editingevolved#_code-action)
	//     code action menus.
	//
	//   - Disabled actions are shown as faded out in the code action menu when the user requests a more specific type
	//     of code action, such as refactorings.
	//
	//   - If the user has a [keybinding](https://code.visualstudio.com/docs/editor/refactoring#_keybindings-for-code-actions)
	//     that auto applies a code action and only disabled code actions are returned, the client should show the user an
	//     error message with `reason` in the editor.
	//
	// Since: 3.16.0
	Disabled CodeActionDisabled `json:"disabled,omitzero"`

	// Edit The workspace edit this code action performs.
	Edit *WorkspaceEdit `json:"edit,omitzero"`

	// Command A command this code action executes. If a code action
	// provides an edit and a command, first the edit is
	// executed and then the command.
	Command Command `json:"command,omitzero"`

	// Data A data entry field that is preserved on a code action between
	// a `textDocument/codeAction` and a `codeAction/resolve` request.
	//
	// Since: 3.16.0
	Data LSPAny `json:"data,omitzero"`

	// Tags Tags for this code action.
	//
	// Since: 3.18.0 - proposed
	Tags []CodeActionTag `json:"tags,omitzero"`
}

CodeAction A code action represents a change that can be performed in code, e.g. to fix a problem or to refactor code.

A CodeAction must set either `edit` and/or a `command`. If both are supplied, the `edit` is applied first, then the `command` is executed.

func (CodeAction) MarshalJSONTo added in v1.0.0

func (x CodeAction) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeAction) UnmarshalJSONFrom added in v1.0.0

func (x *CodeAction) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeActionClientCapabilities added in v0.11.1

type CodeActionClientCapabilities struct {
	// DynamicRegistration Whether code action supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// CodeActionLiteralSupport The client support code action literals of type `CodeAction` as a valid
	// response of the `textDocument/codeAction` request. If the property is not
	// set the request can only return `Command` literals.
	//
	// Since: 3.8.0
	CodeActionLiteralSupport ClientCodeActionLiteralOptions `json:"codeActionLiteralSupport,omitzero"`

	// IsPreferredSupport Whether code action supports the `isPreferred` property.
	//
	// Since: 3.15.0
	IsPreferredSupport *bool `json:"isPreferredSupport,omitzero"`

	// DisabledSupport Whether code action supports the `disabled` property.
	//
	// Since: 3.16.0
	DisabledSupport *bool `json:"disabledSupport,omitzero"`

	// DataSupport Whether code action supports the `data` property which is
	// preserved between a `textDocument/codeAction` and a
	// `codeAction/resolve` request.
	//
	// Since: 3.16.0
	DataSupport *bool `json:"dataSupport,omitzero"`

	// ResolveSupport Whether the client supports resolving additional code action
	// properties via a separate `codeAction/resolve` request.
	//
	// Since: 3.16.0
	ResolveSupport ClientCodeActionResolveOptions `json:"resolveSupport,omitzero"`

	// HonorsChangeAnnotations Whether the 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,omitzero"`

	// DocumentationSupport Whether the client supports documentation for a class of
	// code actions.
	//
	// Since: 3.18.0
	DocumentationSupport *bool `json:"documentationSupport,omitzero"`

	// TagSupport Client supports the tag property on a code action. Clients
	// supporting tags have to handle unknown tags gracefully.
	//
	// Since: 3.18.0 - proposed
	TagSupport CodeActionTagOptions `json:"tagSupport,omitzero"`
}

CodeActionClientCapabilities The Client Capabilities of a [CodeActionRequest].

func (CodeActionClientCapabilities) MarshalJSONTo added in v1.0.0

func (x CodeActionClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeActionClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *CodeActionClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeActionContext

type CodeActionContext struct {
	// Diagnostics An array of diagnostics known on the client side overlapping the range provided to the
	// `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.
	Diagnostics []Diagnostic `json:"diagnostics"`

	// Only Requested kind of actions to return.
	//
	// Actions not of this kind are filtered out by the client before being shown. So servers
	// can omit computing them.
	Only []CodeActionKind `json:"only,omitzero"`

	// TriggerKind The reason why code actions were requested.
	//
	// Since: 3.17.0
	TriggerKind CodeActionTriggerKind `json:"triggerKind,omitzero"`
}

CodeActionContext Contains additional diagnostic information about the context in which a [CodeActionProvider.provideCodeActions] is run.

func (CodeActionContext) MarshalJSONTo added in v1.0.0

func (x CodeActionContext) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeActionContext) UnmarshalJSONFrom added in v1.0.0

func (x *CodeActionContext) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeActionDisabled added in v1.0.0

type CodeActionDisabled struct {
	// Reason Human readable description of why the code action is currently disabled.
	//
	// This is displayed in the code actions UI.
	Reason string `json:"reason"`
}

CodeActionDisabled Captures why the code action is currently disabled.

Since: 3.18.0

func (CodeActionDisabled) MarshalJSONTo added in v1.0.0

func (x CodeActionDisabled) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeActionDisabled) UnmarshalJSONFrom added in v1.0.0

func (x *CodeActionDisabled) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeActionKind

type CodeActionKind string

CodeActionKind A set of predefined code action kinds

const (
	// CodeActionKindEmpty Empty kind.
	CodeActionKindEmpty CodeActionKind = ""
	// CodeActionKindQuickFix Base kind for quickfix actions: 'quickfix'
	CodeActionKindQuickFix CodeActionKind = "quickfix"
	// CodeActionKindRefactor Base kind for refactoring actions: 'refactor'
	CodeActionKindRefactor CodeActionKind = "refactor"
	// CodeActionKindRefactorExtract Base kind for refactoring extraction actions: 'refactor.extract'
	//
	// Example extract actions:
	//
	// - Extract method
	// - Extract function
	// - Extract variable
	// - Extract interface from class
	// - ...
	CodeActionKindRefactorExtract CodeActionKind = "refactor.extract"
	// CodeActionKindRefactorInline Base kind for refactoring inline actions: 'refactor.inline'
	//
	// Example inline actions:
	//
	// - Inline function
	// - Inline variable
	// - Inline constant
	// - ...
	CodeActionKindRefactorInline CodeActionKind = "refactor.inline"
	// CodeActionKindRefactorMove Base kind for refactoring move actions: `refactor.move`
	//
	// Example move actions:
	//
	// - Move a function to a new file
	// - Move a property between classes
	// - Move method to base class
	// - ...
	//
	// Since: 3.18.0
	CodeActionKindRefactorMove CodeActionKind = "refactor.move"
	// CodeActionKindRefactorRewrite Base kind for refactoring rewrite actions: 'refactor.rewrite'
	//
	// Example rewrite actions:
	//
	// - Convert JavaScript function to class
	// - Add or remove parameter
	// - Encapsulate field
	// - Make method static
	// - Move method to base class
	// - ...
	CodeActionKindRefactorRewrite CodeActionKind = "refactor.rewrite"
	// CodeActionKindSource Base kind for source actions: `source`
	//
	// Source code actions apply to the entire file.
	CodeActionKindSource CodeActionKind = "source"
	// CodeActionKindSourceOrganizeImports Base kind for an organize imports source action: `source.organizeImports`
	CodeActionKindSourceOrganizeImports CodeActionKind = "source.organizeImports"
	// CodeActionKindSourceFixAll Base kind for auto-fix source actions: `source.fixAll`.
	//
	// Fix all actions automatically fix errors that have a clear fix that do not require user input.
	// They should not suppress errors or perform unsafe fixes such as generating new types or classes.
	//
	// Since: 3.15.0
	CodeActionKindSourceFixAll CodeActionKind = "source.fixAll"
	// CodeActionKindNotebook Base kind for all code actions applying to the entire notebook's scope. CodeActionKinds using
	// this should always begin with `notebook.`
	//
	// Since: 3.18.0
	CodeActionKindNotebook CodeActionKind = "notebook"
)

CodeActionKind enumeration values.

type CodeActionKindDocumentation added in v1.0.0

type CodeActionKindDocumentation struct {
	// Kind The kind of the code action being documented.
	//
	// If the kind is generic, such as `CodeActionKind.Refactor`, the documentation will be shown whenever any
	// refactorings are returned. If the kind if more specific, such as `CodeActionKind.RefactorExtract`, the
	// documentation will only be shown when extract refactoring code actions are returned.
	Kind CodeActionKind `json:"kind"`

	// Command Command that is ued to display the documentation to the user.
	//
	// The title of this documentation code action is taken from [Command.title]
	Command Command `json:"command"`
}

CodeActionKindDocumentation Documentation for a class of code actions.

Since: 3.18.0

func (CodeActionKindDocumentation) MarshalJSONTo added in v1.0.0

func (x CodeActionKindDocumentation) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeActionKindDocumentation) UnmarshalJSONFrom added in v1.0.0

func (x *CodeActionKindDocumentation) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeActionOptions

type CodeActionOptions struct {
	WorkDoneProgressOptions

	// CodeActionKinds CodeActionKinds that this server may return.
	//
	// The list of kinds may be generic, such as `CodeActionKind.Refactor`, or the server
	// may list out every specific kind they provide.
	CodeActionKinds []CodeActionKind `json:"codeActionKinds,omitzero"`

	// Documentation Static documentation for a class of code actions.
	//
	// Documentation from the provider should be shown in the code actions menu if either:
	//
	// - Code actions of `kind` are requested by the editor. In this case, the editor will show the documentation that
	//   most closely matches the requested code action kind. For example, if a provider has documentation for
	//   both `Refactor` and `RefactorExtract`, when the user requests code actions for `RefactorExtract`,
	//   the editor will use the documentation for `RefactorExtract` instead of the documentation for `Refactor`.
	//
	// - Any code actions of `kind` are returned by the provider.
	//
	// At most one documentation entry should be shown per provider.
	//
	// Since: 3.18.0
	Documentation []CodeActionKindDocumentation `json:"documentation,omitzero"`

	// ResolveProvider The server provides support to resolve additional
	// information for a code action.
	//
	// Since: 3.16.0
	ResolveProvider *bool `json:"resolveProvider,omitzero"`
}

CodeActionOptions Provider options for a [CodeActionRequest].

func (CodeActionOptions) MarshalJSONTo added in v1.0.0

func (x CodeActionOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeActionOptions) UnmarshalJSONFrom added in v1.0.0

func (x *CodeActionOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeActionParams

type CodeActionParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// TextDocument The document in which the command was invoked.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Range The range for which the command was invoked.
	Range Range `json:"range"`

	// Context Context carrying additional information.
	Context CodeActionContext `json:"context"`
}

CodeActionParams The parameters of a [CodeActionRequest].

func (CodeActionParams) MarshalJSONTo added in v1.0.0

func (x CodeActionParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeActionParams) UnmarshalJSONFrom added in v1.0.0

func (x *CodeActionParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeActionProvider added in v1.0.0

type CodeActionProvider interface {
	// contains filtered or unexported methods
}

CodeActionProvider is one of: Boolean, *CodeActionOptions.

type CodeActionRegistrationOptions

type CodeActionRegistrationOptions struct {
	TextDocumentRegistrationOptions
	CodeActionOptions
}

CodeActionRegistrationOptions Registration options for a [CodeActionRequest].

func (CodeActionRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x CodeActionRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeActionRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *CodeActionRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeActionTag added in v1.0.0

type CodeActionTag uint32

CodeActionTag Code action tags are extra annotations that tweak the behavior of a code action.

Since: 3.18.0 - proposed

const (
	// CodeActionTagLLMGenerated Marks the code action as LLM-generated.
	CodeActionTagLLMGenerated CodeActionTag = 1
)

CodeActionTag enumeration values.

type CodeActionTagOptions added in v1.0.0

type CodeActionTagOptions struct {
	// ValueSet The tags supported by the client.
	ValueSet []CodeActionTag `json:"valueSet"`
}

CodeActionTagOptions is defined by the LSP specification.

Since: 3.18.0 - proposed

func (CodeActionTagOptions) MarshalJSONTo added in v1.0.0

func (x CodeActionTagOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeActionTagOptions) UnmarshalJSONFrom added in v1.0.0

func (x *CodeActionTagOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeActionTriggerKind added in v1.0.0

type CodeActionTriggerKind uint32

CodeActionTriggerKind The reason why code actions were requested.

Since: 3.17.0

const (
	// CodeActionTriggerKindInvoked Code actions were explicitly requested by the user or by an extension.
	CodeActionTriggerKindInvoked CodeActionTriggerKind = 1
	// CodeActionTriggerKindAutomatic Code actions were requested automatically.
	//
	// This typically happens when current selection in a file changes, but can
	// also be triggered when file content changes.
	CodeActionTriggerKindAutomatic CodeActionTriggerKind = 2
)

CodeActionTriggerKind enumeration values.

type CodeDescription added in v0.11.0

type CodeDescription struct {
	// Href An URI to open with more information about the diagnostic error.
	Href uri.URI `json:"href"`
}

CodeDescription Structure to capture a description for an error code.

Since: 3.16.0

func (CodeDescription) MarshalJSONTo added in v1.0.0

func (x CodeDescription) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeDescription) UnmarshalJSONFrom added in v1.0.0

func (x *CodeDescription) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeLens

type CodeLens struct {
	// Range The range in which this code lens is valid. Should only span a single line.
	Range Range `json:"range"`

	// Command The command this code lens represents.
	Command Command `json:"command,omitzero"`

	// Data A data entry field that is preserved on a code lens item between
	// a [CodeLensRequest] and a [CodeLensResolveRequest]
	Data LSPAny `json:"data,omitzero"`
}

CodeLens A code lens represents a Command that should be shown along with source text, like the number of references, a way to run tests, etc.

A code lens is _unresolved_ when no command is associated to it. For performance reasons the creation of a code lens and resolving should be done in two stages.

func (CodeLens) MarshalJSONTo added in v1.0.0

func (x CodeLens) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeLens) UnmarshalJSONFrom added in v1.0.0

func (x *CodeLens) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeLensClientCapabilities added in v0.11.1

type CodeLensClientCapabilities struct {
	// DynamicRegistration Whether code lens supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// ResolveSupport Whether the client supports resolving additional code lens
	// properties via a separate `codeLens/resolve` request.
	//
	// Since: 3.18.0
	ResolveSupport ClientCodeLensResolveOptions `json:"resolveSupport,omitzero"`
}

CodeLensClientCapabilities The client capabilities of a [CodeLensRequest].

func (CodeLensClientCapabilities) MarshalJSONTo added in v1.0.0

func (x CodeLensClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeLensClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *CodeLensClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeLensOptions

type CodeLensOptions struct {
	WorkDoneProgressOptions

	// ResolveProvider Code lens has a resolve provider as well.
	ResolveProvider *bool `json:"resolveProvider,omitzero"`
}

CodeLensOptions Code Lens provider options of a [CodeLensRequest].

func (CodeLensOptions) MarshalJSONTo added in v1.0.0

func (x CodeLensOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeLensOptions) UnmarshalJSONFrom added in v1.0.0

func (x *CodeLensOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeLensParams

type CodeLensParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// TextDocument The document to request code lens for.
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

CodeLensParams The parameters of a [CodeLensRequest].

func (CodeLensParams) MarshalJSONTo added in v1.0.0

func (x CodeLensParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeLensParams) UnmarshalJSONFrom added in v1.0.0

func (x *CodeLensParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeLensRegistrationOptions

type CodeLensRegistrationOptions struct {
	TextDocumentRegistrationOptions
	CodeLensOptions
}

CodeLensRegistrationOptions Registration options for a [CodeLensRequest].

func (CodeLensRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x CodeLensRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CodeLensRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *CodeLensRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CodeLensWorkspaceClientCapabilities added in v0.11.1

type CodeLensWorkspaceClientCapabilities struct {
	// RefreshSupport 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,omitzero"`
}

CodeLensWorkspaceClientCapabilities is defined by the LSP specification.

Since: 3.16.0

func (CodeLensWorkspaceClientCapabilities) MarshalJSONTo added in v1.0.0

func (*CodeLensWorkspaceClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *CodeLensWorkspaceClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type Color

type Color struct {
	// Red The red component of this color in the range [0-1].
	Red float64 `json:"red"`

	// Green The green component of this color in the range [0-1].
	Green float64 `json:"green"`

	// Blue The blue component of this color in the range [0-1].
	Blue float64 `json:"blue"`

	// Alpha The alpha component of this color in the range [0-1].
	Alpha float64 `json:"alpha"`
}

Color Represents a color in RGBA space.

func (Color) MarshalJSONTo added in v1.0.0

func (x Color) MarshalJSONTo(enc *jsontext.Encoder) error

func (*Color) UnmarshalJSONFrom added in v1.0.0

func (x *Color) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ColorInformation

type ColorInformation struct {
	// Range The range in the document where this color appears.
	Range Range `json:"range"`

	// Color The actual color value for this color range.
	Color Color `json:"color"`
}

ColorInformation Represents a color range from a document.

func (ColorInformation) MarshalJSONTo added in v1.0.0

func (x ColorInformation) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ColorInformation) UnmarshalJSONFrom added in v1.0.0

func (x *ColorInformation) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ColorPresentation

type ColorPresentation struct {
	// Label The label of this color presentation. It will be shown on the color
	// picker header. By default this is also the text that is inserted when selecting
	// this color presentation.
	Label string `json:"label"`

	// TextEdit An [TextEdit] which is applied to a document when selecting
	// this presentation for the color.  When `falsy` the [ColorPresentation.label]
	// is used.
	TextEdit TextEdit `json:"textEdit,omitzero"`

	// AdditionalTextEdits An optional array of additional [TextEdit] that are applied when
	// selecting this color presentation. Edits must not overlap with the main [ColorPresentation.textEdit] nor with themselves.
	AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitzero"`
}

ColorPresentation is defined by the LSP specification.

func (ColorPresentation) MarshalJSONTo added in v1.0.0

func (x ColorPresentation) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ColorPresentation) UnmarshalJSONFrom added in v1.0.0

func (x *ColorPresentation) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ColorPresentationParams

type ColorPresentationParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// TextDocument The text document.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Color The color to request presentations for.
	Color Color `json:"color"`

	// Range The range where the color would be inserted. Serves as a context.
	Range Range `json:"range"`
}

ColorPresentationParams Parameters for a [ColorPresentationRequest].

func (ColorPresentationParams) MarshalJSONTo added in v1.0.0

func (x ColorPresentationParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ColorPresentationParams) UnmarshalJSONFrom added in v1.0.0

func (x *ColorPresentationParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ColorProvider added in v1.0.0

type ColorProvider interface {
	// contains filtered or unexported methods
}

ColorProvider is one of: Boolean, *DocumentColorOptions, *DocumentColorRegistrationOptions.

type Command

type Command struct {
	// Title Title of the command, like `save`.
	Title string `json:"title"`

	// Tooltip An optional tooltip.
	//
	// Since: 3.18.0
	Tooltip *string `json:"tooltip,omitzero"`

	// Command The identifier of the actual command handler.
	Command string `json:"command"`

	// Arguments Arguments that the command handler should be
	// invoked with.
	Arguments []LSPAny `json:"arguments,omitzero"`
}

Command Represents a reference to a command. Provides a title which will be used to represent a command in the UI and, optionally, an array of arguments which will be passed to the command handler function when invoked.

func (Command) MarshalJSONTo added in v1.0.0

func (x Command) MarshalJSONTo(enc *jsontext.Encoder) error

func (*Command) UnmarshalJSONFrom added in v1.0.0

func (x *Command) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CommandOrCodeAction added in v1.0.0

type CommandOrCodeAction interface {
	// contains filtered or unexported methods
}

CommandOrCodeAction is one of: *Command, *CodeAction.

type CompletionClientCapabilities added in v1.0.0

type CompletionClientCapabilities struct {
	// DynamicRegistration Whether completion supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// CompletionItem The client supports the following `CompletionItem` specific
	// capabilities.
	CompletionItem *ClientCompletionItemOptions `json:"completionItem,omitzero"`

	// CompletionItemKind The client supports the following completion item kinds.
	CompletionItemKind *ClientCompletionItemOptionsKind `json:"completionItemKind,omitzero"`

	// InsertTextMode 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.17.0
	InsertTextMode InsertTextMode `json:"insertTextMode,omitzero"`

	// ContextSupport The client supports to send additional context information for a
	// `textDocument/completion` request.
	ContextSupport *bool `json:"contextSupport,omitzero"`

	// CompletionList The client supports the following `CompletionList` specific
	// capabilities.
	//
	// Since: 3.17.0
	CompletionList *CompletionListCapabilities `json:"completionList,omitzero"`
}

CompletionClientCapabilities Completion client capabilities

func (CompletionClientCapabilities) MarshalJSONTo added in v1.0.0

func (x CompletionClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CompletionClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *CompletionClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CompletionContext

type CompletionContext struct {
	// TriggerKind How the completion was triggered.
	TriggerKind CompletionTriggerKind `json:"triggerKind"`

	// TriggerCharacter The trigger character (a single character) that has trigger code complete.
	// Is undefined if `triggerKind !== CompletionTriggerKind.TriggerCharacter`
	TriggerCharacter *string `json:"triggerCharacter,omitzero"`
}

CompletionContext Contains additional information about the context in which a completion request is triggered.

func (CompletionContext) MarshalJSONTo added in v1.0.0

func (x CompletionContext) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CompletionContext) UnmarshalJSONFrom added in v1.0.0

func (x *CompletionContext) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CompletionItem

type CompletionItem struct {
	// Label The label of this completion item.
	//
	// The label property is also by default the text that
	// is inserted when selecting this completion.
	//
	// If label details are provided the label itself should
	// be an unqualified name of the completion item.
	Label string `json:"label"`

	// LabelDetails Additional details for the label
	//
	// Since: 3.17.0
	LabelDetails *CompletionItemLabelDetails `json:"labelDetails,omitzero"`

	// Kind The kind of this completion item. Based of the kind
	// an icon is chosen by the editor.
	Kind CompletionItemKind `json:"kind,omitzero"`

	// Tags Tags for this completion item.
	//
	// Since: 3.15.0
	Tags []CompletionItemTag `json:"tags,omitzero"`

	// Detail A human-readable string with additional information
	// about this item, like type or symbol information.
	Detail Optional[string] `json:"detail,omitzero"`

	// Documentation A human-readable string that represents a doc-comment.
	Documentation InlayHintTooltip `json:"documentation,omitzero"`

	// Deprecated Indicates if this item is deprecated.
	//
	// Deprecated: Use `tags` instead.
	Deprecated Optional[bool] `json:"deprecated,omitzero"`

	// Preselect Select this item when showing.
	//
	// *Note* that only one completion item can be selected and that the
	// tool / client decides which item that is. The rule is that the *first*
	// item of those that match best is selected.
	Preselect Optional[bool] `json:"preselect,omitzero"`

	// SortText A string that should be used when comparing this item
	// with other items. When `falsy` the [CompletionItem.label]
	// is used.
	SortText Optional[string] `json:"sortText,omitzero"`

	// FilterText A string that should be used when filtering a set of
	// completion items. When `falsy` the [CompletionItem.label]
	// is used.
	FilterText Optional[string] `json:"filterText,omitzero"`

	// InsertText A string that should be inserted into a document when selecting
	// this completion. When `falsy` the [CompletionItem.label]
	// is used.
	//
	// The `insertText` is subject to interpretation by the client side.
	// Some tools might not take the string literally. For example
	// VS Code when code complete is requested in this example
	// `con<cursor position>` and a completion item with an `insertText` of
	// `console` is provided it will only insert `sole`. Therefore it is
	// recommended to use `textEdit` instead since it avoids additional client
	// side interpretation.
	InsertText Optional[string] `json:"insertText,omitzero"`

	// InsertTextFormat The format of the insert text. The format applies to both the
	// `insertText` property and the `newText` property of a provided
	// `textEdit`. If omitted defaults to `InsertTextFormat.PlainText`.
	//
	// Please note that the insertTextFormat doesn't apply to
	// `additionalTextEdits`.
	InsertTextFormat InsertTextFormat `json:"insertTextFormat,omitzero"`

	// InsertTextMode How whitespace and indentation is handled during completion
	// item insertion. If not provided the clients default value depends on
	// the `textDocument.completion.insertTextMode` client capability.
	//
	// Since: 3.16.0
	InsertTextMode InsertTextMode `json:"insertTextMode,omitzero"`

	// TextEdit An [TextEdit] which is applied to a document when selecting
	// this completion. When an edit is provided the value of
	// [CompletionItem.insertText] is ignored.
	//
	// Most editors support two different operations when accepting a completion
	// item. One is to insert a completion text and the other is to replace an
	// existing text with a completion text. Since this can usually not be
	// predetermined by a server it can report both ranges. Clients need to
	// signal support for `InsertReplaceEdits` via the
	// `textDocument.completion.insertReplaceSupport` client capability
	// property.
	//
	// *Note 1:* The text edit's range as well as both ranges from an insert
	// replace edit must be a [single line] and they must contain the position
	// at which completion has been requested.
	// *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.
	//
	// additional type `InsertReplaceEdit`
	//
	// Since: 3.16.0 additional type `InsertReplaceEdit`
	TextEdit CompletionItemTextEdit `json:"textEdit,omitzero"`

	// TextEditText The edit text used if the completion item is part of a CompletionList and
	// CompletionList defines an item default for the text edit range.
	//
	// Clients will only honor this property if they opt into completion list
	// item defaults using the capability `completionList.itemDefaults`.
	//
	// If not provided and a list's default range is provided the label
	// property is used as a text.
	//
	// Since: 3.17.0
	TextEditText Optional[string] `json:"textEditText,omitzero"`

	// AdditionalTextEdits An optional array of additional [TextEdit] that are applied when
	// selecting this completion. Edits must not overlap (including the same insert position)
	// with the main [CompletionItem.textEdit] nor with themselves.
	//
	// Additional text edits should be used to change text unrelated to the current cursor position
	// (for example adding an import statement at the top of the file if the completion item will
	// insert an unqualified type).
	AdditionalTextEdits []TextEdit `json:"additionalTextEdits,omitzero"`

	// CommitCharacters An optional set of characters that when pressed while this completion is active will accept it first and
	// then type that character. *Note* that all commit characters should have `length=1` and that superfluous
	// characters will be ignored.
	CommitCharacters []string `json:"commitCharacters,omitzero"`

	// Command An optional [Command] that is executed *after* inserting this completion. *Note* that
	// additional modifications to the current document should be described with the
	// [CompletionItem.additionalTextEdits]-property.
	Command Command `json:"command,omitzero"`

	// Data A data entry field that is preserved on a completion item between a
	// [CompletionRequest] and a [CompletionResolveRequest].
	Data LSPAny `json:"data,omitzero"`
}

CompletionItem A completion item represents a text snippet that is proposed to complete text that is being typed.

func (CompletionItem) MarshalJSONTo added in v1.0.0

func (x CompletionItem) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CompletionItem) UnmarshalJSONFrom added in v1.0.0

func (x *CompletionItem) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CompletionItemApplyKinds added in v1.0.0

type CompletionItemApplyKinds struct {
	// CommitCharacters Specifies whether commitCharacters on a completion will replace or be
	// merged with those in `completionList.itemDefaults.commitCharacters`.
	//
	// If ApplyKind.Replace, the commit characters from the completion item will
	// always be used unless not provided, in which case those from
	// `completionList.itemDefaults.commitCharacters` will be used. An
	// empty list can be used if a completion item does not have any commit
	// characters and also should not use those from
	// `completionList.itemDefaults.commitCharacters`.
	//
	// If ApplyKind.Merge the commitCharacters for the completion will be the
	// union of all values in both `completionList.itemDefaults.commitCharacters`
	// and the completion's own `commitCharacters`.
	//
	// Since: 3.18.0
	CommitCharacters ApplyKind `json:"commitCharacters,omitzero"`

	// Data Specifies whether the `data` field on a completion will replace or
	// be merged with data from `completionList.itemDefaults.data`.
	//
	// If ApplyKind.Replace, the data from the completion item will be used if
	// provided (and not `null`), otherwise
	// `completionList.itemDefaults.data` will be used. An empty object can
	// be used if a completion item does not have any data but also should
	// not use the value from `completionList.itemDefaults.data`.
	//
	// If ApplyKind.Merge, a shallow merge will be performed between
	// `completionList.itemDefaults.data` and the completion's own data
	// using the following rules:
	//
	// - If a completion's `data` field is not provided (or `null`), the
	//   entire `data` field from `completionList.itemDefaults.data` will be
	//   used as-is.
	// - If a completion's `data` field is provided, each field will
	//   overwrite the field of the same name in
	//   `completionList.itemDefaults.data` but no merging of nested fields
	//   within that value will occur.
	//
	// Since: 3.18.0
	Data ApplyKind `json:"data,omitzero"`
}

CompletionItemApplyKinds Specifies how fields from a completion item should be combined with those from `completionList.itemDefaults`.

If unspecified, all fields will be treated as ApplyKind.Replace.

If a field's value is ApplyKind.Replace, the value from a completion item (if provided and not `null`) will always be used instead of the value from `completionItem.itemDefaults`.

If a field's value is ApplyKind.Merge, the values will be merged using the rules defined against each field below.

Servers are only allowed to return `applyKind` if the client signals support for this via the `completionList.applyKindSupport` capability.

Since: 3.18.0

func (CompletionItemApplyKinds) MarshalJSONTo added in v1.0.0

func (x CompletionItemApplyKinds) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CompletionItemApplyKinds) UnmarshalJSONFrom added in v1.0.0

func (x *CompletionItemApplyKinds) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CompletionItemDefaults added in v1.0.0

type CompletionItemDefaults struct {
	// CommitCharacters A default commit character set.
	//
	// Since: 3.17.0
	CommitCharacters []string `json:"commitCharacters,omitzero"`

	// EditRange A default edit range.
	//
	// Since: 3.17.0
	EditRange CompletionItemDefaultsEditRange `json:"editRange,omitzero"`

	// InsertTextFormat A default insert text format.
	//
	// Since: 3.17.0
	InsertTextFormat InsertTextFormat `json:"insertTextFormat,omitzero"`

	// InsertTextMode A default insert text mode.
	//
	// Since: 3.17.0
	InsertTextMode InsertTextMode `json:"insertTextMode,omitzero"`

	// Data A default data value.
	//
	// Since: 3.17.0
	Data LSPAny `json:"data,omitzero"`
}

CompletionItemDefaults In many cases the items of an actual completion result share the same value for properties like `commitCharacters` or the range of a text edit. A completion list can therefore define item defaults which will be used if a completion item itself doesn't specify the value.

If a completion list specifies a default value and a completion item also specifies a corresponding value, the rules for combining these are defined by `applyKinds` (if the client supports it), defaulting to ApplyKind.Replace.

Servers are only allowed to return default values if the client signals support for this via the `completionList.itemDefaults` capability.

Since: 3.17.0

func (CompletionItemDefaults) MarshalJSONTo added in v1.0.0

func (x CompletionItemDefaults) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CompletionItemDefaults) UnmarshalJSONFrom added in v1.0.0

func (x *CompletionItemDefaults) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CompletionItemDefaultsEditRange added in v1.0.0

type CompletionItemDefaultsEditRange interface {
	// contains filtered or unexported methods
}

CompletionItemDefaultsEditRange is one of: *Range, *EditRangeWithInsertReplace.

type CompletionItemKind

type CompletionItemKind uint32

CompletionItemKind The kind of a completion entry.

const (
	// CompletionItemKindText is defined by the LSP specification.
	CompletionItemKindText CompletionItemKind = 1
	// CompletionItemKindMethod is defined by the LSP specification.
	CompletionItemKindMethod CompletionItemKind = 2
	// CompletionItemKindFunction is defined by the LSP specification.
	CompletionItemKindFunction CompletionItemKind = 3
	// CompletionItemKindConstructor is defined by the LSP specification.
	CompletionItemKindConstructor CompletionItemKind = 4
	// CompletionItemKindField is defined by the LSP specification.
	CompletionItemKindField CompletionItemKind = 5
	// CompletionItemKindVariable is defined by the LSP specification.
	CompletionItemKindVariable CompletionItemKind = 6
	// CompletionItemKindClass is defined by the LSP specification.
	CompletionItemKindClass CompletionItemKind = 7
	// CompletionItemKindInterface is defined by the LSP specification.
	CompletionItemKindInterface CompletionItemKind = 8
	// CompletionItemKindModule is defined by the LSP specification.
	CompletionItemKindModule CompletionItemKind = 9
	// CompletionItemKindProperty is defined by the LSP specification.
	CompletionItemKindProperty CompletionItemKind = 10
	// CompletionItemKindUnit is defined by the LSP specification.
	CompletionItemKindUnit CompletionItemKind = 11
	// CompletionItemKindValue is defined by the LSP specification.
	CompletionItemKindValue CompletionItemKind = 12
	// CompletionItemKindEnum is defined by the LSP specification.
	CompletionItemKindEnum CompletionItemKind = 13
	// CompletionItemKindKeyword is defined by the LSP specification.
	CompletionItemKindKeyword CompletionItemKind = 14
	// CompletionItemKindSnippet is defined by the LSP specification.
	CompletionItemKindSnippet CompletionItemKind = 15
	// CompletionItemKindColor is defined by the LSP specification.
	CompletionItemKindColor CompletionItemKind = 16
	// CompletionItemKindFile is defined by the LSP specification.
	CompletionItemKindFile CompletionItemKind = 17
	// CompletionItemKindReference is defined by the LSP specification.
	CompletionItemKindReference CompletionItemKind = 18
	// CompletionItemKindFolder is defined by the LSP specification.
	CompletionItemKindFolder CompletionItemKind = 19
	// CompletionItemKindEnumMember is defined by the LSP specification.
	CompletionItemKindEnumMember CompletionItemKind = 20
	// CompletionItemKindConstant is defined by the LSP specification.
	CompletionItemKindConstant CompletionItemKind = 21
	// CompletionItemKindStruct is defined by the LSP specification.
	CompletionItemKindStruct CompletionItemKind = 22
	// CompletionItemKindEvent is defined by the LSP specification.
	CompletionItemKindEvent CompletionItemKind = 23
	// CompletionItemKindOperator is defined by the LSP specification.
	CompletionItemKindOperator CompletionItemKind = 24
	// CompletionItemKindTypeParameter is defined by the LSP specification.
	CompletionItemKindTypeParameter CompletionItemKind = 25
)

CompletionItemKind enumeration values.

type CompletionItemLabelDetails added in v1.0.0

type CompletionItemLabelDetails struct {
	// Detail An optional string which is rendered less prominently directly after [CompletionItem.label],
	// without any spacing. Should be used for function signatures and type annotations.
	Detail *string `json:"detail,omitzero"`

	// Description An optional string which is rendered less prominently after [CompletionItem.detail]. Should be used
	// for fully qualified names and file paths.
	Description *string `json:"description,omitzero"`
}

CompletionItemLabelDetails Additional details for a completion item label.

Since: 3.17.0

func (CompletionItemLabelDetails) MarshalJSONTo added in v1.0.0

func (x CompletionItemLabelDetails) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CompletionItemLabelDetails) UnmarshalJSONFrom added in v1.0.0

func (x *CompletionItemLabelDetails) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CompletionItemSlice added in v1.0.0

type CompletionItemSlice []CompletionItem

CompletionItemSlice is a named type so a []CompletionItem arm can satisfy a union interface.

func (CompletionItemSlice) MarshalJSONTo added in v1.0.0

func (x CompletionItemSlice) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CompletionItemSlice) UnmarshalJSONFrom added in v1.0.0

func (x *CompletionItemSlice) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CompletionItemTag added in v0.10.0

type CompletionItemTag uint32

CompletionItemTag Completion item tags are extra annotations that tweak the rendering of a completion item.

Since: 3.15.0

const (
	// CompletionItemTagDeprecated Render a completion as obsolete, usually using a strike-out.
	CompletionItemTagDeprecated CompletionItemTag = 1
)

CompletionItemTag enumeration values.

type CompletionItemTagOptions added in v1.0.0

type CompletionItemTagOptions struct {
	// ValueSet The tags supported by the client.
	ValueSet []CompletionItemTag `json:"valueSet"`
}

CompletionItemTagOptions is defined by the LSP specification.

Since: 3.18.0

func (CompletionItemTagOptions) MarshalJSONTo added in v1.0.0

func (x CompletionItemTagOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CompletionItemTagOptions) UnmarshalJSONFrom added in v1.0.0

func (x *CompletionItemTagOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CompletionItemTextEdit added in v1.0.0

type CompletionItemTextEdit interface {
	// contains filtered or unexported methods
}

CompletionItemTextEdit is one of: *TextEdit, *InsertReplaceEdit.

type CompletionList

type CompletionList struct {
	// IsIncomplete This list it not complete. Further typing results in recomputing this list.
	//
	// Recomputed lists have all their items replaced (not appended) in the
	// incomplete completion sessions.
	IsIncomplete bool `json:"isIncomplete"`

	// ItemDefaults In many cases the items of an actual completion result share the same
	// value for properties like `commitCharacters` or the range of a text
	// edit. A completion list can therefore define item defaults which will
	// be used if a completion item itself doesn't specify the value.
	//
	// If a completion list specifies a default value and a completion item
	// also specifies a corresponding value, the rules for combining these are
	// defined by `applyKinds` (if the client supports it), defaulting to
	// ApplyKind.Replace.
	//
	// Servers are only allowed to return default values if the client
	// signals support for this via the `completionList.itemDefaults`
	// capability.
	//
	// Since: 3.17.0
	ItemDefaults *CompletionItemDefaults `json:"itemDefaults,omitzero"`

	// ApplyKind Specifies how fields from a completion item should be combined with those
	// from `completionList.itemDefaults`.
	//
	// If unspecified, all fields will be treated as ApplyKind.Replace.
	//
	// If a field's value is ApplyKind.Replace, the value from a completion item
	// (if provided and not `null`) will always be used instead of the value
	// from `completionItem.itemDefaults`.
	//
	// If a field's value is ApplyKind.Merge, the values will be merged using
	// the rules defined against each field below.
	//
	// Servers are only allowed to return `applyKind` if the client
	// signals support for this via the `completionList.applyKindSupport`
	// capability.
	//
	// Since: 3.18.0
	ApplyKind *CompletionItemApplyKinds `json:"applyKind,omitzero"`

	// Items The completion items.
	Items []CompletionItem `json:"items"`
}

CompletionList Represents a collection of CompletionItem to be presented in the editor.

func (CompletionList) MarshalJSONTo added in v1.0.0

func (x CompletionList) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CompletionList) UnmarshalJSONFrom added in v1.0.0

func (x *CompletionList) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CompletionListCapabilities added in v1.0.0

type CompletionListCapabilities struct {
	// ItemDefaults The client supports the following itemDefaults on
	// a completion list.
	//
	// The value lists the supported property names of the
	// `CompletionList.itemDefaults` object. If omitted
	// no properties are supported.
	//
	// Since: 3.17.0
	ItemDefaults []string `json:"itemDefaults,omitzero"`

	// ApplyKindSupport Specifies whether the client supports `CompletionList.applyKind` to
	// indicate how supported values from `completionList.itemDefaults`
	// and `completion` will be combined.
	//
	// If a client supports `applyKind` it must support it for all fields
	// that it supports that are listed in `CompletionList.applyKind`. This
	// means when clients add support for new/future fields in completion
	// items the MUST also support merge for them if those fields are
	// defined in `CompletionList.applyKind`.
	//
	// Since: 3.18.0
	ApplyKindSupport *bool `json:"applyKindSupport,omitzero"`
}

CompletionListCapabilities The client supports the following `CompletionList` specific capabilities.

Since: 3.17.0

func (CompletionListCapabilities) MarshalJSONTo added in v1.0.0

func (x CompletionListCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CompletionListCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *CompletionListCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CompletionOptions

type CompletionOptions struct {
	WorkDoneProgressOptions

	// TriggerCharacters Most tools trigger completion request automatically without explicitly requesting
	// it using a keyboard shortcut (e.g. Ctrl+Space). Typically they do so when the user
	// starts to type an identifier. For example if the user types `c` in a JavaScript file
	// code complete will automatically pop up present `console` besides others as a
	// completion item. Characters that make up identifiers don't need to be listed here.
	//
	// If code complete should automatically be trigger on characters not being valid inside
	// an identifier (for example `.` in JavaScript) list them in `triggerCharacters`.
	TriggerCharacters []string `json:"triggerCharacters,omitzero"`

	// AllCommitCharacters The list of all possible characters that commit a completion. This field can be used
	// 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
	// completion item the ones on the completion item win.
	//
	// Since: 3.2.0
	AllCommitCharacters []string `json:"allCommitCharacters,omitzero"`

	// ResolveProvider The server provides support to resolve additional
	// information for a completion item.
	ResolveProvider *bool `json:"resolveProvider,omitzero"`

	// CompletionItem The server supports the following `CompletionItem` specific
	// capabilities.
	//
	// Since: 3.17.0
	CompletionItem *ServerCompletionItemOptions `json:"completionItem,omitzero"`
}

CompletionOptions Completion options.

func (CompletionOptions) MarshalJSONTo added in v1.0.0

func (x CompletionOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CompletionOptions) UnmarshalJSONFrom added in v1.0.0

func (x *CompletionOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CompletionParams

type CompletionParams struct {
	TextDocumentPositionParams
	WorkDoneProgressParams
	PartialResultParams

	// Context The completion context. This is only available it the client specifies
	// to send this using the client capability `textDocument.completion.contextSupport === true`
	Context CompletionContext `json:"context,omitzero"`
}

CompletionParams Completion parameters

func (CompletionParams) MarshalJSONTo added in v1.0.0

func (x CompletionParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CompletionParams) UnmarshalJSONFrom added in v1.0.0

func (x *CompletionParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CompletionRegistrationOptions

type CompletionRegistrationOptions struct {
	TextDocumentRegistrationOptions
	CompletionOptions
}

CompletionRegistrationOptions Registration options for a [CompletionRequest].

func (CompletionRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x CompletionRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CompletionRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *CompletionRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CompletionResult added in v1.0.0

type CompletionResult interface {
	// contains filtered or unexported methods
}

CompletionResult is one of: CompletionItemSlice, *CompletionList.

type CompletionTriggerKind

type CompletionTriggerKind uint32

CompletionTriggerKind How a completion was triggered

const (
	// CompletionTriggerKindInvoked Completion was triggered by typing an identifier (24x7 code
	// complete), manual invocation (e.g Ctrl+Space) or via API.
	CompletionTriggerKindInvoked CompletionTriggerKind = 1
	// CompletionTriggerKindTriggerCharacter Completion was triggered by a trigger character specified by
	// the `triggerCharacters` properties of the `CompletionRegistrationOptions`.
	CompletionTriggerKindTriggerCharacter CompletionTriggerKind = 2
	// CompletionTriggerKindTriggerForIncompleteCompletions Completion was re-triggered as current completion list is incomplete
	CompletionTriggerKindTriggerForIncompleteCompletions CompletionTriggerKind = 3
)

CompletionTriggerKind enumeration values.

type ConfigurationItem

type ConfigurationItem struct {
	// ScopeURI The scope to get the configuration section for.
	ScopeURI *uri.URI `json:"scopeUri,omitzero"`

	// Section The configuration section asked for.
	Section *string `json:"section,omitzero"`
}

ConfigurationItem is defined by the LSP specification.

func (ConfigurationItem) MarshalJSONTo added in v1.0.0

func (x ConfigurationItem) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ConfigurationItem) UnmarshalJSONFrom added in v1.0.0

func (x *ConfigurationItem) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ConfigurationParams

type ConfigurationParams struct {
	// Items is defined by the LSP specification.
	Items []ConfigurationItem `json:"items"`
}

ConfigurationParams The parameters of a configuration request.

func (ConfigurationParams) MarshalJSONTo added in v1.0.0

func (x ConfigurationParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ConfigurationParams) UnmarshalJSONFrom added in v1.0.0

func (x *ConfigurationParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CreateFile

type CreateFile struct {
	ResourceOperation

	// Kind A create
	Kind string `json:"kind"`

	// URI The resource to create.
	URI uri.URI `json:"uri"`

	// Options Additional options
	Options *CreateFileOptions `json:"options,omitzero"`
}

CreateFile Create file operation.

func (CreateFile) MarshalJSONTo added in v1.0.0

func (x CreateFile) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CreateFile) UnmarshalJSONFrom added in v1.0.0

func (x *CreateFile) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CreateFileOptions

type CreateFileOptions struct {
	// Overwrite Overwrite existing file. Overwrite wins over `ignoreIfExists`
	Overwrite *bool `json:"overwrite,omitzero"`

	// IgnoreIfExists Ignore if exists.
	IgnoreIfExists *bool `json:"ignoreIfExists,omitzero"`
}

CreateFileOptions Options to create a file.

func (CreateFileOptions) MarshalJSONTo added in v1.0.0

func (x CreateFileOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CreateFileOptions) UnmarshalJSONFrom added in v1.0.0

func (x *CreateFileOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type CreateFilesParams added in v0.11.0

type CreateFilesParams struct {
	// Files An array of all files/folders created in this operation.
	Files []FileCreate `json:"files"`
}

CreateFilesParams The parameters sent in notifications/requests for user-initiated creation of files.

Since: 3.16.0

func (CreateFilesParams) MarshalJSONTo added in v1.0.0

func (x CreateFilesParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*CreateFilesParams) UnmarshalJSONFrom added in v1.0.0

func (x *CreateFilesParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type Declaration added in v1.0.0

type Declaration interface {
	// contains filtered or unexported methods
}

Definition The definition of a symbol represented as one or many Location. For most programming languages there is only one location at which a symbol is defined.

Servers should prefer returning `DefinitionLink` over `Definition` if supported by the client.

type DeclarationClientCapabilities added in v1.0.0

type DeclarationClientCapabilities struct {
	// DynamicRegistration Whether declaration supports dynamic registration. If this is set to `true`
	// the client supports the new `DeclarationRegistrationOptions` return value
	// for the corresponding server capability as well.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// LinkSupport The client supports additional metadata in the form of declaration links.
	LinkSupport *bool `json:"linkSupport,omitzero"`
}

DeclarationClientCapabilities is defined by the LSP specification.

Since: 3.14.0

func (DeclarationClientCapabilities) MarshalJSONTo added in v1.0.0

func (x DeclarationClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DeclarationClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *DeclarationClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DeclarationLink LocationLink

DeclarationLink Information about where a symbol is declared.

Provides additional metadata over normal Location declarations, including the range of the declaring symbol.

Servers should prefer returning `DeclarationLink` over `Declaration` if supported by the client.

type DeclarationLinkSlice added in v1.0.0

type DeclarationLinkSlice []DeclarationLink

DeclarationLinkSlice is a named type so a []DeclarationLink arm can satisfy a union interface.

func (DeclarationLinkSlice) MarshalJSONTo added in v1.0.0

func (x DeclarationLinkSlice) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DeclarationLinkSlice) UnmarshalJSONFrom added in v1.0.0

func (x *DeclarationLinkSlice) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DeclarationOptions added in v0.10.0

type DeclarationOptions struct {
	WorkDoneProgressOptions
}

DeclarationOptions is defined by the LSP specification.

func (DeclarationOptions) MarshalJSONTo added in v1.0.0

func (x DeclarationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DeclarationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DeclarationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DeclarationParams added in v0.10.0

DeclarationParams is defined by the LSP specification.

func (DeclarationParams) MarshalJSONTo added in v1.0.0

func (x DeclarationParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DeclarationParams) UnmarshalJSONFrom added in v1.0.0

func (x *DeclarationParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DeclarationProvider added in v1.0.0

type DeclarationProvider interface {
	// contains filtered or unexported methods
}

DeclarationProvider is one of: Boolean, *DeclarationOptions, *DeclarationRegistrationOptions.

type DeclarationRegistrationOptions added in v0.10.0

type DeclarationRegistrationOptions struct {
	DeclarationOptions
	TextDocumentRegistrationOptions
	StaticRegistrationOptions
}

DeclarationRegistrationOptions is defined by the LSP specification.

func (DeclarationRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x DeclarationRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DeclarationRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DeclarationRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DeclarationResult added in v1.0.0

type DeclarationResult interface {
	// contains filtered or unexported methods
}

DeclarationResult is one of: *Location, LocationSlice, DeclarationLinkSlice.

type DefinitionClientCapabilities added in v1.0.0

type DefinitionClientCapabilities struct {
	// DynamicRegistration Whether definition supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// LinkSupport The client supports additional metadata in the form of definition links.
	//
	// Since: 3.14.0
	LinkSupport *bool `json:"linkSupport,omitzero"`
}

DefinitionClientCapabilities Client Capabilities for a [DefinitionRequest].

func (DefinitionClientCapabilities) MarshalJSONTo added in v1.0.0

func (x DefinitionClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DefinitionClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *DefinitionClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DefinitionLink LocationLink

DefinitionLink Information about where a symbol is defined.

Provides additional metadata over normal Location definitions, including the range of the defining symbol

type DefinitionLinkSlice added in v1.0.0

type DefinitionLinkSlice []DefinitionLink

DefinitionLinkSlice is a named type so a []DefinitionLink arm can satisfy a union interface.

func (DefinitionLinkSlice) MarshalJSONTo added in v1.0.0

func (x DefinitionLinkSlice) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DefinitionLinkSlice) UnmarshalJSONFrom added in v1.0.0

func (x *DefinitionLinkSlice) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DefinitionOptions added in v0.10.0

type DefinitionOptions struct {
	WorkDoneProgressOptions
}

DefinitionOptions Server Capabilities for a [DefinitionRequest].

func (DefinitionOptions) MarshalJSONTo added in v1.0.0

func (x DefinitionOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DefinitionOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DefinitionOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DefinitionParams added in v0.10.0

DefinitionParams Parameters for a [DefinitionRequest].

func (DefinitionParams) MarshalJSONTo added in v1.0.0

func (x DefinitionParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DefinitionParams) UnmarshalJSONFrom added in v1.0.0

func (x *DefinitionParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DefinitionProvider added in v1.0.0

type DefinitionProvider interface {
	// contains filtered or unexported methods
}

DefinitionProvider is one of: Boolean, *DefinitionOptions.

type DefinitionRegistrationOptions added in v1.0.0

type DefinitionRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DefinitionOptions
}

DefinitionRegistrationOptions Registration options for a [DefinitionRequest].

func (DefinitionRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x DefinitionRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DefinitionRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DefinitionRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DefinitionResult added in v1.0.0

type DefinitionResult interface {
	// contains filtered or unexported methods
}

DefinitionResult is one of: *Location, LocationSlice, DefinitionLinkSlice.

type DeleteFile

type DeleteFile struct {
	ResourceOperation

	// Kind A delete
	Kind string `json:"kind"`

	// URI The file to delete.
	URI uri.URI `json:"uri"`

	// Options Delete options.
	Options *DeleteFileOptions `json:"options,omitzero"`
}

DeleteFile Delete file operation

func (DeleteFile) MarshalJSONTo added in v1.0.0

func (x DeleteFile) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DeleteFile) UnmarshalJSONFrom added in v1.0.0

func (x *DeleteFile) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DeleteFileOptions

type DeleteFileOptions struct {
	// Recursive Delete the content recursively if a folder is denoted.
	Recursive *bool `json:"recursive,omitzero"`

	// IgnoreIfNotExists Ignore the operation if the file doesn't exist.
	IgnoreIfNotExists *bool `json:"ignoreIfNotExists,omitzero"`
}

DeleteFileOptions Delete file options

func (DeleteFileOptions) MarshalJSONTo added in v1.0.0

func (x DeleteFileOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DeleteFileOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DeleteFileOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DeleteFilesParams added in v0.11.0

type DeleteFilesParams struct {
	// Files An array of all files/folders deleted in this operation.
	Files []FileDelete `json:"files"`
}

DeleteFilesParams The parameters sent in notifications/requests for user-initiated deletes of files.

Since: 3.16.0

func (DeleteFilesParams) MarshalJSONTo added in v1.0.0

func (x DeleteFilesParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DeleteFilesParams) UnmarshalJSONFrom added in v1.0.0

func (x *DeleteFilesParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type Diagnostic

type Diagnostic struct {
	// Range The range at which the message applies
	Range Range `json:"range"`

	// Severity The diagnostic's severity. To avoid interpretation mismatches when a
	// server is used with different clients it is highly recommended that servers
	// always provide a severity value.
	Severity DiagnosticSeverity `json:"severity,omitzero"`

	// Code The diagnostic's code, which usually appear in the user interface.
	Code ProgressToken `json:"code,omitzero"`

	// CodeDescription An optional property to describe the error code.
	// Requires the code field (above) to be present/not null.
	//
	// Since: 3.16.0
	CodeDescription CodeDescription `json:"codeDescription,omitzero"`

	// Source A human-readable string describing the source of this
	// diagnostic, e.g. 'typescript' or 'super lint'. It usually
	// appears in the user interface.
	Source Optional[string] `json:"source,omitzero"`

	// Message The diagnostic's message. It usually appears in the user interface.
	//
	// support for MarkupContent. This is guarded by the client
	// capability `textDocument.diagnostic.markupMessageSupport`.
	//
	// Since: 3.18.0 - support for MarkupContent. This is guarded by the client
	// capability `textDocument.diagnostic.markupMessageSupport`.
	Message InlayHintTooltip `json:"message"`

	// Tags Additional metadata about the diagnostic.
	//
	// Since: 3.15.0
	Tags DiagnosticTags `json:"tags,omitzero"`

	// RelatedInformation An array of related diagnostic information, e.g. when symbol-names within
	// a scope collide all definitions can be marked via this property.
	RelatedInformation []DiagnosticRelatedInformation `json:"relatedInformation,omitzero"`

	// Data A data entry field that is preserved between a `textDocument/publishDiagnostics`
	// notification and `textDocument/codeAction` request.
	//
	// Since: 3.16.0
	Data LSPAny `json:"data,omitzero"`
}

Diagnostic Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.

func (Diagnostic) MarshalJSONTo added in v1.0.0

func (x Diagnostic) MarshalJSONTo(enc *jsontext.Encoder) error

func (*Diagnostic) UnmarshalJSONFrom added in v1.0.0

func (x *Diagnostic) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DiagnosticClientCapabilities added in v1.0.0

type DiagnosticClientCapabilities struct {
	DiagnosticsCapabilities

	// DynamicRegistration 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,omitzero"`

	// RelatedDocumentSupport Whether the clients supports related documents for document diagnostic pulls.
	RelatedDocumentSupport *bool `json:"relatedDocumentSupport,omitzero"`

	// MarkupMessageSupport Whether the client supports `MarkupContent` in diagnostic messages.
	//
	// Since: 3.18.0
	MarkupMessageSupport *bool `json:"markupMessageSupport,omitzero"`
}

DiagnosticClientCapabilities Client capabilities specific to diagnostic pull requests.

Since: 3.17.0

func (DiagnosticClientCapabilities) MarshalJSONTo added in v1.0.0

func (x DiagnosticClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DiagnosticClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *DiagnosticClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DiagnosticOptions added in v1.0.0

type DiagnosticOptions struct {
	WorkDoneProgressOptions

	// Identifier An optional identifier under which the diagnostics are
	// managed by the client.
	Identifier *string `json:"identifier,omitzero"`

	// InterFileDependencies Whether the language has inter file dependencies meaning that
	// editing code in one file can result in a different diagnostic
	// set in another file. Inter file dependencies are common for
	// most programming languages and typically uncommon for linters.
	InterFileDependencies bool `json:"interFileDependencies"`

	// WorkspaceDiagnostics The server provides support for workspace diagnostics as well.
	WorkspaceDiagnostics bool `json:"workspaceDiagnostics"`
}

DiagnosticOptions Diagnostic options.

Since: 3.17.0

func (DiagnosticOptions) MarshalJSONTo added in v1.0.0

func (x DiagnosticOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DiagnosticOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DiagnosticOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DiagnosticProvider added in v1.0.0

type DiagnosticProvider interface {
	// contains filtered or unexported methods
}

DiagnosticProvider is one of: *DiagnosticOptions, *DiagnosticRegistrationOptions.

type DiagnosticRegistrationOptions added in v1.0.0

type DiagnosticRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DiagnosticOptions
	StaticRegistrationOptions
}

DiagnosticRegistrationOptions Diagnostic registration options.

Since: 3.17.0

func (DiagnosticRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x DiagnosticRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DiagnosticRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DiagnosticRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DiagnosticRelatedInformation

type DiagnosticRelatedInformation struct {
	// Location The location of this related diagnostic information.
	Location Location `json:"location"`

	// Message The message of this related diagnostic information.
	Message string `json:"message"`
}

DiagnosticRelatedInformation Represents a related message and source code location for a diagnostic. This should be used to point to code locations that cause or related to a diagnostics, e.g when duplicating a symbol in a scope.

func (DiagnosticRelatedInformation) MarshalJSONTo added in v1.0.0

func (x DiagnosticRelatedInformation) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DiagnosticRelatedInformation) UnmarshalJSONFrom added in v1.0.0

func (x *DiagnosticRelatedInformation) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DiagnosticServerCancellationData added in v1.0.0

type DiagnosticServerCancellationData struct {
	// RetriggerRequest is defined by the LSP specification.
	RetriggerRequest bool `json:"retriggerRequest"`
}

DiagnosticServerCancellationData Cancellation data returned from a diagnostic request.

Since: 3.17.0

func (DiagnosticServerCancellationData) MarshalJSONTo added in v1.0.0

func (*DiagnosticServerCancellationData) UnmarshalJSONFrom added in v1.0.0

func (x *DiagnosticServerCancellationData) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DiagnosticSeverity

type DiagnosticSeverity uint32

DiagnosticSeverity The diagnostic's severity.

const (
	// DiagnosticSeverityError Reports an error.
	DiagnosticSeverityError DiagnosticSeverity = 1
	// DiagnosticSeverityWarning Reports a warning.
	DiagnosticSeverityWarning DiagnosticSeverity = 2
	// DiagnosticSeverityInformation Reports an information.
	DiagnosticSeverityInformation DiagnosticSeverity = 3
	// DiagnosticSeverityHint Reports a hint.
	DiagnosticSeverityHint DiagnosticSeverity = 4
)

DiagnosticSeverity enumeration values.

type DiagnosticTag added in v0.10.0

type DiagnosticTag uint32

DiagnosticTag The diagnostic tags.

Since: 3.15.0

const (
	// DiagnosticTagUnnecessary Unused or unnecessary code.
	//
	// Clients are allowed to render diagnostics with this tag faded out instead of having
	// an error squiggle.
	DiagnosticTagUnnecessary DiagnosticTag = 1
	// DiagnosticTagDeprecated Deprecated or obsolete code.
	//
	// Clients are allowed to rendered diagnostics with this tag strike through.
	DiagnosticTagDeprecated DiagnosticTag = 2
)

DiagnosticTag enumeration values.

type DiagnosticTags added in v1.0.0

type DiagnosticTags struct {
	// contains filtered or unexported fields
}

DiagnosticTags stores the common zero-or-one DiagnosticTag case without a backing-array allocation. The public representation intentionally differs from []DiagnosticTag on hot Diagnostic payloads; callers that need slice semantics can use Slice or Set.

func NewDiagnosticTags added in v1.0.0

func NewDiagnosticTags(tags ...DiagnosticTag) DiagnosticTags

NewDiagnosticTags returns a compact DiagnosticTags value initialized from tags.

func (*DiagnosticTags) Clear added in v1.0.0

func (t *DiagnosticTags) Clear()

Clear removes all diagnostic tags.

func (DiagnosticTags) IsZero added in v1.0.0

func (t DiagnosticTags) IsZero() bool

IsZero reports whether there are no tags, driving the generated omitzero behavior for Diagnostic.tags.

func (DiagnosticTags) Len added in v1.0.0

func (t DiagnosticTags) Len() int

Len reports the number of diagnostic tags.

func (DiagnosticTags) MarshalJSONTo added in v1.0.0

func (t DiagnosticTags) MarshalJSONTo(enc *jsontext.Encoder) error

MarshalJSONTo implements json.MarshalerTo.

func (*DiagnosticTags) Set added in v1.0.0

func (t *DiagnosticTags) Set(tags []DiagnosticTag)

Set replaces the tags with a copy of tags.

func (DiagnosticTags) Slice added in v1.0.0

func (t DiagnosticTags) Slice() []DiagnosticTag

Slice returns the diagnostic tags as a new slice owned by the caller.

func (*DiagnosticTags) UnmarshalJSONFrom added in v1.0.0

func (t *DiagnosticTags) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements json.UnmarshalerFrom, decoding in place on the caller's decoder instead of constructing a fresh one per field.

type DiagnosticWorkspaceClientCapabilities added in v1.0.0

type DiagnosticWorkspaceClientCapabilities struct {
	// RefreshSupport 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
	// pulled diagnostics currently shown. It should be used with absolute care and
	// is useful for situation where a server for example detects a project wide
	// change that requires such a calculation.
	RefreshSupport *bool `json:"refreshSupport,omitzero"`
}

DiagnosticWorkspaceClientCapabilities Workspace client capabilities specific to diagnostic pull requests.

Since: 3.17.0

func (DiagnosticWorkspaceClientCapabilities) MarshalJSONTo added in v1.0.0

func (*DiagnosticWorkspaceClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *DiagnosticWorkspaceClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DiagnosticsCapabilities added in v1.0.0

type DiagnosticsCapabilities struct {
	// RelatedInformation Whether the clients accepts diagnostics with related information.
	RelatedInformation *bool `json:"relatedInformation,omitzero"`

	// TagSupport Client supports the tag property to provide meta data about a diagnostic.
	// Clients supporting tags have to handle unknown tags gracefully.
	//
	// Since: 3.15.0
	TagSupport ClientDiagnosticsTagOptions `json:"tagSupport,omitzero"`

	// CodeDescriptionSupport Client supports a codeDescription property
	//
	// Since: 3.16.0
	CodeDescriptionSupport *bool `json:"codeDescriptionSupport,omitzero"`

	// DataSupport Whether code action supports the `data` property which is
	// preserved between a `textDocument/publishDiagnostics` and
	// `textDocument/codeAction` request.
	//
	// Since: 3.16.0
	DataSupport *bool `json:"dataSupport,omitzero"`
}

DiagnosticsCapabilities General diagnostics capabilities for pull and push model.

func (DiagnosticsCapabilities) MarshalJSONTo added in v1.0.0

func (x DiagnosticsCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DiagnosticsCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *DiagnosticsCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidChangeConfigurationClientCapabilities added in v1.0.0

type DidChangeConfigurationClientCapabilities struct {
	// DynamicRegistration Did change configuration notification supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`
}

DidChangeConfigurationClientCapabilities is defined by the LSP specification.

func (DidChangeConfigurationClientCapabilities) MarshalJSONTo added in v1.0.0

func (*DidChangeConfigurationClientCapabilities) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidChangeConfigurationParams

type DidChangeConfigurationParams struct {
	// Settings The actual changed settings
	Settings LSPAny `json:"settings"`
}

DidChangeConfigurationParams The parameters of a change configuration notification.

func (DidChangeConfigurationParams) MarshalJSONTo added in v1.0.0

func (x DidChangeConfigurationParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DidChangeConfigurationParams) UnmarshalJSONFrom added in v1.0.0

func (x *DidChangeConfigurationParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidChangeConfigurationRegistrationOptions added in v1.0.0

type DidChangeConfigurationRegistrationOptions struct {
	// Section is defined by the LSP specification.
	Section DidChangeConfigurationRegistrationOptionsSection `json:"section,omitzero"`
}

DidChangeConfigurationRegistrationOptions is defined by the LSP specification.

func (DidChangeConfigurationRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*DidChangeConfigurationRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidChangeConfigurationRegistrationOptionsSection added in v1.0.0

type DidChangeConfigurationRegistrationOptionsSection interface {
	// contains filtered or unexported methods
}

DidChangeConfigurationRegistrationOptionsSection is one of: String, StringSlice.

type DidChangeNotebookDocumentParams added in v1.0.0

type DidChangeNotebookDocumentParams struct {
	// NotebookDocument The notebook document that did change. The version number points
	// to the version after all provided changes have been applied. If
	// only the text document content of a cell changes the notebook version
	// doesn't necessarily have to change.
	NotebookDocument VersionedNotebookDocumentIdentifier `json:"notebookDocument"`

	// Change The actual changes to the notebook document.
	//
	// The changes describe single state changes to the notebook document.
	// So if there are two changes c1 (at array index 0) and c2 (at array
	// index 1) for a notebook in state S then c1 moves the notebook from
	// S to S' and c2 from S' to S”. So c1 is computed on the state S and
	// c2 is computed on the state S'.
	//
	// To mirror the content of a notebook using change events use the following approach:
	// - start with the same initial content
	// - apply the 'notebookDocument/didChange' notifications in the order you receive them.
	// - apply the `NotebookChangeEvent`s in a single notification in the order
	//   you receive them.
	Change NotebookDocumentChangeEvent `json:"change"`
}

DidChangeNotebookDocumentParams The params sent in a change notebook document notification.

Since: 3.17.0

func (DidChangeNotebookDocumentParams) MarshalJSONTo added in v1.0.0

func (x DidChangeNotebookDocumentParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DidChangeNotebookDocumentParams) UnmarshalJSONFrom added in v1.0.0

func (x *DidChangeNotebookDocumentParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidChangeTextDocumentParams

type DidChangeTextDocumentParams struct {
	// TextDocument The document that did change. The version number points
	// to the version after all provided content changes have
	// been applied.
	TextDocument VersionedTextDocumentIdentifier `json:"textDocument"`

	// ContentChanges The actual content changes. The content changes describe single state changes
	// to the document. So if there are two content changes c1 (at array index 0) and
	// c2 (at array index 1) for a document in state S then c1 moves the document from
	// S to S' and c2 from S' to S”. So c1 is computed on the state S and c2 is computed
	// on the state S'.
	//
	// 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 receive them.
	// - apply the `TextDocumentContentChangeEvent`s in a single notification in the order
	//   you receive them.
	ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"`
}

DidChangeTextDocumentParams The change text document notification's parameters.

func (DidChangeTextDocumentParams) MarshalJSONTo added in v1.0.0

func (x DidChangeTextDocumentParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DidChangeTextDocumentParams) UnmarshalJSONFrom added in v1.0.0

func (x *DidChangeTextDocumentParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidChangeWatchedFilesClientCapabilities added in v1.0.0

type DidChangeWatchedFilesClientCapabilities struct {
	// DynamicRegistration Did change watched files notification supports dynamic registration. Please note
	// that the current protocol doesn't support static configuration for file changes
	// from the server side.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// RelativePatternSupport Whether the client has support for [RelativePattern]
	// or not.
	//
	// Since: 3.17.0
	RelativePatternSupport *bool `json:"relativePatternSupport,omitzero"`
}

DidChangeWatchedFilesClientCapabilities is defined by the LSP specification.

func (DidChangeWatchedFilesClientCapabilities) MarshalJSONTo added in v1.0.0

func (*DidChangeWatchedFilesClientCapabilities) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidChangeWatchedFilesParams

type DidChangeWatchedFilesParams struct {
	// Changes The actual file events.
	Changes []FileEvent `json:"changes"`
}

DidChangeWatchedFilesParams The watched files change notification's parameters.

func (DidChangeWatchedFilesParams) MarshalJSONTo added in v1.0.0

func (x DidChangeWatchedFilesParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DidChangeWatchedFilesParams) UnmarshalJSONFrom added in v1.0.0

func (x *DidChangeWatchedFilesParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidChangeWatchedFilesRegistrationOptions

type DidChangeWatchedFilesRegistrationOptions struct {
	// Watchers The watchers to register.
	Watchers []FileSystemWatcher `json:"watchers"`
}

DidChangeWatchedFilesRegistrationOptions Describe options to be used when registered for text document change events.

func (DidChangeWatchedFilesRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*DidChangeWatchedFilesRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidChangeWorkspaceFoldersParams

type DidChangeWorkspaceFoldersParams struct {
	// Event The actual workspace folder change event.
	Event WorkspaceFoldersChangeEvent `json:"event"`
}

DidChangeWorkspaceFoldersParams The parameters of a `workspace/didChangeWorkspaceFolders` notification.

func (DidChangeWorkspaceFoldersParams) MarshalJSONTo added in v1.0.0

func (x DidChangeWorkspaceFoldersParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DidChangeWorkspaceFoldersParams) UnmarshalJSONFrom added in v1.0.0

func (x *DidChangeWorkspaceFoldersParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidCloseNotebookDocumentParams added in v1.0.0

type DidCloseNotebookDocumentParams struct {
	// NotebookDocument The notebook document that got closed.
	NotebookDocument NotebookDocumentIdentifier `json:"notebookDocument"`

	// CellTextDocuments The text documents that represent the content
	// of a notebook cell that got closed.
	CellTextDocuments []TextDocumentIdentifier `json:"cellTextDocuments"`
}

DidCloseNotebookDocumentParams The params sent in a close notebook document notification.

Since: 3.17.0

func (DidCloseNotebookDocumentParams) MarshalJSONTo added in v1.0.0

func (x DidCloseNotebookDocumentParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DidCloseNotebookDocumentParams) UnmarshalJSONFrom added in v1.0.0

func (x *DidCloseNotebookDocumentParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidCloseTextDocumentParams

type DidCloseTextDocumentParams struct {
	// TextDocument The document that was closed.
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

DidCloseTextDocumentParams The parameters sent in a close text document notification

func (DidCloseTextDocumentParams) MarshalJSONTo added in v1.0.0

func (x DidCloseTextDocumentParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DidCloseTextDocumentParams) UnmarshalJSONFrom added in v1.0.0

func (x *DidCloseTextDocumentParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidOpenNotebookDocumentParams added in v1.0.0

type DidOpenNotebookDocumentParams struct {
	// NotebookDocument The notebook document that got opened.
	NotebookDocument NotebookDocument `json:"notebookDocument"`

	// CellTextDocuments The text documents that represent the content
	// of a notebook cell.
	CellTextDocuments []TextDocumentItem `json:"cellTextDocuments"`
}

DidOpenNotebookDocumentParams The params sent in an open notebook document notification.

Since: 3.17.0

func (DidOpenNotebookDocumentParams) MarshalJSONTo added in v1.0.0

func (x DidOpenNotebookDocumentParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DidOpenNotebookDocumentParams) UnmarshalJSONFrom added in v1.0.0

func (x *DidOpenNotebookDocumentParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidOpenTextDocumentParams

type DidOpenTextDocumentParams struct {
	// TextDocument The document that was opened.
	TextDocument TextDocumentItem `json:"textDocument"`
}

DidOpenTextDocumentParams The parameters sent in an open text document notification

func (DidOpenTextDocumentParams) MarshalJSONTo added in v1.0.0

func (x DidOpenTextDocumentParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DidOpenTextDocumentParams) UnmarshalJSONFrom added in v1.0.0

func (x *DidOpenTextDocumentParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidSaveNotebookDocumentParams added in v1.0.0

type DidSaveNotebookDocumentParams struct {
	// NotebookDocument The notebook document that got saved.
	NotebookDocument NotebookDocumentIdentifier `json:"notebookDocument"`
}

DidSaveNotebookDocumentParams The params sent in a save notebook document notification.

Since: 3.17.0

func (DidSaveNotebookDocumentParams) MarshalJSONTo added in v1.0.0

func (x DidSaveNotebookDocumentParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DidSaveNotebookDocumentParams) UnmarshalJSONFrom added in v1.0.0

func (x *DidSaveNotebookDocumentParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DidSaveTextDocumentParams

type DidSaveTextDocumentParams struct {
	// TextDocument The document that was saved.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Text Optional the content when saved. Depends on the includeText value
	// when the save notification was requested.
	Text *string `json:"text,omitzero"`
}

DidSaveTextDocumentParams The parameters sent in a save text document notification

func (DidSaveTextDocumentParams) MarshalJSONTo added in v1.0.0

func (x DidSaveTextDocumentParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DidSaveTextDocumentParams) UnmarshalJSONFrom added in v1.0.0

func (x *DidSaveTextDocumentParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentChange added in v1.0.0

type DocumentChange interface {
	// contains filtered or unexported methods
}

DocumentChange is one of: *TextDocumentEdit, *CreateFile, *RenameFile, *DeleteFile.

type DocumentColorClientCapabilities added in v0.11.1

type DocumentColorClientCapabilities struct {
	// DynamicRegistration Whether implementation supports dynamic registration. If this is set to `true`
	// the client supports the new `DocumentColorRegistrationOptions` return value
	// for the corresponding server capability as well.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`
}

DocumentColorClientCapabilities is defined by the LSP specification.

func (DocumentColorClientCapabilities) MarshalJSONTo added in v1.0.0

func (x DocumentColorClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentColorClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentColorClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentColorOptions added in v0.10.0

type DocumentColorOptions struct {
	WorkDoneProgressOptions
}

DocumentColorOptions is defined by the LSP specification.

func (DocumentColorOptions) MarshalJSONTo added in v1.0.0

func (x DocumentColorOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentColorOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentColorOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentColorParams

type DocumentColorParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// TextDocument The text document.
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

DocumentColorParams Parameters for a [DocumentColorRequest].

func (DocumentColorParams) MarshalJSONTo added in v1.0.0

func (x DocumentColorParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentColorParams) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentColorParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentColorRegistrationOptions added in v0.10.0

type DocumentColorRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DocumentColorOptions
	StaticRegistrationOptions
}

DocumentColorRegistrationOptions is defined by the LSP specification.

func (DocumentColorRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*DocumentColorRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentColorRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentDiagnosticParams added in v1.0.0

type DocumentDiagnosticParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// TextDocument The text document.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Identifier The additional identifier  provided during registration.
	Identifier *string `json:"identifier,omitzero"`

	// PreviousResultID The result id of a previous response if provided.
	PreviousResultID *string `json:"previousResultId,omitzero"`
}

DocumentDiagnosticParams Parameters of the document diagnostic request.

Since: 3.17.0

func (DocumentDiagnosticParams) MarshalJSONTo added in v1.0.0

func (x DocumentDiagnosticParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentDiagnosticParams) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentDiagnosticParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentDiagnosticReport added in v1.0.0

type DocumentDiagnosticReport interface {
	// contains filtered or unexported methods
}

DocumentDiagnosticReport The result of a document diagnostic pull request. A report can either be a full report containing all diagnostics for the requested document or an unchanged report indicating that nothing has changed in terms of diagnostics in comparison to the last pull request.

Since: 3.17.0

type DocumentDiagnosticReportKind added in v1.0.0

type DocumentDiagnosticReportKind string

DocumentDiagnosticReportKind The document diagnostic report kinds.

Since: 3.17.0

const (
	// DocumentDiagnosticReportKindFull A diagnostic report with a full
	// set of problems.
	DocumentDiagnosticReportKindFull DocumentDiagnosticReportKind = "full"
	// DocumentDiagnosticReportKindUnchanged A report indicating that the last
	// returned report is still accurate.
	DocumentDiagnosticReportKindUnchanged DocumentDiagnosticReportKind = "unchanged"
)

DocumentDiagnosticReportKind enumeration values.

type DocumentDiagnosticReportPartialResult added in v1.0.0

type DocumentDiagnosticReportPartialResult struct {
	// RelatedDocuments is defined by the LSP specification.
	RelatedDocuments map[uri.URI]FullDocumentDiagnosticReportOrUnchangedDocumentDiagnosticReport `json:"relatedDocuments"`
}

DocumentDiagnosticReportPartialResult A partial result for a document diagnostic report.

Since: 3.17.0

func (DocumentDiagnosticReportPartialResult) MarshalJSONTo added in v1.0.0

func (*DocumentDiagnosticReportPartialResult) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentDiagnosticReportPartialResult) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentFilter

type DocumentFilter interface {
	// contains filtered or unexported methods
}

DocumentFilter A document filter describes a top level text document or a notebook cell document.

support for NotebookCellTextDocumentFilter.

Since: 3.17.0 - support for NotebookCellTextDocumentFilter.

type DocumentFormattingClientCapabilities added in v0.11.1

type DocumentFormattingClientCapabilities struct {
	// DynamicRegistration Whether formatting supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`
}

DocumentFormattingClientCapabilities Client capabilities of a [DocumentFormattingRequest].

func (DocumentFormattingClientCapabilities) MarshalJSONTo added in v1.0.0

func (*DocumentFormattingClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentFormattingClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentFormattingOptions added in v0.10.0

type DocumentFormattingOptions struct {
	WorkDoneProgressOptions
}

DocumentFormattingOptions Provider options for a [DocumentFormattingRequest].

func (DocumentFormattingOptions) MarshalJSONTo added in v1.0.0

func (x DocumentFormattingOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentFormattingOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentFormattingOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentFormattingParams

type DocumentFormattingParams struct {
	WorkDoneProgressParams

	// TextDocument The document to format.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Options The format options.
	Options FormattingOptions `json:"options"`
}

DocumentFormattingParams The parameters of a [DocumentFormattingRequest].

func (DocumentFormattingParams) MarshalJSONTo added in v1.0.0

func (x DocumentFormattingParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentFormattingParams) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentFormattingParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentFormattingProvider added in v1.0.0

type DocumentFormattingProvider interface {
	// contains filtered or unexported methods
}

DocumentFormattingProvider is one of: Boolean, *DocumentFormattingOptions.

type DocumentFormattingRegistrationOptions added in v1.0.0

type DocumentFormattingRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DocumentFormattingOptions
}

DocumentFormattingRegistrationOptions Registration options for a [DocumentFormattingRequest].

func (DocumentFormattingRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*DocumentFormattingRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentFormattingRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentHighlight

type DocumentHighlight struct {
	// Range The range this highlight applies to.
	Range Range `json:"range"`

	// Kind The highlight kind, default is [DocumentHighlightKind.Text].
	Kind DocumentHighlightKind `json:"kind,omitzero"`
}

DocumentHighlight A document highlight is a range inside a text document which deserves special attention. Usually a document highlight is visualized by changing the background color of its range.

func (DocumentHighlight) MarshalJSONTo added in v1.0.0

func (x DocumentHighlight) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentHighlight) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentHighlight) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentHighlightClientCapabilities added in v0.11.1

type DocumentHighlightClientCapabilities struct {
	// DynamicRegistration Whether document highlight supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`
}

DocumentHighlightClientCapabilities Client Capabilities for a [DocumentHighlightRequest].

func (DocumentHighlightClientCapabilities) MarshalJSONTo added in v1.0.0

func (*DocumentHighlightClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentHighlightClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentHighlightKind

type DocumentHighlightKind uint32

DocumentHighlightKind A document highlight kind.

const (
	// DocumentHighlightKindText A textual occurrence.
	DocumentHighlightKindText DocumentHighlightKind = 1
	// DocumentHighlightKindRead Read-access of a symbol, like reading a variable.
	DocumentHighlightKindRead DocumentHighlightKind = 2
	// DocumentHighlightKindWrite Write-access of a symbol, like writing to a variable.
	DocumentHighlightKindWrite DocumentHighlightKind = 3
)

DocumentHighlightKind enumeration values.

type DocumentHighlightOptions added in v0.10.0

type DocumentHighlightOptions struct {
	WorkDoneProgressOptions
}

DocumentHighlightOptions Provider options for a [DocumentHighlightRequest].

func (DocumentHighlightOptions) MarshalJSONTo added in v1.0.0

func (x DocumentHighlightOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentHighlightOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentHighlightOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentHighlightParams added in v0.10.0

DocumentHighlightParams Parameters for a [DocumentHighlightRequest].

func (DocumentHighlightParams) MarshalJSONTo added in v1.0.0

func (x DocumentHighlightParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentHighlightParams) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentHighlightParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentHighlightProvider added in v1.0.0

type DocumentHighlightProvider interface {
	// contains filtered or unexported methods
}

DocumentHighlightProvider is one of: Boolean, *DocumentHighlightOptions.

type DocumentHighlightRegistrationOptions added in v1.0.0

type DocumentHighlightRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DocumentHighlightOptions
}

DocumentHighlightRegistrationOptions Registration options for a [DocumentHighlightRequest].

func (DocumentHighlightRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*DocumentHighlightRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentHighlightRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentLink struct {
	// Range The range this link applies to.
	Range Range `json:"range"`

	// Target The uri this link points to. If missing a resolve request is sent later.
	Target *uri.URI `json:"target,omitzero"`

	// Tooltip The tooltip text when you hover over this link.
	//
	// If a tooltip is provided, is will be displayed in a string that includes instructions on how to
	// trigger the link, such as `{0} (ctrl + click)`. The specific instructions vary depending on OS,
	// user settings, and localization.
	//
	// Since: 3.15.0
	Tooltip *string `json:"tooltip,omitzero"`

	// Data A data entry field that is preserved on a document link between a
	// DocumentLinkRequest and a DocumentLinkResolveRequest.
	Data LSPAny `json:"data,omitzero"`
}

DocumentLink A document link is a range in a text document that links to an internal or external resource, like another text document or a web site.

func (DocumentLink) MarshalJSONTo added in v1.0.0

func (x DocumentLink) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentLink) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentLink) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentLinkClientCapabilities added in v0.11.1

type DocumentLinkClientCapabilities struct {
	// DynamicRegistration Whether document link supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// TooltipSupport Whether the client supports the `tooltip` property on `DocumentLink`.
	//
	// Since: 3.15.0
	TooltipSupport *bool `json:"tooltipSupport,omitzero"`
}

DocumentLinkClientCapabilities The client capabilities of a [DocumentLinkRequest].

func (DocumentLinkClientCapabilities) MarshalJSONTo added in v1.0.0

func (x DocumentLinkClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentLinkClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentLinkClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentLinkOptions

type DocumentLinkOptions struct {
	WorkDoneProgressOptions

	// ResolveProvider Document links have a resolve provider as well.
	ResolveProvider *bool `json:"resolveProvider,omitzero"`
}

DocumentLinkOptions Provider options for a [DocumentLinkRequest].

func (DocumentLinkOptions) MarshalJSONTo added in v1.0.0

func (x DocumentLinkOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentLinkOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentLinkOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentLinkParams

type DocumentLinkParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// TextDocument The document to provide document links for.
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

DocumentLinkParams The parameters of a [DocumentLinkRequest].

func (DocumentLinkParams) MarshalJSONTo added in v1.0.0

func (x DocumentLinkParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentLinkParams) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentLinkParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentLinkRegistrationOptions

type DocumentLinkRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DocumentLinkOptions
}

DocumentLinkRegistrationOptions Registration options for a [DocumentLinkRequest].

func (DocumentLinkRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x DocumentLinkRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentLinkRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentLinkRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentOnTypeFormattingClientCapabilities added in v0.11.1

type DocumentOnTypeFormattingClientCapabilities struct {
	// DynamicRegistration Whether on type formatting supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`
}

DocumentOnTypeFormattingClientCapabilities Client capabilities of a [DocumentOnTypeFormattingRequest].

func (DocumentOnTypeFormattingClientCapabilities) MarshalJSONTo added in v1.0.0

func (*DocumentOnTypeFormattingClientCapabilities) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentOnTypeFormattingOptions

type DocumentOnTypeFormattingOptions struct {
	// FirstTriggerCharacter A character on which formatting should be triggered, like `{`.
	FirstTriggerCharacter string `json:"firstTriggerCharacter"`

	// MoreTriggerCharacter More trigger characters.
	MoreTriggerCharacter []string `json:"moreTriggerCharacter,omitzero"`
}

DocumentOnTypeFormattingOptions Provider options for a [DocumentOnTypeFormattingRequest].

func (DocumentOnTypeFormattingOptions) MarshalJSONTo added in v1.0.0

func (x DocumentOnTypeFormattingOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentOnTypeFormattingOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentOnTypeFormattingOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentOnTypeFormattingParams

type DocumentOnTypeFormattingParams struct {
	// TextDocument The document to format.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Position The position around which the on type formatting should happen.
	// This is not necessarily the exact position where the character denoted
	// by the property `ch` got typed.
	Position Position `json:"position"`

	// Ch The character that has been typed that triggered the formatting
	// on type request. That is not necessarily the last character that
	// got inserted into the document since the client could auto insert
	// characters as well (e.g. like automatic brace completion).
	Ch string `json:"ch"`

	// Options The formatting options.
	Options FormattingOptions `json:"options"`
}

DocumentOnTypeFormattingParams The parameters of a [DocumentOnTypeFormattingRequest].

func (DocumentOnTypeFormattingParams) MarshalJSONTo added in v1.0.0

func (x DocumentOnTypeFormattingParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentOnTypeFormattingParams) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentOnTypeFormattingParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentOnTypeFormattingRegistrationOptions

type DocumentOnTypeFormattingRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DocumentOnTypeFormattingOptions
}

DocumentOnTypeFormattingRegistrationOptions Registration options for a [DocumentOnTypeFormattingRequest].

func (DocumentOnTypeFormattingRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*DocumentOnTypeFormattingRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentRangeFormattingClientCapabilities added in v0.11.1

type DocumentRangeFormattingClientCapabilities struct {
	// DynamicRegistration Whether range formatting supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// RangesSupport Whether the client supports formatting multiple ranges at once.
	//
	// Since: 3.18.0
	RangesSupport *bool `json:"rangesSupport,omitzero"`
}

DocumentRangeFormattingClientCapabilities Client capabilities of a [DocumentRangeFormattingRequest].

func (DocumentRangeFormattingClientCapabilities) MarshalJSONTo added in v1.0.0

func (*DocumentRangeFormattingClientCapabilities) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentRangeFormattingOptions added in v0.10.0

type DocumentRangeFormattingOptions struct {
	WorkDoneProgressOptions

	// RangesSupport Whether the server supports formatting multiple ranges at once.
	//
	// Since: 3.18.0
	RangesSupport *bool `json:"rangesSupport,omitzero"`
}

DocumentRangeFormattingOptions Provider options for a [DocumentRangeFormattingRequest].

func (DocumentRangeFormattingOptions) MarshalJSONTo added in v1.0.0

func (x DocumentRangeFormattingOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentRangeFormattingOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentRangeFormattingOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentRangeFormattingParams

type DocumentRangeFormattingParams struct {
	WorkDoneProgressParams

	// TextDocument The document to format.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Range The range to format
	Range Range `json:"range"`

	// Options The format options
	Options FormattingOptions `json:"options"`
}

DocumentRangeFormattingParams The parameters of a [DocumentRangeFormattingRequest].

func (DocumentRangeFormattingParams) MarshalJSONTo added in v1.0.0

func (x DocumentRangeFormattingParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentRangeFormattingParams) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentRangeFormattingParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentRangeFormattingProvider added in v1.0.0

type DocumentRangeFormattingProvider interface {
	// contains filtered or unexported methods
}

DocumentRangeFormattingProvider is one of: Boolean, *DocumentRangeFormattingOptions.

type DocumentRangeFormattingRegistrationOptions added in v1.0.0

type DocumentRangeFormattingRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DocumentRangeFormattingOptions
}

DocumentRangeFormattingRegistrationOptions Registration options for a [DocumentRangeFormattingRequest].

func (DocumentRangeFormattingRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*DocumentRangeFormattingRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentRangesFormattingParams added in v1.0.0

type DocumentRangesFormattingParams struct {
	WorkDoneProgressParams

	// TextDocument The document to format.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Ranges The ranges to format
	Ranges []Range `json:"ranges"`

	// Options The format options
	Options FormattingOptions `json:"options"`
}

DocumentRangesFormattingParams The parameters of a [DocumentRangesFormattingRequest].

Since: 3.18.0

func (DocumentRangesFormattingParams) MarshalJSONTo added in v1.0.0

func (x DocumentRangesFormattingParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentRangesFormattingParams) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentRangesFormattingParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentSelector

type DocumentSelector []DocumentFilter

DocumentSelector 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.

func (DocumentSelector) MarshalJSONTo added in v1.0.0

func (x DocumentSelector) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentSelector) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentSelector) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentSymbol

type DocumentSymbol struct {
	// Name The name of this symbol. Will be displayed in the user interface and therefore must not be
	// an empty string or a string only consisting of white spaces.
	Name string `json:"name"`

	// Detail More detail for this symbol, e.g the signature of a function.
	Detail *string `json:"detail,omitzero"`

	// Kind The kind of this symbol.
	Kind SymbolKind `json:"kind"`

	// Tags Tags for this document symbol.
	//
	// Since: 3.16.0
	Tags []SymbolTag `json:"tags,omitzero"`

	// Deprecated Indicates if this symbol is deprecated.
	//
	// Deprecated: Use tags instead
	Deprecated *bool `json:"deprecated,omitzero"`

	// Range The range enclosing this symbol not including leading/trailing whitespace but everything else
	// like comments. This information is typically used to determine if the clients cursor is
	// inside the symbol to reveal in the symbol in the UI.
	Range Range `json:"range"`

	// SelectionRange The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
	// Must be contained by the `range`.
	SelectionRange Range `json:"selectionRange"`

	// Children Children of this symbol, e.g. properties of a class.
	Children []DocumentSymbol `json:"children,omitzero"`
}

DocumentSymbol Represents programming constructs like variables, classes, interfaces etc. that appear in a document. Document symbols can be hierarchical and they have two ranges: one that encloses its definition and one that points to its most interesting range, e.g. the range of an identifier.

func (DocumentSymbol) MarshalJSONTo added in v1.0.0

func (x DocumentSymbol) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentSymbol) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentSymbol) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentSymbolClientCapabilities added in v0.11.1

type DocumentSymbolClientCapabilities struct {
	// DynamicRegistration Whether document symbol supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// SymbolKind Specific capabilities for the `SymbolKind` in the
	// `textDocument/documentSymbol` request.
	SymbolKind *ClientSymbolKindOptions `json:"symbolKind,omitzero"`

	// HierarchicalDocumentSymbolSupport The client supports hierarchical document symbols.
	HierarchicalDocumentSymbolSupport *bool `json:"hierarchicalDocumentSymbolSupport,omitzero"`

	// TagSupport The client supports tags on `SymbolInformation`. Tags are supported on
	// `DocumentSymbol` if `hierarchicalDocumentSymbolSupport` is set to true.
	// Clients supporting tags have to handle unknown tags gracefully.
	//
	// Since: 3.16.0
	TagSupport ClientSymbolTagOptions `json:"tagSupport,omitzero"`

	// LabelSupport The client supports an additional label presented in the UI when
	// registering a document symbol provider.
	//
	// Since: 3.16.0
	LabelSupport *bool `json:"labelSupport,omitzero"`
}

DocumentSymbolClientCapabilities Client Capabilities for a [DocumentSymbolRequest].

func (DocumentSymbolClientCapabilities) MarshalJSONTo added in v1.0.0

func (*DocumentSymbolClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentSymbolClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentSymbolOptions added in v0.10.0

type DocumentSymbolOptions struct {
	WorkDoneProgressOptions

	// Label A human-readable string that is shown when multiple outlines trees
	// are shown for the same document.
	//
	// Since: 3.16.0
	Label *string `json:"label,omitzero"`
}

DocumentSymbolOptions Provider options for a [DocumentSymbolRequest].

func (DocumentSymbolOptions) MarshalJSONTo added in v1.0.0

func (x DocumentSymbolOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentSymbolOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentSymbolOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentSymbolParams

type DocumentSymbolParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// TextDocument The text document.
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

DocumentSymbolParams Parameters for a [DocumentSymbolRequest].

func (DocumentSymbolParams) MarshalJSONTo added in v1.0.0

func (x DocumentSymbolParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentSymbolParams) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentSymbolParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentSymbolProvider added in v1.0.0

type DocumentSymbolProvider interface {
	// contains filtered or unexported methods
}

DocumentSymbolProvider is one of: Boolean, *DocumentSymbolOptions.

type DocumentSymbolRegistrationOptions added in v1.0.0

type DocumentSymbolRegistrationOptions struct {
	TextDocumentRegistrationOptions
	DocumentSymbolOptions
}

DocumentSymbolRegistrationOptions Registration options for a [DocumentSymbolRequest].

func (DocumentSymbolRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*DocumentSymbolRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentSymbolRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type DocumentSymbolResult added in v1.0.0

type DocumentSymbolResult interface {
	// contains filtered or unexported methods
}

DocumentSymbolResult is one of: SymbolInformationSlice, DocumentSymbolSlice.

type DocumentSymbolSlice added in v1.0.0

type DocumentSymbolSlice []DocumentSymbol

DocumentSymbolSlice is a named type so a []DocumentSymbol arm can satisfy a union interface.

func (DocumentSymbolSlice) MarshalJSONTo added in v1.0.0

func (x DocumentSymbolSlice) MarshalJSONTo(enc *jsontext.Encoder) error

func (*DocumentSymbolSlice) UnmarshalJSONFrom added in v1.0.0

func (x *DocumentSymbolSlice) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type EditRangeWithInsertReplace added in v1.0.0

type EditRangeWithInsertReplace struct {
	// Insert is defined by the LSP specification.
	Insert Range `json:"insert"`

	// Replace is defined by the LSP specification.
	Replace Range `json:"replace"`
}

EditRangeWithInsertReplace Edit range variant that includes ranges for insert and replace operations.

Since: 3.18.0

func (EditRangeWithInsertReplace) MarshalJSONTo added in v1.0.0

func (x EditRangeWithInsertReplace) MarshalJSONTo(enc *jsontext.Encoder) error

func (*EditRangeWithInsertReplace) UnmarshalJSONFrom added in v1.0.0

func (x *EditRangeWithInsertReplace) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ErrorCodes added in v1.0.0

type ErrorCodes int32

ErrorCodes Predefined error codes.

const (
	// ErrorCodesParseError is defined by the LSP specification.
	ErrorCodesParseError ErrorCodes = -32700
	// ErrorCodesInvalidRequest is defined by the LSP specification.
	ErrorCodesInvalidRequest ErrorCodes = -32600
	// ErrorCodesMethodNotFound is defined by the LSP specification.
	ErrorCodesMethodNotFound ErrorCodes = -32601
	// ErrorCodesInvalidParams is defined by the LSP specification.
	ErrorCodesInvalidParams ErrorCodes = -32602
	// ErrorCodesInternalError is defined by the LSP specification.
	ErrorCodesInternalError ErrorCodes = -32603
	// ErrorCodesServerNotInitialized Error code indicating that a server received a notification or
	// request before the server has received the `initialize` request.
	ErrorCodesServerNotInitialized ErrorCodes = -32002
	// ErrorCodesUnknownErrorCode is defined by the LSP specification.
	ErrorCodesUnknownErrorCode ErrorCodes = -32001
)

ErrorCodes enumeration values.

type ExecuteCommandClientCapabilities added in v0.11.1

type ExecuteCommandClientCapabilities struct {
	// DynamicRegistration Execute command supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`
}

ExecuteCommandClientCapabilities The client capabilities of a [ExecuteCommandRequest].

func (ExecuteCommandClientCapabilities) MarshalJSONTo added in v1.0.0

func (*ExecuteCommandClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *ExecuteCommandClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ExecuteCommandOptions

type ExecuteCommandOptions struct {
	WorkDoneProgressOptions

	// Commands The commands to be executed on the server
	Commands []string `json:"commands"`
}

ExecuteCommandOptions The server capabilities of a [ExecuteCommandRequest].

func (ExecuteCommandOptions) MarshalJSONTo added in v1.0.0

func (x ExecuteCommandOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ExecuteCommandOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ExecuteCommandOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ExecuteCommandParams

type ExecuteCommandParams struct {
	WorkDoneProgressParams

	// Command The identifier of the actual command handler.
	Command string `json:"command"`

	// Arguments Arguments that the command should be invoked with.
	Arguments []LSPAny `json:"arguments,omitzero"`
}

ExecuteCommandParams The parameters of a [ExecuteCommandRequest].

func (ExecuteCommandParams) MarshalJSONTo added in v1.0.0

func (x ExecuteCommandParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ExecuteCommandParams) UnmarshalJSONFrom added in v1.0.0

func (x *ExecuteCommandParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ExecuteCommandRegistrationOptions

type ExecuteCommandRegistrationOptions struct {
	ExecuteCommandOptions
}

ExecuteCommandRegistrationOptions Registration options for a [ExecuteCommandRequest].

func (ExecuteCommandRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*ExecuteCommandRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ExecuteCommandRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ExecutionSummary added in v1.0.0

type ExecutionSummary struct {
	// ExecutionOrder A strict monotonically increasing value
	// indicating the execution order of a cell
	// inside a notebook.
	ExecutionOrder uint32 `json:"executionOrder"`

	// Success Whether the execution was successful or
	// not if known by the client.
	Success *bool `json:"success,omitzero"`
}

ExecutionSummary is defined by the LSP specification.

func (ExecutionSummary) MarshalJSONTo added in v1.0.0

func (x ExecutionSummary) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ExecutionSummary) UnmarshalJSONFrom added in v1.0.0

func (x *ExecutionSummary) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FailureHandlingKind

type FailureHandlingKind string

FailureHandlingKind is defined by the LSP specification.

const (
	// FailureHandlingKindAbort Applying the workspace change is simply aborted if one of the changes provided
	// fails. All operations executed before the failing operation stay executed.
	FailureHandlingKindAbort FailureHandlingKind = "abort"
	// FailureHandlingKindTransactional All operations are executed transactional. That means they either all
	// succeed or no changes at all are applied to the workspace.
	FailureHandlingKindTransactional FailureHandlingKind = "transactional"
	// FailureHandlingKindTextOnlyTransactional 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 strategy is abort.
	FailureHandlingKindTextOnlyTransactional FailureHandlingKind = "textOnlyTransactional"
	// FailureHandlingKindUndo The client tries to undo the operations already executed. But there is no
	// guarantee that this is succeeding.
	FailureHandlingKindUndo FailureHandlingKind = "undo"
)

FailureHandlingKind enumeration values.

type FileChangeType

type FileChangeType uint32

FileChangeType The file event type

const (
	// FileChangeTypeCreated The file got created.
	FileChangeTypeCreated FileChangeType = 1
	// FileChangeTypeChanged The file got changed.
	FileChangeTypeChanged FileChangeType = 2
	// FileChangeTypeDeleted The file got deleted.
	FileChangeTypeDeleted FileChangeType = 3
)

FileChangeType enumeration values.

type FileCreate added in v0.11.0

type FileCreate struct {
	// URI A file:// URI for the location of the file/folder being created.
	URI string `json:"uri"`
}

FileCreate Represents information on a file/folder create.

Since: 3.16.0

func (FileCreate) MarshalJSONTo added in v1.0.0

func (x FileCreate) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FileCreate) UnmarshalJSONFrom added in v1.0.0

func (x *FileCreate) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FileDelete added in v0.11.0

type FileDelete struct {
	// URI A file:// URI for the location of the file/folder being deleted.
	URI string `json:"uri"`
}

FileDelete Represents information on a file/folder delete.

Since: 3.16.0

func (FileDelete) MarshalJSONTo added in v1.0.0

func (x FileDelete) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FileDelete) UnmarshalJSONFrom added in v1.0.0

func (x *FileDelete) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FileEvent

type FileEvent struct {
	// URI The file's uri.
	URI uri.URI `json:"uri"`

	// Type The change type.
	Type FileChangeType `json:"type"`
}

FileEvent An event describing a file change.

func (FileEvent) MarshalJSONTo added in v1.0.0

func (x FileEvent) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FileEvent) UnmarshalJSONFrom added in v1.0.0

func (x *FileEvent) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FileOperationClientCapabilities added in v1.0.0

type FileOperationClientCapabilities struct {
	// DynamicRegistration Whether the client supports dynamic registration for file requests/notifications.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// DidCreate The client has support for sending didCreateFiles notifications.
	DidCreate *bool `json:"didCreate,omitzero"`

	// WillCreate The client has support for sending willCreateFiles requests.
	WillCreate *bool `json:"willCreate,omitzero"`

	// DidRename The client has support for sending didRenameFiles notifications.
	DidRename *bool `json:"didRename,omitzero"`

	// WillRename The client has support for sending willRenameFiles requests.
	WillRename *bool `json:"willRename,omitzero"`

	// DidDelete The client has support for sending didDeleteFiles notifications.
	DidDelete *bool `json:"didDelete,omitzero"`

	// WillDelete The client has support for sending willDeleteFiles requests.
	WillDelete *bool `json:"willDelete,omitzero"`
}

FileOperationClientCapabilities 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

func (FileOperationClientCapabilities) MarshalJSONTo added in v1.0.0

func (x FileOperationClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FileOperationClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *FileOperationClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FileOperationFilter added in v0.11.0

type FileOperationFilter struct {
	// Scheme A Uri scheme like `file` or `untitled`.
	Scheme *string `json:"scheme,omitzero"`

	// Pattern The actual file operation pattern.
	Pattern FileOperationPattern `json:"pattern"`
}

FileOperationFilter A filter to describe in which file operation requests or notifications the server is interested in receiving.

Since: 3.16.0

func (FileOperationFilter) MarshalJSONTo added in v1.0.0

func (x FileOperationFilter) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FileOperationFilter) UnmarshalJSONFrom added in v1.0.0

func (x *FileOperationFilter) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FileOperationOptions added in v1.0.0

type FileOperationOptions struct {
	// DidCreate The server is interested in receiving didCreateFiles notifications.
	DidCreate FileOperationRegistrationOptions `json:"didCreate,omitzero"`

	// WillCreate The server is interested in receiving willCreateFiles requests.
	WillCreate FileOperationRegistrationOptions `json:"willCreate,omitzero"`

	// DidRename The server is interested in receiving didRenameFiles notifications.
	DidRename FileOperationRegistrationOptions `json:"didRename,omitzero"`

	// WillRename The server is interested in receiving willRenameFiles requests.
	WillRename FileOperationRegistrationOptions `json:"willRename,omitzero"`

	// DidDelete The server is interested in receiving didDeleteFiles file notifications.
	DidDelete FileOperationRegistrationOptions `json:"didDelete,omitzero"`

	// WillDelete The server is interested in receiving willDeleteFiles file requests.
	WillDelete FileOperationRegistrationOptions `json:"willDelete,omitzero"`
}

FileOperationOptions Options for notifications/requests for user operations on files.

Since: 3.16.0

func (FileOperationOptions) MarshalJSONTo added in v1.0.0

func (x FileOperationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FileOperationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *FileOperationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FileOperationPattern added in v0.11.0

type FileOperationPattern struct {
	// Glob The glob pattern to match. Glob patterns can have the following syntax:
	// - `*` to match zero 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 sub patterns into an OR expression. (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"`

	// Matches Whether to match files or folders with this pattern.
	//
	// Matches both if undefined.
	Matches FileOperationPatternKind `json:"matches,omitzero"`

	// Options Additional options used during matching.
	Options *FileOperationPatternOptions `json:"options,omitzero"`
}

FileOperationPattern A pattern to describe in which file operation requests or notifications the server is interested in receiving.

Since: 3.16.0

func (FileOperationPattern) MarshalJSONTo added in v1.0.0

func (x FileOperationPattern) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FileOperationPattern) UnmarshalJSONFrom added in v1.0.0

func (x *FileOperationPattern) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FileOperationPatternKind added in v0.11.0

type FileOperationPatternKind string

FileOperationPatternKind A pattern kind describing if a glob pattern matches a file a folder or both.

Since: 3.16.0

const (
	// FileOperationPatternKindFile The pattern matches a file only.
	FileOperationPatternKindFile FileOperationPatternKind = "file"
	// FileOperationPatternKindFolder The pattern matches a folder only.
	FileOperationPatternKindFolder FileOperationPatternKind = "folder"
)

FileOperationPatternKind enumeration values.

type FileOperationPatternOptions added in v0.11.0

type FileOperationPatternOptions struct {
	// IgnoreCase The pattern should be matched ignoring casing.
	IgnoreCase *bool `json:"ignoreCase,omitzero"`
}

FileOperationPatternOptions Matching options for the file operation pattern.

Since: 3.16.0

func (FileOperationPatternOptions) MarshalJSONTo added in v1.0.0

func (x FileOperationPatternOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FileOperationPatternOptions) UnmarshalJSONFrom added in v1.0.0

func (x *FileOperationPatternOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FileOperationRegistrationOptions added in v0.11.0

type FileOperationRegistrationOptions struct {
	// Filters The actual filters.
	Filters []FileOperationFilter `json:"filters"`
}

FileOperationRegistrationOptions The options to register for file operations.

Since: 3.16.0

func (FileOperationRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*FileOperationRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *FileOperationRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FileRename added in v0.11.0

type FileRename struct {
	// OldURI A file:// URI for the original location of the file/folder being renamed.
	OldURI string `json:"oldUri"`

	// NewURI A file:// URI for the new location of the file/folder being renamed.
	NewURI string `json:"newUri"`
}

FileRename Represents information on a file/folder rename.

Since: 3.16.0

func (FileRename) MarshalJSONTo added in v1.0.0

func (x FileRename) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FileRename) UnmarshalJSONFrom added in v1.0.0

func (x *FileRename) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FileSystemWatcher

type FileSystemWatcher struct {
	// GlobPattern The glob pattern to watch. See [GlobPattern] for more detail.
	//
	// support for relative patterns.
	//
	// Since: 3.17.0 support for relative patterns.
	GlobPattern GlobPattern `json:"globPattern"`

	// Kind The kind of events of interest. If omitted it defaults
	// to WatchKind.Create | WatchKind.Change | WatchKind.Delete
	// which is 7.
	Kind WatchKind `json:"kind,omitzero"`
}

FileSystemWatcher is defined by the LSP specification.

func (FileSystemWatcher) MarshalJSONTo added in v1.0.0

func (x FileSystemWatcher) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FileSystemWatcher) UnmarshalJSONFrom added in v1.0.0

func (x *FileSystemWatcher) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FoldingRange

type FoldingRange struct {
	// StartLine 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 uint32 `json:"startLine"`

	// StartCharacter The zero-based character offset from where the folded range starts. If not defined, defaults to the length of the start line.
	StartCharacter *uint32 `json:"startCharacter,omitzero"`

	// EndLine 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 uint32 `json:"endLine"`

	// EndCharacter The zero-based character offset before the folded range ends. If not defined, defaults to the length of the end line.
	EndCharacter *uint32 `json:"endCharacter,omitzero"`

	// Kind 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 [FoldingRangeKind] for an enumeration of standardized kinds.
	Kind FoldingRangeKind `json:"kind,omitzero"`

	// CollapsedText The text that the client should show when the specified range is
	// collapsed. If not defined or not supported by the client, a default
	// will be chosen by the client.
	//
	// Since: 3.17.0
	CollapsedText *string `json:"collapsedText,omitzero"`
}

FoldingRange 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.

func (FoldingRange) MarshalJSONTo added in v1.0.0

func (x FoldingRange) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FoldingRange) UnmarshalJSONFrom added in v1.0.0

func (x *FoldingRange) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FoldingRangeClientCapabilities added in v0.11.1

type FoldingRangeClientCapabilities struct {
	// DynamicRegistration Whether implementation supports dynamic registration for folding range
	// providers. If this is set to `true` the client supports the new
	// `FoldingRangeRegistrationOptions` return value for the corresponding
	// server capability as well.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// RangeLimit 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 *uint32 `json:"rangeLimit,omitzero"`

	// LineFoldingOnly 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.
	LineFoldingOnly *bool `json:"lineFoldingOnly,omitzero"`

	// FoldingRangeKind Specific options for the folding range kind.
	//
	// Since: 3.17.0
	FoldingRangeKind *ClientFoldingRangeKindOptions `json:"foldingRangeKind,omitzero"`

	// FoldingRange Specific options for the folding range.
	//
	// Since: 3.17.0
	FoldingRange *ClientFoldingRangeOptions `json:"foldingRange,omitzero"`
}

FoldingRangeClientCapabilities is defined by the LSP specification.

func (FoldingRangeClientCapabilities) MarshalJSONTo added in v1.0.0

func (x FoldingRangeClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FoldingRangeClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *FoldingRangeClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FoldingRangeKind

type FoldingRangeKind string

FoldingRangeKind A set of predefined range kinds.

const (
	// FoldingRangeKindComment Folding range for a comment
	FoldingRangeKindComment FoldingRangeKind = "comment"
	// FoldingRangeKindImports Folding range for an import or include
	FoldingRangeKindImports FoldingRangeKind = "imports"
	// FoldingRangeKindRegion Folding range for a region (e.g. `#region`)
	FoldingRangeKindRegion FoldingRangeKind = "region"
)

FoldingRangeKind enumeration values.

type FoldingRangeOptions added in v0.10.0

type FoldingRangeOptions struct {
	WorkDoneProgressOptions
}

FoldingRangeOptions is defined by the LSP specification.

func (FoldingRangeOptions) MarshalJSONTo added in v1.0.0

func (x FoldingRangeOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FoldingRangeOptions) UnmarshalJSONFrom added in v1.0.0

func (x *FoldingRangeOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FoldingRangeParams

type FoldingRangeParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// TextDocument The text document.
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

FoldingRangeParams Parameters for a [FoldingRangeRequest].

func (FoldingRangeParams) MarshalJSONTo added in v1.0.0

func (x FoldingRangeParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FoldingRangeParams) UnmarshalJSONFrom added in v1.0.0

func (x *FoldingRangeParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FoldingRangeProvider added in v1.0.0

type FoldingRangeProvider interface {
	// contains filtered or unexported methods
}

FoldingRangeProvider is one of: Boolean, *FoldingRangeOptions, *FoldingRangeRegistrationOptions.

type FoldingRangeRegistrationOptions added in v0.10.0

type FoldingRangeRegistrationOptions struct {
	TextDocumentRegistrationOptions
	FoldingRangeOptions
	StaticRegistrationOptions
}

FoldingRangeRegistrationOptions is defined by the LSP specification.

func (FoldingRangeRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x FoldingRangeRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FoldingRangeRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *FoldingRangeRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FoldingRangeWorkspaceClientCapabilities added in v1.0.0

type FoldingRangeWorkspaceClientCapabilities struct {
	// RefreshSupport 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
	// folding ranges currently shown. It should be used with absolute care and is
	// useful for situation where a server for example detects a project wide
	// change that requires such a calculation.
	//
	// Since: 3.18.0
	RefreshSupport *bool `json:"refreshSupport,omitzero"`
}

FoldingRangeWorkspaceClientCapabilities Client workspace capabilities specific to folding ranges

Since: 3.18.0

func (FoldingRangeWorkspaceClientCapabilities) MarshalJSONTo added in v1.0.0

func (*FoldingRangeWorkspaceClientCapabilities) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FormattingOptions

type FormattingOptions struct {
	// TabSize Size of a tab in spaces.
	TabSize uint32 `json:"tabSize"`

	// InsertSpaces Prefer spaces over tabs.
	InsertSpaces bool `json:"insertSpaces"`

	// TrimTrailingWhitespace Trim trailing whitespace on a line.
	//
	// Since: 3.15.0
	TrimTrailingWhitespace *bool `json:"trimTrailingWhitespace,omitzero"`

	// InsertFinalNewline Insert a newline character at the end of the file if one does not exist.
	//
	// Since: 3.15.0
	InsertFinalNewline *bool `json:"insertFinalNewline,omitzero"`

	// TrimFinalNewlines Trim all newlines after the final newline at the end of the file.
	//
	// Since: 3.15.0
	TrimFinalNewlines *bool `json:"trimFinalNewlines,omitzero"`
}

FormattingOptions Value-object describing what options formatting should use.

func (FormattingOptions) MarshalJSONTo added in v1.0.0

func (x FormattingOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FormattingOptions) UnmarshalJSONFrom added in v1.0.0

func (x *FormattingOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FullDocumentDiagnosticReport added in v1.0.0

type FullDocumentDiagnosticReport struct {
	// Kind A full document diagnostic report.
	Kind string `json:"kind"`

	// ResultID An optional result id. If provided it will
	// be sent on the next diagnostic request for the
	// same document.
	ResultID *string `json:"resultId,omitzero"`

	// Items The actual items.
	Items []Diagnostic `json:"items"`
}

FullDocumentDiagnosticReport A diagnostic report with a full set of problems.

Since: 3.17.0

func (FullDocumentDiagnosticReport) MarshalJSONTo added in v1.0.0

func (x FullDocumentDiagnosticReport) MarshalJSONTo(enc *jsontext.Encoder) error

func (*FullDocumentDiagnosticReport) UnmarshalJSONFrom added in v1.0.0

func (x *FullDocumentDiagnosticReport) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type FullDocumentDiagnosticReportOrUnchangedDocumentDiagnosticReport added in v1.0.0

type FullDocumentDiagnosticReportOrUnchangedDocumentDiagnosticReport interface {
	// contains filtered or unexported methods
}

FullDocumentDiagnosticReportOrUnchangedDocumentDiagnosticReport is one of: *FullDocumentDiagnosticReport, *UnchangedDocumentDiagnosticReport.

type GeneralClientCapabilities added in v0.11.0

type GeneralClientCapabilities struct {
	// StaleRequestSupport 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 StaleRequestSupportOptions `json:"staleRequestSupport,omitzero"`

	// RegularExpressions Client capabilities specific to regular expressions.
	//
	// Since: 3.16.0
	RegularExpressions RegularExpressionsClientCapabilities `json:"regularExpressions,omitzero"`

	// Markdown Client capabilities specific to the client's markdown parser.
	//
	// Since: 3.16.0
	Markdown MarkdownClientCapabilities `json:"markdown,omitzero"`

	// PositionEncodings The position encodings supported by the client. Client and server
	// have to agree on the same position encoding to ensure that offsets
	// (e.g. character position in a line) are interpreted the same on both
	// sides.
	//
	// To keep the protocol backwards compatible the following applies: if
	// the value 'utf-16' is missing from the array of position encodings
	// servers can assume that the client supports UTF-16. UTF-16 is
	// therefore a mandatory encoding.
	//
	// If omitted it defaults to ['utf-16'].
	//
	// Implementation considerations: since the conversion from one encoding
	// into another requires the content of the file / line the conversion
	// is best done where the file is read which is usually on the server
	// side.
	//
	// Since: 3.17.0
	PositionEncodings []PositionEncodingKind `json:"positionEncodings,omitzero"`
}

GeneralClientCapabilities General client capabilities.

Since: 3.16.0

func (GeneralClientCapabilities) MarshalJSONTo added in v1.0.0

func (x GeneralClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*GeneralClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *GeneralClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type GlobPattern added in v1.0.0

type GlobPattern interface {
	// contains filtered or unexported methods
}

GlobPattern The glob pattern. Either a string pattern or a relative pattern.

Since: 3.17.0

type Hover

type Hover struct {
	// Contents The hover's content
	Contents HoverContents `json:"contents"`

	// Range An optional range inside the text document that is used to
	// visualize the hover, e.g. by changing the background color.
	Range *Range `json:"range,omitzero"`
}

Hover The result of a hover request.

func (Hover) MarshalJSONTo added in v1.0.0

func (x Hover) MarshalJSONTo(enc *jsontext.Encoder) error

func (*Hover) UnmarshalJSONFrom added in v1.0.0

func (x *Hover) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type HoverClientCapabilities added in v1.0.0

type HoverClientCapabilities struct {
	// DynamicRegistration Whether hover supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// ContentFormat Client supports the following content formats for the content
	// property. The order describes the preferred format of the client.
	ContentFormat []MarkupKind `json:"contentFormat,omitzero"`
}

HoverClientCapabilities is defined by the LSP specification.

func (HoverClientCapabilities) MarshalJSONTo added in v1.0.0

func (x HoverClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*HoverClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *HoverClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type HoverContents added in v1.0.0

type HoverContents interface {
	// contains filtered or unexported methods
}

HoverContents is one of: *MarkupContent, String, *MarkedStringWithLanguage, MarkedStringSlice.

type HoverOptions added in v0.10.0

type HoverOptions struct {
	WorkDoneProgressOptions
}

HoverOptions Hover options.

func (HoverOptions) MarshalJSONTo added in v1.0.0

func (x HoverOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*HoverOptions) UnmarshalJSONFrom added in v1.0.0

func (x *HoverOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type HoverParams added in v0.10.0

HoverParams Parameters for a [HoverRequest].

func (HoverParams) MarshalJSONTo added in v1.0.0

func (x HoverParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*HoverParams) UnmarshalJSONFrom added in v1.0.0

func (x *HoverParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type HoverProvider added in v1.0.0

type HoverProvider interface {
	// contains filtered or unexported methods
}

HoverProvider is one of: Boolean, *HoverOptions.

type HoverRegistrationOptions added in v1.0.0

type HoverRegistrationOptions struct {
	TextDocumentRegistrationOptions
	HoverOptions
}

HoverRegistrationOptions Registration options for a [HoverRequest].

func (HoverRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x HoverRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*HoverRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *HoverRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ImplementationClientCapabilities added in v1.0.0

type ImplementationClientCapabilities struct {
	// DynamicRegistration Whether implementation supports dynamic registration. If this is set to `true`
	// the client supports the new `ImplementationRegistrationOptions` return value
	// for the corresponding server capability as well.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// LinkSupport The client supports additional metadata in the form of definition links.
	//
	// Since: 3.14.0
	LinkSupport *bool `json:"linkSupport,omitzero"`
}

ImplementationClientCapabilities is defined by the LSP specification.

Since: 3.6.0

func (ImplementationClientCapabilities) MarshalJSONTo added in v1.0.0

func (*ImplementationClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *ImplementationClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ImplementationOptions added in v0.10.0

type ImplementationOptions struct {
	WorkDoneProgressOptions
}

ImplementationOptions is defined by the LSP specification.

func (ImplementationOptions) MarshalJSONTo added in v1.0.0

func (x ImplementationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ImplementationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ImplementationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ImplementationParams added in v0.10.0

ImplementationParams is defined by the LSP specification.

func (ImplementationParams) MarshalJSONTo added in v1.0.0

func (x ImplementationParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ImplementationParams) UnmarshalJSONFrom added in v1.0.0

func (x *ImplementationParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ImplementationProvider added in v1.0.0

type ImplementationProvider interface {
	// contains filtered or unexported methods
}

ImplementationProvider is one of: Boolean, *ImplementationOptions, *ImplementationRegistrationOptions.

type ImplementationRegistrationOptions added in v0.10.0

type ImplementationRegistrationOptions struct {
	TextDocumentRegistrationOptions
	ImplementationOptions
	StaticRegistrationOptions
}

ImplementationRegistrationOptions is defined by the LSP specification.

func (ImplementationRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*ImplementationRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ImplementationRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ImplementationResult added in v1.0.0

type ImplementationResult = DefinitionResult

ImplementationResult is an alias for DefinitionResult: the two share one result shape.

type InitializeError

type InitializeError struct {
	// Retry Indicates whether the client execute the following retry logic:
	// (1) show the message provided by the ResponseError to the user
	// (2) user selects retry or cancel
	// (3) if user selected retry the initialize method is sent again.
	Retry bool `json:"retry"`
}

InitializeError The data type of the ResponseError if the initialize request fails.

func (InitializeError) MarshalJSONTo added in v1.0.0

func (x InitializeError) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InitializeError) UnmarshalJSONFrom added in v1.0.0

func (x *InitializeError) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InitializeParams

type InitializeParams struct {
	WorkDoneProgressParams
	WorkspaceFoldersInitializeParams

	// ProcessID The process Id of the parent process that started
	// the server.
	//
	// Is `null` if the process has not been started by another process.
	// If the parent process is not alive then the server should exit.
	ProcessID *int32 `json:"processId"`

	// ClientInfo Information about the client
	//
	// Since: 3.15.0
	ClientInfo ClientInfo `json:"clientInfo,omitzero"`

	// Locale 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,omitzero"`

	// RootPath The rootPath of the workspace. Is null
	// if no folder is open.
	//
	// Deprecated: in favour of rootUri.
	RootPath Nullable[string] `json:"rootPath,omitzero"`

	// RootURI The rootUri of the workspace. Is null if no
	// folder is open. If both `rootPath` and `rootUri` are set
	// `rootUri` wins.
	//
	// Deprecated: in favour of workspaceFolders.
	RootURI *uri.URI `json:"rootUri"`

	// Capabilities The capabilities provided by the client (editor or tool)
	Capabilities ClientCapabilities `json:"capabilities"`

	// InitializationOptions User provided initialization options.
	InitializationOptions LSPAny `json:"initializationOptions,omitzero"`

	// Trace The initial trace setting. If omitted trace is disabled ('off').
	Trace TraceValue `json:"trace,omitzero"`
}

InitializeParams is defined by the LSP specification.

func (InitializeParams) MarshalJSONTo added in v1.0.0

func (x InitializeParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InitializeParams) UnmarshalJSONFrom added in v1.0.0

func (x *InitializeParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InitializeResult

type InitializeResult struct {
	// Capabilities The capabilities the language server provides.
	Capabilities ServerCapabilities `json:"capabilities"`

	// ServerInfo Information about the server.
	//
	// Since: 3.15.0
	ServerInfo ServerInfo `json:"serverInfo,omitzero"`
}

InitializeResult The result returned from an initialize request.

func (InitializeResult) MarshalJSONTo added in v1.0.0

func (x InitializeResult) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InitializeResult) UnmarshalJSONFrom added in v1.0.0

func (x *InitializeResult) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InitializedParams

type InitializedParams struct{}

InitializedParams is defined by the LSP specification.

func (InitializedParams) MarshalJSONTo added in v1.0.0

func (x InitializedParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InitializedParams) UnmarshalJSONFrom added in v1.0.0

func (x *InitializedParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlayHint added in v1.0.0

type InlayHint struct {
	// Position The position of this hint.
	//
	// If multiple hints have the same position, they will be shown in the order
	// they appear in the response.
	Position Position `json:"position"`

	// Label The label of this hint. A human readable string or an array of
	// InlayHintLabelPart label parts.
	//
	// *Note* that neither the string nor the label part can be empty.
	Label InlayHintLabel `json:"label"`

	// Kind The kind of this hint. Can be omitted in which case the client
	// should fall back to a reasonable default.
	Kind InlayHintKind `json:"kind,omitzero"`

	// TextEdits Optional text edits that are performed when accepting this inlay hint.
	//
	// *Note* that edits are expected to change the document so that the inlay
	// hint (or its nearest variant) is now part of the document and the inlay
	// hint itself is now obsolete.
	TextEdits []TextEdit `json:"textEdits,omitzero"`

	// Tooltip The tooltip text when you hover over this item.
	Tooltip InlayHintTooltip `json:"tooltip,omitzero"`

	// PaddingLeft Render padding before the hint.
	//
	// Note: Padding should use the editor's background color, not the
	// background color of the hint itself. That means padding can be used
	// to visually align/separate an inlay hint.
	PaddingLeft *bool `json:"paddingLeft,omitzero"`

	// PaddingRight Render padding after the hint.
	//
	// Note: Padding should use the editor's background color, not the
	// background color of the hint itself. That means padding can be used
	// to visually align/separate an inlay hint.
	PaddingRight *bool `json:"paddingRight,omitzero"`

	// Data A data entry field that is preserved on an inlay hint between
	// a `textDocument/inlayHint` and a `inlayHint/resolve` request.
	Data LSPAny `json:"data,omitzero"`
}

InlayHint Inlay hint information.

Since: 3.17.0

func (InlayHint) MarshalJSONTo added in v1.0.0

func (x InlayHint) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlayHint) UnmarshalJSONFrom added in v1.0.0

func (x *InlayHint) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlayHintClientCapabilities added in v1.0.0

type InlayHintClientCapabilities struct {
	// DynamicRegistration Whether inlay hints support dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// ResolveSupport Indicates which properties a client can resolve lazily on an inlay
	// hint.
	ResolveSupport ClientInlayHintResolveOptions `json:"resolveSupport,omitzero"`
}

InlayHintClientCapabilities Inlay hint client capabilities.

Since: 3.17.0

func (InlayHintClientCapabilities) MarshalJSONTo added in v1.0.0

func (x InlayHintClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlayHintClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *InlayHintClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlayHintKind added in v1.0.0

type InlayHintKind uint32

InlayHintKind Inlay hint kinds.

Since: 3.17.0

const (
	// InlayHintKindType An inlay hint that for a type annotation.
	InlayHintKindType InlayHintKind = 1
	// InlayHintKindParameter An inlay hint that is for a parameter.
	InlayHintKindParameter InlayHintKind = 2
)

InlayHintKind enumeration values.

type InlayHintLabel added in v1.0.0

type InlayHintLabel interface {
	// contains filtered or unexported methods
}

InlayHintLabel is one of: String, InlayHintLabelPartSlice.

type InlayHintLabelPart added in v1.0.0

type InlayHintLabelPart struct {
	// Value The value of this label part.
	Value string `json:"value"`

	// Tooltip The tooltip text when you hover over this label part. Depending on
	// the client capability `inlayHint.resolveSupport` clients might resolve
	// this property late using the resolve request.
	Tooltip InlayHintTooltip `json:"tooltip,omitzero"`

	// Location An optional source code location that represents this
	// label part.
	//
	// The editor will use this location for the hover and for code navigation
	// features: This part will become a clickable link that resolves to the
	// definition of the symbol at the given location (not necessarily the
	// location itself), it shows the hover that shows at the given location,
	// and it shows a context menu with further code navigation commands.
	//
	// Depending on the client capability `inlayHint.resolveSupport` clients
	// might resolve this property late using the resolve request.
	Location Location `json:"location,omitzero"`

	// Command An optional command for this label part.
	//
	// Depending on the client capability `inlayHint.resolveSupport` clients
	// might resolve this property late using the resolve request.
	Command Command `json:"command,omitzero"`
}

InlayHintLabelPart An inlay hint label part allows for interactive and composite labels of inlay hints.

Since: 3.17.0

func (InlayHintLabelPart) MarshalJSONTo added in v1.0.0

func (x InlayHintLabelPart) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlayHintLabelPart) UnmarshalJSONFrom added in v1.0.0

func (x *InlayHintLabelPart) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlayHintLabelPartSlice added in v1.0.0

type InlayHintLabelPartSlice []InlayHintLabelPart

InlayHintLabelPartSlice is a named type so a []InlayHintLabelPart arm can satisfy a union interface.

func (InlayHintLabelPartSlice) MarshalJSONTo added in v1.0.0

func (x InlayHintLabelPartSlice) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlayHintLabelPartSlice) UnmarshalJSONFrom added in v1.0.0

func (x *InlayHintLabelPartSlice) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlayHintOptions added in v1.0.0

type InlayHintOptions struct {
	WorkDoneProgressOptions

	// ResolveProvider The server provides support to resolve additional
	// information for an inlay hint item.
	ResolveProvider *bool `json:"resolveProvider,omitzero"`
}

InlayHintOptions Inlay hint options used during static registration.

Since: 3.17.0

func (InlayHintOptions) MarshalJSONTo added in v1.0.0

func (x InlayHintOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlayHintOptions) UnmarshalJSONFrom added in v1.0.0

func (x *InlayHintOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlayHintParams added in v1.0.0

type InlayHintParams struct {
	WorkDoneProgressParams

	// TextDocument The text document.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Range The document range for which inlay hints should be computed.
	Range Range `json:"range"`
}

InlayHintParams A parameter literal used in inlay hint requests.

Since: 3.17.0

func (InlayHintParams) MarshalJSONTo added in v1.0.0

func (x InlayHintParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlayHintParams) UnmarshalJSONFrom added in v1.0.0

func (x *InlayHintParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlayHintProvider added in v1.0.0

type InlayHintProvider interface {
	// contains filtered or unexported methods
}

InlayHintProvider is one of: Boolean, *InlayHintOptions, *InlayHintRegistrationOptions.

type InlayHintRegistrationOptions added in v1.0.0

type InlayHintRegistrationOptions struct {
	InlayHintOptions
	TextDocumentRegistrationOptions
	StaticRegistrationOptions
}

InlayHintRegistrationOptions Inlay hint options used during static or dynamic registration.

Since: 3.17.0

func (InlayHintRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x InlayHintRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlayHintRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *InlayHintRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlayHintTooltip added in v1.0.0

type InlayHintTooltip interface {
	// contains filtered or unexported methods
}

InlayHintTooltip is one of: String, *MarkupContent.

type InlayHintWorkspaceClientCapabilities added in v1.0.0

type InlayHintWorkspaceClientCapabilities struct {
	// RefreshSupport 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
	// inlay hints currently shown. It should be used with absolute care and
	// is useful for situation where a server for example detects a project wide
	// change that requires such a calculation.
	RefreshSupport *bool `json:"refreshSupport,omitzero"`
}

InlayHintWorkspaceClientCapabilities Client workspace capabilities specific to inlay hints.

Since: 3.17.0

func (InlayHintWorkspaceClientCapabilities) MarshalJSONTo added in v1.0.0

func (*InlayHintWorkspaceClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *InlayHintWorkspaceClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineCompletionClientCapabilities added in v1.0.0

type InlineCompletionClientCapabilities struct {
	// DynamicRegistration Whether implementation supports dynamic registration for inline completion providers.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`
}

InlineCompletionClientCapabilities Client capabilities specific to inline completions.

Since: 3.18.0

func (InlineCompletionClientCapabilities) MarshalJSONTo added in v1.0.0

func (*InlineCompletionClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *InlineCompletionClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineCompletionContext added in v1.0.0

type InlineCompletionContext struct {
	// TriggerKind Describes how the inline completion was triggered.
	TriggerKind InlineCompletionTriggerKind `json:"triggerKind"`

	// SelectedCompletionInfo Provides information about the currently selected item in the autocomplete widget if it is visible.
	SelectedCompletionInfo SelectedCompletionInfo `json:"selectedCompletionInfo,omitzero"`
}

InlineCompletionContext Provides information about the context in which an inline completion was requested.

Since: 3.18.0

func (InlineCompletionContext) MarshalJSONTo added in v1.0.0

func (x InlineCompletionContext) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlineCompletionContext) UnmarshalJSONFrom added in v1.0.0

func (x *InlineCompletionContext) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineCompletionItem added in v1.0.0

type InlineCompletionItem struct {
	// InsertText The text to replace the range with. Must be set.
	InsertText InlineCompletionItemInsertText `json:"insertText"`

	// FilterText A text that is used to decide if this inline completion should be shown. When `falsy` the [InlineCompletionItem.insertText] is used.
	FilterText *string `json:"filterText,omitzero"`

	// Range The range to replace. Must begin and end on the same line.
	Range *Range `json:"range,omitzero"`

	// Command An optional [Command] that is executed *after* inserting this completion.
	Command Command `json:"command,omitzero"`
}

InlineCompletionItem An inline completion item represents a text snippet that is proposed inline to complete text that is being typed.

Since: 3.18.0

func (InlineCompletionItem) MarshalJSONTo added in v1.0.0

func (x InlineCompletionItem) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlineCompletionItem) UnmarshalJSONFrom added in v1.0.0

func (x *InlineCompletionItem) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineCompletionItemInsertText added in v1.0.0

type InlineCompletionItemInsertText interface {
	// contains filtered or unexported methods
}

InlineCompletionItemInsertText is one of: String, *StringValue.

type InlineCompletionItemSlice added in v1.0.0

type InlineCompletionItemSlice []InlineCompletionItem

InlineCompletionItemSlice is a named type so a []InlineCompletionItem arm can satisfy a union interface.

func (InlineCompletionItemSlice) MarshalJSONTo added in v1.0.0

func (x InlineCompletionItemSlice) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlineCompletionItemSlice) UnmarshalJSONFrom added in v1.0.0

func (x *InlineCompletionItemSlice) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineCompletionList added in v1.0.0

type InlineCompletionList struct {
	// Items The inline completion items
	Items []InlineCompletionItem `json:"items"`
}

InlineCompletionList Represents a collection of InlineCompletionItem to be presented in the editor.

Since: 3.18.0

func (InlineCompletionList) MarshalJSONTo added in v1.0.0

func (x InlineCompletionList) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlineCompletionList) UnmarshalJSONFrom added in v1.0.0

func (x *InlineCompletionList) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineCompletionOptions added in v1.0.0

type InlineCompletionOptions struct {
	WorkDoneProgressOptions
}

InlineCompletionOptions Inline completion options used during static registration.

Since: 3.18.0

func (InlineCompletionOptions) MarshalJSONTo added in v1.0.0

func (x InlineCompletionOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlineCompletionOptions) UnmarshalJSONFrom added in v1.0.0

func (x *InlineCompletionOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineCompletionParams added in v1.0.0

type InlineCompletionParams struct {
	TextDocumentPositionParams
	WorkDoneProgressParams

	// Context Additional information about the context in which inline completions were
	// requested.
	Context InlineCompletionContext `json:"context"`
}

InlineCompletionParams A parameter literal used in inline completion requests.

Since: 3.18.0

func (InlineCompletionParams) MarshalJSONTo added in v1.0.0

func (x InlineCompletionParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlineCompletionParams) UnmarshalJSONFrom added in v1.0.0

func (x *InlineCompletionParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineCompletionProvider added in v1.0.0

type InlineCompletionProvider interface {
	// contains filtered or unexported methods
}

InlineCompletionProvider is one of: Boolean, *InlineCompletionOptions.

type InlineCompletionRegistrationOptions added in v1.0.0

type InlineCompletionRegistrationOptions struct {
	InlineCompletionOptions
	TextDocumentRegistrationOptions
	StaticRegistrationOptions
}

InlineCompletionRegistrationOptions Inline completion options used during static or dynamic registration.

Since: 3.18.0

func (InlineCompletionRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*InlineCompletionRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *InlineCompletionRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineCompletionResult added in v1.0.0

type InlineCompletionResult interface {
	// contains filtered or unexported methods
}

InlineCompletionResult is one of: *InlineCompletionList, InlineCompletionItemSlice.

type InlineCompletionTriggerKind added in v1.0.0

type InlineCompletionTriggerKind uint32

InlineCompletionTriggerKind Describes how an [InlineCompletionItemProvider] was triggered.

Since: 3.18.0

const (
	// InlineCompletionTriggerKindInvoked Completion was triggered explicitly by a user gesture.
	InlineCompletionTriggerKindInvoked InlineCompletionTriggerKind = 1
	// InlineCompletionTriggerKindAutomatic Completion was triggered automatically while editing.
	InlineCompletionTriggerKindAutomatic InlineCompletionTriggerKind = 2
)

InlineCompletionTriggerKind enumeration values.

type InlineValue added in v1.0.0

type InlineValue interface {
	// contains filtered or unexported methods
}

InlineValue Inline value information can be provided by different means: - directly as a text value (class InlineValueText). - as a name to use for a variable lookup (class InlineValueVariableLookup) - as an evaluatable expression (class InlineValueEvaluatableExpression) The InlineValue types combines all inline value types into one type.

Since: 3.17.0

type InlineValueClientCapabilities added in v1.0.0

type InlineValueClientCapabilities struct {
	// DynamicRegistration Whether implementation supports dynamic registration for inline value providers.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`
}

InlineValueClientCapabilities Client capabilities specific to inline values.

Since: 3.17.0

func (InlineValueClientCapabilities) MarshalJSONTo added in v1.0.0

func (x InlineValueClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlineValueClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *InlineValueClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineValueContext added in v1.0.0

type InlineValueContext struct {
	// FrameID The stack frame (as a DAP Id) where the execution has stopped.
	FrameID int32 `json:"frameId"`

	// StoppedLocation The document range where execution has stopped.
	// Typically the end position of the range denotes the line where the inline values are shown.
	StoppedLocation Range `json:"stoppedLocation"`
}

InlineValueContext is defined by the LSP specification.

Since: 3.17.0

func (InlineValueContext) MarshalJSONTo added in v1.0.0

func (x InlineValueContext) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlineValueContext) UnmarshalJSONFrom added in v1.0.0

func (x *InlineValueContext) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineValueEvaluatableExpression added in v1.0.0

type InlineValueEvaluatableExpression struct {
	// Range The document range for which the inline value applies.
	//
	// The range could be used to extract the evaluatable expression
	// from the underlying document.
	Range Range `json:"range"`

	// Expression If specified the expression could be evaluated instead.
	Expression *string `json:"expression,omitzero"`
}

InlineValueEvaluatableExpression To compute an inline value through an expression evaluation.

If only a range is specified, the expression should be extracted from the underlying document.

An optional expression could be evaluated instead of the extracted expression.

Since: 3.17.0

func (InlineValueEvaluatableExpression) MarshalJSONTo added in v1.0.0

func (*InlineValueEvaluatableExpression) UnmarshalJSONFrom added in v1.0.0

func (x *InlineValueEvaluatableExpression) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineValueOptions added in v1.0.0

type InlineValueOptions struct {
	WorkDoneProgressOptions
}

InlineValueOptions Inline value options used during static registration.

Since: 3.17.0

func (InlineValueOptions) MarshalJSONTo added in v1.0.0

func (x InlineValueOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlineValueOptions) UnmarshalJSONFrom added in v1.0.0

func (x *InlineValueOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineValueParams added in v1.0.0

type InlineValueParams struct {
	WorkDoneProgressParams

	// TextDocument The text document.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Range The document range for which inline values information will be returned.
	Range Range `json:"range"`

	// Context Additional information about the context in which inline values information was
	// requested.	 */
	Context InlineValueContext `json:"context"`
}

InlineValueParams A parameter literal used in inline value requests.

Since: 3.17.0

func (InlineValueParams) MarshalJSONTo added in v1.0.0

func (x InlineValueParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlineValueParams) UnmarshalJSONFrom added in v1.0.0

func (x *InlineValueParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineValueProvider added in v1.0.0

type InlineValueProvider interface {
	// contains filtered or unexported methods
}

InlineValueProvider is one of: Boolean, *InlineValueOptions, *InlineValueRegistrationOptions.

type InlineValueRegistrationOptions added in v1.0.0

type InlineValueRegistrationOptions struct {
	InlineValueOptions
	TextDocumentRegistrationOptions
	StaticRegistrationOptions
}

InlineValueRegistrationOptions Inline value options used during static or dynamic registration.

Since: 3.17.0

func (InlineValueRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x InlineValueRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlineValueRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *InlineValueRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineValueText added in v1.0.0

type InlineValueText struct {
	// Range The document range for which the inline value applies.
	Range Range `json:"range"`

	// Text The text of the inline value.
	Text string `json:"text"`
}

InlineValueText Returns inline value information as the complete text to be shown.

Since: 3.17.0

func (InlineValueText) MarshalJSONTo added in v1.0.0

func (x InlineValueText) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlineValueText) UnmarshalJSONFrom added in v1.0.0

func (x *InlineValueText) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineValueVariableLookup added in v1.0.0

type InlineValueVariableLookup struct {
	// Range The document range for which the inline value applies.
	//
	// The range could be used to extract the variable name
	// from the underlying document.
	Range Range `json:"range"`

	// VariableName If specified the name of the variable to look up.
	VariableName *string `json:"variableName,omitzero"`

	// CaseSensitiveLookup How to perform the lookup.
	CaseSensitiveLookup bool `json:"caseSensitiveLookup"`
}

InlineValueVariableLookup To compute inline value through a variable lookup.

If only a range is specified, the variable name should be extracted from the underlying document.

An optional variable name could be used to lookup instead of the extracted name.

Since: 3.17.0

func (InlineValueVariableLookup) MarshalJSONTo added in v1.0.0

func (x InlineValueVariableLookup) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InlineValueVariableLookup) UnmarshalJSONFrom added in v1.0.0

func (x *InlineValueVariableLookup) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InlineValueWorkspaceClientCapabilities added in v1.0.0

type InlineValueWorkspaceClientCapabilities struct {
	// RefreshSupport 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
	// inline values currently shown. It should be used with absolute care and is
	// useful for situation where a server for example detects a project wide
	// change that requires such a calculation.
	RefreshSupport *bool `json:"refreshSupport,omitzero"`
}

InlineValueWorkspaceClientCapabilities Client workspace capabilities specific to inline values.

Since: 3.17.0

func (InlineValueWorkspaceClientCapabilities) MarshalJSONTo added in v1.0.0

func (*InlineValueWorkspaceClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *InlineValueWorkspaceClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InsertReplaceEdit added in v0.11.0

type InsertReplaceEdit struct {
	// NewText The string to be inserted.
	NewText string `json:"newText"`

	// Insert The range if the insert is requested
	Insert Range `json:"insert"`

	// Replace The range if the replace is requested.
	Replace Range `json:"replace"`
}

InsertReplaceEdit A special text edit to provide an insert and a replace operation.

Since: 3.16.0

func (InsertReplaceEdit) MarshalJSONTo added in v1.0.0

func (x InsertReplaceEdit) MarshalJSONTo(enc *jsontext.Encoder) error

func (*InsertReplaceEdit) UnmarshalJSONFrom added in v1.0.0

func (x *InsertReplaceEdit) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type InsertTextFormat

type InsertTextFormat uint32

InsertTextFormat Defines whether the insert text in a completion item should be interpreted as plain text or a snippet.

const (
	// InsertTextFormatPlainText The primary text to be inserted is treated as a plain string.
	InsertTextFormatPlainText InsertTextFormat = 1
	// InsertTextFormatSnippet The primary text to be inserted is treated as a snippet.
	//
	// A snippet can define tab stops and placeholders with `$1`, `$2`
	// and `${3:foo}`. `$0` defines the final tab stop, it defaults to
	// the end of the snippet. Placeholders with equal identifiers are linked,
	// that is typing in one will update others too.
	//
	// See also: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#snippet_syntax
	InsertTextFormatSnippet InsertTextFormat = 2
)

InsertTextFormat enumeration values.

type InsertTextMode added in v0.11.0

type InsertTextMode uint32

InsertTextMode How whitespace and indentation is handled during completion item insertion.

Since: 3.16.0

const (
	// InsertTextModeAsIs 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.
	InsertTextModeAsIs InsertTextMode = 1
	// InsertTextModeAdjustIndentation 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.
	InsertTextModeAdjustIndentation InsertTextMode = 2
)

InsertTextMode enumeration values.

type Integer added in v1.0.0

type Integer int32

Integer is a signed integer union arm.

type LSPAny added in v1.0.0

type LSPAny = jsontext.Value

LSPAny is the LSP "any" type: any valid JSON value (object, array, string, number, boolean or null).

It is represented as a raw JSON value (jsontext.Value) rather than a sealed interface: this round-trips byte-for-byte without an "any"/interface{} field and defers typing to the caller, who may decode it on demand.

type LSPArray added in v1.0.0

type LSPArray = []jsontext.Value

LSPArray is an LSP array: a JSON array whose elements are LSPAny.

type LSPErrorCodes added in v1.0.0

type LSPErrorCodes int32

LSPErrorCodes is defined by the LSP specification.

const (
	// LSPErrorCodesRequestFailed A request failed but it was syntactically correct, e.g the
	// method name was known and the parameters were valid. The error
	// message should contain human readable information about why
	// the request failed.
	//
	// Since: 3.17.0
	LSPErrorCodesRequestFailed LSPErrorCodes = -32803
	// LSPErrorCodesServerCancelled The server cancelled the request. This error code should
	// only be used for requests that explicitly support being
	// server cancellable.
	//
	// Since: 3.17.0
	LSPErrorCodesServerCancelled LSPErrorCodes = -32802
	// LSPErrorCodesContentModified The server detected that the content of a document got
	// modified outside normal conditions. A server should
	// NOT send this error code if it detects a content change
	// in it unprocessed messages. The result even computed
	// on an older state might still be useful for the client.
	//
	// If a client decides that a result is not of any use anymore
	// the client should cancel the request.
	LSPErrorCodesContentModified LSPErrorCodes = -32801
	// LSPErrorCodesRequestCancelled The client has canceled a request and a server has detected
	// the cancel.
	LSPErrorCodesRequestCancelled LSPErrorCodes = -32800
)

LSPErrorCodes enumeration values.

type LSPObject added in v1.0.0

type LSPObject = map[string]jsontext.Value

LSPObject is an LSP object: a JSON object whose values are LSPAny.

type LanguageKind added in v1.0.0

type LanguageKind string

LanguageKind Predefined Language kinds

Since: 3.18.0

const (
	// LanguageKindABAP is defined by the LSP specification.
	LanguageKindABAP LanguageKind = "abap"
	// LanguageKindWindowsBat is defined by the LSP specification.
	LanguageKindWindowsBat LanguageKind = "bat"
	// LanguageKindBibTeX is defined by the LSP specification.
	LanguageKindBibTeX LanguageKind = "bibtex"
	// LanguageKindClojure is defined by the LSP specification.
	LanguageKindClojure LanguageKind = "clojure"
	// LanguageKindCoffeescript is defined by the LSP specification.
	LanguageKindCoffeescript LanguageKind = "coffeescript"
	// LanguageKindC is defined by the LSP specification.
	LanguageKindC LanguageKind = "c"
	// LanguageKindCPP is defined by the LSP specification.
	LanguageKindCPP LanguageKind = "cpp"
	// LanguageKindCSharp is defined by the LSP specification.
	LanguageKindCSharp LanguageKind = "csharp"
	// LanguageKindCSS is defined by the LSP specification.
	LanguageKindCSS LanguageKind = "css"
	// LanguageKindD is defined by the LSP specification.
	//
	// Since: 3.18.0
	LanguageKindD LanguageKind = "d"
	// LanguageKindDelphi is defined by the LSP specification.
	//
	// Since: 3.18.0
	LanguageKindDelphi LanguageKind = "pascal"
	// LanguageKindDiff is defined by the LSP specification.
	LanguageKindDiff LanguageKind = "diff"
	// LanguageKindDart is defined by the LSP specification.
	LanguageKindDart LanguageKind = "dart"
	// LanguageKindDockerfile is defined by the LSP specification.
	LanguageKindDockerfile LanguageKind = "dockerfile"
	// LanguageKindElixir is defined by the LSP specification.
	LanguageKindElixir LanguageKind = "elixir"
	// LanguageKindErlang is defined by the LSP specification.
	LanguageKindErlang LanguageKind = "erlang"
	// LanguageKindFSharp is defined by the LSP specification.
	LanguageKindFSharp LanguageKind = "fsharp"
	// LanguageKindGitCommit is defined by the LSP specification.
	LanguageKindGitCommit LanguageKind = "git-commit"
	// LanguageKindGitRebase is defined by the LSP specification.
	LanguageKindGitRebase LanguageKind = "git-rebase"
	// LanguageKindGo is defined by the LSP specification.
	LanguageKindGo LanguageKind = "go"
	// LanguageKindGroovy is defined by the LSP specification.
	LanguageKindGroovy LanguageKind = "groovy"
	// LanguageKindHandlebars is defined by the LSP specification.
	LanguageKindHandlebars LanguageKind = "handlebars"
	// LanguageKindHaskell is defined by the LSP specification.
	LanguageKindHaskell LanguageKind = "haskell"
	// LanguageKindHTML is defined by the LSP specification.
	LanguageKindHTML LanguageKind = "html"
	// LanguageKindIni is defined by the LSP specification.
	LanguageKindIni LanguageKind = "ini"
	// LanguageKindJava is defined by the LSP specification.
	LanguageKindJava LanguageKind = "java"
	// LanguageKindJavaScript is defined by the LSP specification.
	LanguageKindJavaScript LanguageKind = "javascript"
	// LanguageKindJavaScriptReact is defined by the LSP specification.
	LanguageKindJavaScriptReact LanguageKind = "javascriptreact"
	// LanguageKindJSON is defined by the LSP specification.
	LanguageKindJSON LanguageKind = "json"
	// LanguageKindLaTeX is defined by the LSP specification.
	LanguageKindLaTeX LanguageKind = "latex"
	// LanguageKindLess is defined by the LSP specification.
	LanguageKindLess LanguageKind = "less"
	// LanguageKindLua is defined by the LSP specification.
	LanguageKindLua LanguageKind = "lua"
	// LanguageKindMakefile is defined by the LSP specification.
	LanguageKindMakefile LanguageKind = "makefile"
	// LanguageKindMarkdown is defined by the LSP specification.
	LanguageKindMarkdown LanguageKind = "markdown"
	// LanguageKindObjectiveC is defined by the LSP specification.
	LanguageKindObjectiveC LanguageKind = "objective-c"
	// LanguageKindObjectiveCPP is defined by the LSP specification.
	LanguageKindObjectiveCPP LanguageKind = "objective-cpp"
	// LanguageKindPascal is defined by the LSP specification.
	//
	// Since: 3.18.0
	LanguageKindPascal LanguageKind = "pascal"
	// LanguageKindPerl is defined by the LSP specification.
	LanguageKindPerl LanguageKind = "perl"
	// LanguageKindPerl6 is defined by the LSP specification.
	LanguageKindPerl6 LanguageKind = "perl6"
	// LanguageKindPHP is defined by the LSP specification.
	LanguageKindPHP LanguageKind = "php"
	// LanguageKindPlaintext is defined by the LSP specification.
	LanguageKindPlaintext LanguageKind = "plaintext"
	// LanguageKindPowershell is defined by the LSP specification.
	LanguageKindPowershell LanguageKind = "powershell"
	// LanguageKindPug is defined by the LSP specification.
	LanguageKindPug LanguageKind = "jade"
	// LanguageKindPython is defined by the LSP specification.
	LanguageKindPython LanguageKind = "python"
	// LanguageKindR is defined by the LSP specification.
	LanguageKindR LanguageKind = "r"
	// LanguageKindRazor is defined by the LSP specification.
	LanguageKindRazor LanguageKind = "razor"
	// LanguageKindRuby is defined by the LSP specification.
	LanguageKindRuby LanguageKind = "ruby"
	// LanguageKindRust is defined by the LSP specification.
	LanguageKindRust LanguageKind = "rust"
	// LanguageKindSCSS is defined by the LSP specification.
	LanguageKindSCSS LanguageKind = "scss"
	// LanguageKindSASS is defined by the LSP specification.
	LanguageKindSASS LanguageKind = "sass"
	// LanguageKindScala is defined by the LSP specification.
	LanguageKindScala LanguageKind = "scala"
	// LanguageKindShaderLab is defined by the LSP specification.
	LanguageKindShaderLab LanguageKind = "shaderlab"
	// LanguageKindShellScript is defined by the LSP specification.
	LanguageKindShellScript LanguageKind = "shellscript"
	// LanguageKindSQL is defined by the LSP specification.
	LanguageKindSQL LanguageKind = "sql"
	// LanguageKindSwift is defined by the LSP specification.
	LanguageKindSwift LanguageKind = "swift"
	// LanguageKindTypeScript is defined by the LSP specification.
	LanguageKindTypeScript LanguageKind = "typescript"
	// LanguageKindTypeScriptReact is defined by the LSP specification.
	LanguageKindTypeScriptReact LanguageKind = "typescriptreact"
	// LanguageKindTeX is defined by the LSP specification.
	LanguageKindTeX LanguageKind = "tex"
	// LanguageKindVisualBasic is defined by the LSP specification.
	LanguageKindVisualBasic LanguageKind = "vb"
	// LanguageKindXML is defined by the LSP specification.
	LanguageKindXML LanguageKind = "xml"
	// LanguageKindXSL is defined by the LSP specification.
	LanguageKindXSL LanguageKind = "xsl"
	// LanguageKindYAML is defined by the LSP specification.
	LanguageKindYAML LanguageKind = "yaml"
)

LanguageKind enumeration values.

type LinkedEditingRangeClientCapabilities added in v0.11.1

type LinkedEditingRangeClientCapabilities struct {
	// DynamicRegistration 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,omitzero"`
}

LinkedEditingRangeClientCapabilities Client capabilities for the linked editing range request.

Since: 3.16.0

func (LinkedEditingRangeClientCapabilities) MarshalJSONTo added in v1.0.0

func (*LinkedEditingRangeClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *LinkedEditingRangeClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type LinkedEditingRangeOptions added in v0.11.0

type LinkedEditingRangeOptions struct {
	WorkDoneProgressOptions
}

LinkedEditingRangeOptions is defined by the LSP specification.

func (LinkedEditingRangeOptions) MarshalJSONTo added in v1.0.0

func (x LinkedEditingRangeOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*LinkedEditingRangeOptions) UnmarshalJSONFrom added in v1.0.0

func (x *LinkedEditingRangeOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type LinkedEditingRangeParams added in v0.11.0

type LinkedEditingRangeParams struct {
	TextDocumentPositionParams
	WorkDoneProgressParams
}

LinkedEditingRangeParams is defined by the LSP specification.

func (LinkedEditingRangeParams) MarshalJSONTo added in v1.0.0

func (x LinkedEditingRangeParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*LinkedEditingRangeParams) UnmarshalJSONFrom added in v1.0.0

func (x *LinkedEditingRangeParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type LinkedEditingRangeProvider added in v1.0.0

type LinkedEditingRangeProvider interface {
	// contains filtered or unexported methods
}

LinkedEditingRangeProvider is one of: Boolean, *LinkedEditingRangeOptions, *LinkedEditingRangeRegistrationOptions.

type LinkedEditingRangeRegistrationOptions added in v0.11.0

type LinkedEditingRangeRegistrationOptions struct {
	TextDocumentRegistrationOptions
	LinkedEditingRangeOptions
	StaticRegistrationOptions
}

LinkedEditingRangeRegistrationOptions is defined by the LSP specification.

func (LinkedEditingRangeRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*LinkedEditingRangeRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *LinkedEditingRangeRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type LinkedEditingRanges added in v0.11.0

type LinkedEditingRanges struct {
	// Ranges 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"`

	// WordPattern 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,omitzero"`
}

LinkedEditingRanges The result of a linked editing range request.

Since: 3.16.0

func (LinkedEditingRanges) MarshalJSONTo added in v1.0.0

func (x LinkedEditingRanges) MarshalJSONTo(enc *jsontext.Encoder) error

func (*LinkedEditingRanges) UnmarshalJSONFrom added in v1.0.0

func (x *LinkedEditingRanges) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type Location

type Location struct {
	// URI is defined by the LSP specification.
	URI uri.URI `json:"uri"`

	// Range is defined by the LSP specification.
	Range Range `json:"range"`
}

Location Represents a location inside a resource, such as a line inside a text file.

func (Location) MarshalJSONTo added in v1.0.0

func (x Location) MarshalJSONTo(enc *jsontext.Encoder) error

func (*Location) UnmarshalJSONFrom added in v1.0.0

func (x *Location) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type LocationLink struct {
	// OriginSelectionRange Span of the origin of this link.
	//
	// Used as the underlined span for mouse interaction. Defaults to the word range at
	// the definition position.
	OriginSelectionRange *Range `json:"originSelectionRange,omitzero"`

	// TargetURI The target resource identifier of this link.
	TargetURI uri.URI `json:"targetUri"`

	// TargetRange The full target range of this link. If the target for example is a symbol then target range is the
	// range enclosing this symbol not including leading/trailing whitespace but everything else
	// like comments. This information is typically used to highlight the range in the editor.
	TargetRange Range `json:"targetRange"`

	// TargetSelectionRange The range that should be selected and revealed when this link is being followed, e.g the name of a function.
	// Must be contained by the `targetRange`. See also `DocumentSymbol#range`
	TargetSelectionRange Range `json:"targetSelectionRange"`
}

LocationLink Represents the connection of two locations. Provides additional metadata over normal Location, including an origin range.

func (LocationLink) MarshalJSONTo added in v1.0.0

func (x LocationLink) MarshalJSONTo(enc *jsontext.Encoder) error

func (*LocationLink) UnmarshalJSONFrom added in v1.0.0

func (x *LocationLink) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type LocationSlice added in v1.0.0

type LocationSlice []Location

LocationSlice is a named type so a []Location arm can satisfy a union interface.

func (LocationSlice) MarshalJSONTo added in v1.0.0

func (x LocationSlice) MarshalJSONTo(enc *jsontext.Encoder) error

func (*LocationSlice) UnmarshalJSONFrom added in v1.0.0

func (x *LocationSlice) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type LocationUriOnly added in v1.0.0

type LocationUriOnly struct {
	// URI is defined by the LSP specification.
	URI uri.URI `json:"uri"`
}

LocationUriOnly Location with only uri and does not include range.

Since: 3.18.0

func (LocationUriOnly) MarshalJSONTo added in v1.0.0

func (x LocationUriOnly) MarshalJSONTo(enc *jsontext.Encoder) error

func (*LocationUriOnly) UnmarshalJSONFrom added in v1.0.0

func (x *LocationUriOnly) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type LogMessageParams

type LogMessageParams struct {
	// Type The message type. See [MessageType]
	Type MessageType `json:"type"`

	// Message The actual message.
	Message string `json:"message"`
}

LogMessageParams The log message parameters.

func (LogMessageParams) MarshalJSONTo added in v1.0.0

func (x LogMessageParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*LogMessageParams) UnmarshalJSONFrom added in v1.0.0

func (x *LogMessageParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type LogTraceParams added in v0.11.0

type LogTraceParams struct {
	// Message is defined by the LSP specification.
	Message string `json:"message"`

	// Verbose is defined by the LSP specification.
	Verbose *string `json:"verbose,omitzero"`
}

LogTraceParams is defined by the LSP specification.

func (LogTraceParams) MarshalJSONTo added in v1.0.0

func (x LogTraceParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*LogTraceParams) UnmarshalJSONFrom added in v1.0.0

func (x *LogTraceParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type MarkdownClientCapabilities added in v0.11.0

type MarkdownClientCapabilities struct {
	// Parser The name of the parser.
	Parser string `json:"parser"`

	// Version The version of the parser.
	Version *string `json:"version,omitzero"`

	// AllowedTags A list of HTML tags that the client allows / supports in
	// Markdown.
	//
	// Since: 3.17.0
	AllowedTags []string `json:"allowedTags,omitzero"`
}

MarkdownClientCapabilities Client capabilities specific to the used markdown parser.

Since: 3.16.0

func (MarkdownClientCapabilities) MarshalJSONTo added in v1.0.0

func (x MarkdownClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*MarkdownClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *MarkdownClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type MarkedString deprecated added in v1.0.0

type MarkedString interface {
	// contains filtered or unexported methods
}

MarkedString 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 issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting

The pair of a language and a value is an equivalent to markdown: ```${language} ${value} ```

Note that markdown strings will be sanitized - that means html will be escaped.

Deprecated: use MarkupContent instead.

type MarkedStringSlice added in v1.0.0

type MarkedStringSlice []MarkedString

MarkedStringSlice is a named type so a []MarkedString arm can satisfy a union interface.

func (MarkedStringSlice) MarshalJSONTo added in v1.0.0

func (x MarkedStringSlice) MarshalJSONTo(enc *jsontext.Encoder) error

func (*MarkedStringSlice) UnmarshalJSONFrom added in v1.0.0

func (x *MarkedStringSlice) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type MarkedStringWithLanguage deprecated added in v1.0.0

type MarkedStringWithLanguage struct {
	// Language is defined by the LSP specification.
	Language string `json:"language"`

	// Value is defined by the LSP specification.
	Value string `json:"value"`
}

MarkedStringWithLanguage is defined by the LSP specification.

Since: 3.18.0

Deprecated: use MarkupContent instead.

func (MarkedStringWithLanguage) MarshalJSONTo added in v1.0.0

func (x MarkedStringWithLanguage) MarshalJSONTo(enc *jsontext.Encoder) error

func (*MarkedStringWithLanguage) UnmarshalJSONFrom added in v1.0.0

func (x *MarkedStringWithLanguage) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type MarkupContent

type MarkupContent struct {
	// Kind The type of the Markup
	Kind MarkupKind `json:"kind"`

	// Value The content itself
	Value string `json:"value"`
}

MarkupContent A `MarkupContent` literal represents a string value which content is interpreted base on its kind flag. Currently the protocol supports `plaintext` and `markdown` as markup kinds.

If the kind is `markdown` then the value can contain fenced code blocks like in GitHub issues. See https://help.github.com/articles/creating-and-highlighting-code-blocks/#syntax-highlighting

Here is an example how such a string can be constructed using JavaScript / TypeScript: ```ts

let markdown: MarkdownContent = {
 kind: MarkupKind.Markdown,
 value: [
   '# Header',
   'Some text',
   '```typescript',
   'someCode();',
   '```'
 ].join('\n')
};

```

*Please Note* that clients might sanitize the return markdown. A client could decide to remove HTML from the markdown to avoid script execution.

func (MarkupContent) MarshalJSONTo added in v1.0.0

func (x MarkupContent) MarshalJSONTo(enc *jsontext.Encoder) error

func (*MarkupContent) UnmarshalJSONFrom added in v1.0.0

func (x *MarkupContent) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type MarkupKind

type MarkupKind string

MarkupKind Describes the content type that a client supports in various result literals like `Hover`, `ParameterInfo` or `CompletionItem`.

Please note that `MarkupKinds` must not start with a `$`. This kinds are reserved for internal usage.

const (
	// MarkupKindPlainText Plain text is supported as a content format
	MarkupKindPlainText MarkupKind = "plaintext"
	// MarkupKindMarkdown Markdown is supported as a content format
	MarkupKindMarkdown MarkupKind = "markdown"
)

MarkupKind enumeration values.

type MessageActionItem

type MessageActionItem struct {
	// Title A short title like 'Retry', 'Open Log' etc.
	Title string `json:"title"`
}

MessageActionItem is defined by the LSP specification.

func (MessageActionItem) MarshalJSONTo added in v1.0.0

func (x MessageActionItem) MarshalJSONTo(enc *jsontext.Encoder) error

func (*MessageActionItem) UnmarshalJSONFrom added in v1.0.0

func (x *MessageActionItem) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type MessageDirection added in v1.0.0

type MessageDirection string

MessageDirection indicates in which direction a message is sent.

const (
	DirectionClientToServer MessageDirection = "clientToServer"
	DirectionServerToClient MessageDirection = "serverToClient"
	DirectionBoth           MessageDirection = "both"
)

Message directions.

type MessageType

type MessageType uint32

MessageType The message type

const (
	// MessageTypeError An error message.
	MessageTypeError MessageType = 1
	// MessageTypeWarning A warning message.
	MessageTypeWarning MessageType = 2
	// MessageTypeInfo An information message.
	MessageTypeInfo MessageType = 3
	// MessageTypeLog A log message.
	MessageTypeLog MessageType = 4
	// MessageTypeDebug A debug message.
	//
	// Since: 3.18.0
	MessageTypeDebug MessageType = 5
)

MessageType enumeration values.

type MethodInfo added in v1.0.0

type MethodInfo struct {
	Method     string
	Direction  MessageDirection
	Kind       string
	ParamsType string
	ResultType string
}

MethodInfo describes a single LSP request or notification.

type Moniker added in v0.11.0

type Moniker struct {
	// Scheme The scheme of the moniker. For example tsc or .Net
	Scheme string `json:"scheme"`

	// Identifier The identifier of the moniker. The value is opaque in LSIF however
	// schema owners are allowed to define the structure if they want.
	Identifier string `json:"identifier"`

	// Unique The scope in which the moniker is unique
	Unique UniquenessLevel `json:"unique"`

	// Kind The moniker kind if known.
	Kind MonikerKind `json:"kind,omitzero"`
}

Moniker Moniker definition to match LSIF 0.5 moniker definition.

Since: 3.16.0

func (Moniker) MarshalJSONTo added in v1.0.0

func (x Moniker) MarshalJSONTo(enc *jsontext.Encoder) error

func (*Moniker) UnmarshalJSONFrom added in v1.0.0

func (x *Moniker) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type MonikerClientCapabilities added in v0.11.1

type MonikerClientCapabilities struct {
	// DynamicRegistration 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,omitzero"`
}

MonikerClientCapabilities Client capabilities specific to the moniker request.

Since: 3.16.0

func (MonikerClientCapabilities) MarshalJSONTo added in v1.0.0

func (x MonikerClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*MonikerClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *MonikerClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type MonikerKind added in v0.11.0

type MonikerKind string

MonikerKind The moniker kind.

Since: 3.16.0

const (
	// MonikerKindImport The moniker represent a symbol that is imported into a project
	MonikerKindImport MonikerKind = "import"
	// MonikerKindExport The moniker represents a symbol that is exported from a project
	MonikerKindExport MonikerKind = "export"
	// MonikerKindLocal The moniker represents a symbol that is local to a project (e.g. a local
	// variable of a function, a class not visible outside the project, ...)
	MonikerKindLocal MonikerKind = "local"
)

MonikerKind enumeration values.

type MonikerOptions added in v0.11.0

type MonikerOptions struct {
	WorkDoneProgressOptions
}

MonikerOptions is defined by the LSP specification.

func (MonikerOptions) MarshalJSONTo added in v1.0.0

func (x MonikerOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*MonikerOptions) UnmarshalJSONFrom added in v1.0.0

func (x *MonikerOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type MonikerParams added in v0.11.0

MonikerParams is defined by the LSP specification.

func (MonikerParams) MarshalJSONTo added in v1.0.0

func (x MonikerParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*MonikerParams) UnmarshalJSONFrom added in v1.0.0

func (x *MonikerParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type MonikerProvider added in v1.0.0

type MonikerProvider interface {
	// contains filtered or unexported methods
}

MonikerProvider is one of: Boolean, *MonikerOptions, *MonikerRegistrationOptions.

type MonikerRegistrationOptions added in v0.11.0

type MonikerRegistrationOptions struct {
	TextDocumentRegistrationOptions
	MonikerOptions
}

MonikerRegistrationOptions is defined by the LSP specification.

func (MonikerRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x MonikerRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*MonikerRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *MonikerRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookCell added in v1.0.0

type NotebookCell struct {
	// Kind The cell's kind
	Kind NotebookCellKind `json:"kind"`

	// Document The URI of the cell's text document
	// content.
	Document uri.URI `json:"document"`

	// Metadata Additional metadata stored with the cell.
	//
	// Note: should always be an object literal (e.g. LSPObject)
	Metadata LSPObject `json:"metadata,omitzero"`

	// ExecutionSummary Additional execution summary information
	// if supported by the client.
	ExecutionSummary *ExecutionSummary `json:"executionSummary,omitzero"`
}

NotebookCell A notebook cell.

A cell's document URI must be unique across ALL notebook cells and can therefore be used to uniquely identify a notebook cell or the cell's text document.

Since: 3.17.0

func (NotebookCell) MarshalJSONTo added in v1.0.0

func (x NotebookCell) MarshalJSONTo(enc *jsontext.Encoder) error

func (*NotebookCell) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookCell) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookCellArrayChange added in v1.0.0

type NotebookCellArrayChange struct {
	// Start The start oftest of the cell that changed.
	Start uint32 `json:"start"`

	// DeleteCount The deleted cells
	DeleteCount uint32 `json:"deleteCount"`

	// Cells The new cells, if any
	Cells []NotebookCell `json:"cells,omitzero"`
}

NotebookCellArrayChange A change describing how to move a `NotebookCell` array from state S to S'.

Since: 3.17.0

func (NotebookCellArrayChange) MarshalJSONTo added in v1.0.0

func (x NotebookCellArrayChange) MarshalJSONTo(enc *jsontext.Encoder) error

func (*NotebookCellArrayChange) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookCellArrayChange) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookCellKind added in v1.0.0

type NotebookCellKind uint32

NotebookCellKind A notebook cell kind.

Since: 3.17.0

const (
	// NotebookCellKindMarkup A markup-cell is formatted source that is used for display.
	NotebookCellKindMarkup NotebookCellKind = 1
	// NotebookCellKindCode A code-cell is source code.
	NotebookCellKindCode NotebookCellKind = 2
)

NotebookCellKind enumeration values.

type NotebookCellLanguage added in v1.0.0

type NotebookCellLanguage struct {
	// Language is defined by the LSP specification.
	Language string `json:"language"`
}

NotebookCellLanguage is defined by the LSP specification.

Since: 3.18.0

func (NotebookCellLanguage) MarshalJSONTo added in v1.0.0

func (x NotebookCellLanguage) MarshalJSONTo(enc *jsontext.Encoder) error

func (*NotebookCellLanguage) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookCellLanguage) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookCellTextDocumentFilter added in v1.0.0

type NotebookCellTextDocumentFilter struct {
	// Notebook A filter that matches against the notebook
	// containing the notebook cell. If a string
	// value is provided it matches against the
	// notebook type. '*' matches every notebook.
	Notebook NotebookDocumentFilterNotebook `json:"notebook"`

	// Language A language id like `python`.
	//
	// Will be matched against the language id of the
	// notebook cell document. '*' matches every language.
	Language *string `json:"language,omitzero"`
}

NotebookCellTextDocumentFilter A notebook cell text document filter denotes a cell text document by different properties.

Since: 3.17.0

func (NotebookCellTextDocumentFilter) MarshalJSONTo added in v1.0.0

func (x NotebookCellTextDocumentFilter) MarshalJSONTo(enc *jsontext.Encoder) error

func (*NotebookCellTextDocumentFilter) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookCellTextDocumentFilter) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocument added in v1.0.0

type NotebookDocument struct {
	// URI The notebook document's uri.
	URI uri.URI `json:"uri"`

	// NotebookType The type of the notebook.
	NotebookType string `json:"notebookType"`

	// Version The version number of this document (it will increase after each
	// change, including undo/redo).
	Version int32 `json:"version"`

	// Metadata Additional metadata stored with the notebook
	// document.
	//
	// Note: should always be an object literal (e.g. LSPObject)
	Metadata LSPObject `json:"metadata,omitzero"`

	// Cells The cells of a notebook.
	Cells []NotebookCell `json:"cells"`
}

NotebookDocument A notebook document.

Since: 3.17.0

func (NotebookDocument) MarshalJSONTo added in v1.0.0

func (x NotebookDocument) MarshalJSONTo(enc *jsontext.Encoder) error

func (*NotebookDocument) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocument) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentCellChangeStructure added in v1.0.0

type NotebookDocumentCellChangeStructure struct {
	// Array The change to the cell array.
	Array NotebookCellArrayChange `json:"array"`

	// DidOpen Additional opened cell text documents.
	DidOpen []TextDocumentItem `json:"didOpen,omitzero"`

	// DidClose Additional closed cell text documents.
	DidClose []TextDocumentIdentifier `json:"didClose,omitzero"`
}

NotebookDocumentCellChangeStructure Structural changes to cells in a notebook document.

Since: 3.18.0

func (NotebookDocumentCellChangeStructure) MarshalJSONTo added in v1.0.0

func (*NotebookDocumentCellChangeStructure) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocumentCellChangeStructure) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentCellChanges added in v1.0.0

type NotebookDocumentCellChanges struct {
	// Structure Changes to the cell structure to add or
	// remove cells.
	Structure *NotebookDocumentCellChangeStructure `json:"structure,omitzero"`

	// Data Changes to notebook cells properties like its
	// kind, execution summary or metadata.
	Data []NotebookCell `json:"data,omitzero"`

	// TextContent Changes to the text content of notebook cells.
	TextContent []NotebookDocumentCellContentChanges `json:"textContent,omitzero"`
}

NotebookDocumentCellChanges Cell changes to a notebook document.

Since: 3.18.0

func (NotebookDocumentCellChanges) MarshalJSONTo added in v1.0.0

func (x NotebookDocumentCellChanges) MarshalJSONTo(enc *jsontext.Encoder) error

func (*NotebookDocumentCellChanges) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocumentCellChanges) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentCellContentChanges added in v1.0.0

type NotebookDocumentCellContentChanges struct {
	// Document is defined by the LSP specification.
	Document VersionedTextDocumentIdentifier `json:"document"`

	// Changes is defined by the LSP specification.
	Changes []TextDocumentContentChangeEvent `json:"changes"`
}

NotebookDocumentCellContentChanges Content changes to a cell in a notebook document.

Since: 3.18.0

func (NotebookDocumentCellContentChanges) MarshalJSONTo added in v1.0.0

func (*NotebookDocumentCellContentChanges) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocumentCellContentChanges) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentChangeEvent added in v1.0.0

type NotebookDocumentChangeEvent struct {
	// Metadata The changed meta data if any.
	//
	// Note: should always be an object literal (e.g. LSPObject)
	Metadata LSPObject `json:"metadata,omitzero"`

	// Cells Changes to cells
	Cells *NotebookDocumentCellChanges `json:"cells,omitzero"`
}

NotebookDocumentChangeEvent A change event for a notebook document.

Since: 3.17.0

func (NotebookDocumentChangeEvent) MarshalJSONTo added in v1.0.0

func (x NotebookDocumentChangeEvent) MarshalJSONTo(enc *jsontext.Encoder) error

func (*NotebookDocumentChangeEvent) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocumentChangeEvent) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentClientCapabilities added in v1.0.0

type NotebookDocumentClientCapabilities struct {
	// Synchronization Capabilities specific to notebook document synchronization
	//
	// Since: 3.17.0
	Synchronization NotebookDocumentSyncClientCapabilities `json:"synchronization"`
}

NotebookDocumentClientCapabilities Capabilities specific to the notebook document support.

Since: 3.17.0

func (NotebookDocumentClientCapabilities) MarshalJSONTo added in v1.0.0

func (*NotebookDocumentClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocumentClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentFilter added in v1.0.0

type NotebookDocumentFilter interface {
	// contains filtered or unexported methods
}

NotebookDocumentFilter A notebook document filter denotes a notebook document by different properties. The properties will be match against the notebook's URI (same as with documents)

Since: 3.17.0

type NotebookDocumentFilterNotebook added in v1.0.0

type NotebookDocumentFilterNotebook interface {
	// contains filtered or unexported methods
}

NotebookDocumentFilterNotebook is one of: String, *NotebookDocumentFilterNotebookType, *NotebookDocumentFilterScheme, *NotebookDocumentFilterPattern.

type NotebookDocumentFilterNotebookType added in v1.0.0

type NotebookDocumentFilterNotebookType struct {
	// NotebookType The type of the enclosing notebook.
	NotebookType string `json:"notebookType"`

	// Scheme A Uri [Uri.scheme], like `file` or `untitled`.
	Scheme *string `json:"scheme,omitzero"`

	// Pattern A glob pattern.
	Pattern GlobPattern `json:"pattern,omitzero"`
}

NotebookDocumentFilterNotebookType A notebook document filter where `notebookType` is required field.

Since: 3.18.0

func (NotebookDocumentFilterNotebookType) MarshalJSONTo added in v1.0.0

func (*NotebookDocumentFilterNotebookType) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocumentFilterNotebookType) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentFilterPattern added in v1.0.0

type NotebookDocumentFilterPattern struct {
	// NotebookType The type of the enclosing notebook.
	NotebookType *string `json:"notebookType,omitzero"`

	// Scheme A Uri [Uri.scheme], like `file` or `untitled`.
	Scheme *string `json:"scheme,omitzero"`

	// Pattern A glob pattern.
	Pattern GlobPattern `json:"pattern"`
}

NotebookDocumentFilterPattern A notebook document filter where `pattern` is required field.

Since: 3.18.0

func (NotebookDocumentFilterPattern) MarshalJSONTo added in v1.0.0

func (x NotebookDocumentFilterPattern) MarshalJSONTo(enc *jsontext.Encoder) error

func (*NotebookDocumentFilterPattern) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocumentFilterPattern) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentFilterScheme added in v1.0.0

type NotebookDocumentFilterScheme struct {
	// NotebookType The type of the enclosing notebook.
	NotebookType *string `json:"notebookType,omitzero"`

	// Scheme A Uri [Uri.scheme], like `file` or `untitled`.
	Scheme string `json:"scheme"`

	// Pattern A glob pattern.
	Pattern GlobPattern `json:"pattern,omitzero"`
}

NotebookDocumentFilterScheme A notebook document filter where `scheme` is required field.

Since: 3.18.0

func (NotebookDocumentFilterScheme) MarshalJSONTo added in v1.0.0

func (x NotebookDocumentFilterScheme) MarshalJSONTo(enc *jsontext.Encoder) error

func (*NotebookDocumentFilterScheme) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocumentFilterScheme) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentFilterWithCells added in v1.0.0

type NotebookDocumentFilterWithCells struct {
	// Notebook The notebook to be synced If a string
	// value is provided it matches against the
	// notebook type. '*' matches every notebook.
	Notebook NotebookDocumentFilterNotebook `json:"notebook,omitzero"`

	// Cells The cells of the matching notebook to be synced.
	Cells []NotebookCellLanguage `json:"cells"`
}

NotebookDocumentFilterWithCells is defined by the LSP specification.

Since: 3.18.0

func (NotebookDocumentFilterWithCells) MarshalJSONTo added in v1.0.0

func (x NotebookDocumentFilterWithCells) MarshalJSONTo(enc *jsontext.Encoder) error

func (*NotebookDocumentFilterWithCells) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocumentFilterWithCells) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentFilterWithNotebook added in v1.0.0

type NotebookDocumentFilterWithNotebook struct {
	// Notebook The notebook to be synced If a string
	// value is provided it matches against the
	// notebook type. '*' matches every notebook.
	Notebook NotebookDocumentFilterNotebook `json:"notebook"`

	// Cells The cells of the matching notebook to be synced.
	Cells []NotebookCellLanguage `json:"cells,omitzero"`
}

NotebookDocumentFilterWithNotebook is defined by the LSP specification.

Since: 3.18.0

func (NotebookDocumentFilterWithNotebook) MarshalJSONTo added in v1.0.0

func (*NotebookDocumentFilterWithNotebook) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocumentFilterWithNotebook) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentIdentifier added in v1.0.0

type NotebookDocumentIdentifier struct {
	// URI The notebook document's uri.
	URI uri.URI `json:"uri"`
}

NotebookDocumentIdentifier A literal to identify a notebook document in the client.

Since: 3.17.0

func (NotebookDocumentIdentifier) MarshalJSONTo added in v1.0.0

func (x NotebookDocumentIdentifier) MarshalJSONTo(enc *jsontext.Encoder) error

func (*NotebookDocumentIdentifier) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocumentIdentifier) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentSync added in v1.0.0

type NotebookDocumentSync interface {
	// contains filtered or unexported methods
}

NotebookDocumentSync is one of: *NotebookDocumentSyncOptions, *NotebookDocumentSyncRegistrationOptions.

type NotebookDocumentSyncClientCapabilities added in v1.0.0

type NotebookDocumentSyncClientCapabilities struct {
	// DynamicRegistration 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,omitzero"`

	// ExecutionSummarySupport The client supports sending execution summary data per cell.
	ExecutionSummarySupport *bool `json:"executionSummarySupport,omitzero"`
}

NotebookDocumentSyncClientCapabilities Notebook specific client capabilities.

Since: 3.17.0

func (NotebookDocumentSyncClientCapabilities) MarshalJSONTo added in v1.0.0

func (*NotebookDocumentSyncClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocumentSyncClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentSyncOptions added in v1.0.0

type NotebookDocumentSyncOptions struct {
	// NotebookSelector The notebooks to be synced
	NotebookSelector []NotebookSelector `json:"notebookSelector"`

	// Save Whether save notification should be forwarded to
	// the server. Will only be honored if mode === `notebook`.
	Save *bool `json:"save,omitzero"`
}

NotebookDocumentSyncOptions Options specific to a notebook plus its cells to be synced to the server.

If a selector provides a notebook document filter but no cell selector all cells of a matching notebook document will be synced.

If a selector provides no notebook document filter but only a cell selector all notebook document that contain at least one matching cell will be synced.

Since: 3.17.0

func (NotebookDocumentSyncOptions) MarshalJSONTo added in v1.0.0

func (x NotebookDocumentSyncOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*NotebookDocumentSyncOptions) UnmarshalJSONFrom added in v1.0.0

func (x *NotebookDocumentSyncOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookDocumentSyncRegistrationOptions added in v1.0.0

type NotebookDocumentSyncRegistrationOptions struct {
	NotebookDocumentSyncOptions
	StaticRegistrationOptions
}

NotebookDocumentSyncRegistrationOptions Registration options specific to a notebook.

Since: 3.17.0

func (NotebookDocumentSyncRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*NotebookDocumentSyncRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type NotebookSelector added in v1.0.0

type NotebookSelector interface {
	// contains filtered or unexported methods
}

NotebookSelector is one of: *NotebookDocumentFilterWithNotebook, *NotebookDocumentFilterWithCells.

type Nullable added in v1.0.0

type Nullable[T any] struct {
	// contains filtered or unexported fields
}

Nullable wraps a value that is BOTH optional and JSON-nullable, distinguishing the three wire states the LSP specification assigns distinct meaning to:

  • absent — the zero Nullable; omitted on marshal via the ",omitzero" tag;
  • null — an explicit JSON null;
  • value — a present value.

It is generated only for properties that are simultaneously optional and have a null arm (e.g. WorkspaceFoldersInitializeParams.workspaceFolders, where absent means "no workspace-folder support" and null means "supported, none open"). A plain pointer cannot represent all three states.

func NewNullable added in v1.0.1

func NewNullable[T any](v T) Nullable[T]

NewNullable returns a Nullable holding the present value v (set=true, null=false).

func NullNullable added in v1.0.1

func NullNullable[T any]() Nullable[T]

NullNullable returns a Nullable that represents an explicit JSON null (set=true, null=true). This is the second non-zero tri-state; the third (absent) needs no constructor because it is the zero Nullable[T]{}.

func (Nullable[T]) Get added in v1.0.0

func (n Nullable[T]) Get() (T, bool)

Get returns the wrapped value and whether a non-null value is present.

func (Nullable[T]) IsNull added in v1.0.0

func (n Nullable[T]) IsNull() bool

IsNull reports whether the value is present as an explicit JSON null.

func (Nullable[T]) IsZero added in v1.0.0

func (n Nullable[T]) IsZero() bool

IsZero reports whether the value is absent. It drives the ",omitzero" tag so an unset Nullable is omitted entirely.

func (Nullable[T]) MarshalJSONTo added in v1.0.0

func (n Nullable[T]) MarshalJSONTo(enc *jsontext.Encoder) error

MarshalJSONTo implements json.MarshalerTo, streaming the wrapped value (or null) through enc so encoder options propagate without materializing intermediate bytes per field.

func (*Nullable[T]) UnmarshalJSONFrom added in v1.0.0

func (n *Nullable[T]) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements json.UnmarshalerFrom. It decodes the value in place on the caller's decoder — re-applying the union unmarshalers so a nested union value dispatches even when the decoder was not built by Unmarshal — instead of materializing the value bytes and re-parsing them with a fresh decoder per field.

type Optional added in v1.0.0

type Optional[T any] struct {
	// contains filtered or unexported fields
}

Optional wraps a non-nullable optional LSP property, preserving whether a zero value such as "" or false was present on the wire. A JSON null clears the value to match the legacy pointer representation, where null and absent both decoded to nil and were omitted on marshal.

func NewOptional added in v1.0.0

func NewOptional[T any](v T) Optional[T]

NewOptional returns an Optional holding v.

func (*Optional[T]) Clear added in v1.0.0

func (o *Optional[T]) Clear()

Clear marks the Optional absent and clears the stored value.

func (Optional[T]) Get added in v1.0.0

func (o Optional[T]) Get() (T, bool)

Get returns the wrapped value and whether it is present.

func (Optional[T]) IsZero added in v1.0.0

func (o Optional[T]) IsZero() bool

IsZero reports whether the value is absent. It drives the ",omitzero" tag so an unset Optional is omitted entirely.

func (Optional[T]) MarshalJSONTo added in v1.0.0

func (o Optional[T]) MarshalJSONTo(enc *jsontext.Encoder) error

MarshalJSONTo implements json.MarshalerTo, streaming the wrapped value (or null when absent) through enc so encoder options propagate without materializing intermediate bytes per field.

func (*Optional[T]) Set added in v1.0.0

func (o *Optional[T]) Set(v T)

Set marks the Optional present with v.

func (*Optional[T]) UnmarshalJSONFrom added in v1.0.0

func (o *Optional[T]) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements json.UnmarshalerFrom. It decodes the value in place on the caller's decoder — re-applying the union unmarshalers so nested union values dispatch even when the decoder was not built by Unmarshal — instead of materializing the value bytes and re-parsing them with a fresh decoder per field.

type OptionalVersionedTextDocumentIdentifier added in v0.11.0

type OptionalVersionedTextDocumentIdentifier struct {
	TextDocumentIdentifier

	// Version 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 `json:"version"`
}

OptionalVersionedTextDocumentIdentifier A text document identifier to optionally denote a specific version of a text document.

func (OptionalVersionedTextDocumentIdentifier) MarshalJSONTo added in v1.0.0

func (*OptionalVersionedTextDocumentIdentifier) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ParameterInformation

type ParameterInformation struct {
	// Label The label of this parameter information.
	//
	// Either a string or an inclusive start and exclusive end offsets within its containing
	// signature label. (see SignatureInformation.label). The offsets are based on a UTF-16
	// string representation as `Position` and `Range` does.
	//
	// To avoid ambiguities a server should use the [start, end] offset value instead of using
	// a substring. Whether a client support this is controlled via `labelOffsetSupport` client
	// capability.
	//
	// *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 ParameterInformationLabel `json:"label"`

	// Documentation The human-readable doc-comment of this parameter. Will be shown
	// in the UI but can be omitted.
	Documentation InlayHintTooltip `json:"documentation,omitzero"`
}

ParameterInformation Represents a parameter of a callable-signature. A parameter can have a label and a doc-comment.

func (ParameterInformation) MarshalJSONTo added in v1.0.0

func (x ParameterInformation) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ParameterInformation) UnmarshalJSONFrom added in v1.0.0

func (x *ParameterInformation) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ParameterInformationLabel added in v1.0.0

type ParameterInformationLabel interface {
	// contains filtered or unexported methods
}

ParameterInformationLabel is one of: String, ParameterInformationLabelTuple.

type ParameterInformationLabelTuple added in v1.0.0

type ParameterInformationLabelTuple [2]uint32

ParameterInformationLabelTuple is a named tuple type for use as a union arm.

type PartialResultParams added in v0.10.0

type PartialResultParams struct {
	// PartialResultToken An optional token that a server can use to report partial results (e.g. streaming) to
	// the client.
	PartialResultToken ProgressToken `json:"partialResultToken,omitzero"`
}

PartialResultParams is defined by the LSP specification.

func (PartialResultParams) MarshalJSONTo added in v1.0.0

func (x PartialResultParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*PartialResultParams) UnmarshalJSONFrom added in v1.0.0

func (x *PartialResultParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type Pattern added in v1.0.0

type Pattern string

Pattern The glob pattern to watch relative to the base path. Glob patterns can have the following syntax: - `*` to match zero 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`)

Since: 3.17.0

type Position

type Position struct {
	// Line Line position in a document (zero-based).
	Line uint32 `json:"line"`

	// Character Character offset on a line in a document (zero-based).
	//
	// The meaning of this offset is determined by the negotiated
	// `PositionEncodingKind`.
	Character uint32 `json:"character"`
}

Position Position in a text document expressed as zero-based line and character offset. Prior to 3.17 the offsets were always based on a UTF-16 string representation. So a string of the form `a𐐀b` the character offset of the character `a` is 0, the character offset of `𐐀` is 1 and the character offset of b is 3 since `𐐀` is represented using two code units in UTF-16. Since 3.17 clients and servers can agree on a different string encoding representation (e.g. UTF-8). The client announces it's supported encoding via the client capability [`general.positionEncodings`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#clientCapabilities). The value is an array of position encodings the client supports, with decreasing preference (e.g. the encoding at index `0` is the most preferred one). To stay backwards compatible the only mandatory encoding is UTF-16 represented via the string `utf-16`. The server can pick one of the encodings offered by the client and signals that encoding back to the client via the initialize result's property [`capabilities.positionEncoding`](https://microsoft.github.io/language-server-protocol/specifications/specification-current/#serverCapabilities). If the string value `utf-16` is missing from the client's capability `general.positionEncodings` servers can safely assume that the client supports UTF-16. If the server omits the position encoding in its initialize result the encoding defaults to the string value `utf-16`. Implementation considerations: since the conversion from one encoding into another requires the content of the file / line the conversion is best done where the file is read which is usually on the server side.

Positions are line end character agnostic. So you can not specify a position that denotes `\r|\n` or `\n|` where `|` represents the character offset.

support for negotiated position encoding.

Since: 3.17.0 - support for negotiated position encoding.

func (Position) MarshalJSONTo added in v1.0.0

func (x Position) MarshalJSONTo(enc *jsontext.Encoder) error

func (*Position) UnmarshalJSONFrom added in v1.0.0

func (x *Position) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type PositionEncodingKind added in v1.0.0

type PositionEncodingKind string

PositionEncodingKind A set of predefined position encoding kinds.

Since: 3.17.0

const (
	// PositionEncodingKindUTF8 Character offsets count UTF-8 code units (e.g. bytes).
	PositionEncodingKindUTF8 PositionEncodingKind = "utf-8"
	// PositionEncodingKindUTF16 Character offsets count UTF-16 code units.
	//
	// This is the default and must always be supported
	// by servers
	PositionEncodingKindUTF16 PositionEncodingKind = "utf-16"
	// PositionEncodingKindUTF32 Character offsets count UTF-32 code units.
	//
	// Implementation note: these are the same as Unicode codepoints,
	// so this `PositionEncodingKind` may also be used for an
	// encoding-agnostic representation of character offsets.
	PositionEncodingKindUTF32 PositionEncodingKind = "utf-32"
)

PositionEncodingKind enumeration values.

type PrepareRenameDefaultBehavior added in v1.0.0

type PrepareRenameDefaultBehavior struct {
	// DefaultBehavior is defined by the LSP specification.
	DefaultBehavior bool `json:"defaultBehavior"`
}

PrepareRenameDefaultBehavior is defined by the LSP specification.

Since: 3.18.0

func (PrepareRenameDefaultBehavior) MarshalJSONTo added in v1.0.0

func (x PrepareRenameDefaultBehavior) MarshalJSONTo(enc *jsontext.Encoder) error

func (*PrepareRenameDefaultBehavior) UnmarshalJSONFrom added in v1.0.0

func (x *PrepareRenameDefaultBehavior) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type PrepareRenameParams added in v0.10.0

type PrepareRenameParams struct {
	TextDocumentPositionParams
	WorkDoneProgressParams
}

PrepareRenameParams is defined by the LSP specification.

func (PrepareRenameParams) MarshalJSONTo added in v1.0.0

func (x PrepareRenameParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*PrepareRenameParams) UnmarshalJSONFrom added in v1.0.0

func (x *PrepareRenameParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type PrepareRenamePlaceholder added in v1.0.0

type PrepareRenamePlaceholder struct {
	// Range is defined by the LSP specification.
	Range Range `json:"range"`

	// Placeholder is defined by the LSP specification.
	Placeholder string `json:"placeholder"`
}

PrepareRenamePlaceholder is defined by the LSP specification.

Since: 3.18.0

func (PrepareRenamePlaceholder) MarshalJSONTo added in v1.0.0

func (x PrepareRenamePlaceholder) MarshalJSONTo(enc *jsontext.Encoder) error

func (*PrepareRenamePlaceholder) UnmarshalJSONFrom added in v1.0.0

func (x *PrepareRenamePlaceholder) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type PrepareRenameResult added in v1.0.0

type PrepareRenameResult interface {
	// contains filtered or unexported methods
}

PrepareRenameResult is defined by the LSP specification.

type PrepareSupportDefaultBehavior added in v0.11.0

type PrepareSupportDefaultBehavior uint32

PrepareSupportDefaultBehavior is defined by the LSP specification.

const (
	// PrepareSupportDefaultBehaviorIdentifier The client's default behavior is to select the identifier
	// according the to language's syntax rule.
	PrepareSupportDefaultBehaviorIdentifier PrepareSupportDefaultBehavior = 1
)

PrepareSupportDefaultBehavior enumeration values.

type PreviousResultId added in v1.0.0

type PreviousResultId struct {
	// URI The URI for which the client knowns a
	// result id.
	URI uri.URI `json:"uri"`

	// Value The value of the previous result id.
	Value string `json:"value"`
}

PreviousResultId A previous result id in a workspace pull request.

Since: 3.17.0

func (PreviousResultId) MarshalJSONTo added in v1.0.0

func (x PreviousResultId) MarshalJSONTo(enc *jsontext.Encoder) error

func (*PreviousResultId) UnmarshalJSONFrom added in v1.0.0

func (x *PreviousResultId) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ProgressParams added in v0.10.0

type ProgressParams struct {
	// Token The progress token provided by the client or server.
	Token ProgressToken `json:"token"`

	// Value The progress data.
	Value LSPAny `json:"value"`
}

ProgressParams is defined by the LSP specification.

func (ProgressParams) MarshalJSONTo added in v1.0.0

func (x ProgressParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ProgressParams) UnmarshalJSONFrom added in v1.0.0

func (x *ProgressParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ProgressToken added in v0.10.0

type ProgressToken interface {
	// contains filtered or unexported methods
}

ProgressToken is defined by the LSP specification.

type PublishDiagnosticsClientCapabilities added in v0.11.1

type PublishDiagnosticsClientCapabilities struct {
	DiagnosticsCapabilities

	// VersionSupport Whether the client interprets the version property of the
	// `textDocument/publishDiagnostics` notification's parameter.
	//
	// Since: 3.15.0
	VersionSupport *bool `json:"versionSupport,omitzero"`
}

PublishDiagnosticsClientCapabilities The publish diagnostic client capabilities.

func (PublishDiagnosticsClientCapabilities) MarshalJSONTo added in v1.0.0

func (*PublishDiagnosticsClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *PublishDiagnosticsClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type PublishDiagnosticsParams

type PublishDiagnosticsParams struct {
	// URI The URI for which diagnostic information is reported.
	URI uri.URI `json:"uri"`

	// Version Optional the version number of the document the diagnostics are published for.
	//
	// Since: 3.15.0
	Version Optional[int32] `json:"version,omitzero"`

	// Diagnostics An array of diagnostic information items.
	Diagnostics []Diagnostic `json:"diagnostics"`
}

PublishDiagnosticsParams The publish diagnostic notification's parameters.

func (PublishDiagnosticsParams) MarshalJSONTo added in v1.0.0

func (x PublishDiagnosticsParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*PublishDiagnosticsParams) UnmarshalJSONFrom added in v1.0.0

func (x *PublishDiagnosticsParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type Range

type Range struct {
	// Start The range's start position.
	Start Position `json:"start"`

	// End The range's end position.
	End Position `json:"end"`
}

Range A range in a text document expressed as (zero-based) start and end positions.

If you want to specify a range that contains a line including the line ending character(s) then use an end position denoting the start of the next line. For example: ```ts

{
    start: { line: 5, character: 23 }
    end : { line 6, character : 0 }
}

```

func (Range) MarshalJSONTo added in v1.0.0

func (x Range) MarshalJSONTo(enc *jsontext.Encoder) error

func (*Range) UnmarshalJSONFrom added in v1.0.0

func (x *Range) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ReferenceClientCapabilities added in v1.0.0

type ReferenceClientCapabilities struct {
	// DynamicRegistration Whether references supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`
}

ReferenceClientCapabilities Client Capabilities for a [ReferencesRequest].

func (ReferenceClientCapabilities) MarshalJSONTo added in v1.0.0

func (x ReferenceClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ReferenceClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *ReferenceClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ReferenceContext

type ReferenceContext struct {
	// IncludeDeclaration Include the declaration of the current symbol.
	IncludeDeclaration bool `json:"includeDeclaration"`
}

ReferenceContext Value-object that contains additional information when requesting references.

func (ReferenceContext) MarshalJSONTo added in v1.0.0

func (x ReferenceContext) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ReferenceContext) UnmarshalJSONFrom added in v1.0.0

func (x *ReferenceContext) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ReferenceOptions added in v0.11.1

type ReferenceOptions struct {
	WorkDoneProgressOptions
}

ReferenceOptions Reference options.

func (ReferenceOptions) MarshalJSONTo added in v1.0.0

func (x ReferenceOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ReferenceOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ReferenceOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ReferenceParams

type ReferenceParams struct {
	TextDocumentPositionParams
	WorkDoneProgressParams
	PartialResultParams

	// Context is defined by the LSP specification.
	Context ReferenceContext `json:"context"`
}

ReferenceParams Parameters for a [ReferencesRequest].

func (ReferenceParams) MarshalJSONTo added in v1.0.0

func (x ReferenceParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ReferenceParams) UnmarshalJSONFrom added in v1.0.0

func (x *ReferenceParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ReferenceRegistrationOptions added in v1.0.0

type ReferenceRegistrationOptions struct {
	TextDocumentRegistrationOptions
	ReferenceOptions
}

ReferenceRegistrationOptions Registration options for a [ReferencesRequest].

func (ReferenceRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x ReferenceRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ReferenceRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ReferenceRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ReferencesProvider added in v1.0.0

type ReferencesProvider interface {
	// contains filtered or unexported methods
}

ReferencesProvider is one of: Boolean, *ReferenceOptions.

type Registration

type Registration struct {
	// ID The id used to register the request. The id can be used to deregister
	// the request again.
	ID string `json:"id"`

	// Method The method / capability to register for.
	Method string `json:"method"`

	// RegisterOptions Options necessary for the registration.
	RegisterOptions LSPAny `json:"registerOptions,omitzero"`
}

Registration General parameters to register for a notification or to register a provider.

func (Registration) MarshalJSONTo added in v1.0.0

func (x Registration) MarshalJSONTo(enc *jsontext.Encoder) error

func (*Registration) UnmarshalJSONFrom added in v1.0.0

func (x *Registration) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type RegistrationParams

type RegistrationParams struct {
	// Registrations is defined by the LSP specification.
	Registrations []Registration `json:"registrations"`
}

RegistrationParams is defined by the LSP specification.

func (RegistrationParams) MarshalJSONTo added in v1.0.0

func (x RegistrationParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*RegistrationParams) UnmarshalJSONFrom added in v1.0.0

func (x *RegistrationParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type RegularExpressionEngineKind added in v1.0.0

type RegularExpressionEngineKind string

RegularExpressionEngineKind is defined by the LSP specification.

type RegularExpressionsClientCapabilities added in v0.11.0

type RegularExpressionsClientCapabilities struct {
	// Engine The engine's name.
	Engine RegularExpressionEngineKind `json:"engine"`

	// Version The engine's version.
	Version *string `json:"version,omitzero"`
}

RegularExpressionsClientCapabilities Client capabilities specific to regular expressions.

Since: 3.16.0

func (RegularExpressionsClientCapabilities) MarshalJSONTo added in v1.0.0

func (*RegularExpressionsClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *RegularExpressionsClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type RelatedFullDocumentDiagnosticReport added in v1.0.0

type RelatedFullDocumentDiagnosticReport struct {
	FullDocumentDiagnosticReport

	// RelatedDocuments Diagnostics of related documents. This information is useful
	// in programming languages where code in a file A can generate
	// diagnostics in a file B which A depends on. An example of
	// such a language is C/C++ where marco definitions in a file
	// a.cpp and result in errors in a header file b.hpp.
	//
	// Since: 3.17.0
	RelatedDocuments map[uri.URI]FullDocumentDiagnosticReportOrUnchangedDocumentDiagnosticReport `json:"relatedDocuments,omitzero"`
}

RelatedFullDocumentDiagnosticReport A full diagnostic report with a set of related documents.

Since: 3.17.0

func (RelatedFullDocumentDiagnosticReport) MarshalJSONTo added in v1.0.0

func (*RelatedFullDocumentDiagnosticReport) UnmarshalJSONFrom added in v1.0.0

func (x *RelatedFullDocumentDiagnosticReport) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type RelatedUnchangedDocumentDiagnosticReport added in v1.0.0

type RelatedUnchangedDocumentDiagnosticReport struct {
	UnchangedDocumentDiagnosticReport

	// RelatedDocuments Diagnostics of related documents. This information is useful
	// in programming languages where code in a file A can generate
	// diagnostics in a file B which A depends on. An example of
	// such a language is C/C++ where marco definitions in a file
	// a.cpp and result in errors in a header file b.hpp.
	//
	// Since: 3.17.0
	RelatedDocuments map[uri.URI]FullDocumentDiagnosticReportOrUnchangedDocumentDiagnosticReport `json:"relatedDocuments,omitzero"`
}

RelatedUnchangedDocumentDiagnosticReport An unchanged diagnostic report with a set of related documents.

Since: 3.17.0

func (RelatedUnchangedDocumentDiagnosticReport) MarshalJSONTo added in v1.0.0

func (*RelatedUnchangedDocumentDiagnosticReport) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type RelativePattern added in v1.0.0

type RelativePattern struct {
	// BaseURI A workspace folder or a base URI to which this pattern will be matched
	// against relatively.
	BaseURI RelativePatternBaseURI `json:"baseUri"`

	// Pattern The actual glob pattern;
	Pattern Pattern `json:"pattern"`
}

RelativePattern A relative pattern is a helper to construct glob patterns that are matched relatively to a base URI. The common value for a `baseUri` is a workspace folder root, but it can be another absolute URI as well.

Since: 3.17.0

func (RelativePattern) MarshalJSONTo added in v1.0.0

func (x RelativePattern) MarshalJSONTo(enc *jsontext.Encoder) error

func (*RelativePattern) UnmarshalJSONFrom added in v1.0.0

func (x *RelativePattern) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type RelativePatternBaseURI added in v1.0.0

type RelativePatternBaseURI interface {
	// contains filtered or unexported methods
}

RelativePatternBaseURI is one of: *WorkspaceFolder, URI.

type RenameClientCapabilities added in v0.11.1

type RenameClientCapabilities struct {
	// DynamicRegistration Whether rename supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// PrepareSupport Client supports testing for validity of rename operations
	// before execution.
	//
	// Since: 3.12.0
	PrepareSupport *bool `json:"prepareSupport,omitzero"`

	// PrepareSupportDefaultBehavior Client supports the default behavior result.
	//
	// The value indicates the default behavior used by the
	// client.
	//
	// Since: 3.16.0
	PrepareSupportDefaultBehavior PrepareSupportDefaultBehavior `json:"prepareSupportDefaultBehavior,omitzero"`

	// HonorsChangeAnnotations Whether the 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,omitzero"`
}

RenameClientCapabilities is defined by the LSP specification.

func (RenameClientCapabilities) MarshalJSONTo added in v1.0.0

func (x RenameClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*RenameClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *RenameClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type RenameFile

type RenameFile struct {
	ResourceOperation

	// Kind A rename
	Kind string `json:"kind"`

	// OldURI The old (existing) location.
	OldURI uri.URI `json:"oldUri"`

	// NewURI The new location.
	NewURI uri.URI `json:"newUri"`

	// Options Rename options.
	Options *RenameFileOptions `json:"options,omitzero"`
}

RenameFile Rename file operation

func (RenameFile) MarshalJSONTo added in v1.0.0

func (x RenameFile) MarshalJSONTo(enc *jsontext.Encoder) error

func (*RenameFile) UnmarshalJSONFrom added in v1.0.0

func (x *RenameFile) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type RenameFileOptions

type RenameFileOptions struct {
	// Overwrite Overwrite target if existing. Overwrite wins over `ignoreIfExists`
	Overwrite *bool `json:"overwrite,omitzero"`

	// IgnoreIfExists Ignores if target exists.
	IgnoreIfExists *bool `json:"ignoreIfExists,omitzero"`
}

RenameFileOptions Rename file options

func (RenameFileOptions) MarshalJSONTo added in v1.0.0

func (x RenameFileOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*RenameFileOptions) UnmarshalJSONFrom added in v1.0.0

func (x *RenameFileOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type RenameFilesParams added in v0.11.0

type RenameFilesParams struct {
	// Files 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"`
}

RenameFilesParams The parameters sent in notifications/requests for user-initiated renames of files.

Since: 3.16.0

func (RenameFilesParams) MarshalJSONTo added in v1.0.0

func (x RenameFilesParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*RenameFilesParams) UnmarshalJSONFrom added in v1.0.0

func (x *RenameFilesParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type RenameOptions

type RenameOptions struct {
	WorkDoneProgressOptions

	// PrepareProvider Renames should be checked and tested before being executed.
	//
	// Since: version 3.12.0
	PrepareProvider *bool `json:"prepareProvider,omitzero"`
}

RenameOptions Provider options for a [RenameRequest].

func (RenameOptions) MarshalJSONTo added in v1.0.0

func (x RenameOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*RenameOptions) UnmarshalJSONFrom added in v1.0.0

func (x *RenameOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type RenameParams

type RenameParams struct {
	TextDocumentPositionParams
	WorkDoneProgressParams

	// NewName The new name of the symbol. If the given name is not valid the
	// request must return a [ResponseError] with an
	// appropriate message set.
	NewName string `json:"newName"`
}

RenameParams The parameters of a [RenameRequest].

func (RenameParams) MarshalJSONTo added in v1.0.0

func (x RenameParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*RenameParams) UnmarshalJSONFrom added in v1.0.0

func (x *RenameParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type RenameProvider added in v1.0.0

type RenameProvider interface {
	// contains filtered or unexported methods
}

RenameProvider is one of: Boolean, *RenameOptions.

type RenameRegistrationOptions

type RenameRegistrationOptions struct {
	TextDocumentRegistrationOptions
	RenameOptions
}

RenameRegistrationOptions Registration options for a [RenameRequest].

func (RenameRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x RenameRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*RenameRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *RenameRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ResourceOperation added in v1.0.0

type ResourceOperation struct {
	// Kind The resource operation kind.
	Kind string `json:"kind"`

	// AnnotationID An optional annotation identifier describing the operation.
	//
	// Since: 3.16.0
	AnnotationID ChangeAnnotationIdentifier `json:"annotationId,omitzero"`
}

ResourceOperation A generic resource operation.

func (ResourceOperation) MarshalJSONTo added in v1.0.0

func (x ResourceOperation) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ResourceOperation) UnmarshalJSONFrom added in v1.0.0

func (x *ResourceOperation) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ResourceOperationKind

type ResourceOperationKind string

ResourceOperationKind is defined by the LSP specification.

const (
	// ResourceOperationKindCreate Supports creating new files and folders.
	ResourceOperationKindCreate ResourceOperationKind = "create"
	// ResourceOperationKindRename Supports renaming existing files and folders.
	ResourceOperationKindRename ResourceOperationKind = "rename"
	// ResourceOperationKindDelete Supports deleting existing files and folders.
	ResourceOperationKindDelete ResourceOperationKind = "delete"
)

ResourceOperationKind enumeration values.

type SaveOptions

type SaveOptions struct {
	// IncludeText The client is supposed to include the content on save.
	IncludeText *bool `json:"includeText,omitzero"`
}

SaveOptions Save options.

func (SaveOptions) MarshalJSONTo added in v1.0.0

func (x SaveOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SaveOptions) UnmarshalJSONFrom added in v1.0.0

func (x *SaveOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SelectedCompletionInfo added in v1.0.0

type SelectedCompletionInfo struct {
	// Range The range that will be replaced if this completion item is accepted.
	Range Range `json:"range"`

	// Text The text the range will be replaced with if this completion is accepted.
	Text string `json:"text"`
}

SelectedCompletionInfo Describes the currently selected completion item.

Since: 3.18.0

func (SelectedCompletionInfo) MarshalJSONTo added in v1.0.0

func (x SelectedCompletionInfo) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SelectedCompletionInfo) UnmarshalJSONFrom added in v1.0.0

func (x *SelectedCompletionInfo) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SelectionRange added in v0.10.0

type SelectionRange struct {
	// Range The [Range] of this selection range.
	Range Range `json:"range"`

	// Parent The parent selection range containing this range. Therefore `parent.range` must contain `this.range`.
	Parent *SelectionRange `json:"parent,omitzero"`
}

SelectionRange A selection range represents a part of a selection hierarchy. A selection range may have a parent selection range that contains it.

func (SelectionRange) MarshalJSONTo added in v1.0.0

func (x SelectionRange) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SelectionRange) UnmarshalJSONFrom added in v1.0.0

func (x *SelectionRange) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SelectionRangeClientCapabilities added in v0.11.1

type SelectionRangeClientCapabilities struct {
	// DynamicRegistration Whether implementation supports dynamic registration for selection range providers. If this is set to `true`
	// the client supports the new `SelectionRangeRegistrationOptions` return value for the corresponding server
	// capability as well.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`
}

SelectionRangeClientCapabilities is defined by the LSP specification.

func (SelectionRangeClientCapabilities) MarshalJSONTo added in v1.0.0

func (*SelectionRangeClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *SelectionRangeClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SelectionRangeOptions added in v0.10.0

type SelectionRangeOptions struct {
	WorkDoneProgressOptions
}

SelectionRangeOptions is defined by the LSP specification.

func (SelectionRangeOptions) MarshalJSONTo added in v1.0.0

func (x SelectionRangeOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SelectionRangeOptions) UnmarshalJSONFrom added in v1.0.0

func (x *SelectionRangeOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SelectionRangeParams added in v0.10.0

type SelectionRangeParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// TextDocument The text document.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Positions The positions inside the text document.
	Positions []Position `json:"positions"`
}

SelectionRangeParams A parameter literal used in selection range requests.

func (SelectionRangeParams) MarshalJSONTo added in v1.0.0

func (x SelectionRangeParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SelectionRangeParams) UnmarshalJSONFrom added in v1.0.0

func (x *SelectionRangeParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SelectionRangeProvider added in v1.0.0

type SelectionRangeProvider interface {
	// contains filtered or unexported methods
}

SelectionRangeProvider is one of: Boolean, *SelectionRangeOptions, *SelectionRangeRegistrationOptions.

type SelectionRangeRegistrationOptions added in v0.10.0

type SelectionRangeRegistrationOptions struct {
	SelectionRangeOptions
	TextDocumentRegistrationOptions
	StaticRegistrationOptions
}

SelectionRangeRegistrationOptions is defined by the LSP specification.

func (SelectionRangeRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*SelectionRangeRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *SelectionRangeRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokenModifiers added in v0.11.0

type SemanticTokenModifiers string

SemanticTokenModifiers A set of predefined token modifiers. This set is not fixed an clients can specify additional token types via the corresponding client capabilities.

Since: 3.16.0

const (
	// SemanticTokenModifiersDeclaration is defined by the LSP specification.
	SemanticTokenModifiersDeclaration SemanticTokenModifiers = "declaration"
	// SemanticTokenModifiersDefinition is defined by the LSP specification.
	SemanticTokenModifiersDefinition SemanticTokenModifiers = "definition"
	// SemanticTokenModifiersReadonly is defined by the LSP specification.
	SemanticTokenModifiersReadonly SemanticTokenModifiers = "readonly"
	// SemanticTokenModifiersStatic is defined by the LSP specification.
	SemanticTokenModifiersStatic SemanticTokenModifiers = "static"
	// SemanticTokenModifiersDeprecated is defined by the LSP specification.
	SemanticTokenModifiersDeprecated SemanticTokenModifiers = "deprecated"
	// SemanticTokenModifiersAbstract is defined by the LSP specification.
	SemanticTokenModifiersAbstract SemanticTokenModifiers = "abstract"
	// SemanticTokenModifiersAsync is defined by the LSP specification.
	SemanticTokenModifiersAsync SemanticTokenModifiers = "async"
	// SemanticTokenModifiersModification is defined by the LSP specification.
	SemanticTokenModifiersModification SemanticTokenModifiers = "modification"
	// SemanticTokenModifiersDocumentation is defined by the LSP specification.
	SemanticTokenModifiersDocumentation SemanticTokenModifiers = "documentation"
	// SemanticTokenModifiersDefaultLibrary is defined by the LSP specification.
	SemanticTokenModifiersDefaultLibrary SemanticTokenModifiers = "defaultLibrary"
)

SemanticTokenModifiers enumeration values.

type SemanticTokenTypes added in v0.11.0

type SemanticTokenTypes string

SemanticTokenTypes A set of predefined token types. This set is not fixed an clients can specify additional token types via the corresponding client capabilities.

Since: 3.16.0

const (
	// SemanticTokenTypesNamespace is defined by the LSP specification.
	SemanticTokenTypesNamespace SemanticTokenTypes = "namespace"
	// SemanticTokenTypesType Represents a generic type. Acts as a fallback for types which can't be mapped to
	// a specific type like class or enum.
	SemanticTokenTypesType SemanticTokenTypes = "type"
	// SemanticTokenTypesClass is defined by the LSP specification.
	SemanticTokenTypesClass SemanticTokenTypes = "class"
	// SemanticTokenTypesEnum is defined by the LSP specification.
	SemanticTokenTypesEnum SemanticTokenTypes = "enum"
	// SemanticTokenTypesInterface is defined by the LSP specification.
	SemanticTokenTypesInterface SemanticTokenTypes = "interface"
	// SemanticTokenTypesStruct is defined by the LSP specification.
	SemanticTokenTypesStruct SemanticTokenTypes = "struct"
	// SemanticTokenTypesTypeParameter is defined by the LSP specification.
	SemanticTokenTypesTypeParameter SemanticTokenTypes = "typeParameter"
	// SemanticTokenTypesParameter is defined by the LSP specification.
	SemanticTokenTypesParameter SemanticTokenTypes = "parameter"
	// SemanticTokenTypesVariable is defined by the LSP specification.
	SemanticTokenTypesVariable SemanticTokenTypes = "variable"
	// SemanticTokenTypesProperty is defined by the LSP specification.
	SemanticTokenTypesProperty SemanticTokenTypes = "property"
	// SemanticTokenTypesEnumMember is defined by the LSP specification.
	SemanticTokenTypesEnumMember SemanticTokenTypes = "enumMember"
	// SemanticTokenTypesEvent is defined by the LSP specification.
	SemanticTokenTypesEvent SemanticTokenTypes = "event"
	// SemanticTokenTypesFunction is defined by the LSP specification.
	SemanticTokenTypesFunction SemanticTokenTypes = "function"
	// SemanticTokenTypesMethod is defined by the LSP specification.
	SemanticTokenTypesMethod SemanticTokenTypes = "method"
	// SemanticTokenTypesMacro is defined by the LSP specification.
	SemanticTokenTypesMacro SemanticTokenTypes = "macro"
	// SemanticTokenTypesKeyword is defined by the LSP specification.
	SemanticTokenTypesKeyword SemanticTokenTypes = "keyword"
	// SemanticTokenTypesModifier is defined by the LSP specification.
	SemanticTokenTypesModifier SemanticTokenTypes = "modifier"
	// SemanticTokenTypesComment is defined by the LSP specification.
	SemanticTokenTypesComment SemanticTokenTypes = "comment"
	// SemanticTokenTypesString is defined by the LSP specification.
	SemanticTokenTypesString SemanticTokenTypes = "string"
	// SemanticTokenTypesNumber is defined by the LSP specification.
	SemanticTokenTypesNumber SemanticTokenTypes = "number"
	// SemanticTokenTypesRegexp is defined by the LSP specification.
	SemanticTokenTypesRegexp SemanticTokenTypes = "regexp"
	// SemanticTokenTypesOperator is defined by the LSP specification.
	SemanticTokenTypesOperator SemanticTokenTypes = "operator"
	// SemanticTokenTypesDecorator is defined by the LSP specification.
	//
	// Since: 3.17.0
	SemanticTokenTypesDecorator SemanticTokenTypes = "decorator"
	// SemanticTokenTypesLabel is defined by the LSP specification.
	//
	// Since: 3.18.0
	SemanticTokenTypesLabel SemanticTokenTypes = "label"
)

SemanticTokenTypes enumeration values.

type SemanticTokens added in v0.11.0

type SemanticTokens struct {
	// ResultID An optional result id. If provided and clients support delta updating
	// the client will include the result id in the next semantic token request.
	// A server can then instead of computing all semantic tokens again simply
	// send a delta.
	ResultID *string `json:"resultId,omitzero"`

	// Data The actual tokens.
	Data []uint32 `json:"data"`
}

SemanticTokens is defined by the LSP specification.

Since: 3.16.0

func (SemanticTokens) MarshalJSONTo added in v1.0.0

func (x SemanticTokens) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SemanticTokens) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokens) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensClientCapabilities added in v0.11.1

type SemanticTokensClientCapabilities struct {
	// DynamicRegistration 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,omitzero"`

	// Requests 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 ClientSemanticTokensRequestOptions `json:"requests"`

	// TokenTypes The token types that the client supports.
	TokenTypes []string `json:"tokenTypes"`

	// TokenModifiers The token modifiers that the client supports.
	TokenModifiers []string `json:"tokenModifiers"`

	// Formats The token formats the clients supports.
	Formats []TokenFormat `json:"formats"`

	// OverlappingTokenSupport Whether the client supports tokens that can overlap each other.
	OverlappingTokenSupport *bool `json:"overlappingTokenSupport,omitzero"`

	// MultilineTokenSupport Whether the client supports tokens that can span multiple lines.
	MultilineTokenSupport *bool `json:"multilineTokenSupport,omitzero"`

	// ServerCancelSupport Whether the client allows the server to actively cancel a
	// semantic token request, e.g. supports returning
	// LSPErrorCodes.ServerCancelled. If a server does the client
	// needs to retrigger the request.
	//
	// Since: 3.17.0
	ServerCancelSupport *bool `json:"serverCancelSupport,omitzero"`

	// AugmentsSyntaxTokens Whether the client uses semantic tokens to augment existing
	// syntax tokens. If set to `true` client side created syntax
	// tokens and semantic tokens are both used for colorization. If
	// set to `false` the client only uses the returned semantic tokens
	// for colorization.
	//
	// If the value is `undefined` then the client behavior is not
	// specified.
	//
	// Since: 3.17.0
	AugmentsSyntaxTokens *bool `json:"augmentsSyntaxTokens,omitzero"`
}

SemanticTokensClientCapabilities is defined by the LSP specification.

Since: 3.16.0

func (SemanticTokensClientCapabilities) MarshalJSONTo added in v1.0.0

func (*SemanticTokensClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokensClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensDelta added in v0.11.0

type SemanticTokensDelta struct {
	// ResultID is defined by the LSP specification.
	ResultID *string `json:"resultId,omitzero"`

	// Edits The semantic token edits to transform a previous result into a new result.
	Edits []SemanticTokensEdit `json:"edits"`
}

SemanticTokensDelta is defined by the LSP specification.

Since: 3.16.0

func (SemanticTokensDelta) MarshalJSONTo added in v1.0.0

func (x SemanticTokensDelta) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SemanticTokensDelta) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokensDelta) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensDeltaParams added in v0.11.0

type SemanticTokensDeltaParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// TextDocument The text document.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// PreviousResultID 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 received last.
	PreviousResultID string `json:"previousResultId"`
}

SemanticTokensDeltaParams is defined by the LSP specification.

Since: 3.16.0

func (SemanticTokensDeltaParams) MarshalJSONTo added in v1.0.0

func (x SemanticTokensDeltaParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SemanticTokensDeltaParams) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokensDeltaParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensDeltaPartialResult added in v0.11.0

type SemanticTokensDeltaPartialResult struct {
	// Edits is defined by the LSP specification.
	Edits []SemanticTokensEdit `json:"edits"`
}

SemanticTokensDeltaPartialResult is defined by the LSP specification.

Since: 3.16.0

func (SemanticTokensDeltaPartialResult) MarshalJSONTo added in v1.0.0

func (*SemanticTokensDeltaPartialResult) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokensDeltaPartialResult) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensDeltaResult added in v1.0.0

type SemanticTokensDeltaResult interface {
	// contains filtered or unexported methods
}

SemanticTokensDeltaResult is one of: *SemanticTokens, *SemanticTokensDelta.

type SemanticTokensEdit added in v0.11.0

type SemanticTokensEdit struct {
	// Start The start offset of the edit.
	Start uint32 `json:"start"`

	// DeleteCount The count of elements to remove.
	DeleteCount uint32 `json:"deleteCount"`

	// Data The elements to insert.
	Data []uint32 `json:"data,omitzero"`
}

SemanticTokensEdit is defined by the LSP specification.

Since: 3.16.0

func (SemanticTokensEdit) MarshalJSONTo added in v1.0.0

func (x SemanticTokensEdit) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SemanticTokensEdit) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokensEdit) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensFullDelta added in v1.0.0

type SemanticTokensFullDelta struct {
	// Delta The server supports deltas for full documents.
	Delta *bool `json:"delta,omitzero"`
}

SemanticTokensFullDelta Semantic tokens options to support deltas for full documents

Since: 3.18.0

func (SemanticTokensFullDelta) MarshalJSONTo added in v1.0.0

func (x SemanticTokensFullDelta) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SemanticTokensFullDelta) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokensFullDelta) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensLegend added in v0.11.0

type SemanticTokensLegend struct {
	// TokenTypes The token types a server uses.
	TokenTypes []string `json:"tokenTypes"`

	// TokenModifiers The token modifiers a server uses.
	TokenModifiers []string `json:"tokenModifiers"`
}

SemanticTokensLegend is defined by the LSP specification.

Since: 3.16.0

func (SemanticTokensLegend) MarshalJSONTo added in v1.0.0

func (x SemanticTokensLegend) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SemanticTokensLegend) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokensLegend) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensOptions added in v0.11.0

type SemanticTokensOptions struct {
	WorkDoneProgressOptions

	// Legend The legend used by the server
	Legend SemanticTokensLegend `json:"legend"`

	// Range Server supports providing semantic tokens for a specific range
	// of a document.
	Range ClientSemanticTokensRequestOptionsRange `json:"range,omitzero"`

	// Full Server supports providing semantic tokens for a full document.
	Full SemanticTokensOptionsFull `json:"full,omitzero"`
}

SemanticTokensOptions is defined by the LSP specification.

Since: 3.16.0

func (SemanticTokensOptions) MarshalJSONTo added in v1.0.0

func (x SemanticTokensOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SemanticTokensOptions) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokensOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensOptionsFull added in v1.0.0

type SemanticTokensOptionsFull interface {
	// contains filtered or unexported methods
}

SemanticTokensOptionsFull is one of: Boolean, *SemanticTokensFullDelta.

type SemanticTokensOptionsRange added in v1.0.0

type SemanticTokensOptionsRange struct{}

SemanticTokensOptionsRange is a generated inline object literal type.

func (SemanticTokensOptionsRange) MarshalJSONTo added in v1.0.0

func (x SemanticTokensOptionsRange) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SemanticTokensOptionsRange) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokensOptionsRange) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensParams added in v0.11.0

type SemanticTokensParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// TextDocument The text document.
	TextDocument TextDocumentIdentifier `json:"textDocument"`
}

SemanticTokensParams is defined by the LSP specification.

Since: 3.16.0

func (SemanticTokensParams) MarshalJSONTo added in v1.0.0

func (x SemanticTokensParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SemanticTokensParams) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokensParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensPartialResult added in v0.11.0

type SemanticTokensPartialResult struct {
	// Data is defined by the LSP specification.
	Data []uint32 `json:"data"`
}

SemanticTokensPartialResult is defined by the LSP specification.

Since: 3.16.0

func (SemanticTokensPartialResult) MarshalJSONTo added in v1.0.0

func (x SemanticTokensPartialResult) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SemanticTokensPartialResult) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokensPartialResult) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensProvider added in v1.0.0

type SemanticTokensProvider interface {
	// contains filtered or unexported methods
}

SemanticTokensProvider is one of: *SemanticTokensOptions, *SemanticTokensRegistrationOptions.

type SemanticTokensRangeParams added in v0.11.0

type SemanticTokensRangeParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// TextDocument The text document.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Range The range the semantic tokens are requested for.
	Range Range `json:"range"`
}

SemanticTokensRangeParams is defined by the LSP specification.

Since: 3.16.0

func (SemanticTokensRangeParams) MarshalJSONTo added in v1.0.0

func (x SemanticTokensRangeParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SemanticTokensRangeParams) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokensRangeParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensRegistrationOptions added in v0.11.0

type SemanticTokensRegistrationOptions struct {
	TextDocumentRegistrationOptions
	SemanticTokensOptions
	StaticRegistrationOptions
}

SemanticTokensRegistrationOptions is defined by the LSP specification.

Since: 3.16.0

func (SemanticTokensRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*SemanticTokensRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *SemanticTokensRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SemanticTokensWorkspaceClientCapabilities added in v0.11.1

type SemanticTokensWorkspaceClientCapabilities struct {
	// RefreshSupport 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 detects a project
	// wide change that requires such a calculation.
	RefreshSupport *bool `json:"refreshSupport,omitzero"`
}

SemanticTokensWorkspaceClientCapabilities is defined by the LSP specification.

Since: 3.16.0

func (SemanticTokensWorkspaceClientCapabilities) MarshalJSONTo added in v1.0.0

func (*SemanticTokensWorkspaceClientCapabilities) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type Server added in v0.9.0

type Server interface {
	Initialize(ctx context.Context, params *InitializeParams) (*InitializeResult, error)
	Initialized(ctx context.Context, params *InitializedParams) error
	Shutdown(ctx context.Context) error
	Exit(ctx context.Context) error
	SetTrace(ctx context.Context, params *SetTraceParams) error
	Progress(ctx context.Context, params *ProgressParams) error
	WorkDoneProgressCancel(ctx context.Context, params *WorkDoneProgressCancelParams) error
	DidOpen(ctx context.Context, params *DidOpenTextDocumentParams) error
	DidChange(ctx context.Context, params *DidChangeTextDocumentParams) error
	WillSave(ctx context.Context, params *WillSaveTextDocumentParams) error
	WillSaveWaitUntil(ctx context.Context, params *WillSaveTextDocumentParams) ([]TextEdit, error)
	DidSave(ctx context.Context, params *DidSaveTextDocumentParams) error
	DidClose(ctx context.Context, params *DidCloseTextDocumentParams) error
	DidOpenNotebookDocument(ctx context.Context, params *DidOpenNotebookDocumentParams) error
	DidChangeNotebookDocument(ctx context.Context, params *DidChangeNotebookDocumentParams) error
	DidSaveNotebookDocument(ctx context.Context, params *DidSaveNotebookDocumentParams) error
	DidCloseNotebookDocument(ctx context.Context, params *DidCloseNotebookDocumentParams) error
	Declaration(ctx context.Context, params *DeclarationParams) (DeclarationResult, error)
	Definition(ctx context.Context, params *DefinitionParams) (DefinitionResult, error)
	TypeDefinition(ctx context.Context, params *TypeDefinitionParams) (DefinitionResult, error)
	Implementation(ctx context.Context, params *ImplementationParams) (DefinitionResult, error)
	References(ctx context.Context, params *ReferenceParams) ([]Location, error)
	PrepareCallHierarchy(ctx context.Context, params *CallHierarchyPrepareParams) ([]CallHierarchyItem, error)
	IncomingCalls(ctx context.Context, params *CallHierarchyIncomingCallsParams) ([]CallHierarchyIncomingCall, error)
	OutgoingCalls(ctx context.Context, params *CallHierarchyOutgoingCallsParams) ([]CallHierarchyOutgoingCall, error)
	PrepareTypeHierarchy(ctx context.Context, params *TypeHierarchyPrepareParams) ([]TypeHierarchyItem, error)
	Supertypes(ctx context.Context, params *TypeHierarchySupertypesParams) ([]TypeHierarchyItem, error)
	Subtypes(ctx context.Context, params *TypeHierarchySubtypesParams) ([]TypeHierarchyItem, error)
	DocumentHighlight(ctx context.Context, params *DocumentHighlightParams) ([]DocumentHighlight, error)
	DocumentLink(ctx context.Context, params *DocumentLinkParams) ([]DocumentLink, error)
	DocumentLinkResolve(ctx context.Context, params *DocumentLink) (*DocumentLink, error)
	Hover(ctx context.Context, params *HoverParams) (*Hover, error)
	CodeLens(ctx context.Context, params *CodeLensParams) ([]CodeLens, error)
	CodeLensResolve(ctx context.Context, params *CodeLens) (*CodeLens, error)
	FoldingRanges(ctx context.Context, params *FoldingRangeParams) ([]FoldingRange, error)
	SelectionRange(ctx context.Context, params *SelectionRangeParams) ([]SelectionRange, error)
	DocumentSymbol(ctx context.Context, params *DocumentSymbolParams) (DocumentSymbolResult, error)
	SemanticTokensFull(ctx context.Context, params *SemanticTokensParams) (*SemanticTokens, error)
	SemanticTokensFullDelta(ctx context.Context, params *SemanticTokensDeltaParams) (SemanticTokensDeltaResult, error)
	SemanticTokensRange(ctx context.Context, params *SemanticTokensRangeParams) (*SemanticTokens, error)
	InlineValue(ctx context.Context, params *InlineValueParams) ([]InlineValue, error)
	InlayHint(ctx context.Context, params *InlayHintParams) ([]InlayHint, error)
	InlayHintResolve(ctx context.Context, params *InlayHint) (*InlayHint, error)
	Moniker(ctx context.Context, params *MonikerParams) ([]Moniker, error)
	Completion(ctx context.Context, params *CompletionParams) (CompletionResult, error)
	CompletionResolve(ctx context.Context, params *CompletionItem) (*CompletionItem, error)
	Diagnostic(ctx context.Context, params *DocumentDiagnosticParams) (DocumentDiagnosticReport, error)
	DiagnosticWorkspace(ctx context.Context, params *WorkspaceDiagnosticParams) (*WorkspaceDiagnosticReport, error)
	SignatureHelp(ctx context.Context, params *SignatureHelpParams) (*SignatureHelp, error)
	CodeAction(ctx context.Context, params *CodeActionParams) ([]CommandOrCodeAction, error)
	CodeActionResolve(ctx context.Context, params *CodeAction) (*CodeAction, error)
	DocumentColor(ctx context.Context, params *DocumentColorParams) ([]ColorInformation, error)
	ColorPresentation(ctx context.Context, params *ColorPresentationParams) ([]ColorPresentation, error)
	Formatting(ctx context.Context, params *DocumentFormattingParams) ([]TextEdit, error)
	RangeFormatting(ctx context.Context, params *DocumentRangeFormattingParams) ([]TextEdit, error)
	RangesFormatting(ctx context.Context, params *DocumentRangesFormattingParams) ([]TextEdit, error)
	OnTypeFormatting(ctx context.Context, params *DocumentOnTypeFormattingParams) ([]TextEdit, error)
	Rename(ctx context.Context, params *RenameParams) (*WorkspaceEdit, error)
	PrepareRename(ctx context.Context, params *PrepareRenameParams) (PrepareRenameResult, error)
	LinkedEditingRange(ctx context.Context, params *LinkedEditingRangeParams) (*LinkedEditingRanges, error)
	InlineCompletion(ctx context.Context, params *InlineCompletionParams) (InlineCompletionResult, error)
	Symbols(ctx context.Context, params *WorkspaceSymbolParams) (WorkspaceSymbolResult, error)
	WorkspaceSymbolResolve(ctx context.Context, params *WorkspaceSymbol) (*WorkspaceSymbol, error)
	DidChangeConfiguration(ctx context.Context, params *DidChangeConfigurationParams) error
	DidChangeWorkspaceFolders(ctx context.Context, params *DidChangeWorkspaceFoldersParams) error
	WillCreateFiles(ctx context.Context, params *CreateFilesParams) (*WorkspaceEdit, error)
	WillRenameFiles(ctx context.Context, params *RenameFilesParams) (*WorkspaceEdit, error)
	WillDeleteFiles(ctx context.Context, params *DeleteFilesParams) (*WorkspaceEdit, error)
	DidCreateFiles(ctx context.Context, params *CreateFilesParams) error
	DidRenameFiles(ctx context.Context, params *RenameFilesParams) error
	DidDeleteFiles(ctx context.Context, params *DeleteFilesParams) error
	DidChangeWatchedFiles(ctx context.Context, params *DidChangeWatchedFilesParams) error
	ExecuteCommand(ctx context.Context, params *ExecuteCommandParams) (LSPAny, error)
	TextDocumentContent(ctx context.Context, params *TextDocumentContentParams) (*TextDocumentContentResult, error)
	Request(ctx context.Context, method string, params any) (any, error)
}

Server is the LSP server interface: the set of requests and notifications a language server handles. Its method set is the authoritative shape implemented by UnimplementedServer.

func NewClient

func NewClient(ctx context.Context, client Client, stream jsonrpc2.Stream) (context.Context, jsonrpc2.Conn, Server)

NewClient returns the context in which the Client is embedded, the jsonrpc2 connection, and the Server dispatcher. The connection serves the supplied Client and is wired with the union-aware [lspCodec].

func ServerDispatcher added in v0.9.0

func ServerDispatcher(conn jsonrpc2.Conn) Server

ServerDispatcher returns a Server that dispatches LSP requests across conn.

type ServerCapabilities

type ServerCapabilities struct {
	// PositionEncoding The position encoding the server picked from the encodings offered
	// by the client via the client capability `general.positionEncodings`.
	//
	// If the client didn't provide any position encodings the only valid
	// value that a server can return is 'utf-16'.
	//
	// If omitted it defaults to 'utf-16'.
	//
	// Since: 3.17.0
	PositionEncoding PositionEncodingKind `json:"positionEncoding,omitzero"`

	// TextDocumentSync Defines how text documents are synced. Is either a detailed structure
	// defining each notification or for backwards compatibility the
	// TextDocumentSyncKind number.
	TextDocumentSync TextDocumentSync `json:"textDocumentSync,omitzero"`

	// NotebookDocumentSync Defines how notebook documents are synced.
	//
	// Since: 3.17.0
	NotebookDocumentSync NotebookDocumentSync `json:"notebookDocumentSync,omitzero"`

	// CompletionProvider The server provides completion support.
	CompletionProvider *CompletionOptions `json:"completionProvider,omitzero"`

	// HoverProvider The server provides hover support.
	HoverProvider HoverProvider `json:"hoverProvider,omitzero"`

	// SignatureHelpProvider The server provides signature help support.
	SignatureHelpProvider *SignatureHelpOptions `json:"signatureHelpProvider,omitzero"`

	// DeclarationProvider The server provides Goto Declaration support.
	DeclarationProvider DeclarationProvider `json:"declarationProvider,omitzero"`

	// DefinitionProvider The server provides goto definition support.
	DefinitionProvider DefinitionProvider `json:"definitionProvider,omitzero"`

	// TypeDefinitionProvider The server provides Goto Type Definition support.
	TypeDefinitionProvider TypeDefinitionProvider `json:"typeDefinitionProvider,omitzero"`

	// ImplementationProvider The server provides Goto Implementation support.
	ImplementationProvider ImplementationProvider `json:"implementationProvider,omitzero"`

	// ReferencesProvider The server provides find references support.
	ReferencesProvider ReferencesProvider `json:"referencesProvider,omitzero"`

	// DocumentHighlightProvider The server provides document highlight support.
	DocumentHighlightProvider DocumentHighlightProvider `json:"documentHighlightProvider,omitzero"`

	// DocumentSymbolProvider The server provides document symbol support.
	DocumentSymbolProvider DocumentSymbolProvider `json:"documentSymbolProvider,omitzero"`

	// CodeActionProvider The server provides code actions. CodeActionOptions may only be
	// specified if the client states that it supports
	// `codeActionLiteralSupport` in its initial `initialize` request.
	CodeActionProvider CodeActionProvider `json:"codeActionProvider,omitzero"`

	// CodeLensProvider The server provides code lens.
	CodeLensProvider *CodeLensOptions `json:"codeLensProvider,omitzero"`

	// DocumentLinkProvider The server provides document link support.
	DocumentLinkProvider *DocumentLinkOptions `json:"documentLinkProvider,omitzero"`

	// ColorProvider The server provides color provider support.
	ColorProvider ColorProvider `json:"colorProvider,omitzero"`

	// WorkspaceSymbolProvider The server provides workspace symbol support.
	WorkspaceSymbolProvider WorkspaceSymbolProvider `json:"workspaceSymbolProvider,omitzero"`

	// DocumentFormattingProvider The server provides document formatting.
	DocumentFormattingProvider DocumentFormattingProvider `json:"documentFormattingProvider,omitzero"`

	// DocumentRangeFormattingProvider The server provides document range formatting.
	DocumentRangeFormattingProvider DocumentRangeFormattingProvider `json:"documentRangeFormattingProvider,omitzero"`

	// DocumentOnTypeFormattingProvider The server provides document formatting on typing.
	DocumentOnTypeFormattingProvider DocumentOnTypeFormattingOptions `json:"documentOnTypeFormattingProvider,omitzero"`

	// RenameProvider The server provides rename support. RenameOptions may only be
	// specified if the client states that it supports
	// `prepareSupport` in its initial `initialize` request.
	RenameProvider RenameProvider `json:"renameProvider,omitzero"`

	// FoldingRangeProvider The server provides folding provider support.
	FoldingRangeProvider FoldingRangeProvider `json:"foldingRangeProvider,omitzero"`

	// SelectionRangeProvider The server provides selection range support.
	SelectionRangeProvider SelectionRangeProvider `json:"selectionRangeProvider,omitzero"`

	// ExecuteCommandProvider The server provides execute command support.
	ExecuteCommandProvider ExecuteCommandOptions `json:"executeCommandProvider,omitzero"`

	// CallHierarchyProvider The server provides call hierarchy support.
	//
	// Since: 3.16.0
	CallHierarchyProvider CallHierarchyProvider `json:"callHierarchyProvider,omitzero"`

	// LinkedEditingRangeProvider The server provides linked editing range support.
	//
	// Since: 3.16.0
	LinkedEditingRangeProvider LinkedEditingRangeProvider `json:"linkedEditingRangeProvider,omitzero"`

	// SemanticTokensProvider The server provides semantic tokens support.
	//
	// Since: 3.16.0
	SemanticTokensProvider SemanticTokensProvider `json:"semanticTokensProvider,omitzero"`

	// MonikerProvider The server provides moniker support.
	//
	// Since: 3.16.0
	MonikerProvider MonikerProvider `json:"monikerProvider,omitzero"`

	// TypeHierarchyProvider The server provides type hierarchy support.
	//
	// Since: 3.17.0
	TypeHierarchyProvider TypeHierarchyProvider `json:"typeHierarchyProvider,omitzero"`

	// InlineValueProvider The server provides inline values.
	//
	// Since: 3.17.0
	InlineValueProvider InlineValueProvider `json:"inlineValueProvider,omitzero"`

	// InlayHintProvider The server provides inlay hints.
	//
	// Since: 3.17.0
	InlayHintProvider InlayHintProvider `json:"inlayHintProvider,omitzero"`

	// DiagnosticProvider The server has support for pull model diagnostics.
	//
	// Since: 3.17.0
	DiagnosticProvider DiagnosticProvider `json:"diagnosticProvider,omitzero"`

	// InlineCompletionProvider Inline completion options used during static registration.
	//
	// Since: 3.18.0
	InlineCompletionProvider InlineCompletionProvider `json:"inlineCompletionProvider,omitzero"`

	// Workspace Workspace specific server capabilities.
	Workspace *WorkspaceOptions `json:"workspace,omitzero"`

	// Experimental Experimental server capabilities.
	Experimental LSPAny `json:"experimental,omitzero"`
}

ServerCapabilities Defines the capabilities provided by a language server.

func (ServerCapabilities) MarshalJSONTo added in v1.0.0

func (x ServerCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ServerCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *ServerCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ServerCompletionItemOptions added in v1.0.0

type ServerCompletionItemOptions struct {
	// LabelDetailsSupport The server has support for completion item label
	// details (see also `CompletionItemLabelDetails`) when
	// receiving a completion item in a resolve call.
	//
	// Since: 3.17.0
	LabelDetailsSupport *bool `json:"labelDetailsSupport,omitzero"`
}

ServerCompletionItemOptions is defined by the LSP specification.

Since: 3.18.0

func (ServerCompletionItemOptions) MarshalJSONTo added in v1.0.0

func (x ServerCompletionItemOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ServerCompletionItemOptions) UnmarshalJSONFrom added in v1.0.0

func (x *ServerCompletionItemOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ServerInfo added in v0.10.0

type ServerInfo struct {
	// Name The name of the server as defined by the server.
	Name string `json:"name"`

	// Version The server's version as defined by the server.
	Version Optional[string] `json:"version,omitzero"`
}

ServerInfo Information about the server

ServerInfo type name added.

Since: 3.18.0 ServerInfo type name added.

func (ServerInfo) MarshalJSONTo added in v1.0.0

func (x ServerInfo) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ServerInfo) UnmarshalJSONFrom added in v1.0.0

func (x *ServerInfo) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SetTraceParams added in v0.11.0

type SetTraceParams struct {
	// Value is defined by the LSP specification.
	Value TraceValue `json:"value"`
}

SetTraceParams is defined by the LSP specification.

func (SetTraceParams) MarshalJSONTo added in v1.0.0

func (x SetTraceParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SetTraceParams) UnmarshalJSONFrom added in v1.0.0

func (x *SetTraceParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ShowDocumentClientCapabilities added in v0.11.1

type ShowDocumentClientCapabilities struct {
	// Support The client has support for the showDocument
	// request.
	Support bool `json:"support"`
}

ShowDocumentClientCapabilities Client capabilities for the showDocument request.

Since: 3.16.0

func (ShowDocumentClientCapabilities) MarshalJSONTo added in v1.0.0

func (x ShowDocumentClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ShowDocumentClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *ShowDocumentClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ShowDocumentParams added in v0.11.0

type ShowDocumentParams struct {
	// URI The uri to show.
	URI uri.URI `json:"uri"`

	// External 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,omitzero"`

	// TakeFocus 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 is started.
	TakeFocus *bool `json:"takeFocus,omitzero"`

	// Selection 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,omitzero"`
}

ShowDocumentParams Params to show a resource in the UI.

Since: 3.16.0

func (ShowDocumentParams) MarshalJSONTo added in v1.0.0

func (x ShowDocumentParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ShowDocumentParams) UnmarshalJSONFrom added in v1.0.0

func (x *ShowDocumentParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ShowDocumentResult added in v0.11.0

type ShowDocumentResult struct {
	// Success A boolean indicating if the show was successful.
	Success bool `json:"success"`
}

ShowDocumentResult The result of a showDocument request.

Since: 3.16.0

func (ShowDocumentResult) MarshalJSONTo added in v1.0.0

func (x ShowDocumentResult) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ShowDocumentResult) UnmarshalJSONFrom added in v1.0.0

func (x *ShowDocumentResult) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ShowMessageParams

type ShowMessageParams struct {
	// Type The message type. See [MessageType]
	Type MessageType `json:"type"`

	// Message The actual message.
	Message string `json:"message"`
}

ShowMessageParams The parameters of a notification message.

func (ShowMessageParams) MarshalJSONTo added in v1.0.0

func (x ShowMessageParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ShowMessageParams) UnmarshalJSONFrom added in v1.0.0

func (x *ShowMessageParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ShowMessageRequestClientCapabilities added in v0.11.1

type ShowMessageRequestClientCapabilities struct {
	// MessageActionItem Capabilities specific to the `MessageActionItem` type.
	MessageActionItem *ClientShowMessageActionItemOptions `json:"messageActionItem,omitzero"`
}

ShowMessageRequestClientCapabilities Show message request client capabilities

func (ShowMessageRequestClientCapabilities) MarshalJSONTo added in v1.0.0

func (*ShowMessageRequestClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *ShowMessageRequestClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type ShowMessageRequestParams

type ShowMessageRequestParams struct {
	// Type The message type. See [MessageType]
	Type MessageType `json:"type"`

	// Message The actual message.
	Message string `json:"message"`

	// Actions The message action items to present.
	Actions []MessageActionItem `json:"actions,omitzero"`
}

ShowMessageRequestParams is defined by the LSP specification.

func (ShowMessageRequestParams) MarshalJSONTo added in v1.0.0

func (x ShowMessageRequestParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*ShowMessageRequestParams) UnmarshalJSONFrom added in v1.0.0

func (x *ShowMessageRequestParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SignatureHelp

type SignatureHelp struct {
	// Signatures One or more signatures.
	Signatures []SignatureInformation `json:"signatures"`

	// ActiveSignature The active signature. If omitted or the value lies outside the
	// range of `signatures` the value defaults to zero or is ignored if
	// the `SignatureHelp` has no signatures.
	//
	// Whenever possible implementors should make an active decision about
	// the active signature and shouldn't rely on a default value.
	//
	// In future version of the protocol this property might become
	// mandatory to better express this.
	ActiveSignature *uint32 `json:"activeSignature,omitzero"`

	// ActiveParameter The active parameter of the active signature.
	//
	// If `null`, no parameter of the signature is active (for example a named
	// argument that does not match any declared parameters). This is only valid
	// if the client specifies the client capability
	// `textDocument.signatureHelp.noActiveParameterSupport === true`
	//
	// If omitted or the value lies outside the range of
	// `signatures[activeSignature].parameters` defaults to 0 if the active
	// signature has parameters.
	//
	// If the active signature has no parameters it is ignored.
	//
	// In future version of the protocol this property might become
	// mandatory (but still nullable) to better express the active parameter if
	// the active signature does have any.
	//
	// Since version 3.16.0 the `SignatureInformation` itself provides a
	// `activeParameter` property and it should be used instead of this one.
	ActiveParameter Nullable[uint32] `json:"activeParameter,omitzero"`
}

SignatureHelp Signature help represents the signature of something callable. There can be multiple signature but only one active and only one active parameter.

func (SignatureHelp) MarshalJSONTo added in v1.0.0

func (x SignatureHelp) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SignatureHelp) UnmarshalJSONFrom added in v1.0.0

func (x *SignatureHelp) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SignatureHelpClientCapabilities added in v1.0.0

type SignatureHelpClientCapabilities struct {
	// DynamicRegistration Whether signature help supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// SignatureInformation The client supports the following `SignatureInformation`
	// specific properties.
	SignatureInformation *ClientSignatureInformationOptions `json:"signatureInformation,omitzero"`

	// ContextSupport The client supports to send additional context information for a
	// `textDocument/signatureHelp` request. A client that opts into
	// contextSupport will also support the `retriggerCharacters` on
	// `SignatureHelpOptions`.
	//
	// Since: 3.15.0
	ContextSupport *bool `json:"contextSupport,omitzero"`
}

SignatureHelpClientCapabilities Client Capabilities for a [SignatureHelpRequest].

func (SignatureHelpClientCapabilities) MarshalJSONTo added in v1.0.0

func (x SignatureHelpClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SignatureHelpClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *SignatureHelpClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SignatureHelpContext added in v0.10.0

type SignatureHelpContext struct {
	// TriggerKind Action that caused signature help to be triggered.
	TriggerKind SignatureHelpTriggerKind `json:"triggerKind"`

	// TriggerCharacter Character that caused signature help to be triggered.
	//
	// This is undefined when `triggerKind !== SignatureHelpTriggerKind.TriggerCharacter`
	TriggerCharacter *string `json:"triggerCharacter,omitzero"`

	// IsRetrigger `true` if signature help was already showing when it was triggered.
	//
	// Retriggers 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"`

	// ActiveSignatureHelp The currently active `SignatureHelp`.
	//
	// The `activeSignatureHelp` has its `SignatureHelp.activeSignature` field updated based on
	// the user navigating through available signatures.
	ActiveSignatureHelp SignatureHelp `json:"activeSignatureHelp,omitzero"`
}

SignatureHelpContext Additional information about the context in which a signature help request was triggered.

Since: 3.15.0

func (SignatureHelpContext) MarshalJSONTo added in v1.0.0

func (x SignatureHelpContext) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SignatureHelpContext) UnmarshalJSONFrom added in v1.0.0

func (x *SignatureHelpContext) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SignatureHelpOptions

type SignatureHelpOptions struct {
	WorkDoneProgressOptions

	// TriggerCharacters List of characters that trigger signature help automatically.
	TriggerCharacters []string `json:"triggerCharacters,omitzero"`

	// RetriggerCharacters List of characters that re-trigger signature help.
	//
	// These trigger characters are only active when signature help is already showing. All trigger characters
	// are also counted as re-trigger characters.
	//
	// Since: 3.15.0
	RetriggerCharacters []string `json:"retriggerCharacters,omitzero"`
}

SignatureHelpOptions Server Capabilities for a [SignatureHelpRequest].

func (SignatureHelpOptions) MarshalJSONTo added in v1.0.0

func (x SignatureHelpOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SignatureHelpOptions) UnmarshalJSONFrom added in v1.0.0

func (x *SignatureHelpOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SignatureHelpParams added in v0.10.0

type SignatureHelpParams struct {
	TextDocumentPositionParams
	WorkDoneProgressParams

	// Context The signature help context. This is only available if the client specifies
	// to send this using the client capability `textDocument.signatureHelp.contextSupport === true`
	//
	// Since: 3.15.0
	Context SignatureHelpContext `json:"context,omitzero"`
}

SignatureHelpParams Parameters for a [SignatureHelpRequest].

func (SignatureHelpParams) MarshalJSONTo added in v1.0.0

func (x SignatureHelpParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SignatureHelpParams) UnmarshalJSONFrom added in v1.0.0

func (x *SignatureHelpParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SignatureHelpRegistrationOptions

type SignatureHelpRegistrationOptions struct {
	TextDocumentRegistrationOptions
	SignatureHelpOptions
}

SignatureHelpRegistrationOptions Registration options for a [SignatureHelpRequest].

func (SignatureHelpRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*SignatureHelpRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *SignatureHelpRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SignatureHelpTriggerKind added in v0.10.0

type SignatureHelpTriggerKind uint32

SignatureHelpTriggerKind How a signature help was triggered.

Since: 3.15.0

const (
	// SignatureHelpTriggerKindInvoked Signature help was invoked manually by the user or by a command.
	SignatureHelpTriggerKindInvoked SignatureHelpTriggerKind = 1
	// SignatureHelpTriggerKindTriggerCharacter Signature help was triggered by a trigger character.
	SignatureHelpTriggerKindTriggerCharacter SignatureHelpTriggerKind = 2
	// SignatureHelpTriggerKindContentChange Signature help was triggered by the cursor moving or by the document content changing.
	SignatureHelpTriggerKindContentChange SignatureHelpTriggerKind = 3
)

SignatureHelpTriggerKind enumeration values.

type SignatureInformation

type SignatureInformation struct {
	// Label The label of this signature. Will be shown in
	// the UI.
	Label string `json:"label"`

	// Documentation The human-readable doc-comment of this signature. Will be shown
	// in the UI but can be omitted.
	Documentation InlayHintTooltip `json:"documentation,omitzero"`

	// Parameters The parameters of this signature.
	Parameters []ParameterInformation `json:"parameters,omitzero"`

	// ActiveParameter The index of the active parameter.
	//
	// If `null`, no parameter of the signature is active (for example a named
	// argument that does not match any declared parameters). This is only valid
	// if the client specifies the client capability
	// `textDocument.signatureHelp.noActiveParameterSupport === true`
	//
	// If provided (or `null`), this is used in place of
	// `SignatureHelp.activeParameter`.
	//
	// Since: 3.16.0
	ActiveParameter Nullable[uint32] `json:"activeParameter,omitzero"`
}

SignatureInformation Represents the signature of something callable. A signature can have a label, like a function-name, a doc-comment, and a set of parameters.

func (SignatureInformation) MarshalJSONTo added in v1.0.0

func (x SignatureInformation) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SignatureInformation) UnmarshalJSONFrom added in v1.0.0

func (x *SignatureInformation) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SnippetTextEdit added in v1.0.0

type SnippetTextEdit struct {
	// Range The range of the text document to be manipulated.
	Range Range `json:"range"`

	// Snippet The snippet to be inserted.
	Snippet StringValue `json:"snippet"`

	// AnnotationID The actual identifier of the snippet edit.
	AnnotationID ChangeAnnotationIdentifier `json:"annotationId,omitzero"`
}

SnippetTextEdit An interactive text edit.

Since: 3.18.0

func (SnippetTextEdit) MarshalJSONTo added in v1.0.0

func (x SnippetTextEdit) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SnippetTextEdit) UnmarshalJSONFrom added in v1.0.0

func (x *SnippetTextEdit) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type StaleRequestSupportOptions added in v1.0.0

type StaleRequestSupportOptions struct {
	// Cancel The client will actively cancel the request.
	Cancel bool `json:"cancel"`

	// RetryOnContentModified 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"`
}

StaleRequestSupportOptions is defined by the LSP specification.

Since: 3.18.0

func (StaleRequestSupportOptions) MarshalJSONTo added in v1.0.0

func (x StaleRequestSupportOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*StaleRequestSupportOptions) UnmarshalJSONFrom added in v1.0.0

func (x *StaleRequestSupportOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type StaticRegistrationOptions

type StaticRegistrationOptions struct {
	// ID The id used to register the request. The id can be used to deregister
	// the request again. See also Registration#id.
	ID *string `json:"id,omitzero"`
}

StaticRegistrationOptions Static registration options to be returned in the initialize request.

func (StaticRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x StaticRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*StaticRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *StaticRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type String added in v1.0.0

type String string

String is a string union arm.

type StringSlice added in v1.0.0

type StringSlice []string

StringSlice is a named type so a []string arm can satisfy a union interface.

func (StringSlice) MarshalJSONTo added in v1.0.0

func (x StringSlice) MarshalJSONTo(enc *jsontext.Encoder) error

func (*StringSlice) UnmarshalJSONFrom added in v1.0.0

func (x *StringSlice) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type StringValue added in v1.0.0

type StringValue struct {
	// Kind The kind of string value.
	Kind string `json:"kind"`

	// Value The snippet string.
	Value string `json:"value"`
}

StringValue A string value used as a snippet is a template which allows to insert text and to control the editor cursor when insertion happens.

A snippet can define tab stops and placeholders with `$1`, `$2` and `${3:foo}`. `$0` defines the final tab stop, it defaults to the end of the snippet. Variables are defined with `$name` and `${name:default value}`.

Since: 3.18.0

func (StringValue) MarshalJSONTo added in v1.0.0

func (x StringValue) MarshalJSONTo(enc *jsontext.Encoder) error

func (*StringValue) UnmarshalJSONFrom added in v1.0.0

func (x *StringValue) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SymbolInformation

type SymbolInformation struct {
	BaseSymbolInformation

	// Deprecated Indicates if this symbol is deprecated.
	//
	// Deprecated: Use tags instead
	Deprecated *bool `json:"deprecated,omitzero"`

	// Location The location of this symbol. The location's range is used by a tool
	// to reveal the location in the editor. If the symbol is selected in the
	// tool the range's start information is used to position the cursor. So
	// the range usually spans more than the actual symbol's name and does
	// normally include things like visibility modifiers.
	//
	// The range doesn't have to denote a node range in the sense of an abstract
	// syntax tree. It can therefore not be used to re-construct a hierarchy of
	// the symbols.
	Location Location `json:"location"`
}

SymbolInformation Represents information about programming constructs like variables, classes, interfaces etc.

func (SymbolInformation) MarshalJSONTo added in v1.0.0

func (x SymbolInformation) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SymbolInformation) UnmarshalJSONFrom added in v1.0.0

func (x *SymbolInformation) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SymbolInformationSlice added in v1.0.0

type SymbolInformationSlice []SymbolInformation

SymbolInformationSlice is a named type so a []SymbolInformation arm can satisfy a union interface.

func (SymbolInformationSlice) MarshalJSONTo added in v1.0.0

func (x SymbolInformationSlice) MarshalJSONTo(enc *jsontext.Encoder) error

func (*SymbolInformationSlice) UnmarshalJSONFrom added in v1.0.0

func (x *SymbolInformationSlice) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type SymbolKind

type SymbolKind uint32

SymbolKind A symbol kind.

const (
	// SymbolKindFile is defined by the LSP specification.
	SymbolKindFile SymbolKind = 1
	// SymbolKindModule is defined by the LSP specification.
	SymbolKindModule SymbolKind = 2
	// SymbolKindNamespace is defined by the LSP specification.
	SymbolKindNamespace SymbolKind = 3
	// SymbolKindPackage is defined by the LSP specification.
	SymbolKindPackage SymbolKind = 4
	// SymbolKindClass is defined by the LSP specification.
	SymbolKindClass SymbolKind = 5
	// SymbolKindMethod is defined by the LSP specification.
	SymbolKindMethod SymbolKind = 6
	// SymbolKindProperty is defined by the LSP specification.
	SymbolKindProperty SymbolKind = 7
	// SymbolKindField is defined by the LSP specification.
	SymbolKindField SymbolKind = 8
	// SymbolKindConstructor is defined by the LSP specification.
	SymbolKindConstructor SymbolKind = 9
	// SymbolKindEnum is defined by the LSP specification.
	SymbolKindEnum SymbolKind = 10
	// SymbolKindInterface is defined by the LSP specification.
	SymbolKindInterface SymbolKind = 11
	// SymbolKindFunction is defined by the LSP specification.
	SymbolKindFunction SymbolKind = 12
	// SymbolKindVariable is defined by the LSP specification.
	SymbolKindVariable SymbolKind = 13
	// SymbolKindConstant is defined by the LSP specification.
	SymbolKindConstant SymbolKind = 14
	// SymbolKindString is defined by the LSP specification.
	SymbolKindString SymbolKind = 15
	// SymbolKindNumber is defined by the LSP specification.
	SymbolKindNumber SymbolKind = 16
	// SymbolKindBoolean is defined by the LSP specification.
	SymbolKindBoolean SymbolKind = 17
	// SymbolKindArray is defined by the LSP specification.
	SymbolKindArray SymbolKind = 18
	// SymbolKindObject is defined by the LSP specification.
	SymbolKindObject SymbolKind = 19
	// SymbolKindKey is defined by the LSP specification.
	SymbolKindKey SymbolKind = 20
	// SymbolKindNull is defined by the LSP specification.
	SymbolKindNull SymbolKind = 21
	// SymbolKindEnumMember is defined by the LSP specification.
	SymbolKindEnumMember SymbolKind = 22
	// SymbolKindStruct is defined by the LSP specification.
	SymbolKindStruct SymbolKind = 23
	// SymbolKindEvent is defined by the LSP specification.
	SymbolKindEvent SymbolKind = 24
	// SymbolKindOperator is defined by the LSP specification.
	SymbolKindOperator SymbolKind = 25
	// SymbolKindTypeParameter is defined by the LSP specification.
	SymbolKindTypeParameter SymbolKind = 26
)

SymbolKind enumeration values.

type SymbolTag added in v0.11.0

type SymbolTag uint32

SymbolTag Symbol tags are extra annotations that tweak the rendering of a symbol.

Since: 3.16

const (
	// SymbolTagDeprecated Render a symbol as obsolete, usually using a strike-out.
	SymbolTagDeprecated SymbolTag = 1
)

SymbolTag enumeration values.

type TextDocumentChangeRegistrationOptions

type TextDocumentChangeRegistrationOptions struct {
	TextDocumentRegistrationOptions

	// SyncKind How documents are synced to the server.
	SyncKind TextDocumentSyncKind `json:"syncKind"`
}

TextDocumentChangeRegistrationOptions Describe options to be used when registered for text document change events.

func (TextDocumentChangeRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*TextDocumentChangeRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentChangeRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentClientCapabilities

type TextDocumentClientCapabilities struct {
	// Synchronization Defines which synchronization capabilities the client supports.
	Synchronization *TextDocumentSyncClientCapabilities `json:"synchronization,omitzero"`

	// Filters Defines which filters the client supports.
	//
	// Since: 3.18.0
	Filters *TextDocumentFilterClientCapabilities `json:"filters,omitzero"`

	// Completion Capabilities specific to the `textDocument/completion` request.
	Completion *CompletionClientCapabilities `json:"completion,omitzero"`

	// Hover Capabilities specific to the `textDocument/hover` request.
	Hover *HoverClientCapabilities `json:"hover,omitzero"`

	// SignatureHelp Capabilities specific to the `textDocument/signatureHelp` request.
	SignatureHelp *SignatureHelpClientCapabilities `json:"signatureHelp,omitzero"`

	// Declaration Capabilities specific to the `textDocument/declaration` request.
	//
	// Since: 3.14.0
	Declaration *DeclarationClientCapabilities `json:"declaration,omitzero"`

	// Definition Capabilities specific to the `textDocument/definition` request.
	Definition *DefinitionClientCapabilities `json:"definition,omitzero"`

	// TypeDefinition Capabilities specific to the `textDocument/typeDefinition` request.
	//
	// Since: 3.6.0
	TypeDefinition *TypeDefinitionClientCapabilities `json:"typeDefinition,omitzero"`

	// Implementation Capabilities specific to the `textDocument/implementation` request.
	//
	// Since: 3.6.0
	Implementation *ImplementationClientCapabilities `json:"implementation,omitzero"`

	// References Capabilities specific to the `textDocument/references` request.
	References *ReferenceClientCapabilities `json:"references,omitzero"`

	// DocumentHighlight Capabilities specific to the `textDocument/documentHighlight` request.
	DocumentHighlight *DocumentHighlightClientCapabilities `json:"documentHighlight,omitzero"`

	// DocumentSymbol Capabilities specific to the `textDocument/documentSymbol` request.
	DocumentSymbol *DocumentSymbolClientCapabilities `json:"documentSymbol,omitzero"`

	// CodeAction Capabilities specific to the `textDocument/codeAction` request.
	CodeAction *CodeActionClientCapabilities `json:"codeAction,omitzero"`

	// CodeLens Capabilities specific to the `textDocument/codeLens` request.
	CodeLens *CodeLensClientCapabilities `json:"codeLens,omitzero"`

	// DocumentLink Capabilities specific to the `textDocument/documentLink` request.
	DocumentLink *DocumentLinkClientCapabilities `json:"documentLink,omitzero"`

	// ColorProvider Capabilities specific to the `textDocument/documentColor` and the
	// `textDocument/colorPresentation` request.
	//
	// Since: 3.6.0
	ColorProvider *DocumentColorClientCapabilities `json:"colorProvider,omitzero"`

	// Formatting Capabilities specific to the `textDocument/formatting` request.
	Formatting *DocumentFormattingClientCapabilities `json:"formatting,omitzero"`

	// RangeFormatting Capabilities specific to the `textDocument/rangeFormatting` request.
	RangeFormatting *DocumentRangeFormattingClientCapabilities `json:"rangeFormatting,omitzero"`

	// OnTypeFormatting Capabilities specific to the `textDocument/onTypeFormatting` request.
	OnTypeFormatting *DocumentOnTypeFormattingClientCapabilities `json:"onTypeFormatting,omitzero"`

	// Rename Capabilities specific to the `textDocument/rename` request.
	Rename *RenameClientCapabilities `json:"rename,omitzero"`

	// FoldingRange Capabilities specific to the `textDocument/foldingRange` request.
	//
	// Since: 3.10.0
	FoldingRange *FoldingRangeClientCapabilities `json:"foldingRange,omitzero"`

	// SelectionRange Capabilities specific to the `textDocument/selectionRange` request.
	//
	// Since: 3.15.0
	SelectionRange *SelectionRangeClientCapabilities `json:"selectionRange,omitzero"`

	// PublishDiagnostics Capabilities specific to the `textDocument/publishDiagnostics` notification.
	PublishDiagnostics *PublishDiagnosticsClientCapabilities `json:"publishDiagnostics,omitzero"`

	// CallHierarchy Capabilities specific to the various call hierarchy requests.
	//
	// Since: 3.16.0
	CallHierarchy *CallHierarchyClientCapabilities `json:"callHierarchy,omitzero"`

	// SemanticTokens Capabilities specific to the various semantic token request.
	//
	// Since: 3.16.0
	SemanticTokens SemanticTokensClientCapabilities `json:"semanticTokens,omitzero"`

	// LinkedEditingRange Capabilities specific to the `textDocument/linkedEditingRange` request.
	//
	// Since: 3.16.0
	LinkedEditingRange *LinkedEditingRangeClientCapabilities `json:"linkedEditingRange,omitzero"`

	// Moniker Client capabilities specific to the `textDocument/moniker` request.
	//
	// Since: 3.16.0
	Moniker *MonikerClientCapabilities `json:"moniker,omitzero"`

	// TypeHierarchy Capabilities specific to the various type hierarchy requests.
	//
	// Since: 3.17.0
	TypeHierarchy *TypeHierarchyClientCapabilities `json:"typeHierarchy,omitzero"`

	// InlineValue Capabilities specific to the `textDocument/inlineValue` request.
	//
	// Since: 3.17.0
	InlineValue *InlineValueClientCapabilities `json:"inlineValue,omitzero"`

	// InlayHint Capabilities specific to the `textDocument/inlayHint` request.
	//
	// Since: 3.17.0
	InlayHint *InlayHintClientCapabilities `json:"inlayHint,omitzero"`

	// Diagnostic Capabilities specific to the diagnostic pull model.
	//
	// Since: 3.17.0
	Diagnostic *DiagnosticClientCapabilities `json:"diagnostic,omitzero"`

	// InlineCompletion Client capabilities specific to inline completions.
	//
	// Since: 3.18.0
	InlineCompletion *InlineCompletionClientCapabilities `json:"inlineCompletion,omitzero"`
}

TextDocumentClientCapabilities Text document specific client capabilities.

func (TextDocumentClientCapabilities) MarshalJSONTo added in v1.0.0

func (x TextDocumentClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextDocumentClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentContentChangeEvent

type TextDocumentContentChangeEvent interface {
	// contains filtered or unexported methods
}

TextDocumentContentChangeEvent An event describing a change to a text document. If only a text is provided it is considered to be the full content of the document.

type TextDocumentContentChangePartial added in v1.0.0

type TextDocumentContentChangePartial struct {
	// Range The range of the document that changed.
	Range Range `json:"range"`

	// RangeLength The optional length of the range that got replaced.
	//
	// Deprecated: use range instead.
	RangeLength Optional[uint32] `json:"rangeLength,omitzero"`

	// Text The new text for the provided range.
	Text string `json:"text"`
}

TextDocumentContentChangePartial is defined by the LSP specification.

Since: 3.18.0

func (TextDocumentContentChangePartial) MarshalJSONTo added in v1.0.0

func (*TextDocumentContentChangePartial) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentContentChangePartial) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentContentChangeWholeDocument added in v1.0.0

type TextDocumentContentChangeWholeDocument struct {
	// Text The new text of the whole document.
	Text string `json:"text"`
}

TextDocumentContentChangeWholeDocument is defined by the LSP specification.

Since: 3.18.0

func (TextDocumentContentChangeWholeDocument) MarshalJSONTo added in v1.0.0

func (*TextDocumentContentChangeWholeDocument) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentContentChangeWholeDocument) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentContentClientCapabilities added in v1.0.0

type TextDocumentContentClientCapabilities struct {
	// DynamicRegistration Text document content provider supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`
}

TextDocumentContentClientCapabilities Client capabilities for a text document content provider.

Since: 3.18.0

func (TextDocumentContentClientCapabilities) MarshalJSONTo added in v1.0.0

func (*TextDocumentContentClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentContentClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentContentOptions added in v1.0.0

type TextDocumentContentOptions struct {
	// Schemes The schemes for which the server provides content.
	Schemes []string `json:"schemes"`
}

TextDocumentContentOptions Text document content provider options.

Since: 3.18.0

func (TextDocumentContentOptions) MarshalJSONTo added in v1.0.0

func (x TextDocumentContentOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextDocumentContentOptions) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentContentOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentContentParams added in v1.0.0

type TextDocumentContentParams struct {
	// URI The uri of the text document.
	URI uri.URI `json:"uri"`
}

TextDocumentContentParams Parameters for the `workspace/textDocumentContent` request.

Since: 3.18.0

func (TextDocumentContentParams) MarshalJSONTo added in v1.0.0

func (x TextDocumentContentParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextDocumentContentParams) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentContentParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentContentRefreshParams added in v1.0.0

type TextDocumentContentRefreshParams struct {
	// URI The uri of the text document to refresh.
	URI uri.URI `json:"uri"`
}

TextDocumentContentRefreshParams Parameters for the `workspace/textDocumentContent/refresh` request.

Since: 3.18.0

func (TextDocumentContentRefreshParams) MarshalJSONTo added in v1.0.0

func (*TextDocumentContentRefreshParams) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentContentRefreshParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentContentRegistrationOptions added in v1.0.0

type TextDocumentContentRegistrationOptions struct {
	TextDocumentContentOptions
	StaticRegistrationOptions
}

TextDocumentContentRegistrationOptions Text document content provider registration options.

Since: 3.18.0

func (TextDocumentContentRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*TextDocumentContentRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentContentRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentContentResult added in v1.0.0

type TextDocumentContentResult struct {
	// Text The text content of the text document. Please note, that the content of
	// any subsequent open notifications for the text document might differ
	// from the returned content due to whitespace and line ending
	// normalizations done on the client
	Text string `json:"text"`
}

TextDocumentContentResult Result of the `workspace/textDocumentContent` request.

Since: 3.18.0

func (TextDocumentContentResult) MarshalJSONTo added in v1.0.0

func (x TextDocumentContentResult) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextDocumentContentResult) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentContentResult) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentEdit

type TextDocumentEdit struct {
	// TextDocument The text document to change.
	TextDocument OptionalVersionedTextDocumentIdentifier `json:"textDocument"`

	// Edits The edits to be applied.
	//
	// support for AnnotatedTextEdit. This is guarded using a
	// client capability.
	//
	// support for SnippetTextEdit. This is guarded using a
	// client capability.
	//
	// Since: 3.18.0 - support for SnippetTextEdit. This is guarded using a
	// client capability.
	Edits []TextDocumentEditElement `json:"edits"`
}

TextDocumentEdit Describes textual changes on a text document. A TextDocumentEdit describes all changes on a document version Si and after they are applied move the document to version Si+1. So the creator of a TextDocumentEdit doesn't need to sort the array of edits or do any kind of ordering. However the edits must be non overlapping.

func (TextDocumentEdit) MarshalJSONTo added in v1.0.0

func (x TextDocumentEdit) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextDocumentEdit) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentEdit) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentEditElement added in v1.0.0

type TextDocumentEditElement interface {
	// contains filtered or unexported methods
}

TextDocumentEditElement is one of: *TextEdit, *AnnotatedTextEdit, *SnippetTextEdit.

type TextDocumentFilter added in v1.0.0

type TextDocumentFilter interface {
	// contains filtered or unexported methods
}

TextDocumentFilter A document filter denotes a document by different properties like the [TextDocument.languageId], the [Uri.scheme] of its resource, or a glob-pattern that is applied to the [TextDocument.fileName].

Glob patterns can have the following syntax: - `*` to match zero 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 sub patterns into an OR expression. (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`)

@sample A language filter that applies to typescript files on disk: `{ language: 'typescript', scheme: 'file' }` @sample A language filter that applies to all package.json paths: `{ language: 'json', pattern: '**package.json' }`

Since: 3.17.0

type TextDocumentFilterClientCapabilities added in v1.0.0

type TextDocumentFilterClientCapabilities struct {
	// RelativePatternSupport The client supports Relative Patterns.
	//
	// Since: 3.18.0
	RelativePatternSupport *bool `json:"relativePatternSupport,omitzero"`
}

TextDocumentFilterClientCapabilities is defined by the LSP specification.

func (TextDocumentFilterClientCapabilities) MarshalJSONTo added in v1.0.0

func (*TextDocumentFilterClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentFilterClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentFilterLanguage added in v1.0.0

type TextDocumentFilterLanguage struct {
	// Language A language id, like `typescript`.
	Language string `json:"language"`

	// Scheme A Uri [Uri.scheme], like `file` or `untitled`.
	Scheme *string `json:"scheme,omitzero"`

	// Pattern A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples.
	//
	// support for relative patterns. Whether clients support
	// relative patterns depends on the client capability
	// `textDocuments.filters.relativePatternSupport`.
	//
	// Since: 3.18.0 - support for relative patterns. Whether clients support
	// relative patterns depends on the client capability
	// `textDocuments.filters.relativePatternSupport`.
	Pattern GlobPattern `json:"pattern,omitzero"`
}

TextDocumentFilterLanguage A document filter where `language` is required field.

Since: 3.18.0

func (TextDocumentFilterLanguage) MarshalJSONTo added in v1.0.0

func (x TextDocumentFilterLanguage) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextDocumentFilterLanguage) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentFilterLanguage) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentFilterPattern added in v1.0.0

type TextDocumentFilterPattern struct {
	// Language A language id, like `typescript`.
	Language *string `json:"language,omitzero"`

	// Scheme A Uri [Uri.scheme], like `file` or `untitled`.
	Scheme *string `json:"scheme,omitzero"`

	// Pattern A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples.
	//
	// support for relative patterns. Whether clients support
	// relative patterns depends on the client capability
	// `textDocuments.filters.relativePatternSupport`.
	//
	// Since: 3.18.0 - support for relative patterns. Whether clients support
	// relative patterns depends on the client capability
	// `textDocuments.filters.relativePatternSupport`.
	Pattern GlobPattern `json:"pattern"`
}

TextDocumentFilterPattern A document filter where `pattern` is required field.

Since: 3.18.0

func (TextDocumentFilterPattern) MarshalJSONTo added in v1.0.0

func (x TextDocumentFilterPattern) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextDocumentFilterPattern) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentFilterPattern) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentFilterScheme added in v1.0.0

type TextDocumentFilterScheme struct {
	// Language A language id, like `typescript`.
	Language *string `json:"language,omitzero"`

	// Scheme A Uri [Uri.scheme], like `file` or `untitled`.
	Scheme string `json:"scheme"`

	// Pattern A glob pattern, like **​/*.{ts,js}. See TextDocumentFilter for examples.
	//
	// support for relative patterns. Whether clients support
	// relative patterns depends on the client capability
	// `textDocuments.filters.relativePatternSupport`.
	//
	// Since: 3.18.0 - support for relative patterns. Whether clients support
	// relative patterns depends on the client capability
	// `textDocuments.filters.relativePatternSupport`.
	Pattern GlobPattern `json:"pattern,omitzero"`
}

TextDocumentFilterScheme A document filter where `scheme` is required field.

Since: 3.18.0

func (TextDocumentFilterScheme) MarshalJSONTo added in v1.0.0

func (x TextDocumentFilterScheme) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextDocumentFilterScheme) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentFilterScheme) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentIdentifier

type TextDocumentIdentifier struct {
	// URI The text document's uri.
	URI uri.URI `json:"uri"`
}

TextDocumentIdentifier A literal to identify a text document in the client.

func (TextDocumentIdentifier) MarshalJSONTo added in v1.0.0

func (x TextDocumentIdentifier) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextDocumentIdentifier) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentIdentifier) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentItem

type TextDocumentItem struct {
	// URI The text document's uri.
	URI uri.URI `json:"uri"`

	// LanguageID The text document's language identifier.
	LanguageID LanguageKind `json:"languageId"`

	// Version The version number of this document (it will increase after each
	// change, including undo/redo).
	Version int32 `json:"version"`

	// Text The content of the opened text document.
	Text string `json:"text"`
}

TextDocumentItem An item to transfer a text document from the client to the server.

func (TextDocumentItem) MarshalJSONTo added in v1.0.0

func (x TextDocumentItem) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextDocumentItem) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentItem) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentPositionParams

type TextDocumentPositionParams struct {
	// TextDocument The text document.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Position The position inside the text document.
	Position Position `json:"position"`
}

TextDocumentPositionParams A parameter literal used in requests to pass a text document and a position inside that document.

func (TextDocumentPositionParams) MarshalJSONTo added in v1.0.0

func (x TextDocumentPositionParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextDocumentPositionParams) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentPositionParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentRegistrationOptions

type TextDocumentRegistrationOptions struct {
	// DocumentSelector A document selector to identify the scope of the registration. If set to null
	// the document selector provided on the client side will be used.
	DocumentSelector *DocumentSelector `json:"documentSelector"`
}

TextDocumentRegistrationOptions General text document registration options.

func (TextDocumentRegistrationOptions) MarshalJSONTo added in v1.0.0

func (x TextDocumentRegistrationOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextDocumentRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentSaveReason

type TextDocumentSaveReason uint32

TextDocumentSaveReason Represents reasons why a text document is saved.

const (
	// TextDocumentSaveReasonManual Manually triggered, e.g. by the user pressing save, by starting debugging,
	// or by an API call.
	TextDocumentSaveReasonManual TextDocumentSaveReason = 1
	// TextDocumentSaveReasonAfterDelay Automatic after a delay.
	TextDocumentSaveReasonAfterDelay TextDocumentSaveReason = 2
	// TextDocumentSaveReasonFocusOut When the editor lost focus.
	TextDocumentSaveReasonFocusOut TextDocumentSaveReason = 3
)

TextDocumentSaveReason enumeration values.

type TextDocumentSaveRegistrationOptions

type TextDocumentSaveRegistrationOptions struct {
	TextDocumentRegistrationOptions
	SaveOptions
}

TextDocumentSaveRegistrationOptions Save registration options.

func (TextDocumentSaveRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*TextDocumentSaveRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentSaveRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentSync added in v1.0.0

type TextDocumentSync interface {
	// contains filtered or unexported methods
}

TextDocumentSync is one of: *TextDocumentSyncOptions, TextDocumentSyncKind.

type TextDocumentSyncClientCapabilities added in v0.11.1

type TextDocumentSyncClientCapabilities struct {
	// DynamicRegistration Whether text document synchronization supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// WillSave The client supports sending will save notifications.
	WillSave *bool `json:"willSave,omitzero"`

	// WillSaveWaitUntil The client supports sending a will save request and
	// waits for a response providing text edits which will
	// be applied to the document before it is saved.
	WillSaveWaitUntil *bool `json:"willSaveWaitUntil,omitzero"`

	// DidSave The client supports did save notifications.
	DidSave *bool `json:"didSave,omitzero"`
}

TextDocumentSyncClientCapabilities is defined by the LSP specification.

func (TextDocumentSyncClientCapabilities) MarshalJSONTo added in v1.0.0

func (*TextDocumentSyncClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentSyncClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentSyncKind

type TextDocumentSyncKind uint32

TextDocumentSyncKind Defines how the host (editor) should sync document changes to the language server.

const (
	// TextDocumentSyncKindNone Documents should not be synced at all.
	TextDocumentSyncKindNone TextDocumentSyncKind = 0
	// TextDocumentSyncKindFull Documents are synced by always sending the full content
	// of the document.
	TextDocumentSyncKindFull TextDocumentSyncKind = 1
	// TextDocumentSyncKindIncremental Documents are synced by sending the full content on open.
	// After that only incremental updates to the document are
	// send.
	TextDocumentSyncKindIncremental TextDocumentSyncKind = 2
)

TextDocumentSyncKind enumeration values.

type TextDocumentSyncOptions

type TextDocumentSyncOptions struct {
	// OpenClose Open and close notifications are sent to the server. If omitted open close notification should not
	// be sent.
	OpenClose *bool `json:"openClose,omitzero"`

	// Change Change notifications are sent to the server. See TextDocumentSyncKind.None, TextDocumentSyncKind.Full
	// and TextDocumentSyncKind.Incremental. If omitted it defaults to TextDocumentSyncKind.None.
	Change *TextDocumentSyncKind `json:"change,omitzero"`

	// WillSave If present will save notifications are sent to the server. If omitted the notification should not be
	// sent.
	WillSave *bool `json:"willSave,omitzero"`

	// WillSaveWaitUntil If present will save wait until requests are sent to the server. If omitted the request should not be
	// sent.
	WillSaveWaitUntil *bool `json:"willSaveWaitUntil,omitzero"`

	// Save If present save notifications are sent to the server. If omitted the notification should not be
	// sent.
	Save TextDocumentSyncOptionsSave `json:"save,omitzero"`
}

TextDocumentSyncOptions is defined by the LSP specification.

func (TextDocumentSyncOptions) MarshalJSONTo added in v1.0.0

func (x TextDocumentSyncOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextDocumentSyncOptions) UnmarshalJSONFrom added in v1.0.0

func (x *TextDocumentSyncOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TextDocumentSyncOptionsSave added in v1.0.0

type TextDocumentSyncOptionsSave interface {
	// contains filtered or unexported methods
}

TextDocumentSyncOptionsSave is one of: Boolean, *SaveOptions.

type TextEdit

type TextEdit struct {
	// Range The range of the text document to be manipulated. To insert
	// text into a document create a range where start === end.
	Range Range `json:"range"`

	// NewText The string to be inserted. For delete operations use an
	// empty string.
	NewText string `json:"newText"`
}

TextEdit A text edit applicable to a text document.

func (TextEdit) MarshalJSONTo added in v1.0.0

func (x TextEdit) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TextEdit) UnmarshalJSONFrom added in v1.0.0

func (x *TextEdit) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TokenFormat added in v0.11.0

type TokenFormat string

TokenFormat is defined by the LSP specification.

const (
	// TokenFormatRelative is defined by the LSP specification.
	TokenFormatRelative TokenFormat = "relative"
)

TokenFormat enumeration values.

type TraceValue added in v0.11.0

type TraceValue string

TraceValue is defined by the LSP specification.

const (
	// TraceValueOff Turn tracing off.
	TraceValueOff TraceValue = "off"
	// TraceValueMessages Trace messages only.
	TraceValueMessages TraceValue = "messages"
	// TraceValueVerbose Verbose message tracing.
	TraceValueVerbose TraceValue = "verbose"
)

TraceValue enumeration values.

type TypeDefinitionClientCapabilities added in v1.0.0

type TypeDefinitionClientCapabilities struct {
	// DynamicRegistration Whether implementation supports dynamic registration. If this is set to `true`
	// the client supports the new `TypeDefinitionRegistrationOptions` return value
	// for the corresponding server capability as well.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// LinkSupport The client supports additional metadata in the form of definition links.
	//
	// Since 3.14.0
	LinkSupport *bool `json:"linkSupport,omitzero"`
}

TypeDefinitionClientCapabilities Since 3.6.0

func (TypeDefinitionClientCapabilities) MarshalJSONTo added in v1.0.0

func (*TypeDefinitionClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *TypeDefinitionClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TypeDefinitionOptions added in v0.10.0

type TypeDefinitionOptions struct {
	WorkDoneProgressOptions
}

TypeDefinitionOptions is defined by the LSP specification.

func (TypeDefinitionOptions) MarshalJSONTo added in v1.0.0

func (x TypeDefinitionOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TypeDefinitionOptions) UnmarshalJSONFrom added in v1.0.0

func (x *TypeDefinitionOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TypeDefinitionParams added in v0.10.0

TypeDefinitionParams is defined by the LSP specification.

func (TypeDefinitionParams) MarshalJSONTo added in v1.0.0

func (x TypeDefinitionParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TypeDefinitionParams) UnmarshalJSONFrom added in v1.0.0

func (x *TypeDefinitionParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TypeDefinitionProvider added in v1.0.0

type TypeDefinitionProvider interface {
	// contains filtered or unexported methods
}

TypeDefinitionProvider is one of: Boolean, *TypeDefinitionOptions, *TypeDefinitionRegistrationOptions.

type TypeDefinitionRegistrationOptions added in v0.10.0

type TypeDefinitionRegistrationOptions struct {
	TextDocumentRegistrationOptions
	TypeDefinitionOptions
	StaticRegistrationOptions
}

TypeDefinitionRegistrationOptions is defined by the LSP specification.

func (TypeDefinitionRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*TypeDefinitionRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *TypeDefinitionRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TypeDefinitionResult added in v1.0.0

type TypeDefinitionResult = DefinitionResult

TypeDefinitionResult is an alias for DefinitionResult: the two share one result shape.

type TypeHierarchyClientCapabilities added in v1.0.0

type TypeHierarchyClientCapabilities struct {
	// DynamicRegistration 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,omitzero"`
}

TypeHierarchyClientCapabilities is defined by the LSP specification.

Since: 3.17.0

func (TypeHierarchyClientCapabilities) MarshalJSONTo added in v1.0.0

func (x TypeHierarchyClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TypeHierarchyClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *TypeHierarchyClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TypeHierarchyItem added in v1.0.0

type TypeHierarchyItem struct {
	// Name The name of this item.
	Name string `json:"name"`

	// Kind The kind of this item.
	Kind SymbolKind `json:"kind"`

	// Tags Tags for this item.
	Tags []SymbolTag `json:"tags,omitzero"`

	// Detail More detail for this item, e.g. the signature of a function.
	Detail *string `json:"detail,omitzero"`

	// URI The resource identifier of this item.
	URI uri.URI `json:"uri"`

	// Range The range enclosing this symbol not including leading/trailing whitespace
	// but everything else, e.g. comments and code.
	Range Range `json:"range"`

	// SelectionRange The range that should be selected and revealed when this symbol is being
	// picked, e.g. the name of a function. Must be contained by the
	// [TypeHierarchyItem.range].
	SelectionRange Range `json:"selectionRange"`

	// Data A data entry field that is preserved between a type hierarchy prepare and
	// supertypes or subtypes requests. It could also be used to identify the
	// type hierarchy in the server, helping improve the performance on
	// resolving supertypes and subtypes.
	Data LSPAny `json:"data,omitzero"`
}

TypeHierarchyItem is defined by the LSP specification.

Since: 3.17.0

func (TypeHierarchyItem) MarshalJSONTo added in v1.0.0

func (x TypeHierarchyItem) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TypeHierarchyItem) UnmarshalJSONFrom added in v1.0.0

func (x *TypeHierarchyItem) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TypeHierarchyOptions added in v1.0.0

type TypeHierarchyOptions struct {
	WorkDoneProgressOptions
}

TypeHierarchyOptions Type hierarchy options used during static registration.

Since: 3.17.0

func (TypeHierarchyOptions) MarshalJSONTo added in v1.0.0

func (x TypeHierarchyOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TypeHierarchyOptions) UnmarshalJSONFrom added in v1.0.0

func (x *TypeHierarchyOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TypeHierarchyPrepareParams added in v1.0.0

type TypeHierarchyPrepareParams struct {
	TextDocumentPositionParams
	WorkDoneProgressParams
}

TypeHierarchyPrepareParams The parameter of a `textDocument/prepareTypeHierarchy` request.

Since: 3.17.0

func (TypeHierarchyPrepareParams) MarshalJSONTo added in v1.0.0

func (x TypeHierarchyPrepareParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TypeHierarchyPrepareParams) UnmarshalJSONFrom added in v1.0.0

func (x *TypeHierarchyPrepareParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TypeHierarchyProvider added in v1.0.0

type TypeHierarchyProvider interface {
	// contains filtered or unexported methods
}

TypeHierarchyProvider is one of: Boolean, *TypeHierarchyOptions, *TypeHierarchyRegistrationOptions.

type TypeHierarchyRegistrationOptions added in v1.0.0

type TypeHierarchyRegistrationOptions struct {
	TextDocumentRegistrationOptions
	TypeHierarchyOptions
	StaticRegistrationOptions
}

TypeHierarchyRegistrationOptions Type hierarchy options used during static or dynamic registration.

Since: 3.17.0

func (TypeHierarchyRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*TypeHierarchyRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *TypeHierarchyRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TypeHierarchySubtypesParams added in v1.0.0

type TypeHierarchySubtypesParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// Item is defined by the LSP specification.
	Item TypeHierarchyItem `json:"item"`
}

TypeHierarchySubtypesParams The parameter of a `typeHierarchy/subtypes` request.

Since: 3.17.0

func (TypeHierarchySubtypesParams) MarshalJSONTo added in v1.0.0

func (x TypeHierarchySubtypesParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TypeHierarchySubtypesParams) UnmarshalJSONFrom added in v1.0.0

func (x *TypeHierarchySubtypesParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type TypeHierarchySupertypesParams added in v1.0.0

type TypeHierarchySupertypesParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// Item is defined by the LSP specification.
	Item TypeHierarchyItem `json:"item"`
}

TypeHierarchySupertypesParams The parameter of a `typeHierarchy/supertypes` request.

Since: 3.17.0

func (TypeHierarchySupertypesParams) MarshalJSONTo added in v1.0.0

func (x TypeHierarchySupertypesParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*TypeHierarchySupertypesParams) UnmarshalJSONFrom added in v1.0.0

func (x *TypeHierarchySupertypesParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type URI added in v0.11.0

type URI uri.URI

URI is a Uniform Resource Identifier as defined by RFC 3986 and used by the LSP base protocol. It is transported as a JSON string.

Generated URI and URI fields use uri.URI directly. This local URI type is retained as a narrow compatibility and sealed-union bridge where Go requires a package-local receiver type for generated marker methods. Prefer uri.URI for ordinary fields and convert with URI(u) only when a generated union arm such as RelativePatternBaseURI needs the local bridge.

type UnchangedDocumentDiagnosticReport added in v1.0.0

type UnchangedDocumentDiagnosticReport struct {
	// Kind A document diagnostic report indicating
	// no changes to the last result. A server can
	// only return `unchanged` if result ids are
	// provided.
	Kind string `json:"kind"`

	// ResultID A result id which will be sent on the next
	// diagnostic request for the same document.
	ResultID string `json:"resultId"`
}

UnchangedDocumentDiagnosticReport A diagnostic report indicating that the last returned report is still accurate.

Since: 3.17.0

func (UnchangedDocumentDiagnosticReport) MarshalJSONTo added in v1.0.0

func (*UnchangedDocumentDiagnosticReport) UnmarshalJSONFrom added in v1.0.0

func (x *UnchangedDocumentDiagnosticReport) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type UnimplementedClient added in v1.0.0

type UnimplementedClient struct{}

UnimplementedClient is an embeddable default implementation of the Client interface. Each un-overridden request method returns [errNotImplemented] together with the zero value of its result, and each un-overridden notification method returns nil (ignoring the notification), so consumers can embed it and override only the methods they support without an un-overridden notification tearing down the connection.

func (UnimplementedClient) ApplyEdit added in v1.0.0

func (UnimplementedClient) CodeLensRefresh added in v1.0.0

func (UnimplementedClient) CodeLensRefresh(context.Context) error

func (UnimplementedClient) Configuration added in v1.0.0

func (UnimplementedClient) DiagnosticRefresh added in v1.0.0

func (UnimplementedClient) DiagnosticRefresh(context.Context) error

func (UnimplementedClient) FoldingRangeRefresh added in v1.0.0

func (UnimplementedClient) FoldingRangeRefresh(context.Context) error

func (UnimplementedClient) InlayHintRefresh added in v1.0.0

func (UnimplementedClient) InlayHintRefresh(context.Context) error

func (UnimplementedClient) InlineValueRefresh added in v1.0.0

func (UnimplementedClient) InlineValueRefresh(context.Context) error

func (UnimplementedClient) LogMessage added in v1.0.0

func (UnimplementedClient) LogTrace added in v1.0.0

func (UnimplementedClient) Progress added in v1.0.0

func (UnimplementedClient) PublishDiagnostics added in v1.0.0

func (UnimplementedClient) RegisterCapability added in v1.0.0

func (UnimplementedClient) SemanticTokensRefresh added in v1.0.0

func (UnimplementedClient) SemanticTokensRefresh(context.Context) error

func (UnimplementedClient) ShowDocument added in v1.0.0

func (UnimplementedClient) ShowMessage added in v1.0.0

func (UnimplementedClient) ShowMessageRequest added in v1.0.0

func (UnimplementedClient) Telemetry added in v1.0.0

func (UnimplementedClient) TextDocumentContentRefresh added in v1.0.0

func (UnimplementedClient) UnregisterCapability added in v1.0.0

func (UnimplementedClient) WorkDoneProgressCreate added in v1.0.0

func (UnimplementedClient) WorkspaceFolders added in v1.0.0

func (UnimplementedClient) WorkspaceFolders(context.Context) ([]WorkspaceFolder, error)

type UnimplementedServer added in v1.0.0

type UnimplementedServer struct{}

UnimplementedServer is an embeddable default implementation of the Server interface. Each un-overridden request method returns [errNotImplemented] together with the zero value of its result, and each un-overridden notification method returns nil (ignoring the notification), so consumers can embed it and override only the methods they support without an un-overridden notification tearing down the connection.

func (UnimplementedServer) CodeAction added in v1.0.0

func (UnimplementedServer) CodeActionResolve added in v1.0.0

func (UnimplementedServer) CodeActionResolve(context.Context, *CodeAction) (*CodeAction, error)

func (UnimplementedServer) CodeLens added in v1.0.0

func (UnimplementedServer) CodeLensResolve added in v1.0.0

func (UnimplementedServer) CodeLensResolve(context.Context, *CodeLens) (*CodeLens, error)

func (UnimplementedServer) ColorPresentation added in v1.0.0

func (UnimplementedServer) Completion added in v1.0.0

func (UnimplementedServer) CompletionResolve added in v1.0.0

func (UnimplementedServer) Declaration added in v1.0.0

func (UnimplementedServer) Definition added in v1.0.0

func (UnimplementedServer) Diagnostic added in v1.0.0

func (UnimplementedServer) DiagnosticWorkspace added in v1.0.0

func (UnimplementedServer) DidChange added in v1.0.0

func (UnimplementedServer) DidChangeConfiguration added in v1.0.0

func (UnimplementedServer) DidChangeNotebookDocument added in v1.0.0

func (UnimplementedServer) DidChangeWatchedFiles added in v1.0.0

func (UnimplementedServer) DidChangeWorkspaceFolders added in v1.0.0

func (UnimplementedServer) DidClose added in v1.0.0

func (UnimplementedServer) DidCloseNotebookDocument added in v1.0.0

func (UnimplementedServer) DidCreateFiles added in v1.0.0

func (UnimplementedServer) DidDeleteFiles added in v1.0.0

func (UnimplementedServer) DidOpen added in v1.0.0

func (UnimplementedServer) DidOpenNotebookDocument added in v1.0.0

func (UnimplementedServer) DidRenameFiles added in v1.0.0

func (UnimplementedServer) DidSave added in v1.0.0

func (UnimplementedServer) DidSaveNotebookDocument added in v1.0.0

func (UnimplementedServer) DocumentColor added in v1.0.0

func (UnimplementedServer) DocumentHighlight added in v1.0.0

func (UnimplementedServer) DocumentLinkResolve added in v1.0.0

func (UnimplementedServer) DocumentSymbol added in v1.0.0

func (UnimplementedServer) ExecuteCommand added in v1.0.0

func (UnimplementedServer) Exit added in v1.0.0

func (UnimplementedServer) FoldingRanges added in v1.0.0

func (UnimplementedServer) Formatting added in v1.0.0

func (UnimplementedServer) Hover added in v1.0.0

func (UnimplementedServer) Implementation added in v1.0.0

func (UnimplementedServer) IncomingCalls added in v1.0.0

func (UnimplementedServer) Initialize added in v1.0.0

func (UnimplementedServer) Initialized added in v1.0.0

func (UnimplementedServer) InlayHint added in v1.0.0

func (UnimplementedServer) InlayHintResolve added in v1.0.0

func (UnimplementedServer) InlayHintResolve(context.Context, *InlayHint) (*InlayHint, error)

func (UnimplementedServer) InlineCompletion added in v1.0.0

func (UnimplementedServer) InlineValue added in v1.0.0

func (UnimplementedServer) LinkedEditingRange added in v1.0.0

func (UnimplementedServer) Moniker added in v1.0.0

func (UnimplementedServer) OnTypeFormatting added in v1.0.0

func (UnimplementedServer) OutgoingCalls added in v1.0.0

func (UnimplementedServer) PrepareCallHierarchy added in v1.0.0

func (UnimplementedServer) PrepareRename added in v1.0.0

func (UnimplementedServer) PrepareTypeHierarchy added in v1.0.0

func (UnimplementedServer) Progress added in v1.0.0

func (UnimplementedServer) RangeFormatting added in v1.0.0

func (UnimplementedServer) RangesFormatting added in v1.0.0

func (UnimplementedServer) References added in v1.0.0

func (UnimplementedServer) Rename added in v1.0.0

func (UnimplementedServer) Request added in v1.0.0

func (UnimplementedServer) SelectionRange added in v1.0.0

func (UnimplementedServer) SemanticTokensFull added in v1.0.0

func (UnimplementedServer) SemanticTokensFullDelta added in v1.0.0

func (UnimplementedServer) SemanticTokensRange added in v1.0.0

func (UnimplementedServer) SetTrace added in v1.0.0

func (UnimplementedServer) Shutdown added in v1.0.0

func (UnimplementedServer) SignatureHelp added in v1.0.0

func (UnimplementedServer) Subtypes added in v1.0.0

func (UnimplementedServer) Supertypes added in v1.0.0

func (UnimplementedServer) Symbols added in v1.0.0

func (UnimplementedServer) TextDocumentContent added in v1.0.0

func (UnimplementedServer) TypeDefinition added in v1.0.0

func (UnimplementedServer) WillCreateFiles added in v1.0.0

func (UnimplementedServer) WillDeleteFiles added in v1.0.0

func (UnimplementedServer) WillRenameFiles added in v1.0.0

func (UnimplementedServer) WillSave added in v1.0.0

func (UnimplementedServer) WillSaveWaitUntil added in v1.0.0

func (UnimplementedServer) WorkDoneProgressCancel added in v1.0.0

func (UnimplementedServer) WorkspaceSymbolResolve added in v1.0.0

type UniquenessLevel added in v0.11.0

type UniquenessLevel string

UniquenessLevel Moniker uniqueness level to define scope of the moniker.

Since: 3.16.0

const (
	// UniquenessLevelDocument The moniker is only unique inside a document
	UniquenessLevelDocument UniquenessLevel = "document"
	// UniquenessLevelProject The moniker is unique inside a project for which a dump got created
	UniquenessLevelProject UniquenessLevel = "project"
	// UniquenessLevelGroup The moniker is unique inside the group to which a project belongs
	UniquenessLevelGroup UniquenessLevel = "group"
	// UniquenessLevelScheme The moniker is unique inside the moniker scheme.
	UniquenessLevelScheme UniquenessLevel = "scheme"
	// UniquenessLevelGlobal The moniker is globally unique
	UniquenessLevelGlobal UniquenessLevel = "global"
)

UniquenessLevel enumeration values.

type Unregistration

type Unregistration struct {
	// ID The id used to unregister the request or notification. Usually an id
	// provided during the register request.
	ID string `json:"id"`

	// Method The method to unregister for.
	Method string `json:"method"`
}

Unregistration General parameters to unregister a request or notification.

func (Unregistration) MarshalJSONTo added in v1.0.0

func (x Unregistration) MarshalJSONTo(enc *jsontext.Encoder) error

func (*Unregistration) UnmarshalJSONFrom added in v1.0.0

func (x *Unregistration) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type UnregistrationParams

type UnregistrationParams struct {
	// Unregisterations is defined by the LSP specification.
	Unregisterations []Unregistration `json:"unregisterations"`
}

UnregistrationParams is defined by the LSP specification.

func (UnregistrationParams) MarshalJSONTo added in v1.0.0

func (x UnregistrationParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*UnregistrationParams) UnmarshalJSONFrom added in v1.0.0

func (x *UnregistrationParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type VersionedNotebookDocumentIdentifier added in v1.0.0

type VersionedNotebookDocumentIdentifier struct {
	// Version The version number of this notebook document.
	Version int32 `json:"version"`

	// URI The notebook document's uri.
	URI uri.URI `json:"uri"`
}

VersionedNotebookDocumentIdentifier A versioned notebook document identifier.

Since: 3.17.0

func (VersionedNotebookDocumentIdentifier) MarshalJSONTo added in v1.0.0

func (*VersionedNotebookDocumentIdentifier) UnmarshalJSONFrom added in v1.0.0

func (x *VersionedNotebookDocumentIdentifier) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type VersionedTextDocumentIdentifier

type VersionedTextDocumentIdentifier struct {
	TextDocumentIdentifier

	// Version The version number of this document.
	Version int32 `json:"version"`
}

VersionedTextDocumentIdentifier A text document identifier to denote a specific version of a text document.

func (VersionedTextDocumentIdentifier) MarshalJSONTo added in v1.0.0

func (x VersionedTextDocumentIdentifier) MarshalJSONTo(enc *jsontext.Encoder) error

func (*VersionedTextDocumentIdentifier) UnmarshalJSONFrom added in v1.0.0

func (x *VersionedTextDocumentIdentifier) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WatchKind

type WatchKind uint32

WatchKind is defined by the LSP specification.

const (
	// WatchKindCreate Interested in create events.
	WatchKindCreate WatchKind = 1
	// WatchKindChange Interested in change events
	WatchKindChange WatchKind = 2
	// WatchKindDelete Interested in delete events
	WatchKindDelete WatchKind = 4
)

WatchKind enumeration values.

type WillSaveTextDocumentParams

type WillSaveTextDocumentParams struct {
	// TextDocument The document that will be saved.
	TextDocument TextDocumentIdentifier `json:"textDocument"`

	// Reason The 'TextDocumentSaveReason'.
	Reason TextDocumentSaveReason `json:"reason"`
}

WillSaveTextDocumentParams The parameters sent in a will save text document notification.

func (WillSaveTextDocumentParams) MarshalJSONTo added in v1.0.0

func (x WillSaveTextDocumentParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WillSaveTextDocumentParams) UnmarshalJSONFrom added in v1.0.0

func (x *WillSaveTextDocumentParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WindowClientCapabilities added in v0.10.0

type WindowClientCapabilities struct {
	// WorkDoneProgress It indicates whether the client supports server initiated
	// progress using the `window/workDoneProgress/create` request.
	//
	// The capability also controls Whether client supports handling
	// of progress notifications. If set servers are allowed to report a
	// `workDoneProgress` property in the request specific server
	// capabilities.
	//
	// Since: 3.15.0
	WorkDoneProgress *bool `json:"workDoneProgress,omitzero"`

	// ShowMessage Capabilities specific to the showMessage request.
	//
	// Since: 3.16.0
	ShowMessage *ShowMessageRequestClientCapabilities `json:"showMessage,omitzero"`

	// ShowDocument Capabilities specific to the showDocument request.
	//
	// Since: 3.16.0
	ShowDocument *ShowDocumentClientCapabilities `json:"showDocument,omitzero"`
}

WindowClientCapabilities is defined by the LSP specification.

func (WindowClientCapabilities) MarshalJSONTo added in v1.0.0

func (x WindowClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WindowClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *WindowClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkDoneProgressBegin added in v0.10.0

type WorkDoneProgressBegin struct {
	// Kind is defined by the LSP specification.
	Kind string `json:"kind"`

	// Title Mandatory title of the progress operation. Used to briefly inform about
	// the kind of operation being performed.
	//
	// Examples: "Indexing" or "Linking dependencies".
	Title string `json:"title"`

	// Cancellable Controls if a cancel button should show to allow the user to cancel the
	// long running operation. Clients that don't support cancellation are allowed
	// to ignore the setting.
	Cancellable *bool `json:"cancellable,omitzero"`

	// Message Optional, more detailed associated progress message. Contains
	// complementary information to the `title`.
	//
	// Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
	// If unset, the previous progress message (if any) is still valid.
	Message *string `json:"message,omitzero"`

	// Percentage Optional progress percentage to display (value 100 is considered 100%).
	// If not provided infinite progress is assumed and clients are allowed
	// 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. The value range is [0, 100].
	Percentage *uint32 `json:"percentage,omitzero"`
}

WorkDoneProgressBegin is defined by the LSP specification.

func (WorkDoneProgressBegin) MarshalJSONTo added in v1.0.0

func (x WorkDoneProgressBegin) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkDoneProgressBegin) UnmarshalJSONFrom added in v1.0.0

func (x *WorkDoneProgressBegin) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkDoneProgressCancelParams added in v0.10.0

type WorkDoneProgressCancelParams struct {
	// Token The token to be used to report progress.
	Token ProgressToken `json:"token"`
}

WorkDoneProgressCancelParams is defined by the LSP specification.

func (WorkDoneProgressCancelParams) MarshalJSONTo added in v1.0.0

func (x WorkDoneProgressCancelParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkDoneProgressCancelParams) UnmarshalJSONFrom added in v1.0.0

func (x *WorkDoneProgressCancelParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkDoneProgressCreateParams added in v0.10.0

type WorkDoneProgressCreateParams struct {
	// Token The token to be used to report progress.
	Token ProgressToken `json:"token"`
}

WorkDoneProgressCreateParams is defined by the LSP specification.

func (WorkDoneProgressCreateParams) MarshalJSONTo added in v1.0.0

func (x WorkDoneProgressCreateParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkDoneProgressCreateParams) UnmarshalJSONFrom added in v1.0.0

func (x *WorkDoneProgressCreateParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkDoneProgressEnd added in v0.10.0

type WorkDoneProgressEnd struct {
	// Kind is defined by the LSP specification.
	Kind string `json:"kind"`

	// Message Optional, a final message indicating to for example indicate the outcome
	// of the operation.
	Message *string `json:"message,omitzero"`
}

WorkDoneProgressEnd is defined by the LSP specification.

func (WorkDoneProgressEnd) MarshalJSONTo added in v1.0.0

func (x WorkDoneProgressEnd) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkDoneProgressEnd) UnmarshalJSONFrom added in v1.0.0

func (x *WorkDoneProgressEnd) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkDoneProgressOptions added in v0.10.0

type WorkDoneProgressOptions struct {
	// WorkDoneProgress is defined by the LSP specification.
	WorkDoneProgress *bool `json:"workDoneProgress,omitzero"`
}

WorkDoneProgressOptions is defined by the LSP specification.

func (WorkDoneProgressOptions) MarshalJSONTo added in v1.0.0

func (x WorkDoneProgressOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkDoneProgressOptions) UnmarshalJSONFrom added in v1.0.0

func (x *WorkDoneProgressOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkDoneProgressParams added in v0.10.0

type WorkDoneProgressParams struct {
	// WorkDoneToken An optional token that a server can use to report work done progress.
	WorkDoneToken ProgressToken `json:"workDoneToken,omitzero"`
}

WorkDoneProgressParams is defined by the LSP specification.

func (WorkDoneProgressParams) MarshalJSONTo added in v1.0.0

func (x WorkDoneProgressParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkDoneProgressParams) UnmarshalJSONFrom added in v1.0.0

func (x *WorkDoneProgressParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkDoneProgressReport added in v0.10.0

type WorkDoneProgressReport struct {
	// Kind is defined by the LSP specification.
	Kind string `json:"kind"`

	// Cancellable Controls enablement state of a cancel button.
	//
	// Clients that don't support cancellation or don't support controlling the button's
	// enablement state are allowed to ignore the property.
	Cancellable *bool `json:"cancellable,omitzero"`

	// Message Optional, more detailed associated progress message. Contains
	// complementary information to the `title`.
	//
	// Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
	// If unset, the previous progress message (if any) is still valid.
	Message *string `json:"message,omitzero"`

	// Percentage Optional progress percentage to display (value 100 is considered 100%).
	// If not provided infinite progress is assumed and clients are allowed
	// 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. The value range is [0, 100]
	Percentage *uint32 `json:"percentage,omitzero"`
}

WorkDoneProgressReport is defined by the LSP specification.

func (WorkDoneProgressReport) MarshalJSONTo added in v1.0.0

func (x WorkDoneProgressReport) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkDoneProgressReport) UnmarshalJSONFrom added in v1.0.0

func (x *WorkDoneProgressReport) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceClientCapabilities

type WorkspaceClientCapabilities struct {
	// ApplyEdit The client supports applying batch edits
	// to the workspace by supporting the request
	// 'workspace/applyEdit'
	ApplyEdit *bool `json:"applyEdit,omitzero"`

	// WorkspaceEdit Capabilities specific to `WorkspaceEdit`s.
	WorkspaceEdit *WorkspaceEditClientCapabilities `json:"workspaceEdit,omitzero"`

	// DidChangeConfiguration Capabilities specific to the `workspace/didChangeConfiguration` notification.
	DidChangeConfiguration *DidChangeConfigurationClientCapabilities `json:"didChangeConfiguration,omitzero"`

	// DidChangeWatchedFiles Capabilities specific to the `workspace/didChangeWatchedFiles` notification.
	DidChangeWatchedFiles *DidChangeWatchedFilesClientCapabilities `json:"didChangeWatchedFiles,omitzero"`

	// Symbol Capabilities specific to the `workspace/symbol` request.
	Symbol *WorkspaceSymbolClientCapabilities `json:"symbol,omitzero"`

	// ExecuteCommand Capabilities specific to the `workspace/executeCommand` request.
	ExecuteCommand *ExecuteCommandClientCapabilities `json:"executeCommand,omitzero"`

	// WorkspaceFolders The client has support for workspace folders.
	//
	// Since: 3.6.0
	WorkspaceFolders *bool `json:"workspaceFolders,omitzero"`

	// Configuration The client supports `workspace/configuration` requests.
	//
	// Since: 3.6.0
	Configuration *bool `json:"configuration,omitzero"`

	// SemanticTokens Capabilities specific to the semantic token requests scoped to the
	// workspace.
	//
	// Since: 3.16.0.
	SemanticTokens *SemanticTokensWorkspaceClientCapabilities `json:"semanticTokens,omitzero"`

	// CodeLens Capabilities specific to the code lens requests scoped to the
	// workspace.
	//
	// Since: 3.16.0.
	CodeLens *CodeLensWorkspaceClientCapabilities `json:"codeLens,omitzero"`

	// FileOperations The client has support for file notifications/requests for user operations on files.
	//
	// Since 3.16.0
	FileOperations *FileOperationClientCapabilities `json:"fileOperations,omitzero"`

	// InlineValue Capabilities specific to the inline values requests scoped to the
	// workspace.
	//
	// Since: 3.17.0.
	InlineValue *InlineValueWorkspaceClientCapabilities `json:"inlineValue,omitzero"`

	// InlayHint Capabilities specific to the inlay hint requests scoped to the
	// workspace.
	//
	// Since: 3.17.0.
	InlayHint *InlayHintWorkspaceClientCapabilities `json:"inlayHint,omitzero"`

	// Diagnostics Capabilities specific to the diagnostic requests scoped to the
	// workspace.
	//
	// Since: 3.17.0.
	Diagnostics *DiagnosticWorkspaceClientCapabilities `json:"diagnostics,omitzero"`

	// FoldingRange Capabilities specific to the folding range requests scoped to the workspace.
	//
	// Since: 3.18.0
	FoldingRange *FoldingRangeWorkspaceClientCapabilities `json:"foldingRange,omitzero"`

	// TextDocumentContent Capabilities specific to the `workspace/textDocumentContent` request.
	//
	// Since: 3.18.0
	TextDocumentContent *TextDocumentContentClientCapabilities `json:"textDocumentContent,omitzero"`
}

WorkspaceClientCapabilities Workspace specific client capabilities.

func (WorkspaceClientCapabilities) MarshalJSONTo added in v1.0.0

func (x WorkspaceClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkspaceClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceDiagnosticParams added in v1.0.0

type WorkspaceDiagnosticParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// Identifier The additional identifier provided during registration.
	Identifier *string `json:"identifier,omitzero"`

	// PreviousResultIds The currently known diagnostic reports with their
	// previous result ids.
	PreviousResultIds []PreviousResultId `json:"previousResultIds"`
}

WorkspaceDiagnosticParams Parameters of the workspace diagnostic request.

Since: 3.17.0

func (WorkspaceDiagnosticParams) MarshalJSONTo added in v1.0.0

func (x WorkspaceDiagnosticParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkspaceDiagnosticParams) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceDiagnosticParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceDiagnosticReport added in v1.0.0

type WorkspaceDiagnosticReport struct {
	// Items is defined by the LSP specification.
	Items []WorkspaceDocumentDiagnosticReport `json:"items"`
}

WorkspaceDiagnosticReport A workspace diagnostic report.

Since: 3.17.0

func (WorkspaceDiagnosticReport) MarshalJSONTo added in v1.0.0

func (x WorkspaceDiagnosticReport) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkspaceDiagnosticReport) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceDiagnosticReport) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceDiagnosticReportPartialResult added in v1.0.0

type WorkspaceDiagnosticReportPartialResult struct {
	// Items is defined by the LSP specification.
	Items []WorkspaceDocumentDiagnosticReport `json:"items"`
}

WorkspaceDiagnosticReportPartialResult A partial result for a workspace diagnostic report.

Since: 3.17.0

func (WorkspaceDiagnosticReportPartialResult) MarshalJSONTo added in v1.0.0

func (*WorkspaceDiagnosticReportPartialResult) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceDiagnosticReportPartialResult) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceDocumentDiagnosticReport added in v1.0.0

type WorkspaceDocumentDiagnosticReport interface {
	// contains filtered or unexported methods
}

WorkspaceDocumentDiagnosticReport A workspace diagnostic document report.

Since: 3.17.0

type WorkspaceEdit

type WorkspaceEdit struct {
	// Changes Holds changes to existing resources.
	Changes map[uri.URI][]TextEdit `json:"changes,omitzero"`

	// DocumentChanges Depending on the client capability `workspace.workspaceEdit.resourceOperations` document changes
	// are either an array of `TextDocumentEdit`s to express changes to n different text documents
	// where each text document edit addresses a specific version of a text document. Or it can contain
	// above `TextDocumentEdit`s mixed with create, rename and delete file / folder operations.
	//
	// Whether a client supports versioned document edits is expressed via
	// `workspace.workspaceEdit.documentChanges` client capability.
	//
	// If a client neither supports `documentChanges` nor `workspace.workspaceEdit.resourceOperations` then
	// only plain `TextEdit`s using the `changes` property are supported.
	DocumentChanges []DocumentChange `json:"documentChanges,omitzero"`

	// ChangeAnnotations 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[ChangeAnnotationIdentifier]ChangeAnnotation `json:"changeAnnotations,omitzero"`
}

WorkspaceEdit A workspace edit represents changes to many resources managed in the workspace. The edit should either provide `changes` or `documentChanges`. If documentChanges are present they are preferred over `changes` if the client can handle versioned document edits.

Since version 3.13.0 a workspace edit can contain resource operations as well. If resource operations are present clients need to execute the operations in the order in which they are provided. So a workspace edit for example can consist of the following two changes: (1) a create file a.txt and (2) a text document edit which insert text into file a.txt.

An invalid sequence (e.g. (1) delete file a.txt and (2) insert text into file a.txt) will cause failure of the operation. How the client recovers from the failure is described by the client capability: `workspace.workspaceEdit.failureHandling`

func (WorkspaceEdit) MarshalJSONTo added in v1.0.0

func (x WorkspaceEdit) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkspaceEdit) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceEdit) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceEditClientCapabilities added in v1.0.0

type WorkspaceEditClientCapabilities struct {
	// DocumentChanges The client supports versioned document changes in `WorkspaceEdit`s
	DocumentChanges *bool `json:"documentChanges,omitzero"`

	// ResourceOperations The resource operations the client supports. Clients should at least
	// support 'create', 'rename' and 'delete' files and folders.
	//
	// Since: 3.13.0
	ResourceOperations []ResourceOperationKind `json:"resourceOperations,omitzero"`

	// FailureHandling The failure handling strategy of a client if applying the workspace edit
	// fails.
	//
	// Since: 3.13.0
	FailureHandling FailureHandlingKind `json:"failureHandling,omitzero"`

	// NormalizesLineEndings 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 to the client-specified new line
	// character.
	//
	// Since: 3.16.0
	NormalizesLineEndings *bool `json:"normalizesLineEndings,omitzero"`

	// ChangeAnnotationSupport Whether the client in general supports change annotations on text edits,
	// create file, rename file and delete file changes.
	//
	// Since: 3.16.0
	ChangeAnnotationSupport *ChangeAnnotationsSupportOptions `json:"changeAnnotationSupport,omitzero"`

	// MetadataSupport Whether the client supports `WorkspaceEditMetadata` in `WorkspaceEdit`s.
	//
	// Since: 3.18.0
	MetadataSupport *bool `json:"metadataSupport,omitzero"`

	// SnippetEditSupport Whether the client supports snippets as text edits.
	//
	// Since: 3.18.0
	SnippetEditSupport *bool `json:"snippetEditSupport,omitzero"`
}

WorkspaceEditClientCapabilities is defined by the LSP specification.

func (WorkspaceEditClientCapabilities) MarshalJSONTo added in v1.0.0

func (x WorkspaceEditClientCapabilities) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkspaceEditClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceEditClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceEditMetadata added in v1.0.0

type WorkspaceEditMetadata struct {
	// IsRefactoring Signal to the editor that this edit is a refactoring.
	IsRefactoring *bool `json:"isRefactoring,omitzero"`
}

WorkspaceEditMetadata Additional data about a workspace edit.

Since: 3.18.0

func (WorkspaceEditMetadata) MarshalJSONTo added in v1.0.0

func (x WorkspaceEditMetadata) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkspaceEditMetadata) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceEditMetadata) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceFolder

type WorkspaceFolder struct {
	// URI The associated URI for this workspace folder.
	URI uri.URI `json:"uri"`

	// Name The name of the workspace folder. Used to refer to this
	// workspace folder in the user interface.
	Name string `json:"name"`
}

WorkspaceFolder A workspace folder inside a client.

func (WorkspaceFolder) MarshalJSONTo added in v1.0.0

func (x WorkspaceFolder) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkspaceFolder) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceFolder) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceFoldersChangeEvent

type WorkspaceFoldersChangeEvent struct {
	// Added The array of added workspace folders
	Added []WorkspaceFolder `json:"added"`

	// Removed The array of the removed workspace folders
	Removed []WorkspaceFolder `json:"removed"`
}

WorkspaceFoldersChangeEvent The workspace folder change event.

func (WorkspaceFoldersChangeEvent) MarshalJSONTo added in v1.0.0

func (x WorkspaceFoldersChangeEvent) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkspaceFoldersChangeEvent) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceFoldersChangeEvent) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceFoldersInitializeParams added in v1.0.0

type WorkspaceFoldersInitializeParams struct {
	// WorkspaceFolders The workspace folders configured in the client when the server starts.
	//
	// This property is only available if the client supports workspace folders.
	// It can be `null` if the client supports workspace folders but none are
	// configured.
	//
	// Since: 3.6.0
	WorkspaceFolders Nullable[[]WorkspaceFolder] `json:"workspaceFolders,omitzero"`
}

WorkspaceFoldersInitializeParams is defined by the LSP specification.

func (WorkspaceFoldersInitializeParams) MarshalJSONTo added in v1.0.0

func (*WorkspaceFoldersInitializeParams) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceFoldersInitializeParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceFoldersServerCapabilities added in v1.0.0

type WorkspaceFoldersServerCapabilities struct {
	// Supported The server has support for workspace folders
	Supported *bool `json:"supported,omitzero"`

	// ChangeNotifications Whether the server wants to receive workspace folder
	// change notifications.
	//
	// If a string is provided the string is treated as an ID
	// 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.
	ChangeNotifications ChangeNotifications `json:"changeNotifications,omitzero"`
}

WorkspaceFoldersServerCapabilities is defined by the LSP specification.

func (WorkspaceFoldersServerCapabilities) MarshalJSONTo added in v1.0.0

func (*WorkspaceFoldersServerCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceFoldersServerCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceFullDocumentDiagnosticReport added in v1.0.0

type WorkspaceFullDocumentDiagnosticReport struct {
	FullDocumentDiagnosticReport

	// URI The URI for which diagnostic information is reported.
	URI uri.URI `json:"uri"`

	// Version The version number for which the diagnostics are reported.
	// If the document is not marked as open `null` can be provided.
	Version *int32 `json:"version"`
}

WorkspaceFullDocumentDiagnosticReport A full document diagnostic report for a workspace diagnostic result.

Since: 3.17.0

func (WorkspaceFullDocumentDiagnosticReport) MarshalJSONTo added in v1.0.0

func (*WorkspaceFullDocumentDiagnosticReport) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceFullDocumentDiagnosticReport) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceOptions added in v1.0.0

type WorkspaceOptions struct {
	// WorkspaceFolders The server supports workspace folder.
	//
	// Since: 3.6.0
	WorkspaceFolders *WorkspaceFoldersServerCapabilities `json:"workspaceFolders,omitzero"`

	// FileOperations The server is interested in notifications/requests for operations on files.
	//
	// Since: 3.16.0
	FileOperations *FileOperationOptions `json:"fileOperations,omitzero"`

	// TextDocumentContent The server supports the `workspace/textDocumentContent` request.
	//
	// Since: 3.18.0
	TextDocumentContent WorkspaceOptionsTextDocumentContent `json:"textDocumentContent,omitzero"`
}

WorkspaceOptions Defines workspace specific capabilities of the server.

Since: 3.18.0

func (WorkspaceOptions) MarshalJSONTo added in v1.0.0

func (x WorkspaceOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkspaceOptions) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceOptionsTextDocumentContent added in v1.0.0

type WorkspaceOptionsTextDocumentContent interface {
	// contains filtered or unexported methods
}

WorkspaceOptionsTextDocumentContent is one of: *TextDocumentContentOptions, *TextDocumentContentRegistrationOptions.

type WorkspaceSymbol added in v1.0.0

type WorkspaceSymbol struct {
	BaseSymbolInformation

	// Location The location of the symbol. Whether a server is allowed to
	// return a location without a range depends on the client
	// capability `workspace.symbol.resolveSupport`.
	//
	// See SymbolInformation#location for more details.
	Location WorkspaceSymbolLocation `json:"location"`

	// Data A data entry field that is preserved on a workspace symbol between a
	// workspace symbol request and a workspace symbol resolve request.
	Data LSPAny `json:"data,omitzero"`
}

WorkspaceSymbol A special workspace symbol that supports locations without a range.

See also SymbolInformation.

Since: 3.17.0

func (WorkspaceSymbol) MarshalJSONTo added in v1.0.0

func (x WorkspaceSymbol) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkspaceSymbol) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceSymbol) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceSymbolClientCapabilities added in v0.11.1

type WorkspaceSymbolClientCapabilities struct {
	// DynamicRegistration Symbol request supports dynamic registration.
	DynamicRegistration *bool `json:"dynamicRegistration,omitzero"`

	// SymbolKind Specific capabilities for the `SymbolKind` in the `workspace/symbol` request.
	SymbolKind *ClientSymbolKindOptions `json:"symbolKind,omitzero"`

	// TagSupport The client supports tags on `SymbolInformation`.
	// Clients supporting tags have to handle unknown tags gracefully.
	//
	// Since: 3.16.0
	TagSupport ClientSymbolTagOptions `json:"tagSupport,omitzero"`

	// ResolveSupport The client support partial workspace symbols. The client will send the
	// request `workspaceSymbol/resolve` to the server to resolve additional
	// properties.
	//
	// Since: 3.17.0
	ResolveSupport ClientSymbolResolveOptions `json:"resolveSupport,omitzero"`
}

WorkspaceSymbolClientCapabilities Client capabilities for a [WorkspaceSymbolRequest].

func (WorkspaceSymbolClientCapabilities) MarshalJSONTo added in v1.0.0

func (*WorkspaceSymbolClientCapabilities) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceSymbolClientCapabilities) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceSymbolLocation added in v1.0.0

type WorkspaceSymbolLocation interface {
	// contains filtered or unexported methods
}

WorkspaceSymbolLocation is one of: *Location, *LocationUriOnly.

type WorkspaceSymbolOptions added in v0.10.0

type WorkspaceSymbolOptions struct {
	WorkDoneProgressOptions

	// ResolveProvider The server provides support to resolve additional
	// information for a workspace symbol.
	//
	// Since: 3.17.0
	ResolveProvider *bool `json:"resolveProvider,omitzero"`
}

WorkspaceSymbolOptions Server capabilities for a [WorkspaceSymbolRequest].

func (WorkspaceSymbolOptions) MarshalJSONTo added in v1.0.0

func (x WorkspaceSymbolOptions) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkspaceSymbolOptions) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceSymbolOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceSymbolParams

type WorkspaceSymbolParams struct {
	WorkDoneProgressParams
	PartialResultParams

	// Query A query string to filter symbols by. Clients may send an empty
	// string here to request all symbols.
	//
	// The `query`-parameter should be interpreted in a *relaxed way* as editors
	// will apply their own highlighting and scoring on the results. A good rule
	// of thumb is to match case-insensitive and to simply check that the
	// characters of *query* appear in their order in a candidate symbol.
	// Servers shouldn't use prefix, substring, or similar strict matching.
	Query string `json:"query"`
}

WorkspaceSymbolParams The parameters of a [WorkspaceSymbolRequest].

func (WorkspaceSymbolParams) MarshalJSONTo added in v1.0.0

func (x WorkspaceSymbolParams) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkspaceSymbolParams) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceSymbolParams) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceSymbolProvider added in v1.0.0

type WorkspaceSymbolProvider interface {
	// contains filtered or unexported methods
}

WorkspaceSymbolProvider is one of: Boolean, *WorkspaceSymbolOptions.

type WorkspaceSymbolRegistrationOptions added in v1.0.0

type WorkspaceSymbolRegistrationOptions struct {
	WorkspaceSymbolOptions
}

WorkspaceSymbolRegistrationOptions Registration options for a [WorkspaceSymbolRequest].

func (WorkspaceSymbolRegistrationOptions) MarshalJSONTo added in v1.0.0

func (*WorkspaceSymbolRegistrationOptions) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceSymbolRegistrationOptions) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceSymbolResult added in v1.0.0

type WorkspaceSymbolResult interface {
	// contains filtered or unexported methods
}

WorkspaceSymbolResult is one of: SymbolInformationSlice, WorkspaceSymbolSlice.

type WorkspaceSymbolSlice added in v1.0.0

type WorkspaceSymbolSlice []WorkspaceSymbol

WorkspaceSymbolSlice is a named type so a []WorkspaceSymbol arm can satisfy a union interface.

func (WorkspaceSymbolSlice) MarshalJSONTo added in v1.0.0

func (x WorkspaceSymbolSlice) MarshalJSONTo(enc *jsontext.Encoder) error

func (*WorkspaceSymbolSlice) UnmarshalJSONFrom added in v1.0.0

func (x *WorkspaceSymbolSlice) UnmarshalJSONFrom(dec *jsontext.Decoder) error

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

type WorkspaceUnchangedDocumentDiagnosticReport added in v1.0.0

type WorkspaceUnchangedDocumentDiagnosticReport struct {
	UnchangedDocumentDiagnosticReport

	// URI The URI for which diagnostic information is reported.
	URI uri.URI `json:"uri"`

	// Version The version number for which the diagnostics are reported.
	// If the document is not marked as open `null` can be provided.
	Version *int32 `json:"version"`
}

WorkspaceUnchangedDocumentDiagnosticReport An unchanged document diagnostic report for a workspace diagnostic result.

Since: 3.17.0

func (WorkspaceUnchangedDocumentDiagnosticReport) MarshalJSONTo added in v1.0.0

func (*WorkspaceUnchangedDocumentDiagnosticReport) UnmarshalJSONFrom added in v1.0.0

UnmarshalJSONFrom implements the v2 UnmarshalerFrom interface via the byte walker.

Directories

Path Synopsis
internal
genlsp
Package genlsp implements a generator that lowers the LSP meta-model (metaModel.json) into Go source for the go.lsp.dev/protocol package.
Package genlsp implements a generator that lowers the LSP meta-model (metaModel.json) into Go source for the go.lsp.dev/protocol package.
genlsp/cmd/genlsp command
Command genlsp generates the go.lsp.dev/protocol package from the LSP meta-model (metaModel.json).
Command genlsp generates the go.lsp.dev/protocol package from the LSP meta-model (metaModel.json).

Jump to

Keyboard shortcuts

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