패키지, 저장소 및 앱 카테고리 검색

GitHub 저장소felangel/lsp_server_ce

lsp_server_ce

언어 서버 프로토콜의 다트 구현체입니다.

lsp_server_ce 프로젝트 이미지
스타
9
포크
0
최근 푸시(UTC)
2025. 8. 19.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

LSP Server

This is a dart implementation of the Language Server Protocol and comes with all serializable objects defined in the specification (v3.17).

The interface also contains the event methods for Document synchronization as well as the Language Features.

Features

  • Life cycle methods

  • Language features

  • Generic registration of listeners for events and methods.

  • Generic methods to send events and requests

Getting started

To get a better understanding of how this work it can be useful to look at the official documentation and the similar implementations in node.

Full LSP spec definition.

LSP Guide for vscode.

LSP Example for vscode.

Usage

You can use any stream you want, stdio is commonly used and is easy to set up.

void main() async {
  // Create a connection that can read and write data to the LSP client.
  // Supply a readable and writable stream. In this case we are using stdio.
  // But you could use a socket connection or any other stream.
  var connection = Connection(stdin, stdout);

  // Register a listener for when the client initialzes the server.
  // You are suppose to respond with the capabilities of the server.
  // Some capabilities must be enabled by the client, you can see what the client
  // supports by inspecting the ClientCapabilities object, inside InitializeParams.
  connection.onInitialize((params) async {
    return InitializeResult(
      capabilities: ServerCapabilities(
        // In this example we are using the Full sync mode. This means the
        // entire document is sent in each change notification.
        textDocumentSync: const Either2.t1(TextDocumentSyncKind.Full),
      ),
    );
  });
}

Additional information

Who should use this? If you want to build a plugin for an editor that supports the LSP format, and you want to build the server in Dart, then this is the package for you. With this package you can implement features such as "linting", "go to reference", giving contextual information and more.

Todo

Implement the missing features from the protocol:

  • workspaces
  • window
  • notebook
  • client (dynamic capabilities)
  • trace
Felix Angelov GitHub avatar
GitHub 작성자

Felix Angelov ↗

software engineer by day, software engineer by night.

언어Dart

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 10 개

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗