Documentation ¶
Index ¶
- func RunServer(ctx context.Context, stdout *os.File) error
- type Configuration
- type DiagConfiguration
- type ErrDiscard
- type EvaluateParams
- type EvaluateResult
- type FallbackServer
- func (f FallbackServer) CodeAction(_ context.Context, _ *protocol.CodeActionParams) (result []protocol.CodeAction, err error)
- func (f FallbackServer) CodeLens(_ context.Context, _ *protocol.CodeLensParams) (result []protocol.CodeLens, err error)
- func (f FallbackServer) CodeLensRefresh(_ context.Context) (err error)
- func (f FallbackServer) CodeLensResolve(_ context.Context, _ *protocol.CodeLens) (result *protocol.CodeLens, err error)
- func (f FallbackServer) ColorPresentation(_ context.Context, _ *protocol.ColorPresentationParams) (result []protocol.ColorPresentation, err error)
- func (f FallbackServer) Completion(_ context.Context, _ *protocol.CompletionParams) (result *protocol.CompletionList, err error)
- func (f FallbackServer) CompletionResolve(_ context.Context, _ *protocol.CompletionItem) (result *protocol.CompletionItem, err error)
- func (f FallbackServer) Declaration(_ context.Context, _ *protocol.DeclarationParams) (result []protocol.Location, err error)
- func (f FallbackServer) Definition(_ context.Context, _ *protocol.DefinitionParams) (result []protocol.Location, err error)
- func (f FallbackServer) DidChange(_ context.Context, _ *protocol.DidChangeTextDocumentParams) (err error)
- func (f FallbackServer) DidChangeConfiguration(_ context.Context, _ *protocol.DidChangeConfigurationParams) (err error)
- func (f FallbackServer) DidChangeWatchedFiles(_ context.Context, _ *protocol.DidChangeWatchedFilesParams) (err error)
- func (f FallbackServer) DidChangeWorkspaceFolders(_ context.Context, _ *protocol.DidChangeWorkspaceFoldersParams) (err error)
- func (f FallbackServer) DidClose(_ context.Context, _ *protocol.DidCloseTextDocumentParams) (err error)
- func (f FallbackServer) DidCreateFiles(_ context.Context, _ *protocol.CreateFilesParams) (err error)
- func (f FallbackServer) DidDeleteFiles(_ context.Context, _ *protocol.DeleteFilesParams) (err error)
- func (f FallbackServer) DidOpen(_ context.Context, _ *protocol.DidOpenTextDocumentParams) (err error)
- func (f FallbackServer) DidRenameFiles(_ context.Context, _ *protocol.RenameFilesParams) (err error)
- func (f FallbackServer) DidSave(_ context.Context, _ *protocol.DidSaveTextDocumentParams) (err error)
- func (f FallbackServer) DocumentColor(_ context.Context, _ *protocol.DocumentColorParams) (result []protocol.ColorInformation, err error)
- func (f FallbackServer) DocumentHighlight(_ context.Context, _ *protocol.DocumentHighlightParams) (result []protocol.DocumentHighlight, err error)
- func (f FallbackServer) DocumentLink(_ context.Context, _ *protocol.DocumentLinkParams) (result []protocol.DocumentLink, err error)
- func (f FallbackServer) DocumentLinkResolve(_ context.Context, _ *protocol.DocumentLink) (result *protocol.DocumentLink, err error)
- func (f FallbackServer) DocumentSymbol(_ context.Context, _ *protocol.DocumentSymbolParams) (result []interface{}, err error)
- func (f FallbackServer) ExecuteCommand(_ context.Context, _ *protocol.ExecuteCommandParams) (result interface{}, err error)
- func (f FallbackServer) Exit(_ context.Context) (err error)
- func (f FallbackServer) FoldingRanges(_ context.Context, _ *protocol.FoldingRangeParams) (result []protocol.FoldingRange, err error)
- func (f FallbackServer) Formatting(_ context.Context, _ *protocol.DocumentFormattingParams) (result []protocol.TextEdit, err error)
- func (f FallbackServer) Hover(_ context.Context, _ *protocol.HoverParams) (result *protocol.Hover, err error)
- func (f FallbackServer) Implementation(_ context.Context, _ *protocol.ImplementationParams) (result []protocol.Location, err error)
- func (f FallbackServer) IncomingCalls(_ context.Context, _ *protocol.CallHierarchyIncomingCallsParams) (result []protocol.CallHierarchyIncomingCall, err error)
- func (f FallbackServer) Initialize(_ context.Context, _ *protocol.InitializeParams) (result *protocol.InitializeResult, err error)
- func (f FallbackServer) Initialized(_ context.Context, _ *protocol.InitializedParams) (err error)
- func (f FallbackServer) LinkedEditingRange(_ context.Context, _ *protocol.LinkedEditingRangeParams) (result *protocol.LinkedEditingRanges, err error)
- func (f FallbackServer) LogTrace(_ context.Context, _ *protocol.LogTraceParams) (err error)
- func (f FallbackServer) Moniker(_ context.Context, _ *protocol.MonikerParams) (result []protocol.Moniker, err error)
- func (f FallbackServer) OnTypeFormatting(_ context.Context, _ *protocol.DocumentOnTypeFormattingParams) (result []protocol.TextEdit, err error)
- func (f FallbackServer) OutgoingCalls(_ context.Context, _ *protocol.CallHierarchyOutgoingCallsParams) (result []protocol.CallHierarchyOutgoingCall, err error)
- func (f FallbackServer) PrepareCallHierarchy(_ context.Context, _ *protocol.CallHierarchyPrepareParams) (result []protocol.CallHierarchyItem, err error)
- func (f FallbackServer) PrepareRename(_ context.Context, _ *protocol.PrepareRenameParams) (result *protocol.Range, err error)
- func (f FallbackServer) RangeFormatting(_ context.Context, _ *protocol.DocumentRangeFormattingParams) (result []protocol.TextEdit, err error)
- func (f FallbackServer) References(_ context.Context, _ *protocol.ReferenceParams) (result []protocol.Location, err error)
- func (f FallbackServer) Rename(_ context.Context, _ *protocol.RenameParams) (result *protocol.WorkspaceEdit, err error)
- func (f FallbackServer) Request(_ context.Context, _ string, _ interface{}) (result interface{}, err error)
- func (f FallbackServer) SemanticTokensFull(_ context.Context, _ *protocol.SemanticTokensParams) (result *protocol.SemanticTokens, err error)
- func (f FallbackServer) SemanticTokensFullDelta(_ context.Context, _ *protocol.SemanticTokensDeltaParams) (result interface{}, err error)
- func (f FallbackServer) SemanticTokensRange(_ context.Context, _ *protocol.SemanticTokensRangeParams) (result *protocol.SemanticTokens, err error)
- func (f FallbackServer) SemanticTokensRefresh(_ context.Context) (err error)
- func (f FallbackServer) SetTrace(_ context.Context, _ *protocol.SetTraceParams) (err error)
- func (f FallbackServer) ShowDocument(_ context.Context, _ *protocol.ShowDocumentParams) (result *protocol.ShowDocumentResult, err error)
- func (f FallbackServer) Shutdown(_ context.Context) (err error)
- func (f FallbackServer) SignatureHelp(_ context.Context, _ *protocol.SignatureHelpParams) (result *protocol.SignatureHelp, err error)
- func (f FallbackServer) Symbols(_ context.Context, _ *protocol.WorkspaceSymbolParams) (result []protocol.SymbolInformation, err error)
- func (f FallbackServer) TypeDefinition(_ context.Context, _ *protocol.TypeDefinitionParams) (result []protocol.Location, err error)
- func (f FallbackServer) WillCreateFiles(_ context.Context, _ *protocol.CreateFilesParams) (result *protocol.WorkspaceEdit, err error)
- func (f FallbackServer) WillDeleteFiles(_ context.Context, _ *protocol.DeleteFilesParams) (result *protocol.WorkspaceEdit, err error)
- func (f FallbackServer) WillRenameFiles(_ context.Context, _ *protocol.RenameFilesParams) (result *protocol.WorkspaceEdit, err error)
- func (f FallbackServer) WillSave(_ context.Context, _ *protocol.WillSaveTextDocumentParams) (err error)
- func (f FallbackServer) WillSaveWaitUntil(_ context.Context, _ *protocol.WillSaveTextDocumentParams) (result []protocol.TextEdit, err error)
- func (f FallbackServer) WorkDoneProgressCancel(_ context.Context, _ *protocol.WorkDoneProgressCancelParams) (err error)
- type FmtConfiguration
- type OverlayImporter
- type ParseResult
- type Server
- func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)
- func (s *Server) Definition(ctx context.Context, params *protocol.DefinitionParams) ([]protocol.Location, error)
- func (s *Server) DidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams) error
- func (s *Server) DidChangeConfiguration(ctx context.Context, params *protocol.DidChangeConfigurationParams) (err error)
- func (s *Server) DidClose(_ context.Context, params *protocol.DidCloseTextDocumentParams) (err error)
- func (s *Server) DidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams) error
- func (s *Server) DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) (err error)
- func (s *Server) DocumentSymbol(ctx context.Context, params *protocol.DocumentSymbolParams) ([]interface{}, error)
- func (s *Server) Evaluate(ctx context.Context, params *EvaluateParams) (*EvaluateResult, error)
- func (s *Server) ExecuteCommand(ctx context.Context, params *protocol.ExecuteCommandParams) (result interface{}, err error)
- func (s *Server) Exit(ctx context.Context) (err error)
- func (s *Server) Formatting(ctx context.Context, params *protocol.DocumentFormattingParams) ([]protocol.TextEdit, error)
- func (s *Server) Handler() jsonrpc2.Handler
- func (s *Server) Hover(ctx context.Context, params *protocol.HoverParams) (result *protocol.Hover, err error)
- func (s *Server) Initialize(ctx context.Context, params *protocol.InitializeParams) (result *protocol.InitializeResult, err error)
- func (s *Server) Initialized(ctx context.Context, params *protocol.InitializedParams) (err error)
- func (s *Server) NewResolver(uri uri.URI) *valueResolver
- func (s *Server) Shutdown(ctx context.Context) (err error)
- func (s *Server) SignatureHelp(ctx context.Context, params *protocol.SignatureHelpParams) (*protocol.SignatureHelp, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Configuration ¶ added in v0.1.7
type Configuration struct { Diag DiagConfiguration `json:"diag"` JPaths []string `json:"jpaths"` Fmt FmtConfiguration `json:"fmt"` }
func (*Configuration) FormatterOptions ¶ added in v0.1.7
func (c *Configuration) FormatterOptions() formatter.Options
type DiagConfiguration ¶ added in v0.2.6
type ErrDiscard ¶
type ErrDiscard struct{}
func (ErrDiscard) Format ¶
func (e ErrDiscard) Format(err error) string
func (ErrDiscard) SetColorFormatter ¶
func (e ErrDiscard) SetColorFormatter(color jsonnet.ColorFormatter)
func (ErrDiscard) SetMaxStackTraceSize ¶
func (e ErrDiscard) SetMaxStackTraceSize(size int)
type EvaluateParams ¶ added in v0.1.7
type EvaluateParams struct {
TextDocument *protocol.TextDocumentIdentifier `json:"textDocument"`
}
type EvaluateResult ¶ added in v0.1.7
type EvaluateResult struct {
Output string `json:"output"`
}
type FallbackServer ¶
type FallbackServer struct{}
func (FallbackServer) CodeAction ¶
func (f FallbackServer) CodeAction(_ context.Context, _ *protocol.CodeActionParams) (result []protocol.CodeAction, err error)
func (FallbackServer) CodeLens ¶
func (f FallbackServer) CodeLens(_ context.Context, _ *protocol.CodeLensParams) (result []protocol.CodeLens, err error)
func (FallbackServer) CodeLensRefresh ¶
func (f FallbackServer) CodeLensRefresh(_ context.Context) (err error)
func (FallbackServer) CodeLensResolve ¶
func (FallbackServer) ColorPresentation ¶
func (f FallbackServer) ColorPresentation(_ context.Context, _ *protocol.ColorPresentationParams) (result []protocol.ColorPresentation, err error)
func (FallbackServer) Completion ¶
func (f FallbackServer) Completion(_ context.Context, _ *protocol.CompletionParams) (result *protocol.CompletionList, err error)
func (FallbackServer) CompletionResolve ¶
func (f FallbackServer) CompletionResolve(_ context.Context, _ *protocol.CompletionItem) (result *protocol.CompletionItem, err error)
func (FallbackServer) Declaration ¶
func (f FallbackServer) Declaration(_ context.Context, _ *protocol.DeclarationParams) (result []protocol.Location, err error)
func (FallbackServer) Definition ¶
func (f FallbackServer) Definition(_ context.Context, _ *protocol.DefinitionParams) (result []protocol.Location, err error)
func (FallbackServer) DidChange ¶
func (f FallbackServer) DidChange(_ context.Context, _ *protocol.DidChangeTextDocumentParams) (err error)
func (FallbackServer) DidChangeConfiguration ¶
func (f FallbackServer) DidChangeConfiguration(_ context.Context, _ *protocol.DidChangeConfigurationParams) (err error)
func (FallbackServer) DidChangeWatchedFiles ¶
func (f FallbackServer) DidChangeWatchedFiles(_ context.Context, _ *protocol.DidChangeWatchedFilesParams) (err error)
func (FallbackServer) DidChangeWorkspaceFolders ¶
func (f FallbackServer) DidChangeWorkspaceFolders(_ context.Context, _ *protocol.DidChangeWorkspaceFoldersParams) (err error)
func (FallbackServer) DidClose ¶
func (f FallbackServer) DidClose(_ context.Context, _ *protocol.DidCloseTextDocumentParams) (err error)
func (FallbackServer) DidCreateFiles ¶
func (f FallbackServer) DidCreateFiles(_ context.Context, _ *protocol.CreateFilesParams) (err error)
func (FallbackServer) DidDeleteFiles ¶
func (f FallbackServer) DidDeleteFiles(_ context.Context, _ *protocol.DeleteFilesParams) (err error)
func (FallbackServer) DidOpen ¶
func (f FallbackServer) DidOpen(_ context.Context, _ *protocol.DidOpenTextDocumentParams) (err error)
func (FallbackServer) DidRenameFiles ¶
func (f FallbackServer) DidRenameFiles(_ context.Context, _ *protocol.RenameFilesParams) (err error)
func (FallbackServer) DidSave ¶
func (f FallbackServer) DidSave(_ context.Context, _ *protocol.DidSaveTextDocumentParams) (err error)
func (FallbackServer) DocumentColor ¶
func (f FallbackServer) DocumentColor(_ context.Context, _ *protocol.DocumentColorParams) (result []protocol.ColorInformation, err error)
func (FallbackServer) DocumentHighlight ¶
func (f FallbackServer) DocumentHighlight(_ context.Context, _ *protocol.DocumentHighlightParams) (result []protocol.DocumentHighlight, err error)
func (FallbackServer) DocumentLink ¶
func (f FallbackServer) DocumentLink(_ context.Context, _ *protocol.DocumentLinkParams) (result []protocol.DocumentLink, err error)
func (FallbackServer) DocumentLinkResolve ¶
func (f FallbackServer) DocumentLinkResolve(_ context.Context, _ *protocol.DocumentLink) (result *protocol.DocumentLink, err error)
func (FallbackServer) DocumentSymbol ¶
func (f FallbackServer) DocumentSymbol(_ context.Context, _ *protocol.DocumentSymbolParams) (result []interface{}, err error)
func (FallbackServer) ExecuteCommand ¶
func (f FallbackServer) ExecuteCommand(_ context.Context, _ *protocol.ExecuteCommandParams) (result interface{}, err error)
func (FallbackServer) FoldingRanges ¶
func (f FallbackServer) FoldingRanges(_ context.Context, _ *protocol.FoldingRangeParams) (result []protocol.FoldingRange, err error)
func (FallbackServer) Formatting ¶
func (f FallbackServer) Formatting(_ context.Context, _ *protocol.DocumentFormattingParams) (result []protocol.TextEdit, err error)
func (FallbackServer) Hover ¶
func (f FallbackServer) Hover(_ context.Context, _ *protocol.HoverParams) (result *protocol.Hover, err error)
func (FallbackServer) Implementation ¶
func (f FallbackServer) Implementation(_ context.Context, _ *protocol.ImplementationParams) (result []protocol.Location, err error)
func (FallbackServer) IncomingCalls ¶
func (f FallbackServer) IncomingCalls(_ context.Context, _ *protocol.CallHierarchyIncomingCallsParams) (result []protocol.CallHierarchyIncomingCall, err error)
func (FallbackServer) Initialize ¶
func (f FallbackServer) Initialize(_ context.Context, _ *protocol.InitializeParams) (result *protocol.InitializeResult, err error)
func (FallbackServer) Initialized ¶
func (f FallbackServer) Initialized(_ context.Context, _ *protocol.InitializedParams) (err error)
func (FallbackServer) LinkedEditingRange ¶
func (f FallbackServer) LinkedEditingRange(_ context.Context, _ *protocol.LinkedEditingRangeParams) (result *protocol.LinkedEditingRanges, err error)
func (FallbackServer) LogTrace ¶
func (f FallbackServer) LogTrace(_ context.Context, _ *protocol.LogTraceParams) (err error)
func (FallbackServer) Moniker ¶
func (f FallbackServer) Moniker(_ context.Context, _ *protocol.MonikerParams) (result []protocol.Moniker, err error)
func (FallbackServer) OnTypeFormatting ¶
func (f FallbackServer) OnTypeFormatting(_ context.Context, _ *protocol.DocumentOnTypeFormattingParams) (result []protocol.TextEdit, err error)
func (FallbackServer) OutgoingCalls ¶
func (f FallbackServer) OutgoingCalls(_ context.Context, _ *protocol.CallHierarchyOutgoingCallsParams) (result []protocol.CallHierarchyOutgoingCall, err error)
func (FallbackServer) PrepareCallHierarchy ¶
func (f FallbackServer) PrepareCallHierarchy(_ context.Context, _ *protocol.CallHierarchyPrepareParams) (result []protocol.CallHierarchyItem, err error)
func (FallbackServer) PrepareRename ¶
func (f FallbackServer) PrepareRename(_ context.Context, _ *protocol.PrepareRenameParams) (result *protocol.Range, err error)
func (FallbackServer) RangeFormatting ¶
func (f FallbackServer) RangeFormatting(_ context.Context, _ *protocol.DocumentRangeFormattingParams) (result []protocol.TextEdit, err error)
func (FallbackServer) References ¶
func (f FallbackServer) References(_ context.Context, _ *protocol.ReferenceParams) (result []protocol.Location, err error)
func (FallbackServer) Rename ¶
func (f FallbackServer) Rename(_ context.Context, _ *protocol.RenameParams) (result *protocol.WorkspaceEdit, err error)
func (FallbackServer) Request ¶
func (f FallbackServer) Request(_ context.Context, _ string, _ interface{}) (result interface{}, err error)
func (FallbackServer) SemanticTokensFull ¶
func (f FallbackServer) SemanticTokensFull(_ context.Context, _ *protocol.SemanticTokensParams) (result *protocol.SemanticTokens, err error)
func (FallbackServer) SemanticTokensFullDelta ¶
func (f FallbackServer) SemanticTokensFullDelta(_ context.Context, _ *protocol.SemanticTokensDeltaParams) (result interface{}, err error)
func (FallbackServer) SemanticTokensRange ¶
func (f FallbackServer) SemanticTokensRange(_ context.Context, _ *protocol.SemanticTokensRangeParams) (result *protocol.SemanticTokens, err error)
func (FallbackServer) SemanticTokensRefresh ¶
func (f FallbackServer) SemanticTokensRefresh(_ context.Context) (err error)
func (FallbackServer) SetTrace ¶
func (f FallbackServer) SetTrace(_ context.Context, _ *protocol.SetTraceParams) (err error)
func (FallbackServer) ShowDocument ¶
func (f FallbackServer) ShowDocument(_ context.Context, _ *protocol.ShowDocumentParams) (result *protocol.ShowDocumentResult, err error)
func (FallbackServer) SignatureHelp ¶
func (f FallbackServer) SignatureHelp(_ context.Context, _ *protocol.SignatureHelpParams) (result *protocol.SignatureHelp, err error)
func (FallbackServer) Symbols ¶
func (f FallbackServer) Symbols(_ context.Context, _ *protocol.WorkspaceSymbolParams) (result []protocol.SymbolInformation, err error)
func (FallbackServer) TypeDefinition ¶
func (f FallbackServer) TypeDefinition(_ context.Context, _ *protocol.TypeDefinitionParams) (result []protocol.Location, err error)
func (FallbackServer) WillCreateFiles ¶
func (f FallbackServer) WillCreateFiles(_ context.Context, _ *protocol.CreateFilesParams) (result *protocol.WorkspaceEdit, err error)
func (FallbackServer) WillDeleteFiles ¶
func (f FallbackServer) WillDeleteFiles(_ context.Context, _ *protocol.DeleteFilesParams) (result *protocol.WorkspaceEdit, err error)
func (FallbackServer) WillRenameFiles ¶
func (f FallbackServer) WillRenameFiles(_ context.Context, _ *protocol.RenameFilesParams) (result *protocol.WorkspaceEdit, err error)
func (FallbackServer) WillSave ¶
func (f FallbackServer) WillSave(_ context.Context, _ *protocol.WillSaveTextDocumentParams) (err error)
func (FallbackServer) WillSaveWaitUntil ¶
func (f FallbackServer) WillSaveWaitUntil(_ context.Context, _ *protocol.WillSaveTextDocumentParams) (result []protocol.TextEdit, err error)
func (FallbackServer) WorkDoneProgressCancel ¶
func (f FallbackServer) WorkDoneProgressCancel(_ context.Context, _ *protocol.WorkDoneProgressCancelParams) (err error)
type FmtConfiguration ¶ added in v0.2.6
type FmtConfiguration struct { Indent int `json:"indent"` MaxBlankLines int `json:"maxBlankLines"` StringStyle string `json:"stringStyle"` CommentStyle string `json:"commentStyle"` PrettyFieldNames bool `json:"prettyFieldNames"` PadArrays bool `json:"padArrays"` PadObjects bool `json:"padObjects"` SortImports bool `json:"sortImports"` ImplicitPlus bool `json:"implicitPlus"` }
type OverlayImporter ¶ added in v0.1.2
type OverlayImporter struct {
// contains filtered or unexported fields
}
func (*OverlayImporter) Import ¶ added in v0.1.2
func (imp *OverlayImporter) Import(from, path string) (jsonnet.Contents, string, error)
func (*OverlayImporter) SetJPaths ¶ added in v0.2.4
func (imp *OverlayImporter) SetJPaths(jpaths []string)
type ParseResult ¶
func (*ParseResult) StaticErr ¶
func (p *ParseResult) StaticErr() staticError
type Server ¶
type Server struct { *FallbackServer // contains filtered or unexported fields }
func (*Server) Completion ¶
func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (*protocol.CompletionList, error)
func (*Server) Definition ¶
func (*Server) DidChangeConfiguration ¶ added in v0.1.7
func (*Server) DocumentSymbol ¶
func (*Server) Evaluate ¶ added in v0.1.7
func (s *Server) Evaluate(ctx context.Context, params *EvaluateParams) (*EvaluateResult, error)
func (*Server) ExecuteCommand ¶ added in v0.1.7
func (*Server) Formatting ¶
func (*Server) Initialize ¶
func (s *Server) Initialize(ctx context.Context, params *protocol.InitializeParams) (result *protocol.InitializeResult, err error)
func (*Server) Initialized ¶
func (*Server) NewResolver ¶
func (*Server) SignatureHelp ¶
func (s *Server) SignatureHelp(ctx context.Context, params *protocol.SignatureHelpParams) (*protocol.SignatureHelp, error)
Click to show internal directories.
Click to hide internal directories.