commandmeta

package
v0.0.0-...-68c7731 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package commandmeta provides metadata about LSP commands, by statically analyzing the command.Interface type.

It is used to generate JSONRPC dispatch and marshaling. TODO(adonovan): combine with gopls/internal/protocol/command/gen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	MethodName string // e.g. "RunTests"
	Name       string // e.g. "gopls.run_tests"
	Title      string
	Doc        string
	Args       []*Field
	Result     *Field
}

A Command describes a workspace/executeCommand extension command.

func Load

func Load() ([]*Command, error)

Load returns a description of the workspace/executeCommand commands supported by gopls based on static analysis of the command.Interface type.

type Field

type Field struct {
	Name     string
	Doc      string
	JSONTag  string
	Type     types.Type
	FieldMod string
	// In some circumstances, we may want to recursively load additional field
	// descriptors for fields of struct types, documenting their internals.
	Fields []*Field
}

Jump to

Keyboard shortcuts

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