See what we can provide for LSP #3
Closed
opened 2026-07-25 09:11:46 +00:00 by warkanum
·
1 comment
No Branch/Tag Specified
Labels
Clear labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
Breaking change that won't be backward compatible
Something is not working
Documentation changes
Improve existing functionality
New functionality
This is security issue
Issue or pull request related to testing
Priority
Critical
1
The priority is critical
Priority
High
2
The priority is high
Priority
Medium
3
The priority is medium
Priority
Low
4
The priority is low
Reviewed
Confirmed
1
Issue has been confirmed
Reviewed
Duplicate
2
This issue or pull request already exists
Reviewed
Invalid
3
Invalid issue
Reviewed
Won't Fix
3
This issue won't be fixed
Status
Blocked
1
Something is blocking this issue or pull request
Status
Need More Info
2
Feedback is required to reproduce issue or to continue work
Status
Abandoned
3
Somebody has started to work on this but abandoned work
No labels
Milestone
No items
No Milestone
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: wdevs/PgTidy#3
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
https://microsoft.github.io/language-server-protocol/
LSP research for issue #3
Findings on what PgTidy's LSP (
pkg/lsp,cmd/pgtidy/lsp.go) actually provides today.The V3 milestone is already implemented and shipping (per
docs/todo.md), so this is a capability inventory + gap analysis, verified by a framed JSON-RPC 2.0 smoke test over stdio against the built binary.Advertised capabilities (
initialize):textDocumentSync = 1(full sync)documentFormattingProvider = truedocumentRangeFormattingProvider = truecodeActionProvider = trueVerified at runtime:
initializereturns that block;didOpenonselect * from t;publishes aCOR001hint;textDocument/formattingreturns a real edit (SELECT *\nFROM t;\n);hovercorrectly returns-32601 method not found.Gaps (most useful first):
hover(returns -32601) — return the rule explanation for the hovered diagnostic, or a keyword/type glossary.documentSymbol— outline ofCREATE FUNCTION/PROCEDUREsignatures (low cost, reuses the existing CST header parse).Rangeis a 1-char caret, not the actual offending span.willSaveWaitUntil/didSave— format-on-save currently relies on client binding.initializationOptions/ workspace config; nocompletion/rename/foldingRange.Recommended smallest-delta next steps: (1) real diagnostic highlight range, (2)
hover, (3)documentSymbol, (4)willSaveWaitUntil. All reuse the sharedpkg/diagnostics+pkg/lintcore — no new wire types or deps.Verification:
go build ./...OK.pkg/lspunit tests pass forinitialize(formatting/range-formatting tests time out on this box due to slow WASM go-pgquery first-init — pre-existing onmain, not code-related). Framed JSON-RPC e2e confirmed capabilities, a COR001 diagnostic, and a formatting edit.Artifacts:
issue-3-lsp-research1be745b(docs only)docs/lsp-status.md