Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement LSP Example VSCode Client Extension #28

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

hankhsu1996
Copy link
Owner

Overview

This PR introduces a basic "Hello World" example of a VSCode client extension that interfaces with an existing LSP server. The LSP server handles essential LSP methods, including initialize and textDocument/completion.

Changes

  • Client Implementation:
    • Implemented extension.ts to set up the VSCode client using vscode-languageclient.
    • Configured the client to use TransportKind.pipe for communication with the LSP server.
    • Added an output channel to monitor LSP and JSON-RPC messages for debugging and visibility.

Functionality

  • Typing "hello " in a plaintext file triggers the LSP server to suggest "world" as a completion.
  • The output channel logs LSP and JSON-RPC messages, allowing observation of client-server interactions.

Purpose

This example demonstrates a simple yet effective integration of a VSCode client with a custom LSP server, providing foundational insight into LSP functionality and client-server communication.

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.

1 participant