Documentation
¶
Index ¶
- Constants
- Variables
- func DebugHandler(handler jsonrpc2.Handler) jsonrpc2.Handler
- func Expected(err error) error
- func FileChangeFromLSPDidChange(params *protocol.DidChangeTextDocumentParams) []*store.FileChange
- func InitLogger(level int)
- func ServeStdio(ctx context.Context, opts *Options, input io.Reader, output io.Writer) error
- func SlogLevel(level int) slog.Level
- type Analysis
- type ConfigSource
- type Options
- type Project
- type Server
- func (s *Server) CodeAction(ctx context.Context, params *protocol.CodeActionParams) (result []protocol.CommandOrCodeAction, err error)
- func (s *Server) CodeActionResolve(ctx context.Context, params *protocol.CodeAction) (*protocol.CodeAction, error)
- func (s *Server) CodeLens(ctx context.Context, params *protocol.CodeLensParams) (result []protocol.CodeLens, err error)
- func (s *Server) CodeLensRefresh(ctx context.Context) (err error)
- func (s *Server) CodeLensResolve(ctx context.Context, params *protocol.CodeLens) (result *protocol.CodeLens, err error)
- func (s *Server) ColorPresentation(ctx context.Context, params *protocol.ColorPresentationParams) (result []protocol.ColorPresentation, err error)
- func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (result protocol.CompletionResult, err error)
- func (s *Server) CompletionResolve(ctx context.Context, params *protocol.CompletionItem) (result *protocol.CompletionItem, err error)
- func (s *Server) Declaration(ctx context.Context, params *protocol.DeclarationParams) (result protocol.DeclarationResult, err error)
- func (s *Server) Definition(ctx context.Context, params *protocol.DefinitionParams) (result protocol.DefinitionResult, err error)
- func (s *Server) Diagnostic(ctx context.Context, params *protocol.DocumentDiagnosticParams) (protocol.DocumentDiagnosticReport, error)
- func (s *Server) DiagnosticWorkspace(ctx context.Context, params *protocol.WorkspaceDiagnosticParams) (*protocol.WorkspaceDiagnosticReport, error)
- func (s *Server) DidChange(ctx context.Context, params *protocol.DidChangeTextDocumentParams) (err error)
- func (s *Server) DidChangeConfiguration(ctx context.Context, params *protocol.DidChangeConfigurationParams) (err error)
- func (s *Server) DidChangeNotebookDocument(ctx context.Context, params *protocol.DidChangeNotebookDocumentParams) error
- func (s *Server) DidChangeWatchedFiles(ctx context.Context, params *protocol.DidChangeWatchedFilesParams) (err error)
- func (s *Server) DidChangeWorkspaceFolders(ctx context.Context, params *protocol.DidChangeWorkspaceFoldersParams) (err error)
- func (s *Server) DidClose(ctx context.Context, params *protocol.DidCloseTextDocumentParams) (err error)
- func (s *Server) DidCloseNotebookDocument(ctx context.Context, params *protocol.DidCloseNotebookDocumentParams) error
- func (s *Server) DidCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) (err error)
- func (s *Server) DidDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) (err error)
- func (s *Server) DidOpen(ctx context.Context, params *protocol.DidOpenTextDocumentParams) (err error)
- func (s *Server) DidOpenNotebookDocument(ctx context.Context, params *protocol.DidOpenNotebookDocumentParams) error
- func (s *Server) DidRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) (err error)
- func (s *Server) DidSave(ctx context.Context, params *protocol.DidSaveTextDocumentParams) (err error)
- func (s *Server) DidSaveNotebookDocument(ctx context.Context, params *protocol.DidSaveNotebookDocumentParams) error
- func (s *Server) DocumentColor(ctx context.Context, params *protocol.DocumentColorParams) (result []protocol.ColorInformation, err error)
- func (s *Server) DocumentHighlight(ctx context.Context, params *protocol.DocumentHighlightParams) (result []protocol.DocumentHighlight, err error)
- func (s *Server) DocumentLink(ctx context.Context, params *protocol.DocumentLinkParams) (result []protocol.DocumentLink, err error)
- func (s *Server) DocumentLinkResolve(ctx context.Context, params *protocol.DocumentLink) (result *protocol.DocumentLink, err error)
- func (s *Server) DocumentSymbol(ctx context.Context, params *protocol.DocumentSymbolParams) (result protocol.DocumentSymbolResult, err error)
- func (s *Server) ExecuteCommand(ctx context.Context, params *protocol.ExecuteCommandParams) (result protocol.LSPAny, err error)
- func (s *Server) Exit(ctx context.Context) (err error)
- func (s *Server) FoldingRanges(ctx context.Context, params *protocol.FoldingRangeParams) (result []protocol.FoldingRange, err error)
- func (s *Server) Formatting(ctx context.Context, params *protocol.DocumentFormattingParams) (result []protocol.TextEdit, err error)
- func (s *Server) Hover(ctx context.Context, params *protocol.HoverParams) (result *protocol.Hover, err error)
- func (s *Server) Implementation(ctx context.Context, params *protocol.ImplementationParams) (result protocol.DefinitionResult, err error)
- func (s *Server) IncomingCalls(ctx context.Context, params *protocol.CallHierarchyIncomingCallsParams) (result []protocol.CallHierarchyIncomingCall, 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) InlayHint(ctx context.Context, params *protocol.InlayHintParams) ([]protocol.InlayHint, error)
- func (s *Server) InlayHintResolve(ctx context.Context, params *protocol.InlayHint) (*protocol.InlayHint, error)
- func (s *Server) InlineCompletion(ctx context.Context, params *protocol.InlineCompletionParams) (protocol.InlineCompletionResult, error)
- func (s *Server) InlineValue(ctx context.Context, params *protocol.InlineValueParams) ([]protocol.InlineValue, error)
- func (s *Server) LinkedEditingRange(ctx context.Context, params *protocol.LinkedEditingRangeParams) (result *protocol.LinkedEditingRanges, err error)
- func (s *Server) LogTrace(ctx context.Context, params *protocol.LogTraceParams) (err error)
- func (s *Server) Moniker(ctx context.Context, params *protocol.MonikerParams) (result []protocol.Moniker, err error)
- func (s *Server) OnTypeFormatting(ctx context.Context, params *protocol.DocumentOnTypeFormattingParams) (result []protocol.TextEdit, err error)
- func (s *Server) OutgoingCalls(ctx context.Context, params *protocol.CallHierarchyOutgoingCallsParams) (result []protocol.CallHierarchyOutgoingCall, err error)
- func (s *Server) PrepareCallHierarchy(ctx context.Context, params *protocol.CallHierarchyPrepareParams) (result []protocol.CallHierarchyItem, err error)
- func (s *Server) PrepareRename(ctx context.Context, params *protocol.PrepareRenameParams) (result protocol.PrepareRenameResult, err error)
- func (s *Server) PrepareTypeHierarchy(ctx context.Context, params *protocol.TypeHierarchyPrepareParams) ([]protocol.TypeHierarchyItem, error)
- func (s *Server) Progress(ctx context.Context, params *protocol.ProgressParams) error
- func (s *Server) RangeFormatting(ctx context.Context, params *protocol.DocumentRangeFormattingParams) (result []protocol.TextEdit, err error)
- func (s *Server) RangesFormatting(ctx context.Context, params *protocol.DocumentRangesFormattingParams) ([]protocol.TextEdit, error)
- func (s *Server) References(ctx context.Context, params *protocol.ReferenceParams) (result []protocol.Location, err error)
- func (s *Server) Rename(ctx context.Context, params *protocol.RenameParams) (result *protocol.WorkspaceEdit, err error)
- func (s *Server) Request(ctx context.Context, method string, params any) (result any, err error)
- func (s *Server) SelectionRange(ctx context.Context, params *protocol.SelectionRangeParams) ([]protocol.SelectionRange, error)
- func (s *Server) SemanticTokensFull(ctx context.Context, params *protocol.SemanticTokensParams) (result *protocol.SemanticTokens, err error)
- func (s *Server) SemanticTokensFullDelta(ctx context.Context, params *protocol.SemanticTokensDeltaParams) (result protocol.SemanticTokensDeltaResult, err error)
- func (s *Server) SemanticTokensRange(ctx context.Context, params *protocol.SemanticTokensRangeParams) (result *protocol.SemanticTokens, err error)
- func (s *Server) SemanticTokensRefresh(ctx context.Context) (err error)
- func (s *Server) SetTrace(ctx context.Context, params *protocol.SetTraceParams) (err error)
- func (s *Server) ShowDocument(ctx context.Context, params *protocol.ShowDocumentParams) (result *protocol.ShowDocumentResult, err error)
- func (s *Server) Shutdown(ctx context.Context) (err error)
- func (s *Server) SignatureHelp(ctx context.Context, params *protocol.SignatureHelpParams) (result *protocol.SignatureHelp, err error)
- func (s *Server) Subtypes(ctx context.Context, params *protocol.TypeHierarchySubtypesParams) ([]protocol.TypeHierarchyItem, error)
- func (s *Server) Supertypes(ctx context.Context, params *protocol.TypeHierarchySupertypesParams) ([]protocol.TypeHierarchyItem, error)
- func (s *Server) Symbols(ctx context.Context, params *protocol.WorkspaceSymbolParams) (result protocol.WorkspaceSymbolResult, err error)
- func (s *Server) TextDocumentContent(ctx context.Context, params *protocol.TextDocumentContentParams) (*protocol.TextDocumentContentResult, error)
- func (s *Server) TypeDefinition(ctx context.Context, params *protocol.TypeDefinitionParams) (result protocol.DefinitionResult, err error)
- func (s *Server) WillCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) (result *protocol.WorkspaceEdit, err error)
- func (s *Server) WillDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) (result *protocol.WorkspaceEdit, err error)
- func (s *Server) WillRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) (result *protocol.WorkspaceEdit, err error)
- func (s *Server) WillSave(ctx context.Context, params *protocol.WillSaveTextDocumentParams) (err error)
- func (s *Server) WillSaveWaitUntil(ctx context.Context, params *protocol.WillSaveTextDocumentParams) (result []protocol.TextEdit, err error)
- func (s *Server) WorkDoneProgressCancel(ctx context.Context, params *protocol.WorkDoneProgressCancelParams) (err error)
- func (s *Server) WorkspaceSymbolResolve(ctx context.Context, params *protocol.WorkspaceSymbol) (*protocol.WorkspaceSymbol, error)
- type StreamServer
- type WorkspaceIssue
- type WorkspaceLoader
- type WorkspaceSnapshot
Constants ¶
const ( ServerName = "thrift-ls" LanguageIDThrift = "thrift" )
Variables ¶
var ServerVersion = "dev"
ServerVersion is the version reported by --version and the initialize handshake. It defaults to "dev" and is replaced at release build time with the git tag:
go build -ldflags "-X github.com/karitham/thrift-ls/lsp.ServerVersion=0.1.0"
Functions ¶
func DebugHandler ¶
DebugHandler wraps a jsonrpc2.Handler with request/response debug logging and panic recovery. A recovered panic becomes an error response, so the client never sees a success for a request that crashed.
func FileChangeFromLSPDidChange ¶ added in v0.1.8
func FileChangeFromLSPDidChange(params *protocol.DidChangeTextDocumentParams) []*store.FileChange
FileChangeFromLSPDidChange converts a didChange payload into file changes. The server advertises whole-document sync, so whole-document events map one-to-one; incremental (partial) events are a client protocol violation and are skipped.
func InitLogger ¶ added in v0.1.4
func InitLogger(level int)
InitLogger configures the process-wide slog logger with the given level (1 fatal .. 6 trace) and redirects it to a temp file so LSP traffic on stdio is never polluted. Records are also forwarded to the LSP client as window/logMessage once the handshake is done (see setLogClient).
Re-calling InitLogger re-levels the existing handler in place: the file is opened once and a client wired after the handshake keeps receiving records.
func ServeStdio ¶ added in v0.2.0
ServeStdio serves the language server over input and output until the context is canceled or the input closes. End-of-file is a clean shutdown. A nil opts uses the server defaults.
Types ¶
type Analysis ¶ added in v0.2.0
type Analysis struct {
Analyzers []sema.Analyzer
Fixers []sema.Fixer
Providers []sema.ActionProvider
}
Analysis bundles the semantic extensions a frontend contributes. Analyzers run in the diagnostic pipeline, Fixers compute on-demand quickfixes for reported diagnostics, and Providers offer selection refactors. All three ride the same lint Disabled/Severity tuning.
type ConfigSource ¶ added in v0.2.0
ConfigSource resolves the config document for a project root directory. It returns the patch plus its origin, so build-system frontends can serve in-memory config while file discovery still pins diagnostics. A nil ConfigSource on Options means file discovery through the server's Files (lsp.FileConfigSource).
func FileConfigSource ¶ added in v0.2.0
func FileConfigSource(src store.FileSource) ConfigSource
FileConfigSource discovers thrift-ls.json through src: THRIFT_LS_CONFIG when set, otherwise the nearest thrift-ls.json walking up from the project root. It is the default ConfigSource, and the reason tests can run without touching disk — seed the FileSource with config documents and discovery resolves against them. Relative include paths anchor to the discovered file's location, as with options.Load.
Reads use context.Background: resolution runs at view creation, outside any request scope. A missing candidate simply continues the walk; any other read or parse failure aborts with the candidate path attached.
type Options ¶
type Options struct {
// Files serves file content and directory walks. Nil uses the disk
// source.
Files store.FileSource
// Defaults sits directly above the builtin defaults. An empty patch
// uses the package defaults.
Defaults options.Patch
// ConfigSource resolves the config document per project root. Nil
// means file discovery through the server's Files
// (lsp.FileConfigSource). Use options.PinnedSource to pin one document
// (explicit --config) or to disable discovery (nil patch).
ConfigSource ConfigSource
// CLI overlays every view's config (flags like -I). Empty when the
// process has no CLI layer (in-process use).
CLI options.Patch
// WorkspaceLoader replaces the default recursive workspace scan when set.
WorkspaceLoader WorkspaceLoader
// Analysis extensions appended to the builtin pipeline.
Analysis Analysis
// Version is reported in the initialize result. Empty uses ServerVersion.
Version string
}
Options is the complete frontend bundle for one server process. Files is the only filesystem seam: disk in production, in-memory in tests, build-system backed internally. Nil Files means the disk source.
type Project ¶ added in v0.2.0
type Project struct {
// ConfigURI is the stable identity and source location of the project
// configuration.
ConfigURI uri.URI
// RootURI is the directory whose files use this project's view.
RootURI uri.URI
// TargetFiles are the Thrift files to index for the project.
TargetFiles []uri.URI
// IncludePaths are the compiler-equivalent include roots for the
// project. A non-empty list is authoritative over the config document
// and CLI, because the build system owns resolution. Empty means
// resolve includes via the server ConfigSource for the root.
IncludePaths []string
}
Project describes one independently configured Thrift project. It is the build-system seam: discovery hands thrift-ls roots, files, and include paths, and nothing else. Formatting and lint come from the config document and CLI layers, never from here.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
NewServer returns a Server resolving configuration per view. The options are expected to validate; workspace settings overlay each view's config at initialize time and on didChangeConfiguration.
func (*Server) CodeAction ¶
func (s *Server) CodeAction(ctx context.Context, params *protocol.CodeActionParams) (result []protocol.CommandOrCodeAction, err error)
func (*Server) CodeActionResolve ¶
func (s *Server) CodeActionResolve(ctx context.Context, params *protocol.CodeAction) (*protocol.CodeAction, error)
func (*Server) CodeLensResolve ¶
func (*Server) ColorPresentation ¶
func (s *Server) ColorPresentation(ctx context.Context, params *protocol.ColorPresentationParams) (result []protocol.ColorPresentation, err error)
func (*Server) Completion ¶
func (s *Server) Completion(ctx context.Context, params *protocol.CompletionParams) (result protocol.CompletionResult, err error)
func (*Server) CompletionResolve ¶
func (s *Server) CompletionResolve(ctx context.Context, params *protocol.CompletionItem) (result *protocol.CompletionItem, err error)
func (*Server) Declaration ¶
func (s *Server) Declaration(ctx context.Context, params *protocol.DeclarationParams) (result protocol.DeclarationResult, err error)
func (*Server) Definition ¶
func (s *Server) Definition(ctx context.Context, params *protocol.DefinitionParams) (result protocol.DefinitionResult, err error)
func (*Server) Diagnostic ¶
func (s *Server) Diagnostic(ctx context.Context, params *protocol.DocumentDiagnosticParams) (protocol.DocumentDiagnosticReport, error)
func (*Server) DiagnosticWorkspace ¶
func (s *Server) DiagnosticWorkspace(ctx context.Context, params *protocol.WorkspaceDiagnosticParams) (*protocol.WorkspaceDiagnosticReport, error)
func (*Server) DidChangeConfiguration ¶
func (*Server) DidChangeNotebookDocument ¶
func (*Server) DidChangeWatchedFiles ¶
func (*Server) DidChangeWorkspaceFolders ¶
func (*Server) DidCloseNotebookDocument ¶
func (*Server) DidCreateFiles ¶
func (*Server) DidDeleteFiles ¶
func (*Server) DidOpenNotebookDocument ¶
func (*Server) DidRenameFiles ¶
func (*Server) DidSaveNotebookDocument ¶
func (*Server) DocumentColor ¶
func (s *Server) DocumentColor(ctx context.Context, params *protocol.DocumentColorParams) (result []protocol.ColorInformation, err error)
func (*Server) DocumentHighlight ¶
func (s *Server) DocumentHighlight(ctx context.Context, params *protocol.DocumentHighlightParams) (result []protocol.DocumentHighlight, err error)
func (*Server) DocumentLink ¶
func (s *Server) DocumentLink(ctx context.Context, params *protocol.DocumentLinkParams) (result []protocol.DocumentLink, err error)
func (*Server) DocumentLinkResolve ¶
func (s *Server) DocumentLinkResolve(ctx context.Context, params *protocol.DocumentLink) (result *protocol.DocumentLink, err error)
func (*Server) DocumentSymbol ¶
func (s *Server) DocumentSymbol(ctx context.Context, params *protocol.DocumentSymbolParams) (result protocol.DocumentSymbolResult, err error)
func (*Server) ExecuteCommand ¶
func (*Server) FoldingRanges ¶
func (s *Server) FoldingRanges(ctx context.Context, params *protocol.FoldingRangeParams) (result []protocol.FoldingRange, err error)
func (*Server) Formatting ¶
func (*Server) Implementation ¶
func (s *Server) Implementation(ctx context.Context, params *protocol.ImplementationParams) (result protocol.DefinitionResult, err error)
func (*Server) IncomingCalls ¶
func (s *Server) IncomingCalls(ctx context.Context, params *protocol.CallHierarchyIncomingCallsParams) (result []protocol.CallHierarchyIncomingCall, err error)
func (*Server) Initialize ¶
func (s *Server) Initialize(ctx context.Context, params *protocol.InitializeParams) (result *protocol.InitializeResult, err error)
func (*Server) Initialized ¶
func (*Server) InlayHintResolve ¶
func (*Server) InlineCompletion ¶
func (s *Server) InlineCompletion(ctx context.Context, params *protocol.InlineCompletionParams) (protocol.InlineCompletionResult, error)
func (*Server) InlineValue ¶
func (s *Server) InlineValue(ctx context.Context, params *protocol.InlineValueParams) ([]protocol.InlineValue, error)
func (*Server) LinkedEditingRange ¶
func (s *Server) LinkedEditingRange(ctx context.Context, params *protocol.LinkedEditingRangeParams) (result *protocol.LinkedEditingRanges, err error)
func (*Server) OnTypeFormatting ¶
func (*Server) OutgoingCalls ¶
func (s *Server) OutgoingCalls(ctx context.Context, params *protocol.CallHierarchyOutgoingCallsParams) (result []protocol.CallHierarchyOutgoingCall, err error)
func (*Server) PrepareCallHierarchy ¶
func (s *Server) PrepareCallHierarchy(ctx context.Context, params *protocol.CallHierarchyPrepareParams) (result []protocol.CallHierarchyItem, err error)
func (*Server) PrepareRename ¶
func (s *Server) PrepareRename(ctx context.Context, params *protocol.PrepareRenameParams) (result protocol.PrepareRenameResult, err error)
func (*Server) PrepareTypeHierarchy ¶
func (s *Server) PrepareTypeHierarchy(ctx context.Context, params *protocol.TypeHierarchyPrepareParams) ([]protocol.TypeHierarchyItem, error)
func (*Server) RangeFormatting ¶
func (*Server) RangesFormatting ¶
func (*Server) References ¶
func (*Server) Rename ¶
func (s *Server) Rename(ctx context.Context, params *protocol.RenameParams) (result *protocol.WorkspaceEdit, err error)
func (*Server) SelectionRange ¶
func (s *Server) SelectionRange(ctx context.Context, params *protocol.SelectionRangeParams) ([]protocol.SelectionRange, error)
func (*Server) SemanticTokensFull ¶
func (s *Server) SemanticTokensFull(ctx context.Context, params *protocol.SemanticTokensParams) (result *protocol.SemanticTokens, err error)
func (*Server) SemanticTokensFullDelta ¶
func (s *Server) SemanticTokensFullDelta(ctx context.Context, params *protocol.SemanticTokensDeltaParams) (result protocol.SemanticTokensDeltaResult, err error)
func (*Server) SemanticTokensRange ¶
func (s *Server) SemanticTokensRange(ctx context.Context, params *protocol.SemanticTokensRangeParams) (result *protocol.SemanticTokens, err error)
func (*Server) SemanticTokensRefresh ¶
func (*Server) ShowDocument ¶
func (s *Server) ShowDocument(ctx context.Context, params *protocol.ShowDocumentParams) (result *protocol.ShowDocumentResult, err error)
func (*Server) SignatureHelp ¶
func (s *Server) SignatureHelp(ctx context.Context, params *protocol.SignatureHelpParams) (result *protocol.SignatureHelp, err error)
func (*Server) Subtypes ¶
func (s *Server) Subtypes(ctx context.Context, params *protocol.TypeHierarchySubtypesParams) ([]protocol.TypeHierarchyItem, error)
func (*Server) Supertypes ¶
func (s *Server) Supertypes(ctx context.Context, params *protocol.TypeHierarchySupertypesParams) ([]protocol.TypeHierarchyItem, error)
func (*Server) Symbols ¶
func (s *Server) Symbols(ctx context.Context, params *protocol.WorkspaceSymbolParams) (result protocol.WorkspaceSymbolResult, err error)
func (*Server) TextDocumentContent ¶
func (s *Server) TextDocumentContent(ctx context.Context, params *protocol.TextDocumentContentParams) (*protocol.TextDocumentContentResult, error)
func (*Server) TypeDefinition ¶
func (s *Server) TypeDefinition(ctx context.Context, params *protocol.TypeDefinitionParams) (result protocol.DefinitionResult, err error)
func (*Server) WillCreateFiles ¶
func (s *Server) WillCreateFiles(ctx context.Context, params *protocol.CreateFilesParams) (result *protocol.WorkspaceEdit, err error)
func (*Server) WillDeleteFiles ¶
func (s *Server) WillDeleteFiles(ctx context.Context, params *protocol.DeleteFilesParams) (result *protocol.WorkspaceEdit, err error)
func (*Server) WillRenameFiles ¶
func (s *Server) WillRenameFiles(ctx context.Context, params *protocol.RenameFilesParams) (result *protocol.WorkspaceEdit, err error)
func (*Server) WillSaveWaitUntil ¶
func (*Server) WorkDoneProgressCancel ¶
func (*Server) WorkspaceSymbolResolve ¶
func (s *Server) WorkspaceSymbolResolve(ctx context.Context, params *protocol.WorkspaceSymbol) (*protocol.WorkspaceSymbol, error)
type StreamServer ¶
type StreamServer struct {
// contains filtered or unexported fields
}
func NewStreamServer ¶
func NewStreamServer(opts *Options) *StreamServer
func (*StreamServer) ServeStream ¶
type WorkspaceIssue ¶ added in v0.2.0
WorkspaceIssue is a non-fatal discovery problem publishable at URI.
type WorkspaceLoader ¶ added in v0.2.0
WorkspaceLoader discovers the projects in one LSP workspace folder. A returned error means discovery failed for the folder. Non-fatal project failures belong in WorkspaceSnapshot.Issues so valid projects can still be indexed.
type WorkspaceSnapshot ¶ added in v0.2.0
type WorkspaceSnapshot struct {
Projects []Project
Issues []WorkspaceIssue
}
WorkspaceSnapshot is one immutable result of workspace discovery. The loader must not mutate it after returning.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package lsptest is an e2e harness for the thrift-ls language server.
|
Package lsptest is an e2e harness for the thrift-ls language server. |
|
Package folding computes document folding ranges: braced bodies (structs, enums, services), const list and map values, annotations, and comment blocks.
|
Package folding computes document folding ranges: braced bodies (structs, enums, services), const list and map values, annotations, and comment blocks. |