Help us shape the future of Go! Take the 2026 Go Developer Survey

lsp

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check(files []string) (string, error)

Check runs language server diagnostics on the provided files.

func Languages

func Languages() []string

Types

type Diagnostic

type Diagnostic struct {
	File     string `json:"file"`
	Line     int    `json:"line"`
	Col      int    `json:"col"`
	Code     string `json:"code,omitempty"`
	Severity string `json:"severity"` // error|warning|info
	Message  string `json:"message"`
	Tool     string `json:"tool"`     // gopls|tsc
	Language string `json:"language"` // go|typescript
}

Diagnostic represents a single compiler/language diagnostic.

func ParseDiagnostics

func ParseDiagnostics(output string) []Diagnostic

ParseDiagnostics attempts to parse output from gopls check and tsc --noEmit into structured diagnostics. It is resilient to slight format variations.

Jump to

Keyboard shortcuts

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