Skip to content

feat(lsp): add completion method to LSPManager#16

Merged
amondnet merged 3 commits into
mainfrom
15-add-completion-method-to-lspmanager
Dec 18, 2025
Merged

feat(lsp): add completion method to LSPManager#16
amondnet merged 3 commits into
mainfrom
15-add-completion-method-to-lspmanager

Conversation

@amondnet

Copy link
Copy Markdown
Contributor

Summary

Add code completion support to LSPManager with full LSP 3.17 specification compliance. This enables AI-assisted code editors to provide real-time completion suggestions to users.

Changes

New Methods

  • completion() - Get code completion suggestions at a given position in the file
    • Takes file path, line, and character position
    • Returns normalized CompletionItem[] array
    • Handles multiple language server clients

New Types

  • CompletionItemKind enum - Standard completion item type classifications (Method, Function, Class, etc.)
  • CompletionItem - Individual completion suggestion with label, kind, detail, and documentation
  • CompletionList - Collection of completion items with incomplete flag

Implementation Details

Test Plan

  • Verify completion method is exported from @pleaseai/code-lsp
  • Test completion with TypeScript language server
  • Verify both CompletionList and CompletionItem[] responses are handled
  • Test error handling when no clients available
  • Verify type guards work correctly at runtime

Related Issues

Closes #15

@amondnet amondnet linked an issue Dec 18, 2025 that may be closed by this pull request
9 tasks
Add code completion support with textDocument/completion:
- completion(): Get code completion suggestions at a position
- CompletionItemKind enum for completion item types
- CompletionItem and CompletionList types

Follows LSP 3.17 specification with support for:
- CompletionList and CompletionItem[] response formats
- Type guards for runtime checking

Closes #15
- Add Vue and Dart servers to supported servers list
- Document new methods: definition, references, completion
- Add LSPManager methods reference table
- Create comprehensive README with API reference
- Add additional allowed bash commands to Claude settings
- Add .claude/settings.local.json to gitignore
- Fix import ordering in README.md (auto-formatted)
@amondnet
amondnet force-pushed the 15-add-completion-method-to-lspmanager branch from 53b0b16 to 84165ca Compare December 18, 2025 05:51
@amondnet
amondnet merged commit f9423ec into main Dec 18, 2025
3 checks passed
@passionfactory-bot passionfactory-bot Bot mentioned this pull request Dec 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add completion method to LSPManager

1 participant