Documentation ¶
Index ¶
- func ComputeEdits(before, after string) []types.TextEdit
- func FmtCommand(args []string) types.Command
- func FmtV1Command(args []string) types.Command
- func NewConnectionFromLanguageServer(ctx context.Context, handler ConnectionHandlerFunc, opts *ConnectionOptions) *jsonrpc2.Conn
- func NoWhiteSpaceCommentCommand(args []string) types.Command
- func TokenFoldingRanges(policy string) []types.FoldingRange
- func UseAssignmentOperatorCommand(args []string) types.Command
- type ConnectionHandlerFunc
- type ConnectionLoggingConfig
- type ConnectionOptions
- type HoverResponse
- type LanguageServer
- func (l *LanguageServer) Handle(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrpc2.Request) (result any, err error)
- func (l *LanguageServer) SetConn(conn *jsonrpc2.Conn)
- func (l *LanguageServer) StartCommandWorker(ctx context.Context)
- func (l *LanguageServer) StartConfigWorker(ctx context.Context)
- func (l *LanguageServer) StartDiagnosticsWorker(ctx context.Context)
- func (l *LanguageServer) StartHoverWorker(ctx context.Context)
- type LanguageServerOptions
- type OpKind
- type StdOutReadWriteCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeEdits ¶ added in v0.21.0
ComputeEdits computes diff edits from 2 string inputs.
func FmtCommand ¶ added in v0.21.0
func FmtV1Command ¶ added in v0.21.0
func NewConnectionFromLanguageServer ¶ added in v0.21.0
func NewConnectionFromLanguageServer( ctx context.Context, handler ConnectionHandlerFunc, opts *ConnectionOptions, ) *jsonrpc2.Conn
func NoWhiteSpaceCommentCommand ¶ added in v0.21.0
func TokenFoldingRanges ¶ added in v0.21.0
func TokenFoldingRanges(policy string) []types.FoldingRange
func UseAssignmentOperatorCommand ¶ added in v0.21.0
Types ¶
type ConnectionHandlerFunc ¶ added in v0.21.0
type ConnectionLoggingConfig ¶ added in v0.21.0
type ConnectionLoggingConfig struct { Writer io.Writer LogInbound bool LogOutbound bool // IncludeMethods is a list of methods to include in the request log. // If empty, all methods are included. IncludeMethods takes precedence // over ExcludeMethods. IncludeMethods []string // ExcludeMethods is a list of methods to exclude from the request log. ExcludeMethods []string }
func (*ConnectionLoggingConfig) ShouldLog ¶ added in v0.21.0
func (cfg *ConnectionLoggingConfig) ShouldLog(method string) bool
type ConnectionOptions ¶ added in v0.21.0
type ConnectionOptions struct {
LoggingConfig ConnectionLoggingConfig
}
type HoverResponse ¶ added in v0.20.0
type HoverResponse struct { Contents types.MarkupContent `json:"contents"` Range types.Range `json:"range"` }
type LanguageServer ¶
type LanguageServer struct {
// contains filtered or unexported fields
}
func NewLanguageServer ¶
func NewLanguageServer(opts *LanguageServerOptions) *LanguageServer
func (*LanguageServer) SetConn ¶
func (l *LanguageServer) SetConn(conn *jsonrpc2.Conn)
func (*LanguageServer) StartCommandWorker ¶ added in v0.21.0
func (l *LanguageServer) StartCommandWorker(ctx context.Context)
func (*LanguageServer) StartConfigWorker ¶ added in v0.21.0
func (l *LanguageServer) StartConfigWorker(ctx context.Context)
func (*LanguageServer) StartDiagnosticsWorker ¶
func (l *LanguageServer) StartDiagnosticsWorker(ctx context.Context)
func (*LanguageServer) StartHoverWorker ¶ added in v0.20.0
func (l *LanguageServer) StartHoverWorker(ctx context.Context)
type LanguageServerOptions ¶
type OpKind ¶ added in v0.21.0
type OpKind int
OpKind is used to denote the type of operation a line represents.
const ( // Delete is the operation kind for a line that is present in the input // but not in the output. Delete OpKind = iota // Insert is the operation kind for a line that is new in the output. Insert // Equal is the operation kind for a line that is the same in the input and // output, often used to provide context around edited lines. Equal )
type StdOutReadWriteCloser ¶
type StdOutReadWriteCloser struct{}
func (StdOutReadWriteCloser) Close ¶
func (StdOutReadWriteCloser) Close() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.