From a08bc230519957706f5b74a3e93ae2895f8fc29f Mon Sep 17 00:00:00 2001 From: Goulven Clec'h Date: Sat, 21 Dec 2024 20:44:27 +0100 Subject: [PATCH] fix review --- README.md | 10 +++++----- crates/csslsrs/README.md | 4 ++-- crates/csslsrs/src/service.rs | 2 +- crates/weblsp/README.md | 6 ++---- crates/weblsp/src/css.rs | 4 ++-- crates/weblsp/src/notifications.rs | 2 +- justfile | 2 +- packages/csslsrs/README.md | 6 ++---- packages/vscode/README.md | 20 +------------------- packages/vscode/package.json | 2 +- packages/vscode/src/extension.ts | 2 +- 11 files changed, 19 insertions(+), 41 deletions(-) diff --git a/README.md b/README.md index 52dd526..946c271 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ WEBlsp logo -A Language Server for the Web. +A language server for the Web. -(Work In Progress) ~~It provides full-featured language support for HTML and CSS, including code completion, diagnostics, hover, and more.~~ Compliant with the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), WEBlsp is designed to work with any IDE that supports LSP. Build on top of ~~HTMLlsrs~~ and [CSSlsrs](https://github.com/web-lsp/weblsp/tree/main/crates/csslsrs), our own modern, fast, and reliable Language Services. +WEBlsp is an implementation of the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) (Work In Progress) ~~providing full-featured language support for HTML and CSS, including code completion, diagnostics, hover, and more.~~ It uses ~~HTMLlsrs~~ and [CSSlsrs](https://github.com/web-lsp/weblsp/tree/main/crates/csslsrs), our own modern and fast language services, designed to be integrated into language servers written in Rust or via WebAssembly. ## Quick Links @@ -44,8 +44,8 @@ WEBlsp is a monorepo that contains the following crates (Rust packages): | Name | Description | Crates.io | README | | --------- | ------------------------ | --------- | --------------------------------------- | -| `weblsp` | The main Language Server | WIP | [README.md](./crates/weblsp/README.md) | -| `csslsrs` | CSS Language Service | WIP | [README.md](./crates/csslsrs/README.md) | +| `weblsp` | The main language server | WIP | [README.md](./crates/weblsp/README.md) | +| `csslsrs` | CSS language service | WIP | [README.md](./crates/csslsrs/README.md) | ### Packages @@ -54,7 +54,7 @@ Additionally, WEBlsp contains the following NPM packages (JavaScript packages): | Name | Description | NPM | README | | --------------------- | ------------------------------------------ | --- | ----------------------------------------------------- | | `vscode` | WEBlsp VSCode extension | WIP | [README.md](./packages/vscode/README.md) | -| `csslsrs` | WASM CSS Language Service | WIP | [README.md](./packages/csslsrs/README.md) | +| `csslsrs` | CSSlsrs API for JS/TS | WIP | [README.md](./packages/csslsrs/README.md) | | `benchmark-wasm` | Benchmark WASM packages | WIP | [README.md](./packages/benchmark-wasm/README.md) | | `ls-tests-benchmarks` | End-to-end tests and benchmarks for WEBlsp | WIP | [README.md](./packages/ls-tests-benchmarks/README.md) | diff --git a/crates/csslsrs/README.md b/crates/csslsrs/README.md index 185f2d6..bd30ec4 100644 --- a/crates/csslsrs/README.md +++ b/crates/csslsrs/README.md @@ -3,9 +3,9 @@ WEBlsp logo -A Language Service for CSS. +A language service for CSS. -(Work In Progress) ~~It provides full-featured language support for HTML and CSS, including code completion, diagnostics, hover, and more.~~ Compliant with the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), CSSlsrs can be integrated into Language Servers written in Rust or JavaScript/TypeScript (via WebAssembly). Thanks to [Biome](https://biomejs.dev/)'s parser, we deliver a fast and efficient language service, designed to improve your productivity when working with CSS. +(Work In Progress) ~~It provides full-featured language support, including code completion, diagnostics, hover, and more.~~ Compliant with the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), CSSlsrs can be integrated into language servers written in Rust or via WebAssembly. We use [Biome](https://biomejs.dev/)'s CSS parser behind the scenes. ## Quick Links diff --git a/crates/csslsrs/src/service.rs b/crates/csslsrs/src/service.rs index 527cb0b..0b9cfc4 100644 --- a/crates/csslsrs/src/service.rs +++ b/crates/csslsrs/src/service.rs @@ -7,7 +7,7 @@ use crate::{ use lsp_types::{TextDocumentItem, Uri}; use serde::{Deserialize, Serialize}; -/// The Language Service is the main entry point for interacting with CSSlsrs. +/// The language service is the main entry point for interacting with CSSlsrs. /// It contains a DocumentStore, a PositionEncoding and a reference to the CSS data. pub struct LanguageService { pub(crate) store: DocumentStore, diff --git a/crates/weblsp/README.md b/crates/weblsp/README.md index cacf2dc..bbd6fca 100644 --- a/crates/weblsp/README.md +++ b/crates/weblsp/README.md @@ -3,11 +3,9 @@ WEBlsp logo -A Language Server for the Web. +A language server for the Web. -(Work In Progress) ~~It provides full-featured language support for HTML and CSS, including code completion, diagnostics, hover, and more.~~ Compliant with the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), WEBlsp is designed to work with any IDE that supports LSP. - -This crate contains the Language Server implementation in Rust. WEBlsp receives requests from the client, and dispatches them to the appropriate language service (e.g., [CSSlsrs](https://github.com/web-lsp/weblsp/tree/main/crates/csslsrs)), before sending the response back to the client. +WEBlsp is an implementation of the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), using ~~HTMLlsrs~~ and [CSSlsrs](https://github.com/web-lsp/weblsp/tree/main/crates/csslsrs) behind the scenes. (Work In Progress) ~~It provides full-featured language support for HTML and CSS, including code completion, diagnostics, hover, and more.~~ ## Quick Links diff --git a/crates/weblsp/src/css.rs b/crates/weblsp/src/css.rs index a8a4c05..bf2b092 100644 --- a/crates/weblsp/src/css.rs +++ b/crates/weblsp/src/css.rs @@ -8,14 +8,14 @@ use std::error::Error; use crate::requests::cast; -/// Initialize our CSS Language Service (CSSlsrs). +/// Initialize our CSS language service (CSSlsrs). /// Used once at the start of the main loop, so the document store stays alive throughout the server's lifetime. pub fn init_language_service() -> LanguageService { LanguageService::default() } /// Handle WEBlsp's CSS requests. This function will be called by the main loop when a CSS request is received, -/// and will dispatch the request to our CSS Language Service (CSSlsrs). +/// and will dispatch the request to our CSS language service (CSSlsrs). pub fn handle_request( language_service: &mut LanguageService, connection: &Connection, diff --git a/crates/weblsp/src/notifications.rs b/crates/weblsp/src/notifications.rs index 721ad6a..5785e47 100644 --- a/crates/weblsp/src/notifications.rs +++ b/crates/weblsp/src/notifications.rs @@ -17,7 +17,7 @@ pub fn handle_notification( } "textDocument/didOpen" => { // didOpen notification carry a textDocument item, which contains the document's URI and languageId. - // We can use this information to determine in which Language Service's store we should add the document. + // We can use this information to determine in which language service's store we should add the document. let params: DidOpenTextDocumentParams = serde_json::from_value(notification.params).unwrap(); match params.text_document.language_id.as_str() { diff --git a/justfile b/justfile index d439369..87a4a9d 100644 --- a/justfile +++ b/justfile @@ -33,5 +33,5 @@ benchmark: cargo bench echo "Running WASM benchmarks..." pnpm -C ./packages/benchmark-wasm run benchmark --run - echo "Running Language Server benchmarks..." + echo "Running language server benchmarks..." pnpm -C ./packages/ls-tests-benchmarks run benchmark --run diff --git a/packages/csslsrs/README.md b/packages/csslsrs/README.md index 4f4f10d..de4bf12 100644 --- a/packages/csslsrs/README.md +++ b/packages/csslsrs/README.md @@ -3,11 +3,9 @@ WEBlsp logo -A Language Service for CSS. +A language service for CSS. -(Work In Progress) ~~It provides full-featured language support for HTML and CSS, including code completion, diagnostics, hover, and more.~~ Compliant with the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), CSSlsrs can be integrated into Language Servers written in Rust or JavaScript/TypeScript (via WebAssembly). Thanks to [Biome](https://biomejs.dev/)'s parser, we deliver a fast and efficient language service, designed to improve your productivity when working with CSS. - -This package contains the WASM implementation of [CSSlsrs](https://github.com/web-lsp/weblsp/tree/main/crates/csslsrs) for JavaScript/TypeScript Language Servers. +(Work In Progress) ~~It provides full-featured language support for HTML and CSS, including code completion, diagnostics, hover, and more.~~ Compliant with the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/), this package contains JavaScript/TypeScript API for [CSSlsrs](https://github.com/web-lsp/weblsp/tree/main/crates/csslsrs) WASM exports. ## Quick Links diff --git a/packages/vscode/README.md b/packages/vscode/README.md index 95a6ee2..b4ac418 100644 --- a/packages/vscode/README.md +++ b/packages/vscode/README.md @@ -3,24 +3,6 @@ WEBlsp logo -A Language Server for the Web, now in VSCode. +A language server for the Web, now in VSCode. (Work In Progress) ~~It provides full-featured language support for HTML and CSS, including code completion, diagnostics, hover, and more.~~ - -## Quick Links - -📖 [Main repository](https://github.com/web-lsp/weblsp/), with all related crates and packages. - -🐛 [Report a bug](https://github.com/web-lsp/weblsp/issues), please read our [contributing guidelines](https://github.com/web-lsp/weblsp/blob/main/CONTRIBUTING.md) and [code of conduct](https://github.com/web-lsp/weblsp/blob/main/CODE_OF_CONDUCT.md) first. - -🚨 [Report a security vulnerability](https://github.com/web-lsp/weblsp/security/advisories/new), and be sure to review our [security policy](https://github.com/web-lsp/weblsp/blob/main/SECURITY.md). - -💬 [Join the discussion](https://github.com/web-lsp/weblsp/discussions), if you have any questions, ideas, or suggestions. - -## Installation - -WIP. - -## Configuration - -WIP. diff --git a/packages/vscode/package.json b/packages/vscode/package.json index 36f0785..ffc2da0 100644 --- a/packages/vscode/package.json +++ b/packages/vscode/package.json @@ -2,7 +2,7 @@ "name": "@weblsp/vscode", "displayName": "WEBlsp", "version": "1.0.0", - "description": "A Language Server for the Web — WORK IN PROGRESS ⚠️", + "description": "A language server for the Web — WORK IN PROGRESS ⚠️", "repository": { "type": "git", "url": "https://github.com/web-lsp/weblsp" diff --git a/packages/vscode/src/extension.ts b/packages/vscode/src/extension.ts index ab36551..1aa115d 100644 --- a/packages/vscode/src/extension.ts +++ b/packages/vscode/src/extension.ts @@ -24,7 +24,7 @@ export async function activate(context: vscode.ExtensionContext) { client = new lsp.LanguageClient( "weblsp", - "WEBlsp Language Server", + "WEBlsp language server", serverOptions, clientOptions );