A Thrift language server, formatter, and linter.
lsp linter helix vim vscode thrift

lsp: consolidate features into a source package, gopls-style master

One package for all feature logic, uniform (ctx, snapshot, file) APIs, and the protocol layer reduced to dumb adapters. Packages merged into lsp/source (codejump, completion, diagnostic, semantic, symbols, folding, links): - duplicated range helpers (nodeRange, tokenRange) and test fixtures (buildSnapshot) deduplicated; diagnostic's Interface renamed Checker; semantic's classify renamed classifyToken. - WorkspaceSymbols no longer takes the session: it queries one snapshot over a file list, and the server iterates views (folders sorted by URI), mirroring gopls's snapshot-as-currency rule. - the diagnostic registry and completion types lost their package prefixes (source.NewDiagnostic, source.DefaultTokenCompletion). Formatting and the fix-all code action moved into source as FormatDocument, FormatRange, and FormatDocumentAction; the root files are thin withFile wrappers. rangeFormatting no longer swallows mapper errors as nil,nil, and the code action end position uses the mapper's UTF-16-correct GetLSPEndPosition instead of byte counting. The 17 copies of the ViewOf -> Snapshot -> release boilerplate (in three subtly different shapes) collapsed into withSnapshot/withFile helpers; getFileContext (the one manual-release variant) is gone. Dead code deleted: Snapshot.Initialize no-op, Snapshot.ctx, the ResolveIncludeWithText alias, lsputils.GetIncludePath/IncludeURI/ IncludeURIWithPaths, and the whole lsputils package - its survivors moved home: Include.PathText() is a syntax method, and includeNameOf/parseIdent live in source. The workspace walk starts at the end of initialize instead of the Initialized notification: notifications are fire-and-forget, so a client that dropped it never indexed the workspace until the first edit. initialize is a request, the walk is already async, and the once-guard is unchanged.


Author karitham Date Commit c3da8e56 Parent 6205e0e4 Change ID okxttxss
+10471 -10714
117 changed files